chore(hygiene): port the space-run literal guard (#3130) - #65
Draft
MichaelTaylor3d wants to merge 3 commits into
Draft
chore(hygiene): port the space-run literal guard (#3130)#65MichaelTaylor3d wants to merge 3 commits into
MichaelTaylor3d wants to merge 3 commits into
Conversation
MichaelTaylor3d
force-pushed
the
loop/3130-copy-hygiene
branch
from
September 8, 2026 02:36
b0fa162 to
8efb372
Compare
…es (#3130) Ports dig-node's merged reference implementation (continuation_guard.rs, dig-node#526/#583) into every member of the digs workspace, adopting the settled discriminator rather than inventing a second one: a non-comment line carrying a run of 10 or more spaces is a defect, unless immediately followed by `//` or covered by a per-file exclusion. Each copy is byte-identical to the reference apart from its doc comment and a per-crate MIN_FILES_SCANNED floor tuned to that crate's real .rs count, so a walker that stops finding files fails the test instead of silently passing on zero. All three exemption lists are empty in every crate. Covers the 14 published workspace members. The two workspace-excluded crates (digstore-prover/guest, dig-client-wasm) are not built by `cargo test --workspace` and are out of scope. This commit is the guard only; no string literal is changed by it. Refs DIG-Network/dig_ecosystem#3130
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 — lane in progress
WIP for https://github.com/DIG-Network/dig_ecosystem/issues/3130 (port the space-run literal guard
that catches a lost
\string-continuation collapsing into a run of spaces mid-sentence).Reference implementation:
dig-installer/tests/copy_hygiene.rs(PR dig-installer#71, head5020536)— a line-boundary state machine (
Code/Str/Raw(hashes)) that carries literal state acrossline breaks, so it catches both the joined-onto-one-line shape and the lost-continuation shape.
Will update with: the ported guard, whatever it caught, the revert-proof (reintroduce one corruption,
confirm red with a real test count, restore, confirm green), and the dep-bump audit (§2.4b).
Refs https://github.com/DIG-Network/dig_ecosystem/issues/3130