This repository was archived by the owner on Jul 24, 2026. It is now read-only.
fix(up): a worker crash dings its SUPERVISOR again, not just the CoS (crash-ding regression) - #102
Merged
Merged
Conversation
…(crash-ding regression) 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. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS
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.
Finding (from the evals crash-ding cell)
On a worker crash,
convoy up's crash-ding reaches the CoS/orchestrator but not the crashed worker's supervisor (cd-sup's inbox stays empty). Answer: this is a regression, not a stale expectation — the two-recipient design (CoS and the supervisor) is correct (it's the #48 design; the agent-filesupervisorfield andcrashDingTargets'convoy.spawnerbranch exist for exactly this).Root cause
crashDingTargetscorrectly pages the CoS (convoy.tier=cos) pluscrashed.tags["convoy.spawner"](the supervisor). But the declarative arc broke the wiring that setsconvoy.spawner:agentFileToSpecdroppedsupervisor— the declared supervisor never reached the launch path (the field was documented as "reconcile does not yet build the supervision tree from it").writeAgentFilesstampedconvoy.spawnerfrom the launching process'sST_AGENT— which, in the declarative flow, is theconvoy uphost, not the parent. So a declared worker'sconvoy.spawnerbecame the host (often == the CoS → deduped away), and its real supervisor was never dinged.Fix
supervisoronAgentSpec;af.supervisor → spec.supervisorinagentFileToSpec;convoy.spawner = spec.supervisor ?? process.env.ST_AGENTinwriteAgentFiles— the declared supervisor is authoritative;ST_AGENTstays the fallback for the imperativeconvoy runpath.Tests
+2 regression tests (533 total pass, typecheck clean):
agentFileToSpeccarriessupervisor;writeAgentFilesprefers the declared supervisor over the host'sST_AGENT(and falls back toST_AGENTwhen none is declared).For the eval cell
Keep the two-recipient expectation. Once this lands and the worker is launched fresh (the cell spins a new network each run) with
--supervisor <cd-sup>declared, itspty.tomlgetsconvoy.spawner = cd-sup, so a crash pages bothcd-cosandcd-sup. (Already-running workers keep their old tag until re-rendered.)🤖 Generated with Claude Code
https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS