mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-18 19:02:18 +02:00
fix(ship): foreground-flag + deadline + scope guard on all four dispatch sites (#497/#2440 class, 3rd recurrence)
Steps 7/8/10/18 dispatch subagents whose LAST-line JSON the parent
consumes, but none passed run_in_background: false — since Claude Code
v2.1.198 subagents background by default, so /ship stranded at Step 18
waiting on output that never arrives. Every site now renders the shared
{{FOREGROUND_DISPATCH_NOTE}} resolver constant, carries a ~10-minute
deadline with an explicit recovery branch (stop the runaway task,
reconcile against pre-dispatch HEAD, surface stray state, never
re-dispatch), and Step 18's prompt gains a docs-sync-only scope guard
(no VERSION changes, no base-branch merges, push-rejection reported as
pushed:false with parent-side reconciliation and a second-failure
branch). Greptile failures now record as UNAVAILABLE, not zero comments.
GENERATED_WITH_GUIDANCE pins all five ship dispatch carriers; a new test
pins the deadline recovery + scope guard phrases in pr-body (.md and
.tmpl). Codex/factory ship goldens re-rendered.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e76f65a8da
commit
95b502bd3a
@@ -21,7 +21,21 @@ const ROOT = path.resolve(import.meta.dir, '..');
|
||||
// (Step 4.5 moved out of the skeleton), so the pin follows it there. Same for
|
||||
// autoplan: the dual-voice dispatch (Phase 1 override rules) lives in its
|
||||
// carved CEO-phase section.
|
||||
const GENERATED_WITH_GUIDANCE = ['review/sections/review-army.md', 'autoplan/sections/ceo-phase.md'];
|
||||
//
|
||||
// Third recurrence (#497 → #2440 → /ship Step 18): the four ship dispatch
|
||||
// sections (Steps 7/8/10/18) never carried the flag and were never pinned, so
|
||||
// a backgrounded doc-sync dispatch stranded the ship run waiting on LAST-line
|
||||
// JSON that never came. Every synchronous dispatch carrier is pinned here now;
|
||||
// add new dispatch sites to this list in the same commit that creates them.
|
||||
const GENERATED_WITH_GUIDANCE = [
|
||||
'review/sections/review-army.md',
|
||||
'autoplan/sections/ceo-phase.md',
|
||||
'ship/sections/review-army.md',
|
||||
'ship/sections/pr-body.md',
|
||||
'ship/sections/test-coverage.md',
|
||||
'ship/sections/plan-completion.md',
|
||||
'ship/sections/greptile.md',
|
||||
];
|
||||
|
||||
// The inverted, post-2.1.198-inert phrasings. Checked across every generated
|
||||
// SKILL.md so the regression can't migrate to another skill unnoticed.
|
||||
@@ -55,6 +69,19 @@ describe('run_in_background guidance (#2440)', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Third recurrence (#497 → #2440 → /ship Step 18): a backgrounded doc-sync
|
||||
// dispatch stranded the ship run. Pin the deadline/recovery branch and the
|
||||
// docs-sync scope guard in both the generated section and its template, so
|
||||
// neither a template edit nor a stale regen can drop them silently.
|
||||
const PR_BODY_SITES = ['ship/sections/pr-body.md', 'ship/sections/pr-body.md.tmpl'];
|
||||
test('ship pr-body carries the doc-sync deadline recovery + scope guard', () => {
|
||||
for (const rel of PR_BODY_SITES) {
|
||||
const content = fs.readFileSync(path.join(ROOT, rel), 'utf-8');
|
||||
expect(content).toContain('document-release did not complete');
|
||||
expect(content).toContain('Scope guard — docs sync ONLY');
|
||||
}
|
||||
});
|
||||
|
||||
test('the inverted "do NOT use run_in_background" phrasing never comes back', () => {
|
||||
for (const file of allGeneratedSkillFiles()) {
|
||||
const content = fs.readFileSync(file, 'utf-8');
|
||||
|
||||
Reference in New Issue
Block a user