fix: harden closeout reconciliation failure cases

This commit is contained in:
Dicky Moore 2026-04-28 08:55:33 +01:00
parent 8d80762280
commit 54f0437922
2 changed files with 31 additions and 7 deletions

View File

@ -109,11 +109,19 @@ If `{sprint_status}` file does not exist, note that story status was updated in
Re-open the story file after saving and verify the top-level `Status:` field equals `{new_status}`. Re-open the story file after saving and verify the top-level `Status:` field equals `{new_status}`.
Set `{reconciliation_result}` = `story file verified; sprint tracker verification skipped`. If the story file does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion.
If `{sprint_status}` exists and `{story_key}` was found, re-open `{sprint_status}` after saving and verify `development_status[{story_key}]` also equals `{new_status}`. If it matches, set `{reconciliation_result}` = `story markdown and sprint tracker agree on {new_status}`. If `{sprint_status}` file does not exist, set `{reconciliation_result}` = `story file verified; sprint tracker not applicable`.
If the story file does not match `{new_status}`, or if `{sprint_status}` was verified and `development_status[{story_key}]` does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion. If `{sprint_status}` exists but `{story_key}` was not found during sprint-status sync, HALT with a closeout reconciliation failure instead of reporting completion.
If `{sprint_status}` exists and `{story_key}` was found, re-open `{sprint_status}` after saving and verify `development_status[{story_key}]` also equals `{new_status}`.
If `development_status[{story_key}]` is missing, unreadable, or cannot be verified, HALT with a closeout reconciliation failure instead of reporting completion.
If `development_status[{story_key}]` matches `{new_status}`, set `{reconciliation_result}` = `story markdown and sprint tracker agree on {new_status}`.
If `development_status[{story_key}]` does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion.
#### Completion summary #### Completion summary

View File

@ -45,16 +45,32 @@ assert(
assert( assert(
codeReview.includes( codeReview.includes(
'If the story file does not match `{new_status}`, or if `{sprint_status}` was verified and `development_status[{story_key}]` does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion.', 'If the story file does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion.',
), ),
'code-review halts when closeout reconciliation fails', 'code-review halts when story markdown reconciliation fails',
); );
assert(codeReview.includes('development_status[{story_key}]'), 'code-review verifies the sprint tracker entry during reconciliation'); assert(codeReview.includes('development_status[{story_key}]'), 'code-review verifies the sprint tracker entry during reconciliation');
assert( assert(
codeReview.includes('Set `{reconciliation_result}` = `story file verified; sprint tracker verification skipped`.'), codeReview.includes(
'code-review records when sprint tracker verification is skipped', 'If `development_status[{story_key}]` is missing, unreadable, or cannot be verified, HALT with a closeout reconciliation failure instead of reporting completion.',
),
'code-review halts when the sprint tracker entry cannot be verified',
);
assert(
codeReview.includes(
'If `development_status[{story_key}]` does not match `{new_status}`, HALT with a closeout reconciliation failure instead of reporting completion.',
),
'code-review halts when sprint tracker reconciliation fails',
);
assert(
codeReview.includes(
'If `{sprint_status}` file does not exist, set `{reconciliation_result}` = `story file verified; sprint tracker not applicable`.',
),
'code-review treats skipped reconciliation as not applicable only when no sprint tracker exists',
); );
assert( assert(