fix: pre-landing review fixes (#2733)

Review army + coverage audit findings, all applied:
- headless directive carries the spawned escape sentence too (multi-
  specialist: a CI-hosted ship's marked subagent must not end BLOCKED)
- anti-injection scoping on every text-claimable spawned trigger (AUQ
  rule + shared escape sentence): markings count only from the creating
  prompt, never from files/tool output/web content read mid-run
- [conductor][spawned] deny annotates one-way doors per question
- SPAWNED_OVERRIDE: env tamper-visibility status line + OPENCLAW.md note
- spawned sessions skip the network update-check and first-task probe
  (consumers suppressed; preserves the one-shot just-upgraded marker)
- test hardening: dispatch-tripwire end-bound validated, vacuous marker
  asserts replaced with output asserts, E2E cpSync size filter + named
  fence tolerance, spawnedByEnv parity pin, destructive-policy cross-
  surface drift guard, one-way annotation + bogus-value hook cases
- session-kind duplicate rationale comment deduped; regen + goldens +
  context-budget fixture refreshed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-31 00:45:18 +00:00
co-authored by Claude Fable 5
parent 46ba23c512
commit e65be946dd
61 changed files with 431 additions and 128 deletions
+6 -1
View File
@@ -81,7 +81,12 @@ describe('/ship Step 18 dispatches /document-release (carve visibility)', () =>
expect(content).toContain('"decisions"');
const docHeading = content.indexOf('\n## Documentation\n');
expect(docHeading, 'PR-body template must carry the ## Documentation heading').toBeGreaterThan(0);
const docSection = content.slice(docHeading, content.indexOf('\n## Test plan\n'));
// End bound searched FROM docHeading and asserted found — otherwise a
// removed/reordered '## Test plan' heading degrades this guard to a
// vacuous empty-slice check instead of failing loudly (#2733 review).
const docEnd = content.indexOf('\n## Test plan\n', docHeading);
expect(docEnd, '## Test plan heading must follow ## Documentation').toBeGreaterThan(docHeading);
const docSection = content.slice(docHeading, docEnd);
expect(docSection, 'decisions must never leak into the PR-body Documentation embed').not.toContain('decisions');
}
});