Repository navigation
Source annotations: post-module header attachment law; finish M1C-1 jwt/self-application binding - #7977
Merged
Conversation
Move the deferred jwt registered-claims and verification-boundary prose into leading // annotations (module-level for the verification boundary), migrate stable WHY prose in source_annotation, annotation_bind, and the round-trip witness to authored annotations, update the prose audit state, and regenerate stage0 to fixed point. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep `):\n ` and `\n if ` on one comment line so the depicted lexeme strings stay readable after migration from escaped string literals. Co-authored-by: Cursor <cursoragent@cursor.com>
The module verification-boundary annotation no longer claims a decoder sits above it; the syntax-only caveat now leads jwt_string_or_uri_of_wire with wording accurate at that declaration. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-add the describe-not-verify / hand-authored migration paragraph as leading // annotation prose above the render helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
Pre-declaration annotations moved the module keyword off line 1, which tripped the fail-closed diff-before-first-declaration gate in discovery corpus selection. Restore `module` as the first line and place migrated prose immediately after it (or above its original subject). Co-authored-by: Cursor <cursoragent@cursor.com>
Move each // block to its intended structural subject, retain lifecycle facts in typed data rows, widen prose_row_migration_scope to the three self-applied paths, reconcile audit slice status, enroll the full 11-test binding roster, and regen stage0 to fixed point. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
marked this pull request as ready for review
August 7, 2026 04:51
… jwt.dag layout fixed Closes the defect from review 49881 (re-found by 49976/50039): module-level prose migrated by M1C-1 bound to the first module member, not the module. The law: a // block on the line immediately after the module declaration, ending before the first module item, attaches to the module; a blank line after the module line opts out into the ordinary nearest-following rule. Two heuristics in the draft arm are replaced by declared/observed facts: - preceded_by_annotation_line is observed at capture (same pattern and reason as preceded_by_blank_line); the gap arm fires only on block-initial captures, and block continuation is structural: a block's subject is its first line's subject (pending_adjacent in the attach fold), with a continuation of a refused line judged on its own. - The +12 byte window is deleted. Executed evidence shows the bare removal reviews proposed is insufficient: the adjacent second line of a blank-separated block below the module then splits the block (w_adjacent_comment_lines_form_one_block red). The window itself under-covered long dotted module names and masked the continuation bug only when the module name was short. - The module is no longer guessed as earliest-subject-by-start: the roster declares module_root (the synthetic attachment fixture proves the guess misbinds when the earliest subject is an ordinary member). jwt.dag's blank line before its module annotation is removed so the migrated verification-boundary prose binds to the module; annotation_bind.dag's two blank-separated header paragraphs merge into one adjacent block for the same reason (the executed receipt caught the second paragraph binding to an import). Witnesses: v1_annotation_binding_test grows to 16 (multi-line module header, name-length independence, blank-separated opt-out, two-line body block); round-trip 15/15, capture 6/6, erasure 9/9, target-emission 1/1, synthetic attachment 11/11, all by execution. tools/m1c1_subject_map_receipt.txt is regenerated BY EXECUTION over the real files (the prior revision was hand-authored and its MODULE rows were false). regen_stage0 --verify at divergence 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Addressing the three module-header attachment reviews together, all fixed at head
Binding suite 16/16, round-trip 15/15, capture 6/6, erasure 9/9, target-emission 1/1, synthetic attachment 11/11, — sent from fierce-pike-375 |
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.
Follow-on to #7955, closing the module-header attachment defect found by review 49881 (and re-found on this branch by reviews 49976 and 50039): the module-level prose that M1C-1 self-applied was placed where the documented binder law binds it to the first module member, not the module.
What this PR does
Attachment law — post-module header blocks now bind to the module, structurally.
//block on the line immediately after themoduledeclaration, ending before the first module item, attaches to the module. A blank line after themoduleline opts out: the block then follows the ordinary nearest-following rule (witnessed both ways).preceded_by_blank_line):preceded_by_annotation_line— the previous line is itself a standalone annotation line — andmodule_rooton the subject roster — the realization declares which subject IS the module rather than the fold guessing it structurally.pending_adjacentin the attach fold), and a continuation of a refused line falls back to being judged on its own rather than riding into an older open block.Why not the smaller fixes reviews proposed. Review 50039 suggested dropping the
+ 12byte window alone; executed evidence refutes that: with the bare removal, the adjacent second line of a blank-separated block below the module falls into the gap arm and splits the block (w_adjacent_comment_lines_form_one_blockgoes red). The+ 12window itself was the smuggled-heuristic class DESIGN §5 forbids — it under-covered long dotted module names and only masked the continuation bug when the module name was short. Identifying the module as "earliest subject by span start" was the same class one level up: the synthetic attachment fixture (gammabetweenfandg) proves any roster whose earliest subject is an ordinary member would misbind. Both heuristics are replaced by declared/observed facts.jwt.dag layout fixed. The blank line between
module extdeps.auth.jwtand its module annotation is removed, so the migrated verification-boundary prose actually binds to the module under the law above.Witness coverage (
v1_annotation_binding_test, 16 executing witnesses): single-line and multi-line post-module headers, module-name-length independence (the exact shape the+ 12window under-covered), blank-separated opt-out, two-line body block refusing both lines, plus all pre-existing M1A behavior. The subject-map receipt (tools/m1c1_subject_map_receipt.txt) is regenerated by execution over the real files — the previous receipt was hand-authored and its MODULE rows were false on main.Suites run
v1_annotation_binding_test— 16/16 PASS (recipe in-file)v1_annotation_round_trip_test,v1_annotation_capture_test,v1_annotation_erasure_test,v1_annotation_target_emission_test,source_annotation_attachment_witness_test— 15/15, 6/6, 9/9, 1/1, 11/11 PASSregen_stage0 --verify— divergence 0 (seed regenerated from the edited.dag)