Repository navigation
S2.3.5 — withTasksChecklist merger, and the checklist on both capability paths - #340
Merged
dev-pmallapp merged 3 commits intoSep 21, 2026
Conversation
The Story body was replaced by the checklist, not merged with it: planSubIssueAttach passed tasksChecklist's output as the whole --body of a gh issue edit on the parent. The shipped test asserted the first four argv elements and that the last contained the heading, both of which are true of a body that had destroyed everything else. withTasksChecklist(body, items) is the merger, modelled on withParentLine: it rewrites the ## Tasks section in place, preserves everything around it, inherits a tick the caller is silent about, and refuses a body carrying two ## Tasks sections rather than guessing which one is the checklist. parentBody is required on both paths and has no default, because a default of "" would make the destructive behaviour the fallback for a caller who simply forgot. The checklist edit is now emitted on the GraphQL path too, where CLAIM-47.1's clause was previously unreachable. Refs #315, #47
…t it Mutation M11 survived the first round: widening the section boundary to H3 changed no assertion. Chasing it down found that every real Story body puts load-bearing prose INSIDE ## Tasks, after the entries — #47's dependency ordering and its "must not be built twice" ruling, #293's sequencing rulings — and that on #293 the section runs to the end of the body, so a section-wide rewrite deletes all of it with no following heading to stop it. The merger rewrote the whole section. That is the defect this task exists to remove, reproduced one level down inside the fix for it. The rewrite now covers the leading run of entry lines and nothing else, and the structure is asserted rather than assumed: entries split by prose are refused with the line named, because taking "the first contiguous run" on trust is how #323's audit parser read the right rows by accident. Refs #315, #47
dev-pmallapp
marked this pull request as ready for review
September 20, 2026 11:42
5 tasks
dev-pmallapp
merged commit Sep 21, 2026
fcd91c7
into
story/47-s2-3-execution-skills
14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #315. Refs #47. Build targets 1 and 2. Anchors
CLAIM-47.7,CLAIM-47.1. Cases 2 and 12.No
Closesdirective, deliberately.NEVER-47.8— this Story's own anti-claim — forbids a task PR carrying one, andCONTRIBUTING.md:415records that it would never fire against a story branch anyway.The defect, measured before anything was changed
At
a6ce084,packages/core/src/gh/sub-issues.ts:296-304builtgh issue edit <parent> --repo … --body <checklist>where the body wastasksChecklist's output — only## Tasks\n\n- [ ] #905 …. The Story's entire body was replaced by its own checklist.packages/core/test/gh-sub-issues.test.ts:165-169asserted the first four argv elements and that the last contained## Tasks. Both are true of a body that has destroyed everything else. A passing test that is wrong.What shipped
withTasksChecklist(body, items)— build target 1, modelled onwithParentLineone file over: it inserts into an existing body, it is idempotent, and it refuses the ambiguous case rather than guessing.## Tasks— see below## Taskssections, naming the countcheckedwinssafeOwnValue, never a spreadparentBodyis required on both paths and has no default. A default of""would make the destructive behaviour the fallback for a caller who simply forgot — the defect with a nicer signature. A genuinely empty Story body is stated as"".Build target 2: the checklist edit is emitted on the GraphQL path too. At
a6ce084that path returned exactly one command and no checklist, soCLAIM-47.1's clause "adds a## Taskschecklist to the Story" was unreachable on the primary path. Both paths now build the edit through one helper, so they cannot drift on what "adds a checklist" means.The finding, and it came from the one survivor
M11 — widening the section boundary from
^#{1,2}to^#{1,3}— survived the first pass, changing not one assertion. Chasing it down found the real defect:The merger as first written replaced the section from its heading to the next H1/H2. Against #293 it would have deleted every one of those rulings. The fix for a body-destroying defect had reproduced the defect one level down, inside itself, with the full suite green across it.
Mutations — 13 run, 11 killed, 2 void
a6ce084defect restored## Taskssections stop being refusedparentBodysilently defaults to""safeOwnValuereplaced by direct readsM3 and M7 are VOID, not survivors — their patterns stopped existing when the code they targeted was replaced. A mutation whose pattern does not match has measured nothing.
Case 12 is a forward-dated kill and the pre-landing state is recorded as a measured gap, never as a pass. At
a6ce084there was no preservation logic to delete —grep -c withTasksChecklistoverpackages/core/srcreturns 0 — so the mutation was inapplicable there, not surviving. M1 pays the kill now.Two process findings recorded in the artifact
A revert is a mutating operation. The mutation script's
git checkout -- <path>ran against a dirty tree and destroyed the section fix before it was committed. Its own post-revert byte-identity assertion fired on mutation 1 rather than at the end of a 13-mutation round; it now refuses to start while those files are dirty.The task-branch recipe pushes to the story branch.
git checkout -b task/… origin/story/…sets the upstream to the story branch, and withpush.default = trackinga plaingit push -u origin task/…lands three commits directly on it. It did.story/47-s2-3-execution-skillswas restored toa6ce084and the commits re-pushed to their own ref. The existingtask/196-revert-direct-pushbranch suggests this is the second occurrence.What this does not close
## Build Targetsparser is build target 3, owned by S2.3.1 —task-create#48. Only the checklist half ofCLAIM-47.1is touched here.ghargv this repository builds has ever been executed, and no build target owns paying that bill #330 — noghargv built here has been executed. Both paths are verified as argv only. A seventh task defers it.planSubIssueAttachhas no production caller yet (task-createis S2.3.1 —task-create#48), so this contract change is free today and will not be later.Chain, measured at
db04726Baseline at
a6ce084: 903 tests / 889 pass / 3179expect(). Theexpect()total becomes 3243 once the evidence artifact lands — #299, and the delta is a property of the corpus an artifact joins, verified rather than assumed.Evidence:
docs/evidence/315-20260920T112814Z.md