Swamp Triage
Investigate why any swamp model or workflow is failing, without knowing anything about the domain it automates. Every method and workflow run leaves a @swamp/method-summary or @swamp/workflow-summary report behind as versioned model data, written on failure as well as success — so the full history of a target is already on disk with nothing extra instrumented. investigate resolves a target by name at call time, walks that history back to the boundary where it stopped working, and classifies the error into auth / unreachable / timeout / tls / rate_limit / not_found / config, each with a concrete next step. The distinction it exists to make is auth vs unreachable: a remote answering 403 is healthy and rejecting your credential (go to the vault), while a remote that never answers is a network problem (go to the host) — the two read almost identically in a notification and lead opposite ways. Unrecognised errors are reported as unknown verbatim rather than filed under a plausible-looking category. A run that failed without recording any error text is reported as unrecorded, never as none. recent answers the question an alert with no name leaves open -- what just broke? -- by listing every model and workflow that failed within a window -- still failing first, then those that have since recovered, with when -- each with its instance name and model type and classified the same way. Both methods tell the caller's mistakes apart from the fleet's failures: recent flags the investigator's own failed runs (selfInflicted) and a failure fixed by an immediate retry of the same method (quickRetry), reports each target's definition path, and lists scheduled workflows with no recorded run at all (a schedule that never fires leaves no failure anywhere else); investigate reports a target with no runs as never_run -- failing when it is scheduled to run here -- suggests the closest names for one that matches nothing, and separates a rejected call argument (caller_args) from a definition problem (config). A failed workflow step is reported with the error its own run recorded, and an expression that failed to evaluate classifies as config. resolve maps free alert text to the model and workflow names it most likely means -- token overlap with names, types, tags and descriptions, top matches with score -- for an alert that does not name its target. Read-only: every method reads what previous runs recorded and never invokes the failing target.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| repoDir? | string | Repository root to investigate. Defaults to the repo the model runs in. |
| Argument | Type | Description |
|---|---|---|
| target | string | Name of the model or workflow to investigate. |
| kind? | enum | Which definitions to search. 'auto' searches models then workflows. |
| maxVersions? | number | How many recorded runs to walk back through when looking for the |
| placementTag? | string | key=value tag (e.g. runs-on=primary) naming the workflows this |
| Argument | Type | Description |
|---|---|---|
| withinHours? | number | |
| kind? | enum | Which targets to list. 'auto' lists models and workflows. |
| limit? | number | Maximum failures to list; the rest are counted, not dropped. |
| maxVersions? | number | How many earlier runs to read per recovered target when looking |
| placementTag? | string | key=value tag (e.g. runs-on=primary) naming the workflows this |
| Argument | Type | Description |
|---|---|---|
| text | string | Free alert text, e.g. a notification title or a step name. |
| kind? | enum | Which definitions to search. 'auto' searches both. |
| limit? | number | Most matches to return. |
Resources
Investigate why any model or workflow in this repo is failing, and raise the finding through Apprise. Domain-agnostic: the target is named at run time, so this is the same workflow whether the thing that broke talks to a network controller, a DNS server, or an object store. swamp workflow run @sntxrr/investigate-apprise --input target=<name> Requires @sntxrr/apprise-notify and a model instance of it named `apprise`: swamp extension pull @sntxrr/apprise-notify swamp model create @sntxrr/
Investigate why any model or workflow in this repo is failing, and post the finding straight to ntfy. Domain-agnostic: the target is named at run time, so this is the same workflow whether the thing that broke talks to a network controller, a DNS server, or an object store. swamp workflow run @sntxrr/investigate-ntfy --input target=<name> Requires @mgreten/ntfy-notify and a model instance of it named `ntfy`: swamp extension pull @mgreten/ntfy-notify swamp model create @mgreten/ntfy-noti
Declare SPDX license (MIT) in manifest.
recent reports each failure's model type as targetType ("workflow" for workflows), so a run-history line or alert that names only a type maps to the failing instance without a catalog search.
Add recent: list every model and workflow whose latest run failed within a window, newest first, classified like investigate — for alerts that name no target. Reserve current and recent as instance names so investigating a target with either name cannot overwrite the stable handle.
Modified 1 behaviors
Added 2 workflows
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned