fix(steer): the GENERATING-lane warning named a mode it could never report - #122
Merged
Merged
Conversation
…eport (AEAB-25)
A single `warn!` whose TEXT asserted "mode=type here is a regression" while the
structured field carried the mode that actually happened.
25 of 25 records, all-time, are mode="paste" — the mode the same sentence calls
correct. And this is not luck: `must_paste` is `generating || chars > 400 ||
picker_shaped`, so inside `if generating { … }` the paste branch is taken for
EVERY input. The condition the warning described was unreachable BY
CONSTRUCTION, which is stronger than never-observed.
So the line fired only on the healthy path, and a genuine mode=type regression —
if the invariant ever broke — would have arrived as one line among identical
healthy ones, indistinguishable. That is the same shape as the scheduler's
"nothing was delivered" (LR-24) fixed two days ago, in the same file: a loud probe
whose output does not discriminate.
The surrounding comment already states the intent — make every mid-turn delivery
self-announcing so a sweep can count them, and `mode="type"` "should be
structurally impossible". That is instrumentation, not an alarm. So the record
stays for every delivery, at INFO, and only the impossible case is a WARN.
That leaves a branch that cannot currently fire, which is acceptable only while
the invariant holds — so the invariant is now an assertion rather than a comment.
`a_generating_lane_always_pastes_so_the_type_warning_stays_unreachable` sweeps
chars 0..100_000 across both picker shapes. If anyone widens `must_paste` so a
generating lane can be typed into, that test fails loudly AND the warning becomes
live and correct in the same moment.
No behavioural test for the log split itself, and I would rather say so than imply
otherwise: it changes no delivery behaviour, and this repo has no tracing capture
to assert on a log line. The discriminating evidence is the measurement above plus
the pinned invariant.
CI's exact commands: clippy --workspace --all-targets -D warnings exit 0;
test --workspace 39 result lines, 0 failed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4vuEScunv4K6RMwQoT9xx
Amux-Session: amux-errors-and-bugs
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.
A single
warn!whose text assertedmode=type here is a regressionwhile the structured field carried the mode that actually happened.25 of 25 records, all-time, are
mode="paste"— the mode the same sentence calls correct.And that isn't luck.
must_pasteis:generating || chars > 400 || picker_shapedso inside
if generating { … }the paste branch is taken for every input. The condition the warning described was unreachable by construction — stronger than never-observed.So the line fired only on the healthy path, and a genuine
mode=typeregression — if the invariant ever broke — would have arrived as one line among identical healthy ones, indistinguishable. Same shape as the scheduler's "nothing was delivered" (#107) two days ago, in the same file: a loud probe whose output doesn't discriminate.The fix follows the author's own stated intent
The surrounding comment already says it: make every mid-turn delivery self-announcing so a sweep can count them, and
mode="type""should be structurally impossible". That's instrumentation, not an alarm.So the record stays for every delivery, at
INFO, and only the impossible case is aWARN.The unreachable branch is now pinned by an assertion, not a comment
That leaves a branch that can't currently fire, which is acceptable only while the invariant holds. So:
sweeps chars
0..100_000across both picker shapes. If anyone widensmust_pasteso a generating lane can be typed into, that test fails loudly and the warning becomes live and correct in the same moment.What I did not do
No behavioural test for the log split itself, and I'd rather say so than imply otherwise: it changes no delivery behaviour, and this repo has no tracing capture to assert on a log line. The discriminating evidence is the measurement above plus the pinned invariant.
cargo clippy --workspace --all-targets -- -D warningsexit 0;cargo test --workspace39 result lines, 0 failed.🤖 Generated with Claude Code
https://claude.ai/code/session_01B4vuEScunv4K6RMwQoT9xx