Park-capable workflow steps run without the standby Claude token — one refusal here parks the whole host #879
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#879
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Several workflow steps that can reach
claude_limit_parkrun with theprimary Claude token alone. They must also carry the standby token in their
own
env:block, besideCLAUDE_CODE_OAUTH_TOKEN:A sibling step's token does not count — inheritance is per step (a job- or
workflow-level
env:does count, since steps inherit it).Steps to fix
.forgejo/workflows/ci.yml→ Investigate failure (healer) stepWhy it matters
Without the standby token in scope,
claude_standby_availablesees an unsetvariable,
claude_failoverdeclines, andclaude_limit_parkstamps thehost-global marker
/tmp/matou-swarm-claude-limit(host-global by design,dev-factory #238 — one subscription window per host, shared by every repo).
So one under-provisioned caller in this repo parks every factory caller on
that host for the rest of the window — including repos that were riding a
perfectly healthy standby account. That is the 2026-08-25 triage outage, and
it recurred on 2026-08-26: both swarm hosts sat parked while account B was
available, because triage kept refusing on the exhausted account A and
re-stamping the shared marker.
Verification
dev-factory
@02ff038makes this property vendored code(
park-wiring-lib.sh, dev-factory #85 / GOTCHAS 30). Once this repo pins ator past that commit:
preflight-swarm.shfails closed before a worker spawns while anypark-capable step is unwired, naming the file and step, and
check-harness-drift.shreports it as an advisory at the moment of thepin bump.
Fix the wiring in the same change as the bump, or the first swarm tick after
the bump will refuse to start — which is the intended behaviour, not a bug.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
ready-for-session(+priority). Notready-for-agent, notready-for-human.Why not
ready-for-agent: the fix edits.forgejo/workflows/ci.yml, and.forgejo/is a fingerprinted protected path for swarm workers (PP_PROTECTED_DIRS_DEFAULT=".sandcastle .forgejo",.sandcastle/protected-paths-lib.sh). A worker's edit there is rolled back after the run (#445), and the protected-path escape message itself directs such work toready-for-session. The change is also coupled to a dev-factory pin bump (.sandcastle/FACTORY_REF, currentlye61aa000) sopark-wiring-lib.shfails closed on the unwired step — harness territory, not backlog.Why not
ready-for-human: no Ben's-hands / Ben's-eyes / one-way-door residue.CLAUDE_CODE_OAUTH_TOKEN_Balready exists as a repo secret (referenced elsewhere in the factory); this only wires the existing secret reference into one step'senv:. Not a new credential, not a posture widening.Why this is a two-way door: revertible by a one-line commit, and provable by existing probes — the filing's own verification says
preflight-swarm.shfails closed (naming file + step) andcheck-harness-drift.shraises an advisory once the pin bump lands. Reversible + provable + off the one-way-door list.priority(additive): an active, recurring, host-global outage — one exhausted-account-A refusal stamps/tmp/matou-swarm-claude-limitand parks every factory caller on the host, incl. repos riding a healthy account B (2026-08-25, again 2026-08-26). Surfacing it ahead of ordinary backlog for the session sweep is warranted; remove by hand once fixed.Verified against the tree:
.forgejo/workflows/ci.yml:34is theInvestigate failure (healer)step; itsenv:(line ~39) carriesCLAUDE_CODE_OAUTH_TOKENbut notCLAUDE_CODE_OAUTH_TOKEN_B. Defect confirmed exactly as filed.Session brief
CLAUDE_CODE_OAUTH_TOKEN_B: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN_B }}to theenv:of theInvestigate failure (healer)step in.forgejo/workflows/ci.yml(~line 39), beside the existing primary token. A job- or workflow-levelenv:would also satisfy inheritance if you prefer to wire it once.claude_limit_parkand lacks the B token in its own scope (inheritance is per step).@02ff038(property vendored viapark-wiring-lib.sh, dev-factory #85 / GOTCHAS 30) sopreflight-swarm.shenforces it. If the current pin is already at/past that, wire-and-verify only.preflight-swarm.shstarts clean after the change;check-harness-drift.shadvisory clears. Wire in the same commit as the bump, or the first tick after refuses to start (intended)..forgejo/path + harness pin bump.Close-report — landed (Ruled by agent under ADR 0174 — veto anytime).
What landed:
.forgejo/workflows/ci.yml→ Investigate failure (healer) step now carries the standby token in its ownenv:block, beside the primary:Why it was the bug (proof): that step runs
bash .sandcastle/heal.sh, which is park-capable —heal.sh:291callsclaude_limit_parkwhen Claude refuses mid-diagnosis. Env inheritance is per-step, so the primary-onlyenv:meantclaude_standby_available(.sandcastle/limit-lib.sh:163,[ -n "${CLAUDE_CODE_OAUTH_TOKEN_B:-}" ]) saw an unset var →claude_failoverdeclined →claude_limit_parkstamped the host-global/tmp/matou-swarm-claude-limitmarker (dev-factory #238), parking every factory caller on the host. That is the 2026-08-25 outage that recurred 2026-08-26.Reference conformance: the fix matches the already-wired sibling steps —
healer.yml:25,triage.yml:41/142,swarm.yml:52/159— all of which carry the standby token per park-capable step.Scope note on the Verification section: the enforced guard (
park-wiring-lib.shinpreflight-swarm.sh/check-harness-drift.sh, dev-factory@02ff038) is not yet vendored here — this repo pinsFACTORY_REF=e61aa000…, which predates02ff038(park-wiring-lib.shis absent and not inFACTORY_MANIFEST). So those guards can't be run against this change today. The wiring fix lands now precisely so that a future pin bump to02ff038+is safe (the ticket's own warning: "Fix the wiring in the same change as the bump, or the first swarm tick after the bump will refuse to start"). The pin bump itself is a separate, larger re-vendor change and is out of scope for this ticket — filing it is left to whoever does the bump; this fix is its precondition. If a follow-up ticket for the pin bump is wanted, that's a clean next step.Proof carried in-repo:
python3 -c "yaml.safe_load(...)", clean)..sandcastle/tests+scripts/tests).STATUS.mdheader logged.Commit:
638ea9a3(pushed tomain;git pull --rebasefirst).Closing.