Repository navigation
t27b: unify put_bytes on the emit_kit subrange form; ledger deliberate copies - #13601
Merged
Merged
Conversation
…e copies (#13594) macho.t27 splices emit_kit::put_bytes via use instead of carrying its own full-range copy (the two bodies differed only in call convention); the two macho callers pass explicit ranges. The remaining flagged groups (find: red_black_tree vs avl_tree; put_bytes: emit_kit vs session_store; put_dec 3,2) are deliberate cross-domain copies with divergent types and no t27 generics to unify them -- recorded in the duplicate-bodies ledger in this same commit. Verified: t27b native macho 22/22 + invariant; cargo test -p t27b green; macho resealed without --force; dupe_scan errors cleared on this tree. Closes #13594
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: c7786ae9-e079-4758-849f-4f61efac77dd) |
Contributor
gHashTag
enabled auto-merge (squash)
November 11, 2026 04:37
gHashTag
added a commit
that referenced
this pull request
Nov 11, 2026
…ge form (Refs #13592) Master unified put_bytes on the emit_kit subrange signature (#13601); the restored lane copies still called the 3-arg form and were refused by typecheck (emit-bitexact: 2 specs newly fail to generate). 86 call sites lowered mechanically; typecheck passes (elf 0 errors, wasm 0 errors).
gHashTag
added a commit
that referenced
this pull request
Nov 11, 2026
…own source again; elf/wasm move to the emit_kit put_bytes subrange form via put_str (Closes #13602) - specs/compiler/core/t27core.t27: SRC_MAX 262144 -> 524288. t27core.t27 grew past 256 KiB on master (#13194) and the core refused to read its own source ('input exceeds SRC_MAX'), which failed core_selfhost and grew the test-ratchet failing set by 2. One line; the fixpoint test passes again (measured: core(t27core) == gen-c(t27core)). - bootstrap/gen/rust/verified/*.rs (7 files): regenerated with t27c gen-rust after the rust_num_suffix usize branch changed the shared helper bytes; signed_receipt_reader green. - specs/tri/t27b/emit_kit.t27: put_str, the full-range form elf.t27 and wasm.t27 were written against; one definition, spliced through macho's use; test extended. - specs/tri/t27b/elf.t27, wasm.t27: the ~90 put_bytes call sites moved to put_str. #13594 (#13601) unified put_bytes on the 5-arg subrange form and left these two callers typechecking-refused on master -- emit-bitexact newly flagged them on the merge commit. - gen/rust/tri/t27b/{elf,wasm}.rs regenerated; emit_kit/macho/elf/wasm and t27core seals re-saved without --force. Verified locally (zig 0.16 on PATH): core_selfhost 1/1, signed_receipt_reader 9/9, seal currency STALE 0, seal coverage OK 113 known-broken, dupe_scan exit 0, l2_regen_check ok. Closes #13602
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.
Closes #13594.
put_bytes: one definition in emit_kit
macho.t27 splices
emit_kit::put_bytesviauseinstead of carrying its own full-range copy; the two macho callers pass explicit ranges. The spliced module embeds the whole kit into the generated macho.rs -- that is how t27 use works at the gen-rust level; the.t27source has one definition, which is what the duplicate-bodies gate measures.Ledger for the deliberate copies
The remaining flagged groups are cross-domain copies with divergent types and no t27 generics to unify them, recorded in
duplicate_bodies_baseline.txtin this same commit:Evidence
Closes #13594.
Note
Low Risk
Scoped refactor to a shared byte-copy helper with existing oracle tests and an updated seal; no auth or runtime security surface.
Overview
Mach-O spec now shares
put_byteswithemit_kitinstead of defining a full-slice copy locally.macho.t27splices it viause tri::t27b::emit_kit, andput_group/write_objectpass explicit[a..b)ranges.Regenerated
gen/rust/tri/t27b/macho.rsand resealedT27bMachO(closure listsemit_kit, toolchain Zig 0.17.1, hashes updated; tests still 22/22).Duplicate-body ledger (
tools/duplicate_bodies_baseline.txt) records intentional cross-domain copies:put_bytes,find, andput_decarity3,2.Reviewed by Cursor Bugbot for commit 4c531f4. Bugbot is set up for automated code reviews on this repo. Configure here.