thumb2c batch: score registered owners inside retained regions (--owner-spans, --sweep) - #8
Open
wowwheaties wants to merge 1 commit into
Open
Conversation
… batch `thumb2c batch` scores each retained region at its extent, but 64 of the 386 overlay-assembly regions hold more than one registered owner (regions.json manual_regions). Scored at the owner's own span, the unchanged draft often links exact already. - `--owner-spans`: after the region pass, score every registered owner (not yet mapped to C) whose start lies inside the region at that owner's span, one row per owner, with an `owner_spans=` summary line (`list --owner-spans` lists them). - `--sweep`: when the owner span is not exact, retry with the span widened to the rest of the region and report both, for owners registered short of the pool island their function really runs to. - trailing pad: a reference one halfword longer than the candidate with no other differing halfword is ranked exact and marked `trailing_pad=1` with the raw count kept in the row; `adopt` still decides on the real bytes. Default output is unchanged without the flags. On this tree `batch --all --jobs 8 --owner-spans --sweep` reports 270 owner spans in 184 regions, 51 of them exact from the unchanged draft; resource_3a2's 02000ac0 and 02000b2c stay exact at their registered spans, unadopted. Co-Authored-By: Claude Fable 5.1 <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.
Summary
thumb2c batchscores each retained region at its extent, but many regions hold more than one registered owner (regions.jsonmanual_regions). Scoring the unchanged draft at the owner's own span instead often links exact already — that observation produced most of the owners in #6, by hand. This makesthumb2cdo it (supersedes #7, which targeted the removedlifter).--owner-spans(batch, list): after the region pass, score every registered owner whose start lies inside the region at that owner's span; one row per owner (resource_3a2:02000924 span=412 differing_halfwords=6 (region 02000924 extent 1036)) and anowner_spans=… owner_exact=…summary line.--sweep: when the owner span is not exact, retry with the span widened to the rest of the region and report both (sweep_span=… best=owner|sweep), for owners registered short of the pool island their function really runs to (the3c5:02001238/379:02000074shape from ☀️ 74% – adopt seventy-four exact owners on 7d8a72083: eight main-image functions and sixty-six scene sequences #6).wrong_instructions=0is ranked exact and markedtrailing_pad=1with the raw count kept in the row;adoptstill decides on the real bytes.Default output is byte-identical without the flags. No new dependencies;
cargo testandcargo fmt --checkclean;make verifygreen.On this tree (187bb97)
thumb2c batch --all --jobs 8 --owner-spans --sweep: 184 regions, 270 owner spans, 51 exact from the unchanged draft (one via the pad rule:3a6:020011a0), 12 spans where the widened sweep scores better than the registered span. Of the 386 overlay-assembly regions, 64 nest two or more registered owners; those are the ones the region-extent pass could not see.Notes
--jobs 8a handful of owner scores come back withno score line(23 here); each scores fine when retried alone. That is the existing scorer subprocess path under load, not new code — left as is rather than adding a retry you might prefer to shape.