fix(resume-work): detect non-phase continue-here checkpoints (#3451)
* fix(resume-work): detect non-phase continue-here checkpoints * docs(inbox): align changelog check with changeset policy * fix(resume-work): include sketch subdirectory checkpoints
This commit is contained in:
4
.changeset/bug-3446-resume-continue-here-discovery.md
Normal file
4
.changeset/bug-3446-resume-continue-here-discovery.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
type: Fixed
|
||||
---
|
||||
**Resume-work now detects non-phase and legacy checkpoint handoffs** — `resume-project` now scans `.continue-here*.md` across phase, spike, sketch, deliberation, planning-root, and legacy repo-root paths so `/gsd:resume-work` can recover the most recent checkpoint outside phase-only flows.
|
||||
@@ -212,7 +212,7 @@ For each classified PR, review against its template requirements.
|
||||
- [ ] PR title is descriptive (not just "fix" or "update")
|
||||
- [ ] One concern per PR (not mixing fix + enhancement)
|
||||
- [ ] No unrelated formatting changes visible in diff
|
||||
- [ ] CHANGELOG.md updated
|
||||
- [ ] `.changeset/*.md` fragment added for user-facing changes (or `no-changelog` label applied)
|
||||
- [ ] Not using `--no-verify` or skipping hooks
|
||||
|
||||
**Scoring:** Same as issues — completeness percentage per PR.
|
||||
|
||||
@@ -66,8 +66,13 @@ Look for incomplete work that needs attention:
|
||||
# Check for structured handoff (preferred — machine-readable)
|
||||
cat .planning/HANDOFF.json 2>/dev/null || true
|
||||
|
||||
# Check for continue-here files (mid-plan resumption)
|
||||
ls .planning/phases/*/.continue-here*.md 2>/dev/null || true
|
||||
# Check for continue-here files (phase + non-phase + legacy fallback)
|
||||
ls .planning/phases/*/.continue-here*.md \
|
||||
.planning/spikes/*/.continue-here*.md \
|
||||
.planning/sketches/*/.continue-here*.md \
|
||||
.planning/deliberations/.continue-here*.md \
|
||||
.planning/.continue-here*.md \
|
||||
.continue-here*.md 2>/dev/null || true
|
||||
|
||||
# Check for plans without summaries (incomplete execution)
|
||||
for plan in .planning/phases/*/*-PLAN.md; do
|
||||
@@ -93,7 +98,7 @@ fi
|
||||
- Flag: "Found structured handoff — resuming from task {task}/{total_tasks}"
|
||||
- **After successful resumption, delete HANDOFF.json** (it's a one-shot artifact)
|
||||
|
||||
**If .continue-here file exists (fallback):**
|
||||
**If .continue-here file exists (phase/non-phase/legacy fallback):**
|
||||
|
||||
- This is a mid-plan resumption point
|
||||
- Read the file for specific resumption context
|
||||
|
||||
44
tests/bug-3446-resume-continue-here-discovery.test.cjs
Normal file
44
tests/bug-3446-resume-continue-here-discovery.test.cjs
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
describe('bug #3446: resume-project detects non-phase and legacy continue-here handoffs', () => {
|
||||
const workflowPath = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'resume-project.md');
|
||||
const workflowContent = fs.readFileSync(workflowPath, 'utf8');
|
||||
|
||||
function readCheckBlock() {
|
||||
const stepStart = workflowContent.indexOf('<step name="check_incomplete_work">');
|
||||
const stepEnd = workflowContent.indexOf('</step>', stepStart);
|
||||
return workflowContent.slice(stepStart, stepEnd);
|
||||
}
|
||||
|
||||
test('check_incomplete_work scans .planning-root continue-here fallback', () => {
|
||||
const block = readCheckBlock();
|
||||
assert.match(
|
||||
block,
|
||||
/\.planning\/\.continue-here\*\.md/,
|
||||
'resume workflow must scan .planning/.continue-here*.md fallback path written by pause-work'
|
||||
);
|
||||
});
|
||||
|
||||
test('check_incomplete_work scans sketch subdirectory continue-here checkpoints', () => {
|
||||
const block = readCheckBlock();
|
||||
assert.match(
|
||||
block,
|
||||
/\.planning\/sketches\/\*\/\.continue-here\*\.md/,
|
||||
'resume workflow must scan .planning/sketches/*/.continue-here*.md for sketch checkpoint handoffs'
|
||||
);
|
||||
});
|
||||
|
||||
test('check_incomplete_work scans legacy repo-root continue-here fallback', () => {
|
||||
const block = readCheckBlock();
|
||||
assert.match(
|
||||
block,
|
||||
/\s\.continue-here\*\.md/,
|
||||
'resume workflow must scan legacy repo-root .continue-here*.md handoff path'
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user