Skip to content

fix(gate): a lane drops only through its paired lower record - #1259

Merged
tieubao merged 2 commits into
masterfrom
l312-lane-prune
Dec 2, 2026
Merged

tieubao merged 2 commits into
masterfrom
l312-lane-prune

Conversation

@tieubao

@tieubao tieubao commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

What

The lane check (lane_effective in lib/gate/lane-data.sh) could lower a run's lane on an override that was not the paired lane-lower record: it skipped the field-count and via=lane-lower checks, read the wrong field, and kept a pending lower across unrelated lines. So "override lane-lower" followed by "start --amend tiny" dropped a full spec lane to tiny. A lane now drops only through the exact paired record.

Demo

A ledger with an unpaired lane-lower override then an amend to tiny: lane tiny before, full after.

Proof

docs/verification/l312-lane-prune.md

  • Verdict: works: no crafted ledger lowers a lane without its paired record, and legitimate lowers still work.
  • Proof: tests/test-lane-lower-via.sh red on master, 16/16 after on bash 3.2 and 5; planted faults red; a fresh review ran 20 crafted ledgers, the lane and ship-gate suites with BSD awk, gawk and mawk, and a branch-vs-master pass over 1449 real run ledgers with zero differences.
  • Risk: a ledger that relied on the loose match now keeps its higher lane; undo with a revert.
  • Needs Han: nothing.

Bookkeeping

no-board-row: leftover audit slice tracked on the devkit leftovers item

Restrict lane_effective in lib/gate/lane-data.sh so only an immediately preceding lane-lower override tagged via=lane-lower (written by start --amend --lower) sanctions a START-AMEND below the spec Lane header. Parse the target lane from the first arrow segment (p[2] with n >= 2) so reasons containing arrows still resolve and arrow-less lines are rejected, and drop an unused local variable flagged by shellcheck.
@tieubao
tieubao merged commit 2204bcf into master Dec 2, 2026
11 of 13 checks passed
@tieubao
tieubao deleted the l312-lane-prune branch December 2, 2026 09:14
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.

1 participant