emit-portable: make streamEq self-check opt-in (S6a, #57)#68
Merged
Conversation
Default Doc/createDoc off; edit-session keeps validate on, edit-session-fast skips the full rescan; gate asserts fast ≡ validated five-field align. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
Slice 6a of #57. The
streamEqself-check (full relex + field-by-field comparison after everyedit()) was acceptance scaffolding for the windowed-relexing slices (S3–S5b) and cancelled their lexing win. It is now opt-in:createDoc(src, { validate? }), GoDoc.SetValidate, RustDoc::set_validate— default off. With validation off, the post-edit rescan is skipped and the alignment JSON omits thestreamEqkey ({oldN,newN,prefix,suffix,relexed}); no fabricatedstreamEq: true.edit-sessionrunner protocol keeps validation ON, so the gate and all adversarial corpus scripts continue to exercise the checked path unchanged. A newedit-session-fastprotocol runs with validation off.windowRelexStep, state restoration, resync) is untouched line-for-line.Validation
node test/portable-targets.ts— 34 scenarios × 3 targets × 2 modes, fast ≡ validated everywherenode test/check.ts emit-parity— 5/5;node test/newline-mode.ts— 29/29;npx tsc --noEmit— clean; 5 corpus scripts ALL PARITY (validated path, zero changes)streamEqkey in fast mode, byte-identical stdout and exit codes