test(e2e): spawned document-release subagent returns the JSON contract through a firing gate (#2733)

The behavioral proof the bug shipped without: ship-docsync stubs the
skill (no preamble, no gates) and skill-e2e-workflow suppresses the
gates by prompt. This gate-tier E2E plays the parent — it drives the
verbatim Step 18 dispatch prompt (extracted from the live pr-body.md,
drift-proof) against a real preamble-bearing document-release slice in
a Conductor-ambient env with both AUQ hooks seeded live, an unbumped
VERSION making Step 8 fire. Asserts: the final line parses as the
5-key JSON contract, the fired gate's auto-choice is recorded in
decisions, and VERSION is untouched (the gate resolved to its
recommended Skip). Burn-in: 1/1 pass, $0.35, 21 turns, 106s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-31 00:18:06 +00:00
co-authored by Claude Fable 5
parent 0c1b50441d
commit 85e4597b48
3 changed files with 305 additions and 0 deletions
+16
View File
@@ -293,6 +293,21 @@ export const E2E_TOUCHFILES: Record<string, string[]> = {
'plan-eng-coverage-audit': ['plan-eng-review/**', 'test/fixtures/coverage-audit-fixture.ts', 'test/skill-e2e-coverage-audit.test.ts'],
'ship-triage': ['ship/**', 'bin/gstack-repo-mode', 'test/skill-e2e-triage.test.ts'],
'ship-docsync': ['ship/**', 'document-release/**', 'scripts/gen-skill-docs.ts', 'scripts/resolvers/sections.ts', 'test/skill-e2e-ship-docsync.test.ts'],
// #2733 behavioral proof: the JSON contract survives a firing gate inside a
// spawned-marked subagent. Deps name every behavior under test — the
// session-kind override, the skill-start gates, both hooks + the shared
// directive, and the AUQ prose rule — so changing any of them selects it.
'docsync-spawned': [
'document-release/**',
'ship/sections/pr-body.md',
'bin/gstack-session-kind',
'bin/gstack-skill-start',
'hosts/claude/hooks/question-preference-hook.ts',
'hosts/claude/hooks/auq-error-fallback-hook.ts',
'hosts/claude/hooks/spawned-directive.ts',
'scripts/resolvers/preamble/generate-ask-user-format.ts',
'test/skill-e2e-docsync-spawned.test.ts',
],
// Plan completion audit + verification
'ship-plan-completion': ['ship/**', 'scripts/gen-skill-docs.ts'],
@@ -702,6 +717,7 @@ export const E2E_TIERS: Record<string, 'gate' | 'periodic'> = {
'ship-coverage-audit': 'gate',
'ship-triage': 'gate',
'ship-docsync': 'gate',
'docsync-spawned': 'gate', // #2733 JSON-contract-through-a-firing-gate proof (deterministic safety)
'ship-plan-completion': 'gate',
'ship-plan-verification': 'gate',