fix(messages): remove baked source indentation from lost string continuations - #531
Draft
MichaelTaylor3d wants to merge 3 commits into
Draft
fix(messages): remove baked source indentation from lost string continuations#531MichaelTaylor3d wants to merge 3 commits into
MichaelTaylor3d wants to merge 3 commits into
Conversation
Lane anchor for #526. Bumps the workspace version so the branch exists on the remote before any implementation work, per the push-early rule -- a session that dies mid-task must not lose state. Co-Authored-By: Claude <noreply@anthropic.com>
…ard (WIP) Uncommitted work from the dead lane on #526, committed as-is so it survives; compile + guard-coverage verification follow. Co-Authored-By: Claude <noreply@anthropic.com>
…52.82) Co-Authored-By: Claude <noreply@anthropic.com>
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.
DO NOT MERGE — gate round has not returned.
Closes #526
The defect
A Rust string literal continued with a trailing
\renders correctly. When that backslash islost —
cargo fmtrejoining it, or a regex repair — the literal keeps the source's leadingindentation, so the emitted text carries a 14-22 space run in the middle of a sentence. It
compiles, every test stays green, and the mangled and correct forms are indistinguishable in a
normal diff. The only witness is a person reading the emitted text.
Two corrections to the ticket, both measured
The two guards #526 says already pin this class do not exist.
every_operator_facing_line_reads_as_a_sentenceandthe_refusal_messages_read_as_sentencesreturn zero hits repo-wide. #501 is still OPEN — its repairs and guards are on its branch,
not on
origin/main. The ticket was written against that branch's state as though it had merged.The count is eight, not seven.
service.rs:1692is an operator-facing WARN carrying two18-space runs. It sits inside a multi-line literal, which is why a line-oriented sweep does
not see it.
Sites fixed — 8 sites, 11 space runs
pairing.rs:146service.rs:1692cli.rs:255meta.rs:1751service.rs:2630control.rs:6081logging.rs:261meta.rs:1743Fixed with
concat!, never by re-wrapping — re-wrapping is what caused every one of these,and
cargo fmtwould do it again. No message is reworded; only the space run is removed.Deliberately out of scope
Six live sites in
mirror/advertise.rs(:94,:97,:116— three of them productiontracingoutput),mirror/pass.rs(:794,:1067) andmirror/runner.rs(:1374).Open PR #501 changes all four of those files; repairing them from here would duplicate that
work and conflict. Recorded on #501 instead. The guard carries a named
mirror/exclusionciting #501, to be deleted when it merges — at which point the guard holds those sites too.
The guard
A source scan, not a const-set walk: six of the eight sites are inline test assertion messages
that no const-set walk can reach without hoisting them. It skips comment lines structurally
(never by rewording, which would just move the trap to the next author), ignores leading
indentation, and refuses any run of 2+ spaces or any control character inside a literal.
The existing reference —
wallet_env.rs:608 the_announcements_have_no_lost_string_continuation— is too weak on all three of the ticket'sacceptance points: it tests
contains(" ")(four spaces, so it misses a 2- or 3-spacerun), asserts no count, and has no non-vacuity control. This guard asserts a floor on files
scanned, so a scan that reads nothing FAILS rather than passes.
pairing.rs:146's corrected body is asserted through the JSON-RPC error path a clientreceives, not at the literal.
Blast radius
Message text only — no control flow, no signature, no wire shape. The one exclusion that is a
judgement call rather than a fact is
service.rs'ssc qcoutput fixture, which must staybyte-identical to real
sc.exeoutput.