Skip to content

status counts only the features and legs workspace_load_project will make, and a - branch: or a - role: the record's KEY ORDER leaves under a shut list is a finding naming the list that shut it and the two exits in the order that does not lose the work, instead of a resume <Name> that brings none of it back - #33

Merged
brettheap merged 5 commits into
mainfrom
fix/record-feature-list-closes
Sep 14, 2026

Conversation

@brettheap

@brettheap brettheap commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

workspace_load_project — the loader resume and park both read a record
through — reads a block by INDENT and SHUTS a list at the first key shallower
than its items. in_features=false is the first line of its indent-4 arm,
before the case that sets it true again for features: alone; in_legs=false
is the first line of its indent-8 arm; its - branch: arm sits behind
[ "$in_features" = true ] || continue and its - role: arm behind
[ "$in_legs" = true ] || continue. So a project-level key a bad merge left
between two features, or between a feature and its legs:, does not reorder
the record — it ENDS the list, and everything under it is lines resume makes
no feature and no leg out of.

status had no such state: it matched the indent of a line and nothing above
it. So it counted features resume never makes and legs it never collects,
and offered resume <Name> for both — work status claims and resume will
not bring back, in the direction that matters most, because a person reading
it believes the feature is safe.

The twelve records, the loader's answer, and what main says

Run against the INSTALLED extension on this rebase, 2026-09-14 —
git-common.sh and workspace-common.sh sourced in place, twelve hand-built
records, the MANIFEST_* arrays printed — with the answers the runs of
2026-09-12 and 2026-09-13 recorded. main and this branch are read by lifting
record_rows out of each status and running it over the same twelve.

record the loader main this branch
(d) the ordinary record park writes, two features 2 features, 2 legs 2, 2 ✅ 2, 2 ✅
(a) a project key BETWEEN two features 1 feature, 1 leg 2, 2 ❌ 1, 1 ✅
(b) a project key between a - branch: and its legs: 1 feature, 0 legs 1, 1 ❌ 1, 0 ✅
(c1) a - branch: above every features: key 0 features, 0 legs 1, 1 ❌ 0, 0 ✅
(c2) …and with no features: key at all 0 features, 0 legs 1, 1 ❌ 0, 0 ✅
(e) a feature-level key between legs: and its items 1 feature, 0 legs 1, 1 ❌ 1, 0 ✅
(f) a feature-level key BETWEEN two legs 1 feature, 1 leg 1, 2 ❌ 1, 1 ✅
(g) a project key between two legs 1 feature, 1 leg 1, 2 ❌ 1, 1 ✅
(h) a SECOND features: key after a project key (the list REOPENS) 2 features, 2 legs 2, 2 ✅ 2, 2 ✅
(i) a - branch: below a project key, no legs 1 feature, 1 leg 2, 1 ❌ 1, 1 ✅
(j) a BLANK - branch:, a project key above its legs: 1 feature named nothing, 0 legs 1, 1 ❌ 1, 0 ✅
(k) a second features: key BELOW an unread - branch: 1 feature, 2 legs, both filed under the feature ABOVE it (MANIFEST_LEG_FEATURE is 0 0) 2, 2, the second leg under the phantom ❌ 1, 2, both under the feature above ✅

main agrees on (d) and (h) and on nothing else — the same answer e18ec53
gave, and for a reason worth one line: record_rows is byte-identical
between e18ec53 and 7efc850
. #23's rounds 3–5 and #27's whole computed-path
reading are in read_record and below it; neither touched the row reader.

And what that costs the person reading it (run against 7efc850's own
status, on the estates this suite builds, 2026-09-14):

  • (a) — 2 feature(s) and resume Atlas offered twice, once for a feature resume never selects.
  • (b), (e) — (repo leg): no worktree on that branch here … resume Atlas brings it back for a leg collect_legs never collects, which is a feature resume refuses WHOLE.
  • (c) — 1 feature(s) and that same offer; and with no features: key at all the note line is parked record: 1 feature(s), parked ? on ?, the project row suppressed and the date and the workstation with it.
  • (f), (g) — in the three-leg fixture, the phantom leg's own line: ``resume Trio brings it back, unless origin has lost that branch … taking the WHOLE feature with it ("001-a-thing is no longer on origin in the code leg") — a whole-feature refusal over a leg `resume` never reads, and `resume Trio` twice.
  • (i) — a second feature, and the record lists no leg for it, which is collect_legs's refusal of a feature it REACHES.
  • (j) — RR2's refusal, is no longer on origin, of a feature collect_legs throws out before RR2 is reached.

What changed

record_rows carries the loader's two flags, set where the loader sets them:
every line at indent 0, 2 or 4 shuts the feature list and features: alone
reopens it; every line at indent 6 or 8 shuts the leg list and legs: reopens
it inside an open feature list; nothing at indent 10 or 12 moves either, and a
full-line comment is no line to either reader.

  • A - branch: under a shut list gets a nofeature row instead of a branch row, and does NOT become $branch — $branch is this reader's feature_index, the last feature the loader MADE, which is record (k).
  • A - role: under a shut leg list gets a noleg row carrying the branch, the role and WHICH LIST WAS SHUT — because that is the line a person has to go and find.
  • read_record counts the unread legs onto the feature in its first pass and prints, in the second, one finding per unread - branch: and one per feature whose legs went unread: the whole-feature refusal where the feature keeps no leg, the one-leg line where it keeps some, and the two defects in ONE line where the branch has no name (rather than the "lists no leg" a record that lists one should not be told).
  • The why and the exits are worded once, in record_unread_why and record_unread_exits. The why names ONE arm, never both. The exits are the record's key ORDER first — the one hand-edit these rules ask for — and the re-park second, and only from the workstation that has the feature: workspace_write_manifest rewrites the project's whole block and emit_recorded_feature carries forward only what MANIFEST_FEATURE_BRANCHES holds, so a park run anywhere else writes the block back without these lines at all. The lines are one park from gone.
  • The project row's gate takes an $unread half beside $has_features, so a block whose - branch: sits above every features: key still gets the row its finding needs the date and the workstation out of. Every record park writes is byte for byte the rows it always was.

It composes with #27's verdict walk by being invisible to it. The walk's
questions — collect_legs's three, then RR6, RR4/RR3, RR2, RR1 in
resume.sh's own order, each gated on "no earlier leg refused" — are asked in
the leg) arm of the first pass and nowhere else, and a line under a shut list
emits no leg row. That is the loader again: it puts no such line in
MANIFEST_LEG_ROLE, so collect_legs never walks it and no RR is ever asked
of it. A nofeature row appends no feature entry either, so every array the
walk reads back is still indexed by the features the loader MAKES.

The differential guard, rebuilt 7efc850 → 9b06ecb

Twin estates out of this suite's own fixture builders in a temp dir; the temp
root and every hex sha normalised; exit code, stdout and stderr diffed. Eleven
record shapes × seven phases — five spellings of pushed: (true, false,
the key absent, the key with no value, a word that is neither) with no worktree
here, one with a worktree on the branch, one with the branch dropped from
origin under --fetch. 77 comparisons.

main's status run AGAIN after this branch's run is byte-identical in all
77 — the harness reads nothing but the change, and neither run moved the
estate. Against this branch: 14 identical, 63 differing, and the split is
exactly the loader's.

shape pushed:true pushed:false pushed absent pushed empty pushed word worktree gone (--fetch)
(a) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(b) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(c1) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(c2) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(d) SAME SAME SAME SAME SAME SAME SAME
(e) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(f) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(g) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(h) SAME SAME SAME SAME SAME SAME SAME
(i) DIFF DIFF DIFF DIFF DIFF DIFF DIFF
(j) DIFF DIFF DIFF DIFF DIFF DIFF DIFF

Every difference is an arm above: (a), (c) and (i) the feature count and the
branch's own finding (the indent-4 arm); (b) and (e) the whole-feature refusal
that replaces a leg read against disk (the project-indent and the
feature-indent arm); (f) and (g) the phantom leg's line becoming the finding
about the leg that will not come back, while the leg that does keeps its
resume; (c2) also the note line, which is the project row's new $unread
half; (j) the one line that now says both defects. Two differences are not a
finding's wording and are named for that reason: (c) in the worktree phase
also gains worktree on 001-a-thing (root): not in the parked record — never parked
, because a branch the loader makes no feature of is in no recorded
set and park, reading the record through that same loader, would park it as
new — and the footer's finding COUNT moves with it. The --fetch phase adds
no reading of its own: the role is read before any RR.

Bite, suite, caps, invariants

Eight tests bite. This branch's tests/ against main's status in a
scratch tree, 2026-09-14: 8 failed, 6 passed —
test_a_project_key_between_two_features_leaves_the_second_unread,
test_a_branch_above_every_features_key_is_a_feature_resume_never_makes,
test_a_feature_level_key_between_legs_and_its_items_leaves_no_leg,
test_a_key_between_two_legs_costs_that_leg_and_not_the_feature,
test_a_second_features_key_reopens_the_list_and_its_legs_keep_the_feature
(the five new ones),
test_a_root_key_between_a_branch_and_its_legs_still_reads_that_feature and
test_a_blank_branch_above_the_root_key_is_still_the_feature_resume_refuses
(the two that took the split), and
test_the_help_carries_the_no_push_exception_its_findings_do.

The suite: 480 passed at 7efc850, 485 here (python3 -m pytest tests -q,
both in a real checkout with the submodule at the pinned commit).

The caps are the measured counts, not either side's number. main reached
AGENTS.md 214 / README.md 377 while this branch waited; the ten and six lines
it wrote on 162 and 256 land in the same rule 4 sentence and the same
exception, over none of the lines the entries above them bought. Measured
after the rebase: AGENTS.md 224, README.md 383, each with its own dated
entry in tests/test_repo_hygiene.py beside main's, which all stay.
(Those were the counts AT THE REBASE. main has since moved to 63a74af
and the checked-in caps are now 224 / 409 — see The merge of main at
63a74af
below.)

Invariants: the shared estate resolver byte-identical across park,
resume and status; expand_home byte-identical across status and
resume; gh api only in gh_api_line; no bash-4-only grammar; bash -n status clean; shellcheck 0.9.0's finding profile identical to main's; and
this commit adds no "${arr[@]}" expansion at all (its one array read is
${#feature_legs[@]}, the count main's own leg) arm already uses).

The rebase

e18ec53 → 7efc850, still ONE commit. The conflicts were the three texts
this reading shares with #23 and #27, and the two caps: the --help exception
paragraph, where main's "after a fetch that WORKED in that repository"
replaces "under --fetch" and the key-order clause follows it; read_record's
locals and its first pass, where the noleg arm and its three arrays join
#27's feature_rr/feature_add walk rather than the feature_gone it
replaced; and the two cap entries. AGENTS.md and the README merged clean.
Everything above was re-measured on the rebase.

Recorded and NOT taken, as before: workspace_load_project takes a list item
by stripping - and TRIMMING AGAIN, so - branch: and - role: are a
feature and a leg to it while this reader's patterns match neither. Re-run
2026-09-14: main and this branch answer IDENTICALLY on both. It is neither
this branch's regression nor its to fix; it wants an item parser this layer
has never had.

Copilot's three rounds, 8a77d39, 2bedf9b and 55bb7a1

Round 1 on 9b06ecb (three inline threads, six suppressed), round 2 on
8a77d39 (one suppressed) and round 3 on 2bedf9b (one inline) are six
findings, all six real and all six taken
; the loader run that decided each is
in this
comment
.

  • The noun, six places. "at the next key at feature indent" — in
    status --help, AGENTS.md rule 4, the README, both cap docstrings and the
    help string the suite pins byte-for-byte. grep -rn "next at " over the
    tree now returns nothing.

  • A reopened list is a clean slate for $dropped. The legs of a list
    reopened below an unread - branch: are collected onto the feature ABOVE
    it, so a - role: left under a shut leg list there is that feature's
    defect — and, left set, $dropped suppressed its row entirely: the leg went
    out in SILENCE, and where the feature above kept no read leg the report said
    "the record lists no leg for it" about a record that lists one.

  • A list that was never OPENED has no key that shut it. record_unread_why
    takes two arms more, nolist and nolegs, which name the key that opens
    each list and say it is missing above that line, rather than sending a hand
    to a closing key the record has not got.

  • And the third state may not swallow the second — not Copilot's finding
    but the hole taking the one above opened. The loader makes a feature at
    indent 6 only where the item's key is branch, so any other line there
    leaves the feature above it current, and THAT feature has its legs: key.
    nolegs is the - branch: line's alone.

  • No unread-leg line promises back a feature this run already refuses. The
    legs it DOES read can carry a whole-feature verdict of their own; the
    verdict is read back in the order the leg) arm reads it, and where there
    is one the sentence says so and stops.

  • A leg the record gives no role is named by the role it has not got.
    - role: # note is that line to both readers — record_scalar's reading
    from status reads a record leg that names no parked_commit: — and one the record gives no role — the way resume will refuse them, instead of offering resume <Name> for the first and saying nothing about the second #21 — and the finding about it had been naming the leg with a pair of
    empty backticks. Recorded and not taken: with the key put back such a leg is
    one collect_legs READS, which check_parked_leg's roleless arm already
    answers on the run after the key moves.

  • A blank - branch: that keeps a leg still names the one it drops. The
    combined line was reached only where the feature keeps NO leg; where it keeps
    one the run fell through to "a - branch: in the record has no value" and
    stopped — and since the blank name suppresses every per-leg line and the
    noleg arm only counts, the dropped line was said NOWHERE. The new arm is
    the third of four and keeps RR2's refusal, because a feature that keeps a leg
    collect_legs collects is not refused as a shape mismatch; the exits stay the
    blank name's, since no re-ordering settles a feature named nothing.

Bite: 5 tests fail against 9b06ecb, 2 more against 8a77d39, 1 more
against 2bedf9b. Suite: 485 → 488 → 490 → 491. Caps unmoved by those four commits: AGENTS.md 224, README.md 383 (the later merge of main raises them to 224 / 409 — see below). Row
differential 9b06ecb → 8a77d39 over 21 records
: the feature and leg
counts identical in all 21 — every difference is which line a finding names,
one line that was never printed, and one name that was printed empty. The
estate-level guard above is 7efc850 → 9b06ecb and is not rebuilt for these
rounds, for that reason. Invariants unchanged at each step, shellcheck profile
included.

The merge of main at 63a74af

main moved to 63a74af (#26, Amendment 11's lane tooling) while this branch
waited on review, so the branch merges it — a merge commit, e2952d9, not a
rebase
, because three Copilot rounds are recorded against 8a77d39,
2bedf9b and 55bb7a1, and a rebase would rewrite all three and leave the
review pointing at commits that no longer exist.

#26 touches neither status nor tests/test_status_command.py, so the overlap
is three files. AGENTS.md and README.md merged CLEAN and both readings
stand in their places: the merged AGENTS.md differs from this branch's by
exactly main's one line (the --install count, nine → eleven), and the
merged README.md differs from main's by exactly this branch's six.

The one conflict was the two README cap entries, and both sides were right —
each appended a dated entry after 270 AND 363 MEET AT 377 and each rewrote the
same assert. Both entries are kept, and a third, 383 AND 403 MEET AT 409,
records the arithmetic. Nothing is dropped.

The caps are the measured counts of the MERGED files:

file this branch main merged, checked in
AGENTS.md 224 214 224
README.md 383 403 409

README.md is 377 + 6 (this branch) + 26 (main), the line sets disjoint, and
neither side's number would have done: 409 fails <= 383 and <= 403.
AGENTS.md does not move because #26 changed a word of it and not a line —
and its 224 is still the number measured after the merge rather than the one the
branch was carrying.

Suite on the merged tree: python3 -m pytest tests -q → 549 passed,
rc=0 (the 491 measured here at 55bb7a1, plus the 58 arriving with #26). Among
those 58, ALL_BASH now holds every shipped file to A9 Addendum 4's rule
against a case opened inside a $( ); it meets this branch's 379 added lines
of status for the first time here, and they carry none.

Lane: openrepotools-3 (openRepoTools-3)

🤖 Generated with Claude Code

Summary by Sourcery

Make status mirror the loader's indentation and key-order semantics so it reports only recoverable work and gives safe, precise guidance for unread record entries.

Bug Fixes:

  • Align status feature and leg counts with the records that workspace_load_project actually loads, preventing misleading resume suggestions for entries hidden by indentation and key order.
  • Report unread branches and legs with the list state and recovery actions needed to restore them, including malformed and partially readable records.

Enhancements:

  • Preserve loader state across record parsing, support reopened lists, and ensure findings are associated with the feature the loader actually creates.
  • Improve diagnostics and help text to prioritize restoring record key order before re-parking from the workstation that owns the feature.
  • Keep unread-record findings compatible with the existing resume verdict evaluation.

Documentation:

  • Document how record key order can shut feature and leg lists and explain the safe recovery order.

Tests:

  • Add extensive regressions for unread features and legs, reopened lists, blank branches, missing roles, and interactions with whole-feature resume refusals.
  • Increase repository hygiene caps to accommodate the expanded user-facing guidance.

…ill make, and a `- branch:` or a `- role:` the record's KEY ORDER leaves under a shut list is a finding naming the list that shut it and the two exits in the order that does not lose the work, instead of a `resume <Name>` that brings none of it back

THE GAP IS THE ONE e18ec53's MESSAGE RECORDED AND DID NOT TAKE.
`workspace_load_project` reads a block by INDENT and shuts a list at the first
key shallower than its items: `in_features=false` is the first line of its
indent-4 arm, before the `case` that sets it true again for `features:` alone;
`in_legs=false` is the first line of its indent-8 arm, before the one that
sets it true for `legs:`; its `- branch:` arm sits behind
`[ "$in_features" = true ] || continue` and its `- role:` arm behind
`[ "$in_legs" = true ] || continue`. So a key a bad merge left between two
features, or between a feature and its `legs:`, does not reorder the record —
it ENDS the list, and what is under it is lines `resume` makes no feature and
no leg out of. Run against the installed extension AGAIN ON THIS REBASE,
2026-09-14 (`git-common.sh` and `workspace-common.sh` sourced in place, twelve
hand-built records, the `MANIFEST_*` arrays printed), with the answers the
runs of 2026-09-12 and 2026-09-13 recorded:

  (d) the ordinary record `park` writes, two features   -> 2 features, 2 legs
  (a) a project key BETWEEN two features                -> 1 feature,  1 leg
  (b) a project key between a `- branch:` and its `legs:` -> 1 feature, 0 legs
  (c) a `- branch:` above every `features:` key         -> 0 features, 0 legs
      (both spellings: the key at the bottom of its block, and no key at all)
  (e) a feature-level key between `legs:` and its items -> 1 feature,  0 legs
  (f) a feature-level key BETWEEN two legs              -> 1 feature,  1 leg
  (g) a project key between two legs                    -> 1 feature,  1 leg
  (h) a SECOND `features:` key after a project key      -> 2 features, 2 legs
      (the list REOPENS)
  (i) a `- branch:` below a project key, no legs        -> 1 feature,  1 leg
  (j) a BLANK `- branch:` with a project key above its `legs:`
                                                        -> 1 feature named
                                                           nothing, 0 legs
  (k) a second `features:` key BELOW an unread `- branch:`
                                                        -> 1 feature, 2 legs,
                                                           both filed under
                                                           the feature ABOVE
                                                           the unread line
                                                           (`MANIFEST_LEG_FEATURE`
                                                           is 0 0)

`main` AGREES ON (d) AND (h) AND ON NOTHING ELSE, which is the answer
e18ec53 gave and for a reason worth saying in one line: `record_rows` is
BYTE-IDENTICAL between e18ec53 and 7efc850. #23's rounds 3-5 and #27's whole
computed-path reading are in `read_record` and below it, and neither touched
the row reader. Read back through it the same day — the function lifted out
of each `status` and run over the twelve records — `main` counts 2 features
for (a) where the loader makes 1, a leg for (b) and for (e) where it collects
none, a feature and a leg for (c) in BOTH spellings where it makes neither, a
second leg for (f) and for (g), a second feature for (i), and for (k) two
features with the reopened list's legs filed under the PHANTOM instead of
under the feature above it.

AND WHAT THAT COSTS THE PERSON READING IT, run on 2026-09-14 against
7efc850's own `status` on the estates this suite builds: for (a) "2
feature(s)" and `resume Atlas` offered twice, once for a feature `resume`
never selects; for (b) and (e) "(repo leg): no worktree on that branch here …
`resume Atlas` brings it back" for a leg `collect_legs` never collects, which
is a feature `resume` refuses WHOLE; for (c) "1 feature(s)" and that same
offer, and where the block has no `features:` key at all the note line as
"parked record: 1 feature(s), parked ? on ?", the project row suppressed and
the date and the workstation with it; for (f) and (g) in the three-leg
fixture the phantom leg's OWN line — "`resume Trio` brings it back, unless
origin has lost that branch … taking the WHOLE feature with it ("001-a-thing
is no longer on origin in the code leg")" — a whole-feature refusal over a
leg `resume` never reads, and `resume Trio` twice; for (i) a second feature
and "the record lists no leg for it", which is `collect_legs`'s refusal of a
feature it REACHES; and for (j) RR2's refusal, "is no longer on origin", of a
feature `collect_legs` throws out before RR2 is reached. Work `status` claims
and `resume` will not bring back, in the direction that matters most, because
a person reading it believes the feature is safe.

WHAT THIS COMMIT DOES. `record_rows` carries the loader's two flags, set where
the loader sets them: every line at indent 0, 2 or 4 shuts the feature list
and `features:` alone reopens it; every line at indent 6 or 8 shuts the leg
list and `legs:` reopens it inside an open feature list; nothing at indent 10
or 12 moves either, and a full-line comment is no line to either reader. (The
loader's indent-6 reset sits behind its own `in_features` gate and this one
does not, which is the same reading: `in_legs` can only be set true under an
open feature list, and every line that shuts that list shuts the leg list with
it.) A `- branch:` under a shut list gets a `nofeature` row instead of a
`branch` row and does NOT become `$branch` — `$branch` is this reader's
`feature_index`, the last feature the loader MADE, and the loader's does not
move at a line it reads no feature out of, which is record (k) above: the legs
of a list reopened below such a line are collected onto the feature ABOVE it,
and that is the name their rows carry. A `- role:` under a shut leg list gets
a `noleg` row carrying the branch, the role, and WHICH LIST WAS SHUT, because
that is the line a person has to go and find: with the feature list still open
the key is a feature's own, above `legs:`; with it shut the key is at PROJECT
indent and the leg list never opened. This layer drops nothing silently.

`read_record` counts the unread legs onto the feature in its first pass and,
in its second, prints one finding per unread `- branch:` and one per feature
whose legs went unread: where the feature keeps no leg the sentence is the
whole-feature refusal `resume` makes, where it keeps some the sentence is
about the leg that will not come back with it, and where the branch has no
name the two defects are said in one line rather than in the "lists no leg"
the old wording would have given a record that lists one. The why and the
exits are worded once, in `record_unread_why` and `record_unread_exits`, as
`origin_gone_exits` and `role_shape_exits` are: `record_unread_why` names ONE
arm, never both, because the key that shut the list is the one the reader has
to go and find; `record_unread_exits` puts the record's key ORDER first
(`workspace_write_manifest`'s, which `status` never writes itself) and the
re-park from the workstation that has the feature second — in that order,
because `emit_recorded_feature` carries a feature forward out of
`MANIFEST_FEATURE_BRANCHES` and a feature that loader never made is in no such
array, so a park run anywhere else writes the block back without these lines
at all. The lines are one park from gone.

THE PROJECT ROW'S GATE takes an `$unread` half beside `$has_features`, and
nothing else: a block whose `- branch:` sits above every `features:` key has
no feature for the row to count, and the finding it gets instead names the
date and the workstation out of exactly those fields. Every record `park`
writes is byte for byte the rows it always was.

AND IT COMPOSES WITH THE VERDICT WALK #27 LEFT IN `read_record` BY BEING
INVISIBLE TO IT. That walk's questions — `collect_legs`'s three, then RR6,
RR4 and RR3, RR2, RR1 in `resume.sh`'s own order, each gated on "no earlier
leg refused" — are asked in the `leg)` arm of the first pass and nowhere
else, and a line under a shut list emits no `leg` row: the `noleg` arm beside
it only counts. That is the loader once more — `workspace_load_project` puts
no such line in `MANIFEST_LEG_ROLE`, so `collect_legs` never walks it and no
RR is ever asked of it — and the `nofeature` row appends no feature entry
either, so every array the walk reads back is still indexed by the features
the loader MAKES, which is what `$branch` and `feature_index` already agreed
on. Read off both readers on 2026-09-14, and the guard below is the same
statement measured: the two shapes the loader reads whole are byte-identical
in all seven phases, including the `--fetch` one where RR2 is asked.

EIGHT TESTS, ALL FAILING AGAINST 7efc850 (run there on 2026-09-14, this
branch's `tests/` against `main`'s `status` in a scratch tree). Five are new,
in the record layer's style, one per shape the loader was probed with: (a),
where the second feature is a finding of its own and the report keeps ONE
`resume Atlas` (`main`: "2 feature(s)" and `resume Atlas` twice), with (i) as
its second phase, where a branch with no legs under it takes the branch's
line and not "lists no leg for it" (`main` says that sentence); (c) in both
spellings, where the note line is "0 feature(s)" and still carries the date
and the workstation (`main`: "1 feature(s)", and "parked ? on ?" with the key
gone), and a third phase holding that a worktree on that branch is one the
record does not know; (e), where the line is the FEATURE's whole-feature
refusal and names the leg the record lists (`main` reads that leg against
disk and offers `resume Atlas`); (f) and (g) together in the three-leg
fixture, where the same key one leg later costs the LEG and not the feature,
`resume Trio` stays on the leg that comes back, and no line says "the WHOLE
feature" (`main` says it, on both spellings, over the phantom leg's missing
`origin/001-a-thing`); and (h), whose first phase is the control the reading
must not move and whose second is record (k), the refusal landing on the
feature the loader files the reopened legs under. Two existing tests took the
split, each with a dated docstring saying which half moved and why: the
`root:`-key test keeps its feature half — the block still matches on `root:`,
the rows above the key are still held, the feature is still counted, the
report still reaches its footer — and its leg half becomes the whole-feature
refusal, with the second phase reopening the list so the per-feature verdict
is still asked of two features the loader really makes; and the blank-branch
test says the two defects in one line. The eighth is the help test, whose
byte-for-byte pin of the exception paragraph now carries the key-order
sentence, with the dated entry that says why the ORDER of its two exits is
what is pinned. 480 passed at 7efc850, 485 now.

THE GUARD IS TWIN ESTATES out of this suite's own fixture builders in a temp
dir, the temp root and every hex sha normalised, exit code, stdout and stderr
diffed, and it was REBUILT 7efc850 -> this commit on 2026-09-14: eleven
record shapes — (a), (b), (c) in both spellings, (d), (e), (f), (g), (h),
(i), (j) — across five spellings of `pushed:` with no worktree here, one with
a worktree on the branch, and one with the branch dropped from origin under
`--fetch`. 77 comparisons. `main`'s `status` run AGAIN after this commit's
run is byte-identical in all 77, which is what says the harness reads nothing
but the change and that neither run moved the estate; against this commit it
is 14 identical and 63 differing, and the split is exactly the loader's: (d)
and (h) — the two shapes it reads WHOLE — are byte-identical in every
spelling and every phase, and the nine it does not are different in every
one. Every difference is the arm above. (a), (c) and (i) differ in the
feature count and in the branch's own finding, because the indent-4 arm shuts
the list; (b) and (e) in the whole-feature refusal that replaces a leg read
against disk, by the project-indent and the feature-indent arm respectively;
(f) and (g) in the phantom leg's line, which becomes the finding about the
leg that does not come back while the leg that does keeps its `resume`;
(c) with no `features:` key at all also in the note line, which is the
project row's new `$unread` half; and (j) in the one line that now says both
defects. Two differences are not a finding's wording and are named here for
that reason: (c) in the worktree phase gains "worktree on 001-a-thing (root):
not in the parked record — never parked", because a branch the loader makes
no feature of is in no recorded set and `park`, reading the record through
that same loader, would park it as new; and the finding COUNT in the footer
moves with it. The `--fetch` phase adds no reading of its own: the role is
read before any RR, so the branch being gone from origin changes nothing
about which lines are unread.

THE DOCS SAY IT IN THREE PLACES and the caps move with them: `status --help`,
AGENTS.md rule 4 and the README each carry the exception, naming the two
exits in the same order, with the hand-edit named as the hand-edit these rules
otherwise forbid. AGENTS.md 214 -> 224 and README.md 377 -> 383 — the same
ten and six lines this branch wrote on 162 and 256, rebased onto the counts
`main` reached while it waited, measured after the rebase and not carried
over — each with a dated entry in `tests/test_repo_hygiene.py` saying what
the lines bought: that an assistant told "re-park" unaided parks from
wherever it is standing, and that park is what deletes the lines for good.

RECORDED AND NOT TAKEN, and it is this layer's oldest disagreement rather
than this reading's. `workspace_load_project` takes a list item by stripping
`- ` and TRIMMING AGAIN (`_shape_set_trimmed "${trimmed#- }"`), so
`-   branch:` and `-   role:` — more than one space after the dash — are a
feature and a leg to it, while this reader's patterns are the single-space
spelling `workspace_write_manifest` writes and match neither. Run both ways
again on 2026-09-14: the loader loads each as 1 feature and 1 leg, and
7efc850's row reader and this one answer IDENTICALLY on both — no feature at
all for the first, and for the second a feature whose legs are none, which is
the "lists no leg for it" a record that lists one should not be told. Neither
is this commit's; both want an item parser this layer has never had.

REBASED FROM e18ec53 ONTO 7efc850, one commit still. The conflicts were the
three texts this reading shares with #23 and #27 and the two caps: the
`--help` exception paragraph, where `main`'s "after a fetch that WORKED in
that repository" replaces "under `--fetch`" and the key-order clause follows
it; `read_record`'s locals and its first pass, where the `noleg` arm and its
three arrays join #27's `feature_rr`/`feature_add` walk rather than the
`feature_gone` it replaced; and the two cap entries, where `main`'s dated
entries all stay and this branch's is added below them with the arithmetic it
actually has. AGENTS.md and the README merged clean into rule 4's and the
exception's own sentences. Everything above was re-measured on the rebase.

Base: 7efc850.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 14, 2026 01:25

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 15 hours and 8 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates status to use the loader’s indentation-sensitive feature and leg boundaries, preventing phantom counts and invalid resume advice while producing targeted findings for unread record entries; adds extensive regression tests and documents the manual-repair-first recovery workflow.

Sequence diagram for targeted unread-record findings

sequenceDiagram
    participant Status
    participant read_record
    participant workspace_load_project
    participant Record
    participant User
    Status->>read_record: read_record
    read_record->>workspace_load_project: Apply indentation list boundaries
    workspace_load_project-->>read_record: Loaded feature and leg rows
    read_record->>Record: Identify nofeature and noleg rows
    read_record->>Status: Count loaded rows and unread findings
    Status->>User: Show accurate counts and targeted recovery exits
    User->>Record: Restore key order
    User->>Status: Re-run status
Loading

Flow diagram for loader-aligned status parsing

flowchart TD
    A[Read record row] --> B{Indentation opens active list?}
    B -->|features: at project level| C[Open feature list]
    B -->|legs: inside open feature| D[Open leg list]
    B -->|Shallower key| E[Shut corresponding list]
    B -->|Item under open list| F[Create loader-aligned feature or leg row]
    B -->|Item under shut list| G[Emit nofeature or noleg finding row]
    C --> F
    D --> F
    E --> B
    F --> H[Count only rows workspace_load_project will load]
    G --> I[Name shut list and unread entry]
Loading

Flow diagram for unread-record recovery exits

flowchart LR
    A[Unread branch or role] --> B[Finding names shut list]
    B --> C{Choose recovery exit}
    C -->|First| D[Restore record key order]
    C -->|Second| E[Re-park from workstation holding feature]
    D --> F[Loader reads feature or leg again]
    E --> G[workspace_write_manifest rewrites complete block]
    F --> H[status counts resumable work]
    G --> H
Loading

File-Level Changes

Change Details Files
Make status mirror workspace_load_project list-state semantics so it reports only features and legs that resume can actually load.
  • Track feature and leg list open/closed state by indentation, including list reopening via repeated features: or legs: keys.
  • Emit unread rows for - branch: and - role: entries beneath shut lists instead of treating them as loadable records.
  • Preserve loader feature indexing when unread branches are encountered, including legs under reopened lists.
  • Gate project summary output on unread content so malformed records still receive dated and workstation-qualified findings.
status
Replace misleading resume guidance for unread record content with findings that identify the loader defect and safe recovery order.
  • Distinguish unread features from unread legs and identify the key/list that shut each one.
  • Count unread legs in the first pass and generate whole-feature, partial-leg, or combined blank-branch findings as appropriate.
  • Centralize the explanation and exits, prioritizing manual key-order repair and limiting re-park guidance to the workstation that owns the feature.
  • Keep verdict traversal unchanged by excluding unread rows from loader-backed feature and leg arrays.
status
tests/test_status_command.py
Add regression coverage for malformed key ordering and loader/status agreement.
  • Cover project- and feature-level keys that terminate lists, branches outside any features: list, and legs outside any legs: list.
  • Verify reopened lists, loader feature-index behavior, counts, findings, resume suggestions, and worktree detection.
  • Add assertions for help text carrying the new exception and recovery guidance.
tests/test_status_command.py
Document the record key-order failure mode and its recovery constraints.
  • Explain indentation-based list shutdown and the two recovery exits in the operational guidance.
  • Update repository hygiene count caps and dated rationale for the added documentation.
AGENTS.md
README.md
tests/test_repo_hygiene.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved diagnostic and recovery guidance issues remain, along with mirrored documentation and test wording corrections.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates status to mirror loader behavior for malformed record key ordering and provide actionable recovery diagnostics.

Changes:

  • Tracks closed and reopened feature/leg lists.
  • Reports unread branches and roles.
  • Adds regression tests and recovery documentation.
File summaries
File Summary
status Implements loader-aware parsing and diagnostics; recovery wording and partial-leg guidance need correction.
tests/test_status_command.py Adds malformed-record coverage; expected help wording needs correction.
tests/test_repo_hygiene.py Updates documentation limits; recorded guidance wording needs correction.
README.md Documents recovery behavior; contains unclear wording.
AGENTS.md Adds operational recovery guidance; contains unclear wording.
Review details

Suppressed comments (6)

status:2328

  • dropped remains set after an unread - branch: even when a later features: key reopens the list. In that shape the loader keeps the last real feature as the current feature, so a subsequent - role: under a closed legs: list belongs to that real feature; this condition suppresses its noleg row, causing read_record to miss the unread leg (or incorrectly report that the feature lists no leg). Reset dropped when features: reopens the feature list, and add a regression for this reopen-then-noleg case.
            '    features:'*) in_features=1; in_legs=0 ;;

status:5244

  • This wording assumes that the readable legs will resume successfully, but feature_why, feature_rr, or feature_add may already contain a whole-feature refusal from one of those legs. In that case check_parked_leg reports the feature as refused and does not offer resume, while this line says that resume brings it back, producing contradictory guidance. Gate the partial-leg wording on there being no whole-feature verdict, or fold the unread-leg detail into the existing refusal.
                        finding "parked feature $a: the record lists a \`${feature_drop_role[seen_branches - 1]:-}\` leg for it where \`resume\` reads no leg, because $(record_unread_why "${feature_drop_why[seen_branches - 1]:-legs}"); \`resume\` brings the feature back with the legs it does read and leaves that one's work where it was parked — $(record_unread_exits "${RECORD_FILE##*/}" "$where")"

status:4819

  • This helper is used for every nofeature row, including the new cases where a branch appears before the first features: key or where the record has no features: key at all. Those lists were never opened, but the emitted explanation says a later project-level key shut the list and that the branch is below it; the analogous legs text is also wrong when a role precedes the first legs: key. Carry whether the list was never opened versus closed and phrase the finding accordingly, otherwise the actionable diagnosis points the reader to a closing key that does not exist.
        printf "\`resume\` reads a record by INDENT, and \`workspace_load_project\` SHUTS the \`features:\` list at the next key at project indent, making no feature of a \`- branch:\` below one"
        ;;
    outer)
        printf "\`resume\` reads a record by INDENT, and \`workspace_load_project\` SHUTS the \`features:\` list at the next key at project indent, and every feature's \`legs:\` list inside it with it, making no leg of a \`- role:\` below one"

tests/test_repo_hygiene.py:956

  • This new hygiene-test documentation also says “at the next at feature indent,” leaving the documented loader behavior unclear. Use “at the next key at feature indent.”
    and a feature's `legs:` list at the next at feature indent, so a project

tests/test_status_command.py:6760

  • This new test documentation repeats the malformed phrase “at the next at feature indent.” Correct it to “at the next key at feature indent” so the documented contract is clear.
    the next at feature indent, so a `- branch:` or a `- role:` a bad merge

tests/test_status_command.py:6796

  • The expected help string contains the same incomplete phrase “at the next at feature indent.” Update it to “at the next key at feature indent” along with the production help text.
            "feature's `legs:` list at the next at feature indent — the "
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread status Resolved
Comment thread AGENTS.md Resolved
Comment thread README.md Resolved
…`features:` key that reopens the list clears `$dropped` or the leg under it goes out in SILENCE, a list nothing ever OPENED has no key that shut it, an unread leg may not promise back a feature this run already refuses — and the noun six sentences were missing

NINE COMMENTS, FOUR FINDINGS, NONE OF THEM WRONG. Copilot reviewed 9b06ecb
at 2026-09-14T01:31:07Z: three inline threads and six suppressed, of which
six comments are one finding about one missing word and the other three are
three readings of `record_rows` and `read_record`. Each was checked against
`workspace_load_project` before it was taken — nine hand-built records, the
`MANIFEST_*` arrays printed, the two row readers lifted out of 9b06ecb's
`status` and out of this one and run over the same nine. Sourcery's slot was
spent ("you've used your own review budget of 250,000 diff characters"), so
this round is Copilot's alone.

THE NOUN, SIX PLACES (three inline threads, verbatim: "This new help text
says 'at the next at feature indent,' which is missing the noun describing
what is next and makes the recovery instruction unclear. Please change it to
'at the next key at feature indent,' and update the mirrored docs/tests", and
the same of AGENTS.md and of the README; three suppressed, of
`tests/test_repo_hygiene.py`, of the new test's docstring and of the help
string it pins). IT IS RIGHT AND IT IS ONE SENTENCE: the clause beside it,
"shuts the `features:` list at the next key at project indent", has the noun,
and this one was written from it without. `status --help`, AGENTS.md rule 4,
the README, the two cap docstrings and the test that pins the help
byte-for-byte now say "at the next key at feature indent". `grep -rn "next at
"` over the tree returns nothing; "next key at" returns eighteen. The caps do
not move: the word was absorbed by rewrapping inside the lines the entries
above already bought — AGENTS.md 224, README.md 383, the same counts 9b06ecb
measured after its rebase.

A REOPENED LIST IS A CLEAN SLATE FOR `$dropped` (suppressed, verbatim):
"`dropped` remains set after an unread `- branch:` even when a later
`features:` key reopens the list. In that shape the loader keeps the last
real feature as the current feature, so a subsequent `- role:` under a closed
`legs:` list belongs to that real feature; this condition suppresses its
`noleg` row, causing `read_record` to miss the unread leg (or incorrectly
report that the feature lists no leg). Reset `dropped` when `features:`
reopens the feature list, and add a regression for this reopen-then-noleg
case."

IT IS RIGHT, AND THE SECOND HALF IS THIS BRANCH'S OWN SENTENCE TURNED ON
ITSELF. `$dropped` says "the last `- branch:` line was one the loader did not
read, so the legs written under it are its defect and not a second one" — and
a `features:` key ENDS that, because `feature_index` does not move at a line
the loader reads no feature out of and the legs of a reopened list are
collected onto the feature ABOVE the unread one. Run against the extension
2026-09-14, the record with a project key, an unread `- branch: 002-ghost`, a
second `features:` key and a `- role: spec` under it:

  features=1 legs=1  branches=[001-a-thing] roles=[repo] leg_feature=[0]

— one feature, one leg, and the `spec` line no leg at all. 9b06ecb's reader
emitted `branch=1 leg=1 nofeature=1 noleg=0` for it: the unread leg got NO
ROW, and the report said nothing whatever about it, printing only the `repo`
leg's own line and the ghost branch's finding. With the feature above keeping
no read leg of its own it was worse than silent: `feature_drops` stayed 0,
and "the record lists no leg for it" went out about a record that lists one —
the sentence this branch exists to stop making. `$dropped` is now cleared
where `features:` reopens the list, and the reader answers `noleg=1` carrying
`001-a-thing`, which is the feature `MANIFEST_LEG_FEATURE` files that list's
legs under.

A LIST THAT WAS NEVER OPENED HAS NO KEY THAT SHUT IT (suppressed, verbatim):
"This helper is used for every `nofeature` row, including the new cases where
a branch appears before the first `features:` key or where the record has no
`features:` key at all. Those lists were never opened, but the emitted
explanation says a later project-level key shut the list and that the branch
is below it; the analogous `legs` text is also wrong when a role precedes the
first `legs:` key. Carry whether the list was never opened versus closed and
phrase the finding accordingly, otherwise the actionable diagnosis points the
reader to a closing key that does not exist."

IT IS RIGHT IN BOTH HALVES, and it is the one kind of error this layer may
not make: a finding whose whole worth is the line it sends a hand to. Against
the extension 2026-09-14 — a `- branch:` above every `features:` key loads
`features=0 legs=0`; a `- role:` above its feature's `legs:` key loads
`features=1 legs=1`, the leg being the one BELOW the key; with no `legs:` key
at all, `features=1 legs=0`. In all three nothing shut a list, because
nothing opened one. 9b06ecb answered the first with the `feature` arm ("SHUTS
the `features:` list at the next key at project indent") and the other two
with the `legs` arm ("SHUTS a feature's `legs:` list at the next line
shallower than its `- role:` items"), each naming a key the record has not
got. `record_unread_why` takes two arms more — `nolist` and `nolegs`, which
name the key that OPENS each list and say it is missing ABOVE that line — and
the rows carry which: the `nofeature` row's second field is `nolist` where no
`features:` key has been read in the block yet, and `$leg_why` is `nolegs`
where no `legs:` key has opened a list since this feature's `- branch:` line.
The exits do not move, and that is the point of keeping them in one function:
the order `park` writes is where the missing key goes back, and the re-park is
still only from the workstation that has the feature.

AND THE THIRD STATE MAY NOT SWALLOW THE SECOND, which is not Copilot's
finding but the hole taking it opened. `$leg_why` is three states now, and an
indent-6 line is where they collide: the loader's indent-6 arm makes a feature
only where the item's key is `branch` (`[ "$key" = branch ] || continue`), so
an indent-6 line that is anything else reads as NO feature and leaves the one
above it current — and THAT feature has its `legs:` key above the line. Run
2026-09-14 on both spellings, `      - stray: x` and `      stray: x`, with a
`- role:` under each: `features=1 legs=1 leg_feature=[0]` for both, the leg
being the one above the line. So that line is a key that SHUT a list, `legs`
as it was before this round, and a `nolegs` there would send a hand looking
for a `legs:` key the feature has got. `nolegs` is now the `- branch:` line's
alone; every other line at indent 6 is read with the indent-8 keys beside it.
Written the other way first and caught by the phase that holds it: the two
spellings came back with "this feature has no such key ABOVE that line" about
a feature whose `legs:` key is four lines up.

AND "BRINGS THE FEATURE BACK" IS NOT SAID OVER A FEATURE THIS RUN ALREADY
REFUSES (suppressed, verbatim): "This wording assumes that the readable legs
will resume successfully, but `feature_why`, `feature_rr`, or `feature_add`
may already contain a whole-feature refusal from one of those legs. In that
case `check_parked_leg` reports the feature as refused and does not offer
`resume`, while this line says that `resume` brings it back, producing
contradictory guidance. Gate the partial-leg wording on there being no
whole-feature verdict, or fold the unread-leg detail into the existing
refusal."

IT IS RIGHT, and the pair is the one the rule at the top of
`check_parked_leg` forbids — made by this layer against itself, in the same
report and four lines apart. The record: a `nope` leg this root does not
mount, then a `feature_directory:` a merge left below it, then a `repo` leg
under that key. The loader reads `features=1 legs=1 roles=[nope]`
(2026-09-14): `collect_legs` maps `nope` onto nothing and refuses the WHOLE
feature before any RR is asked, so every leg line prints that refusal and
offers no `resume` — while 9b06ecb's unread-leg line above them said

  `resume` brings the feature back with the legs it does read and leaves that
  one's work where it was parked

of a feature this same run will not bring back at all. The verdict is read
back here in the order the `leg)` arm reads it — `feature_why`, then
`feature_rr`, then `feature_add`, which is `collect_legs` before the RRs
before the add — and where there is one the sentence is "`resume` refuses this
feature WHOLE in any case, for the reason the legs it does read give on their
own lines below, so nothing here brings it back". The exits stay, because
those lines are one park from gone whatever refuses the feature.

THE ROW READER DIFFED 9b06ecb -> THIS COMMIT OVER TWENTY-ONE RECORDS, which
is the guard this round can carry: the estate-level one in the PR body is
`7efc850` -> `9b06ecb` and is NOT rebuilt here, because nothing this round
changes is a count — it is which line a finding names, and one line that was
never printed. `record_rows` lifted out of each `status` and run over the
twelve records 9b06ecb was probed with plus the nine built for this round,
2026-09-14:

  * THE FEATURE AND LEG COUNTS ARE IDENTICAL IN ALL TWENTY-ONE. The agreement
    with `workspace_load_project` that 9b06ecb established is untouched.
  * Ten records are identical in every field: (b), (d), (e), (f), (g), (h),
    (j), and the three built for the indent-6 reading and the verdict gate.
  * Three differ in the `nofeature` row's NEW FIELD ONLY — (a), (i) and (k),
    which carry `feature` where they carried nothing — and the sentence
    printed for them is byte for byte what it was, because that is the arm
    `record_unread_why`'s default already chose.
  * Three change that field's VALUE, and with it the sentence: (c1), (c2) and
    the new `nolist` record, from the shutting arm to the opening one.
  * Three change a `noleg` row's why from `legs` to `nolegs`, the two built
    for a `- role:` above its `legs:` key and the one for a second feature
    that has no `legs:` key at all.
  * Two gain a `noleg` ROW: the reopen-then-noleg pair, where 9b06ecb emitted
    none and said nothing.

THREE TESTS, AND FIVE BITE. Against 9b06ecb's `status` in a scratch tree with
this branch's `tests/` (2026-09-14): `5 failed, 191 passed` —
`test_a_reopened_list_below_an_unread_branch_still_says_the_leg_it_drops` and
`test_a_role_above_its_features_legs_key_names_the_key_that_never_opened` and
`test_the_unread_leg_line_never_promises_a_feature_this_run_refuses` (the
three new ones), `test_a_branch_above_every_features_key_is_a_feature_resume_never_makes`
(which took the `nolist` arm) and
`test_the_help_carries_the_no_push_exception_its_findings_do` (the missing
noun, in the paragraph it pins byte-for-byte). Each new test quotes the
finding it answers verbatim in its docstring and carries the loader's run for
the shape it builds. The third phase of the `nolegs` test is the one assertion
here that does NOT bite against 9b06ecb, and it is named for that reason: it
holds the arm 9b06ecb already got right, and it bites against this round's own
first draft, which is the only place that shape was ever wrong.

THE SUITE: 485 at 9b06ecb, 488 here (`python3 -m pytest tests -q`, in a real
checkout with the submodule at the pinned commit). THE CAPS DO NOT MOVE:
AGENTS.md 224, README.md 383, both entries in `tests/test_repo_hygiene.py`
unchanged in their arithmetic and corrected in their wording.

INVARIANTS: the shared estate resolver byte-identical across `park`, `resume`
and `status`; `expand_home` byte-identical across `status` and `resume`; `gh
api` only in `gh_api_line`; no bash-4-only grammar; `bash -n status` clean;
shellcheck 0.9.0's finding profile byte-identical to 9b06ecb's (30 SC2317, 2
SC2015); and this commit adds no `"${arr[@]}"` expansion at all — `$leg_why`
and `$why` are scalars, and the one array read it goes near is the
`${feature_*[seen_branches - 1]:-}` form every arm around it already uses.

RECORDED AND NOT TAKEN is unchanged from 9b06ecb's message and is this
layer's oldest disagreement, not this round's: `workspace_load_project` takes
a list item by stripping `- ` and TRIMMING AGAIN, so `-   branch:` and
`-   role:` are a feature and a leg to it while this reader's patterns are the
single-space spelling `workspace_write_manifest` writes. Both readers still
answer identically on both, and it wants an item parser this layer has never
had.

Base: 9b06ecb.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Clarify empty-role diagnostics and add regression coverage before approval.

Review details

Suppressed comments (1)

status:5325

  • When an unread - role: has an empty value (for example - role: # note under a closed legs: list), feature_drop_role is empty and this renders the record lists its `` leg. That makes the new recovery diagnostic unclear for a roleless record; use an explicit label such as “a leg with no role” (and cover this malformed spelling in the regression tests).
                        finding "parked feature $a: the record lists its \`${feature_drop_role[seen_branches - 1]:-}\` leg where \`resume\` reads no leg, because $(record_unread_why "${feature_drop_why[seen_branches - 1]:-legs}"); \`resume\` collects NO leg for this feature and refuses it WHOLE, reporting it as a shape mismatch, so nothing here brings it back — $(record_unread_exits "${RECORD_FILE##*/}" "$where")"
                    elif [ -n "$verdict" ]; then
                        finding "parked feature $a: the record lists a \`${feature_drop_role[seen_branches - 1]:-}\` leg for it where \`resume\` reads no leg, because $(record_unread_why "${feature_drop_why[seen_branches - 1]:-legs}"); \`resume\` refuses this feature WHOLE in any case, for the reason the legs it does read give on their own lines below, so nothing here brings it back — $(record_unread_exits "${RECORD_FILE##*/}" "$where")"
                    else
                        finding "parked feature $a: the record lists a \`${feature_drop_role[seen_branches - 1]:-}\` leg for it where \`resume\` reads no leg, because $(record_unread_why "${feature_drop_why[seen_branches - 1]:-legs}"); \`resume\` brings the feature back with the legs it does read and leaves that one's work where it was parked — $(record_unread_exits "${RECORD_FILE##*/}" "$where")"
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…ead `- role:` the record gives NO ROLE was named with a pair of empty backticks — and `- role: # note` is that line to both readers, which is this layer's own reading from #21 arriving in the arms this branch added

COPILOT'S SECOND ROUND ON THIS PR (2026-09-14T04:15:43Z, one suppressed
comment on `status`, no inline threads, no new comments), verbatim:

  "When an unread `- role:` has an empty value (for example `- role: # note`
  under a closed `legs:` list), `feature_drop_role` is empty and this renders
  `the record lists its `` leg`. That makes the new recovery diagnostic
  unclear for a roleless record; use an explicit label such as "a leg with no
  role" (and cover this malformed spelling in the regression tests)."

IT IS RIGHT, AND THE SPELLING IS ONE THIS LAYER ALREADY KNOWS. `record_scalar`
takes a `#` comment off every value because `workspace_load_project` takes it
off every LINE before it splits key from value, so `- role: # note` is a leg
with no role to BOTH readers — the reading Copilot's round on #21 put above
`record_scalar` itself, four functions above the arms this branch added. The
bare `- role:` is the same line by the same rule. Neither had ever reached
these arms before this branch wrote them, and the line they drew named the leg
with nothing at all between two backticks: a name where the reader is looking
for one, on a line whose whole worth is sending a hand to a line.

RUN AGAINST THE INSTALLED EXTENSION, 2026-09-14, on every shape the arms can
be reached in:

  the roleless line beside a leg the loader DOES read   -> 1 feature, 1 leg,
                                                          `MANIFEST_LEG_ROLE`
                                                          `[repo]`
  the roleless line as the feature's only leg           -> 1 feature, 0 legs
  the same under a `- branch:` with no value either     -> 1 feature named
                                                          nothing, 0 legs

In every one of them `MANIFEST_LEG_ROLE` has no entry for that line:
`collect_legs` never walks it, no RR is ever asked of it, and it is unread for
exactly the reason the finding gives. What was wrong was only the noun.

`record_unread_leg` IS THAT NOUN, worded once beside `record_unread_why` and
`record_unread_exits` and for the same reason: the role in backticks where the
record gives one, "leg with no role" where it does not. The three sentences
that name a dropped leg read it — the feature that keeps a leg `resume` reads
("the record lists a leg with no role for it where `resume` reads no leg"),
the feature that keeps none ("the record lists its leg with no role where
`resume` reads no leg"), and the feature whose `- branch:` has no value either
("the leg with no role listed under it sits where `resume` reads no leg") —
and for every record that names its roles the printed bytes are what they
were, because the helper prints "`repo` leg" exactly as the interpolation
did.

RECORDED AND NOT TAKEN, and it is the EXITS' reading rather than this line's.
With the key put back, a leg with no role is one `collect_legs` READS, and a
role it cannot map is a refusal of the WHOLE feature — so the first exit does
not, for this one record shape, end in a feature that comes back. This layer
already says that: `check_parked_leg`'s roleless arm prints "a leg of it in
the record has no role; `resume` maps each leg's role onto this checkout and
refuses the WHOLE feature" with the re-park as its only exit, on the run after
the key moves, which is where it is true. Bolting it onto this sentence would
say it twice and say it early, about a state the record is not in yet. It is
named here so the next reading starts from it.

TWO TESTS, BOTH BITING. Against 8a77d39's `status` in a scratch tree with this
commit's `tests/` (2026-09-14): `2 failed, 196 passed` —
`test_an_unread_leg_with_no_role_is_named_by_the_role_it_has_not_got`, which
holds both spellings against both arms that name a dropped leg on a feature
the record names, and
`test_a_blank_branch_over_an_unread_leg_with_no_role_says_both_and_neither`,
which holds the third. Each asserts `"``" not in result.stdout` beside the
sentence it pins, because the empty pair is the defect and the wording is the
fix. The loader's answer for every record they build is in the docstrings.

THE SUITE: 488 at 8a77d39, 490 here (`python3 -m pytest tests -q`, in a real
checkout with the submodule at the pinned commit). THE CAPS DO NOT MOVE:
AGENTS.md 224, README.md 383 — this commit touches no document, because the
noun is a finding's and the documents name no leg.

INVARIANTS: the shared estate resolver byte-identical across `park`, `resume`
and `status`; `expand_home` byte-identical across `status` and `resume`;
`gh api` only in `gh_api_line`; no bash-4-only grammar; `bash -n status`
clean; shellcheck 0.9.0's finding profile identical to 8a77d39's; and no
`"${arr[@]}"` expansion is added — `record_unread_leg` takes one positional
and prints.

Base: 8a77d39.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 04:34
@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's two rounds, answered: five findings, all five REAL, none refused

Round 1 on 9b06ecb (2026-09-14T01:31Z, three inline threads and six suppressed) and round 2 on 8a77d39 (04:15Z, one suppressed) are taken in 8a77d39 and 2bedf9b. Nothing was judged wrong, so there is nothing here to argue against — this comment is the proof each one was checked before it was taken, and the one thing taking them required that no round asked for.

Every claim below was decided by running workspace_load_project itself: git-common.sh and workspace-common.sh sourced in place, hand-built records, the MANIFEST_* arrays printed; and record_rows lifted out of each status and run over the same records.

1. "at the next key at feature indent" — six places (3 inline + 3 suppressed)

Taken. The clause beside it always had the noun; this one was written from it without. status --help, AGENTS.md rule 4, the README, both cap docstrings and the help string the suite pins byte-for-byte now say it. Over the tree, grep -rn "next at " returns nothing and grep -rn "next key at" returns eighteen. The caps did not move — the word was absorbed by rewrapping inside lines the entries above had already bought (AGENTS.md 224, README.md 383).

2. dropped must be reset when features: reopens the list

Taken. The loader, on the record with a project key, an unread - branch: 002-ghost, a second features: key and a - role: spec under it:

features=1 legs=1  branches=[001-a-thing]  roles=[repo]  leg_feature=[0]

One feature, one leg — and the spec line no leg at all, filed under nothing. 9b06ecb's reader answered branch=1 leg=1 nofeature=1 noleg=0: the unread leg got no row and the report said nothing whatever about it. With the feature above keeping no read leg of its own it was worse than silent — "the record lists no leg for it" went out about a record that lists one. $dropped is now cleared where features: reopens the list, and the row carries 001-a-thing, which is the feature MANIFEST_LEG_FEATURE files that list's legs under.

3. A list that was never opened has no key that shut it

Taken, in both halves. Against the extension: a - branch: above every features: key loads features=0 legs=0; a - role: above its feature's legs: key loads features=1 legs=1, the leg being the one below the key; with no legs: key at all, features=1 legs=0. In all three nothing shut a list, because nothing opened one — and 9b06ecb named a closing key the record has not got. record_unread_why takes two arms more, nolist and nolegs, which name the key that OPENS each list; the rows carry which.

4. And the third state may not swallow the second — not asked for, but taking (3) required it

The loader's indent-6 arm makes a feature only where the item's key is branch ([ "$key" = branch ] || continue). So an indent-6 line that is anything else reads as no feature and leaves the one above it current — and that feature has its legs: key above the line. Both spellings, 2026-09-14:

- stray: x    -> features=1 legs=1  roles=[repo]  leg_feature=[0]
  stray: x    -> features=1 legs=1  roles=[repo]  leg_feature=[0]

Written the symmetric way first, it answered "this feature has no such key ABOVE that line" about a feature whose legs: key is four lines up. nolegs is now the - branch: line's alone, and the phase that holds it is the one assertion in this round that does not bite against 9b06ecb — it holds the arm 9b06ecb already got right.

5. An unread leg line may not promise back a feature this run already refuses

Taken. The record lists a nope leg this root does not mount, a feature_directory: a merge left below it, and a repo leg under that key; the loader reads features=1 legs=1 roles=[nope]. collect_legs refuses the WHOLE feature before any RR is asked, so every leg line prints that refusal and offers no resume — while the unread-leg line above them said "resume brings the feature back with the legs it does read". That is the contradictory pair the rule at the top of check_parked_leg forbids, made by this layer against itself. The verdict is now read back in the order the leg) arm reads it (feature_why, then feature_rr, then feature_add).

6. Round 2: an unread - role: with no role was named with empty backticks

Taken. - role: # note is a leg with no role to both readers, because record_scalar takes a # comment off every value for the same reason the loader takes it off every line — the reading #21's round put above record_scalar itself. The loader on every shape the arms can be reached in: beside a leg it does read, features=1 legs=1 roles=[repo]; as the feature's only leg, features=1 legs=0; under a - branch: with no value either, one feature named nothing and legs=0. MANIFEST_LEG_ROLE has no entry for that line in any of them. record_unread_leg names it by the role it has not got, and for every record that names its roles the printed bytes are unchanged.

Recorded and not taken: with the key put back, a leg with no role is one collect_legs READS, and that is a refusal of the whole feature — which check_parked_leg's roleless arm already says, with the re-park as its only exit, on the run after the key moves. Saying it here too would say it early, about a state the record is not in yet.

The measurements

  • Bite — this branch's tests/ against 9b06ecb's status in a scratch tree: 5 failed, 191 passed; against 8a77d39's: 2 failed, 196 passed.
  • Row-level differential, 9b06ecb → 8a77d39, twenty-one records (the twelve 9b06ecb was probed with plus nine built for the round): the feature and leg counts are identical in all twenty-one — the agreement with the loader is untouched. Ten records are identical in every field; three differ in the nofeature row's new field only, where the printed sentence is byte for byte what it was; three change that field's value and with it the sentence; three change a noleg why from legs to nolegs; and two gain a noleg row where 9b06ecb emitted none.
  • Suite: 485 at 9b06ecb, 488 at 8a77d39, 490 at 2bedf9b.
  • Caps: AGENTS.md 224, README.md 383 — unmoved by either commit.
  • Invariants: shared estate resolver byte-identical across park/resume/status; expand_home byte-identical across status/resume; gh api only in gh_api_line; no bash-4-only grammar; bash -n status clean; shellcheck 0.9.0's finding profile identical to 9b06ecb's at each step; and neither commit adds a "${arr[@]}" expansion.

The estate-level differential guard in the PR description is 7efc850 → 9b06ecb and was not rebuilt for these rounds: nothing either commit changes is a count. What they change is which line a finding names, one line that was never printed, and one name that was printed empty.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate issue remains where mixed blank-branch records can suppress unread-leg diagnostics.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread status Resolved
Copilot AI review requested due to automatic review settings September 14, 2026 04:56
…this whole branch exists to shut: a blank `- branch:` that keeps a leg said NOTHING WHATEVER about the one the key order drops, because the combined line was reached only where the feature keeps none

COPILOT'S THIRD ROUND ON THIS PR (2026-09-14T04:41:05Z, one inline thread on
`status`, no suppressed comments), verbatim:

  "When a blank `- branch:` has both a readable leg and a `noleg`, this
  condition skips the new combined diagnostic because it only enters the
  unread-leg branch when `feature_legs` is zero. Control then falls through to
  the older blank-branch message; `unnamed=1` suppresses all readable leg rows
  and the later `noleg` arm is a no-op, so the unread leg/key-order defect is
  never reported. Please handle this mixed case too (and add a regression)
  while retaining the blank-branch refusal."

IT IS RIGHT, AND IT IS THE SHAPE OF HOLE THIS BRANCH WAS WRITTEN TO CLOSE —
made by the branch itself, in the one arm where every other way of saying it
is already shut off. The blank name suppresses every per-leg line by design
(`unnamed=1`, and the `leg)` arm's first statement: there is no branch to find
a worktree for, and each line would only print the refusal again with the name
blank); the `noleg)` arm of the second pass only counts; so the feature's own
line is the ONLY place an unread leg of a nameless feature can be named — and
that line reached the combined wording solely where `feature_legs` was 0.
Where the feature kept one leg the loader reads and lost another to a key,
`status` printed "a `- branch:` in the record has no value" and stopped, with
nothing at all about the line the record lists and `resume` will not read.

RUN AGAINST THE INSTALLED EXTENSION, 2026-09-14, on the record this commit's
test builds — a blank `- branch:`, a `legs:` key, a `repo` leg, a
`feature_directory:` a merge left below it, and a `spec` leg under that key:

  features=1 legs=1  branches=[]  roles=[repo]  leg_feature=[0]

One feature named nothing, ONE leg, and the `spec` line no leg at all. The row
reader has emitted its `noleg` row for that line since 9b06ecb's own commit;
`read_record` had nowhere to say it.

THE ARM IS THE THIRD OF FOUR, and its refusal is not the arm above it's. A
feature that keeps a leg `collect_legs` COLLECTS is not refused as a shape
mismatch: the run gets as far as RR2 and refuses it there with the name blank
("Error:  is no longer on origin in the repo leg"), which is what the arm
BELOW says and what Copilot asked be retained. So the line says the two
defects in one sentence, names the dropped leg and the list that shut it, and
keeps RR2's refusal:

  parked feature with no branch name: a `- branch:` in the record has no
  value, and a `spec` leg listed under it sits where `resume` reads no leg,
  because …; `resume` reads the feature as one named nothing and refuses it as
  a branch origin has not got ("is no longer on origin", the name blank), so
  nothing here brings it back — …

AND THE EXITS DO NOT MOVE, for the reason the arm above them gives: a key put
back leaves a feature named nothing, which no re-ordering settles, so they are
the blank name's delete-or-re-park pair and not the key-order pair every other
unread line carries. They carry the dropped leg's lines too, because the park
that writes the branch writes the legs it parks with it.

ONE TEST, AND IT BITES. Against 2bedf9b's `status` in a scratch tree with this
commit's `tests/`: `1 failed, 6 passed` on the blank-branch family —
`test_a_blank_branch_that_keeps_a_leg_still_names_the_one_it_drops`, which
pins the line, holds the finding COUNT at one (no per-leg line for either
leg), and asserts "lists no leg" is not said about a record that lists two.
The three blank-branch tests beside it are unmoved: the legless arm, the
combined arm and the `else` arm each still say what they said.

THE SUITE: 490 at 2bedf9b, 491 here (`python3 -m pytest tests -q`, in a real
checkout with the submodule at the pinned commit). THE CAPS DO NOT MOVE:
AGENTS.md 224, README.md 383 — this commit touches no document either.

INVARIANTS: the shared estate resolver byte-identical across `park`, `resume`
and `status`; `expand_home` byte-identical across `status` and `resume`;
`gh api` only in `gh_api_line`; no bash-4-only grammar; `bash -n status`
clean; shellcheck 0.9.0's finding profile identical to 2bedf9b's; and no
`"${arr[@]}"` expansion is added — the new arm reads the same
`${feature_*[seen_branches - 1]:-}` form as the three beside it.

Base: 2bedf9b.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The changes span parsing, recovery behavior, tests, and documentation, warranting final human review.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

Rounds 3 and 4

Round 3 on 2bedf9b (one inline thread, status:5281) is real and taken in 55bb7a1, answered and resolved on the thread. It is the shape of hole this branch exists to close, made by the branch itself in the one arm where every other way of saying it is already shut off: a blank - branch: suppresses every per-leg line by design, the noleg arm only counts, so the feature's own line is the ONLY place an unread leg of a nameless feature can be named — and it reached the combined wording solely where feature_legs was 0. The loader on the record the regression builds:

features=1 legs=1  branches=[]  roles=[repo]  leg_feature=[0]

One feature named nothing, one leg, and the spec line no leg at all — said nowhere. The new arm is the third of four; it keeps RR2's refusal rather than the shape mismatch, because the feature does keep a leg collect_legs collects, and it keeps the blank name's delete-or-re-park exits, because no re-ordering settles a feature named nothing.

Round 4 on 55bb7a1 generated 0 comments and raised no finding: "The changes span parsing, recovery behavior, tests, and documentation, warranting final human review."

Where that leaves the four commits

bite suite caps
9b06ecb — 485 224 / 383
8a77d39 5 tests fail against 9b06ecb 488 224 / 383
2bedf9b 2 more against 8a77d39 490 224 / 383
55bb7a1 1 more against 2bedf9b 491 224 / 383

Eleven comments over four rounds, six findings, all six real, all six taken, none refused — plus one the rounds did not raise and taking round 1's third finding required (nolegs is the - branch: line's alone; any other line at indent 6 leaves the feature above it current, and that feature has its legs: key). Invariants hold at every step and shellcheck 0.9.0's finding profile is byte-identical to 9b06ecb's at each: 30 SC2317, 2 SC2015. All five checks green on 55bb7a1; mergeStateStatus CLEAN.

Sourcery has not reviewed since 9b06ecb — its budget is spent ("you've used your own review budget of 250,000 diff characters for the last 7 days") and returns about 16:33Z today; @sourcery-ai review will fetch one then.

…easured to 224/409

`main` moved twice under this branch while it waited on review. `7efc850`
(#27, the path `resume` computes for a parked feature's worktree) it already
sits on; `63a74af` (#26, Amendment 11's lane tooling — `restart`, `lanes`,
`commands/swap.md`, `skills/restart/SKILL.md` and the `$LANES_WORKSTATION`
rule) is what this merge brings in.

A MERGE AND NOT A REBASE, deliberately. The branch is pushed and #33 is under
review: three Copilot rounds are recorded against `8a77d39`, `2bedf9b` and
`55bb7a1`, and every inline thread on it hangs off a line in one of those
three commits. A rebase would rewrite all three and leave the review pointing
at commits that no longer exist.

**THE OVERLAP IS THREE FILES AND ONE CONFLICT.** #26 touches neither `status`
nor `tests/test_status_command.py`, which are this branch's whole subject, so
the only files both sides wrote are `AGENTS.md`, `README.md` and
`tests/test_repo_hygiene.py`.

`AGENTS.md` and `README.md` merged clean, and both readings stand in their own
places. In `AGENTS.md` that is `main`'s opening count of what `--install`
places — nine to eleven, line 6 — and this branch's ten lines on the record's
KEY ORDER inside rule 4, line 129. In `README.md` it is this branch's six
lines in the parked-record exception and `main`'s twenty-six for `restart`,
`lanes`, the `$LANES_WORKSTATION` row and clause (j)'s settled narrowing.
Measured against each side: the merged `AGENTS.md` differs from this branch's
by exactly `main`'s one line, and the merged `README.md` differs from `main`'s
by exactly this branch's six.

**The one conflict was the two README cap entries, and both sides were right.**
Each appended a dated entry after `270 AND 363 MEET AT 377` and each rewrote
the same `assert` — this branch to 383 for the record's key order, `main` to
403 for the merge that carried A11's tooling in. Both entries are kept, in
that order, and a third — `383 AND 403 MEET AT 409` — says what they meet at
and why. Nothing is dropped, because a cap is only worth having while the
reason for every line of it can still be read back.

**THE CAPS ARE RE-MEASURED, NEVER CARRIED OVER.**

    AGENTS.md  224   this branch 224, `main` 214. #26 changed a WORD on line
                     6 and a word is not a line, so the count does not move —
                     and the 224 is still the measurement, not the branch's
                     number waved through. Its own docstring now says so.
    README.md  409   this branch 383, `main` 403. Both raises start from the
                     377 that `270 AND 363 MEET AT 377` records, +6 and +26,
                     and the line sets are disjoint.

409 is the sum and NEITHER SIDE'S NUMBER, and here that is not a nicety: the
merged README measures 409, so `main`'s 403 and this branch's 383 BOTH go red
on `assert len(lines) <= cap`. There was no side to take the answer from.
`AGENTS.md` reads the same way from the other end — `main`'s 214 fails the
merged 224, and the 224 that passes is the one this merge measured, not the
one the branch happened to be carrying.

Both numbers were taken after the merge with `len(text.splitlines())`, the
call each test itself makes, and each cap is that count EXACTLY rather than a
round number above it, so the next line either file gains has to come back
here and say what bought it.

`python3 -m pytest tests -q` on the merged tree: **549 passed**, rc=0 — the
491 this branch measured at `55bb7a1` plus the 58 #26 brings with it. Among
those 58, `ALL_BASH` now holds every shipped file to A9 Addendum 4's newest
rule — a `case` opened inside a `$( )`, which bash 3.2 ends at the first
pattern's `)` — and this is the first time it is asked of the 379 lines this
branch added to `status`. It carries none.

Re-checked on the merged tree beside the suite: `bash -n` clean on all ten
shipped bash files; the shared estate resolver still byte-identical across
`park`, `resume` and `status` (365 lines); `expand_home` still byte-identical
across `status` and `resume`; and `gh api` still run in exactly one place,
`gh_api_line`, with every other mention prose.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 09:13
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A moderate recovery-guidance issue remains, and the PR description has a stale cap claim.

Review details

Suppressed comments (2)

status:5397

  • When the unread nofeature row has an empty branch value, this arm always uses record_unread_exits, whose first remedy is to restore the key order. That does not resolve a blank branch: after moving features: above it, workspace_load_project creates a feature named "" and resume still refuses it at the blank-branch RR2/shape-mismatch path. Please keep the unread-list explanation but use the blank-branch delete/re-park guidance for this case, and cover it with a regression.
                    finding "parked feature with no branch name: the record lists a \`- branch:\` with no value where \`resume\` reads no feature, because $(record_unread_why "${b:-feature}"); it is in none of the features a bare \`resume\` walks, so nothing here brings it back — $(record_unread_exits "${RECORD_FILE##*/}" "$where")"

tests/test_repo_hygiene.py:1654

  • The PR description still reports the README cap as 383 and says the caps are unmoved, but this change enforces 409 and documents that merged main contributed 26 additional lines. Please update the PR description's cap/test claims to match the checked-in 409-line limit so the review evidence is not stale.
    assert len(lines) <= 409, f"README.md is {len(lines)} lines; the cap is 409"
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

Copilot's fourth round, on the merge commit e2952d9

Round 4 ran against the merge of main at 63a74af and generated 0 new
inline comments
; both items were suppressed. Dispositions, in its order:

1. status:5397 — the nofeature arm where the - branch: is also blank.
Recorded, not taken: not this round's, and the second exit is already the
one it asks for.

The merge changed no line of status — git diff --stat 55bb7a1 e2952d9 -- status is empty, and the 18 files it does touch are #26's. So this is the
branch's own code, reviewed in rounds 1–3, and not something the merge
introduced.

On the substance: record_unread_exits prints two exits, not one. The
first is the hand-edit of the key order, and Copilot is right that on its own
it leaves a feature named "". The second is "park that feature again FROM
THE WORKSTATION THAT HAS IT, which rewrites the whole block in that order"
—
and a re-park is exactly what a blank name wants, because it rewrites the
block out of what the loader read with the real branch value in it. The
remedy the finding asks for is therefore already in the line; what it is
observing is that the incomplete exit is listed first.

That ordering is deliberate and was settled in round 3, which drew the
distinction the other way for the arm where the feature keeps a leg: there
"the exits stay the blank name's, since no re-ordering settles a feature named
nothing."
Under a shut list the row is not read as a feature at all, so
the key order is the first thing to say — and the re-park below it carries the
blank name.

2. tests/test_repo_hygiene.py:1654 — the PR description's stale cap.
Real, and caused by this merge. Taken — the description is updated.

The body said README.md 383 and "caps unmoved"; the merge raises the
checked-in cap to 409, so the claim had gone stale. The description now
carries a The merge of main at 63a74af section with the measured counts,
and both earlier cap sentences are marked as the counts at the rebase with
a pointer forward. No code change and no new commit: the stale text was the
description, not the tree.

For the record, the caps are measured and neither side's number would have
done — the merged README is 409, which fails <= 383 and <= 403:

file this branch main merged, checked in
AGENTS.md 224 214 224
README.md 383 403 409

Suite on the merged tree: 549 passed, rc=0. All five checks green at
e2952d9; mergeStateStatus CLEAN.

@brettheap
brettheap merged commit 8a36eb3 into main Sep 14, 2026
7 checks passed
@brettheap
brettheap deleted the fix/record-feature-list-closes branch September 14, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants