docs: repair merge damage in the mutation ledger - #70
Merged
Conversation
Squash-merging seven stacked PRs (#63-#69) that each carried their own copy of the ledger appended both the pre-work and post-work version of many rows. 48 IDs appeared twice inside the ## Ledger table. Collapse them, recompute the summary, and rewrite the rows whose production site no longer exists.
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.
What happened
PRs #63-#69 were seven stacked branches, each carrying its own edited copy of
docs/mutation-ledger.md. Squash-merging them in sequence appended both thepre-work and the post-work version of many rows, so 48 row IDs appeared twice
inside the
## Ledgertable (SFU-01..22,CACHE-01..07,CFG-01..09,UI-01..10). No pair was byte-identical — each differed inStatus, and often inthe planned-test cell and the
File:linereference — so this needed a per-rowdecision, not
uniq.Survivor rule
donebeatstodo. All seven PRs are merged, sodoneis the accuratestate. This picked the survivor for all 48 IDs. It also happens to pick the
richer copy every time: the
donecopies carry the post-review corrections andthe test names that actually landed, while the
todocopies name tests thatwere only planned (e.g.
TestSortRolesForDisplay_MixedCase,TestExtractBinary_RejectsNonRegularEntries— neither exists onmain).236 rows before → 188 after. Unique IDs: 188 before, 188 after — no row lost
(verified by diffing the sorted ID sets against
origin/main).Rows rewritten because the production site is gone
sort.SliceStableinsortGroupsForDisplay(
internal/ui/group_selector.go). fix(ui): resolve interactive selections by index, not display text #68 deletedSelectGroup,sortGroupsForDisplayandresolveGroupSelectionas having zero productioncallers, and its planned test
TestSortGroupsForDisplay_Orderingdoes not existon
main. Repointed at the two surviving display sorts —sortTargetsForDisplay(internal/ui/selector.go:69) andbuildUnifiedOptions(
cmd/selection.go:62) — both pinned, including their stability mutants. Notegroup_selector.goitself survives withFormatGroupOption/BuildGroupOptions; only the selector half was deleted.if len(groups) == 0guard inSelectGroup.The surviving equivalent is the
len(items) == 0guard inuiUnifiedSelector.SelectItem(cmd/root.go:1005), which nothing pins:TestUnifiedSelector_NonTTYcovers only the guard that precedes it. Rowrewritten and flipped back to
todo, with the successor test named.findItemByDisplaywas replaced by the index-basedresolveSelectionItemin fix(ui): resolve interactive selections by index, not display text #68. ItsPlanned testcell still namedTestFindItemByDisplay_ReturnsMatchingItem, which was never added and now cannotbe. Repointed at
TestResolveSelectionItem,TestResolveSelectionItem_EmptySliceandTestUIUnifiedSelector_PTY_DuplicateGroupDisplay, all of which exist.Other corrections
cmd/favorites.gorows cited stale lines. The preamble's"+13 shift" no longer applies now that test: isolate the suite from real user state, and wire integration tests into CI #63's guard is merged; re-verified against
the file and corrected (OUT-02 258→261, OUT-03 388→391, OUT-16 462→465,
OUT-17 464→467, OUT-18 466→469, OUT-19 333→336, OUT-24 432-433→435-437,
OUT-27 248-250→250-251). OUT-20's
199-205was already correct.UI-06selector.go:107→:95,UI-07session_selector.go:112→:122.branches, not an assertion; the tree wins when they disagree.
main: REQ-23 and OUT-26 →done(the## PR1 closure evidencesection already says both are closed, CI runsgo test -tags=integration ./cmdon both legs, andinternal/testenv+AssertSandboxedexist); OUT-28 and OUT-29 →done(settled by review,matching their sibling SCA-17).
Recomputed summary (before → after)
The old counts were computed against the duplicated table.
testtest + prod-fixprod-fixwont-fixrefutedBy PR: PR1 2/0, PR2 12→13/11→12, PR3 10/10, PR4 42→43/41,
PR5 42/39, PR6 16/16, PR7 10→11/10→11, PR8 39→47/37→45,
no-PR 4/0→1.
wont-fixgained COV-02 andrefutedlost OUT-27 (REFUTED verdict, but a test wasadded anyway) — both were miscounted before, independently of the duplication.
Reconciliation narrative
The old narrative no longer held arithmetically, so it was fixed rather than
fudged. The five batch headlines sum to exactly 145 (22+25+35+22+41). The
43-row excess now decomposes exactly:
(
OUT-30..38,SCA-19..24,WF-21..25,SFU-23,COV-01,COV-02). Thesewere never accounted for in the old table, which is most of why it did not add
up; a sixth table row now names them.
excluded, 8 are finer enumeration in batches 4 and 5.
Batch 3 and batch 5 rows now state their ID ranges explicitly (
SCA-01..18+WF-01..20;SFU-01..22+CACHE-01..07+CFG-01..09+UI-01..10) so the+23 additions cannot be silently folded back in. Batch 5's verdict split was also
wrong ("all CONFIRMED" — SFU-22 is OVERSTATED).
Verification
## Ledger;## Summaryand## PR1 closure evidenceuntouched by the dedupe (CFG-02's three legitimate
## Summaryappearances arepreserved).
programmatically, escaped
\|handled).File:linereferences and 65 named tests spot-checked withrg.git diff --name-only origin/main...HEAD→docs/mutation-ledger.md.donerows whose named test does not exist onmainTwo, both from the deletion of
ui.SelectGroupin #68, both handled above:TestSortGroupsForDisplay_Ordering(UI-02, row repointed at existing tests, staysdone) andTestSelectGroup_EmptyList(UI-08, no successor exists — flipped totodo). The other genuinetodois WF-25, deliberately deferred out of PR8;Validator.Regexis confirmed unasserted anywhere ininternal/workflows.