Files
msd-core/tests/workflow-size-baseline.json
Tom Boucher 455ad49ae3 feat(#2296): config-gated provider escalation on quota-exceeded (#2458)
* test(#2296): failing-first coverage for provider escalation on quota-exceeded

Covers the provider-escalation ladder layered onto EXEC.CLASSIFY: back-compat
(no escalation block without --failure-class), cap boundaries at
min(max_escalations, list length) at limit-1/limit/limit+1, opt-in gating,
malformed/hostile provider_escalation config, the --failure-class CLI negative
matrix, config-key registration, and a fast-check budget-limit property.

Red until the resolver, CLI flag, and manifest key land.

Refs #2296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(#2296): config-gated provider escalation on quota-exceeded

The dynamic_routing tier ladder escalates within one provider, which does not
help when that provider is what ran out of quota. Add an opt-in provider ladder
layered on the existing EXEC.CLASSIFY seam.

- model-resolver: resolveProviderEscalation walks dynamic_routing.provider_escalation
  capped at min(max_escalations, list length), reporting from/to/attempted/exhausted.
  Invalid entries are dropped (ADR 227 shape validation). Stays a leaf module —
  the quota-class policy decision is the caller's, per the CONTEXT.md contract.
- agent-command-router: export a frozen AGENT_FAILURE_CLASSES so the new CLI
  validator cannot drift from the classifier that produces the values.
- resolve-execution: --failure-class flag; emits an escalation block ONLY when
  passed, so the existing JSON contract is byte-identical for every caller.
- config-schema.manifest: register dynamic_routing.provider_escalation.
- execute-phase step 7.1: auto-escalate, honor Retry-After, fail loudly naming
  every model tried once the ladder is spent.

Refs #2296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(#2296): extract quota recovery to a reference fragment; regen goldens

The step 7.1a addition pushed gsd-core/workflows/execute-phase.md from 93390 to
95111 LF bytes, past the frozen ADR-857 Phase 6 ceiling (hard <93600, margin
<=93400) asserted by tests/fix-2285-claude-orchestration-wiring.test.cjs. The
base sat 10 bytes under the margin, so no inline wording would have fit.

That gate's own rationale is that optional-feature detail belongs in a fragment,
not the host loop. Moved BOTH the new provider-escalation branch and the
pre-existing manual recovery prompt into
gsd-core/references/execute-phase-quota-recovery.md, leaving step 7.1 as a
one-line pointer. execute-phase.md is now 92880 bytes — 510 SMALLER than base.

Also regenerates the fixtures that legitimately moved because three shipped
files changed (gsd-tools.cjs, config-schema.manifest.json, execute-phase.md):
golden-install-parity + install-tree for all 16 runtimes, INVENTORY.md +
INVENTORY-MANIFEST.json for the new reference, and the workflow size baseline.

Refs #2296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test(#2351): make the C1 orphan-reaping test load-independent

tests/run-with-timeout.test.cjs C1 asserted the child heartbeat file exists
after a 1s group-kill window, but the child only wrote it on the first 100ms
setInterval tick. Nothing synchronized the two: on a loaded container the group
is SIGKILLed before that tick lands, the file never appears, and the assertion
fails for a reason unrelated to reaping. Observed failing on both linux-node22
and linux-node24.

The behavior actually under test is the FREEZE assertion (heartbeat stops
advancing => descendant was reaped, not orphaned). That is unaffected by
sampling once more at t=0.

Child now writes its first heartbeat synchronously at startup before arming the
interval, and the kill window widens 1s -> 3s to cover child boot under load.
Both remove the timing dependency; neither weakens what the test proves.

Refs #2296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(#2296): backfill pr:2458 in .changeset/rapid-jays-bark.md

* chore(#2296): regenerate fixtures after rebase onto #2402

The rebase conflicted on the generated golden-install-parity fixtures and
workflow-size-baseline.json because #2402 (b6e6a22fc) regenerated the same
artifacts. Conflict resolution picked a side to unblock the rebase; a true
regeneration on the combined tree then produced further drift, confirming the
resolved content was stale and would have dropped #2402's fixture changes.

Regenerated goldens, install-tree, size baseline, and INVENTORY-MANIFEST from
the merged tree. docs/INVENTORY.md keeps BOTH new reference rows.

execute-phase.md is 92782 LF bytes with both #2402's and this PR's extractions
applied — under the frozen ceiling (hard <93600, margin <=93400).

Refs #2296

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 14:59:30 -04:00

94 lines
2.4 KiB
JSON

{
"add-backlog.md": 7176,
"add-phase.md": 7578,
"add-tests.md": 17247,
"add-todo.md": 11020,
"ai-integration-phase.md": 15420,
"analyze-dependencies.md": 3887,
"audit-fix.md": 11743,
"audit-milestone.md": 18448,
"audit-uat.md": 7469,
"autonomous.md": 42474,
"check-todos.md": 9761,
"cleanup.md": 10319,
"code-review-fix.md": 24320,
"code-review.md": 32524,
"complete-milestone.md": 31436,
"debug.md": 19667,
"diagnose-issues.md": 12858,
"discovery-phase.md": 13543,
"discuss-phase-assumptions.md": 27667,
"discuss-phase-power.md": 11273,
"discuss-phase.md": 31986,
"do.md": 10731,
"docs-update.md": 55908,
"edit-phase.md": 12927,
"eval-review.md": 10332,
"execute-phase.md": 92782,
"execute-plan.md": 34548,
"explore.md": 10541,
"extract-learnings.md": 12893,
"fast.md": 7613,
"forensics.md": 12531,
"graduation.md": 11987,
"health.md": 12246,
"help.md": 1722,
"import.md": 15014,
"inbox.md": 19299,
"ingest-docs.md": 19235,
"insert-phase.md": 8987,
"list-phase-assumptions.md": 4305,
"list-seeds.md": 6987,
"list-workspaces.md": 5699,
"manager.md": 27751,
"map-codebase.md": 20817,
"milestone-summary.md": 11842,
"mvp-phase.md": 13991,
"new-milestone.md": 38081,
"new-project.md": 66470,
"new-workspace.md": 11584,
"next.md": 20138,
"node-repair.md": 4173,
"note.md": 6563,
"onboard.md": 8877,
"pause-work.md": 14441,
"plan-milestone-gaps.md": 11809,
"plan-phase.md": 94470,
"plan-review-convergence.md": 26285,
"plant-seed.md": 12150,
"pr-branch.md": 15963,
"profile-user.md": 21624,
"progress.md": 32632,
"quick.md": 51392,
"reapply-patches.md": 20312,
"remove-phase.md": 8513,
"remove-workspace.md": 7916,
"resume-project.md": 17270,
"review.md": 50497,
"scan.md": 7728,
"secure-phase.md": 13987,
"session-report.md": 4044,
"settings-advanced.md": 40019,
"settings-integrations.md": 16257,
"settings.md": 33832,
"ship.md": 28310,
"sketch-wrap-up.md": 14267,
"sketch.md": 20369,
"smart-entry.md": 11489,
"spec-phase.md": 31987,
"spike-wrap-up.md": 15136,
"spike.md": 24939,
"stats.md": 6762,
"sync-skills.md": 6125,
"thread.md": 12508,
"transition.md": 22070,
"ui-phase.md": 26340,
"ui-review.md": 11581,
"ultraplan-phase.md": 10512,
"undo.md": 15323,
"update.md": 21178,
"validate-phase.md": 11214,
"verify-phase.md": 40949,
"verify-work.md": 40733
}