This repository was archived by the owner on Jul 24, 2026. It is now read-only.
crash-ding: page cos + the crashed worker's spawner, not the whole permanent crew (Nathan-flagged) + double-ding fix - #48
Merged
Conversation
…crew (Nathan-flagged) + fix double-ding The crash-ding paged EVERY --permanent agent on one worker crash — permanence was used as a proxy for "orchestrator," but every repo-owner runs --permanent, so a throwaway worker crash paged the entire standing crew (13 agents; pulled app-apple off task). TARGETING (crashDingTargets): now targets (a) the CoS — always, via a convoy.tier=cos tag (network-wide backstop, no hardcoded id); (b) the crashed agent's ACTUAL supervisor — its convoy.spawner tag (bus id of whoever ran convoy add). NOT the permanent set. notify + no-self-ding preserved. WIRING (writePtyToml/nativeLaunch): stamp convoy.tier=cos (role=chief-of-staff) + convoy.spawner=<ST_AGENT of the add-er> on the HARNESS session (never the ding sidecar). convoy up re-asserts both across a permanent respawn (pty restart strips tags) so the cos backstop survives cos restarting. DOUBLE-DING (found while diagnosing the crashtest test): a worker's DING sidecar fired its own crash-ding alongside the agent (both resolve the same busId) -> 2 dings/crash. Ding sessions are now excluded from crash/flapping dings (still respawned for permanents, silently). One crash = one ding. Preserved: clean exit 0 = silent; nonzero/vanished/null = crash (workerCrashed unchanged). tsc clean, 163 green — incl the acceptance (worker crash pages ONLY cos + its spawner, NOT unrelated permanents like app-apple), the clean-exit-silent negative control, and the writePtyToml tag wiring.
This was referenced Jul 15, 2026
myobie
added a commit
that referenced
this pull request
Jul 21, 2026
…(crash-ding regression) (#102) On a worker crash, `convoy up`'s crash-ding is meant to page BOTH the CoS (the always-on backstop, via convoy.tier=cos) AND the worker's actual supervisor (via its convoy.spawner tag) — the two-recipient design from #48. The declarative arc broke the supervisor half. `agentFileToSpec` DROPPED the agent file's `supervisor` field, so it never reached the launch path; and `writeAgentFiles` stamped convoy.spawner from the LAUNCHING process's ST_AGENT — which, in the declarative flow, is the `convoy up` HOST, not the parent. So a declared worker's convoy.spawner became the host (often == the CoS, then deduped), and its real supervisor was never dinged. Fix: carry `supervisor` on AgentSpec, map af.supervisor → spec.supervisor in agentFileToSpec, and stamp convoy.spawner = spec.supervisor ?? ST_AGENT in writeAgentFiles. The declared supervisor is now authoritative; ST_AGENT stays the fallback for the imperative `convoy run` path (no declared supervisor). Surfaced by the evals crash-ding cell (cd-cos got the notice; cd-sup's inbox stayed empty). +2 regression tests: agentFileToSpec carries supervisor, and writeAgentFiles prefers the declared supervisor over the host's ST_AGENT. Claude-Session: https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crash-ding: page cos + the worker's actual supervisor — not the whole permanent crew
Fixes the Nathan-flagged targeting bug + a double-ding I found diagnosing the
crashtesttest.The bug
crashDingTargetspaged every--permanentagent — permanence was used as a proxy for "orchestrator." But every repo-owner runs--permanent(they're long-lived), so one throwaway worker crash paged the entire standing crew (13 agents) and pulled app-apple off its task.Targeting fix (
crashDingTargets)Now targets:
convoy.tier=costag (no hardcoded id).convoy.spawnertag (the bus id of whoever ranconvoy add).NOT the permanent set.
--notifyextras + no-self-ding preserved.Wiring (
writePtyToml/nativeLaunch)Correct-by-construction:
convoy addstamps, on the harness session only (never the ding sidecar):convoy.tier=coswhenrole=chief-of-staff.convoy.spawner=<ST_AGENT of the spawning shell>— whoever spawned it owns it; null (human-spawned) → cos-only ding.convoy upre-asserts both tags across a permanent respawn (pty restart strips tags), so the cos backstop survives cos restarting.Double-ding fix (bonus, found while diagnosing)
A worker's ding sidecar fired its own crash-ding alongside the agent (both resolve the same busId) → 2 dings per crash. Ding sessions are now excluded from crash/flapping dings (still respawned for permanents, just silently). One crash = one ding.
Design note
Chose the spawner tag (cos's lean) over a role/tier-only signal — it identifies the specific supervisor of this worker (not all supervisors), which is exactly "the crashed worker's actual supervisor."
Verified
workerCrashedunchanged: exit 0 = silent, nonzero/vanished/null = crash); pluswritePtyTomltag wiring (agent gets the tags, ding does not).After merge
Nathan restarts
convoy uponce to activate (the running supervisor holds the old code until then). Existing agents get theirconvoy.spawner/convoy.tiertags on their nextconvoy add/reload; aconvoy reload <cos>(or re-add) stampsconvoy.tier=coson cos. Until an agent is re-materialized it has no spawner tag → its crash falls back to cos-only (safe).