From 3bc6c2d15566054a4d22046f2d3c35f04cb32868 Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Wed, 14 Oct 2026 04:10:50 +0200 Subject: [PATCH] Phase 3 gate, second half: cross-check our masking against an independent hash The gate asks for the relocated-copy result to be cross-checked against an independent cluster hash. OpenRAC/rac2-gc-decomp's config/levels/functions.tsv is exactly that: 7,765 functions carrying a content fingerprint and the levels each appears on. 3,452 appear on all 27, in 2,984 distinct fingerprints. Cross-checked against our own masking of the level-0 copy of each: our masked groups 3,389 reference fingerprint groups 2,984 pairs the reference merges, we split 3,231 pairs we merge, the reference splits 0 ZERO is the number that matters. Whenever our masking says two functions are the same code, the independent fingerprint agrees -- our method never merges what theirs separates. It is strictly finer: 3,389 groups against 2,984, splitting 3,231 pairs the reference keeps together. The likely reason ours splits is that the reference fingerprint evidently ignores something our mask preserves, so functions it calls identical differ in the words our mask keeps. Coarseness, not contradiction. That is the compatible reading and it is the one the 0 supports; had it been non-zero, this would have been a conflict and worth chasing. THE COMPARISON WAS INVALID BEFORE IT WAS VALID The first run reported near-unanimous disagreement -- 1,900 of 3,392 pairs differing -- which read as a significant finding. It was a category error in the harness: key() masks the FIRST FOUR WORDS, while the reference fingerprints the WHOLE function. A four-word summary compared against a whole-body hash is not a comparison of two clusterings, and it produced confident numbers either way. Recording it because nothing in the invalid output distinguishes it from a real conflict, and the correction is only visible from the harness, not the numbers. That is the third time this session that a measurement error produced a result that looked like a finding -- after the constant-zero validity test and the stride sampling artifact -- and the common factor is comparing things whose denominators or extents differ. The gate's second half is met, with "agrees" meaning "never contradicts" and ours the finer of the two partitions. --- docs/formats/core-data-regions.md | 41 +++++++++++++++++++++++++++++++ docs/roadmap.md | 7 +++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/docs/formats/core-data-regions.md b/docs/formats/core-data-regions.md index bcc54cf..9dc6235 100644 --- a/docs/formats/core-data-regions.md +++ b/docs/formats/core-data-regions.md @@ -3494,3 +3494,44 @@ which is a bounded question with the parser as its control. So `moby_anim` is still **not** unblocked, but the question is now bounded rather than open-ended, and the next step is to subtract the parsed geometry from the span and look at what remains. + + +## Phase 3 gate, second half: our masking against an independent clustering + +The Phase 3 gate asks for the relocated-copy result to be "cross-checked against +an independent cluster hash". `OpenRAC/rac2-gc-decomp`'s +`config/levels/functions.tsv` is exactly that: 7,765 functions carrying a content +**fingerprint** and the list of levels each appears on. Of those, **3,452 appear on +all 27**, falling into **2,984 distinct fingerprints**. + +Cross-checking against our own masking, over the level-0 copy of each of those: + + our masked groups 3,389 + reference fingerprint groups 2,984 + pairs the reference merges, we split 3,231 + pairs we merge, the reference splits 0 + +**Zero.** That is the number that matters. Whenever our masking says two functions +are the same code, the independent fingerprint says so too -- our method never +merges what theirs separates. It is *strictly finer*: 3,389 groups against 2,984, +splitting 3,231 pairs the reference keeps together. + +So the two clusterings are compatible, with ours the more discriminating of the +two. The likely reason ours splits: the reference fingerprint evidently ignores +some of what our mask preserves, so functions it considers identical differ in the +words our mask keeps. That is a difference in coarseness, not a contradiction. + +### A comparison that was invalid before it was valid + +The first run of this cross-check reported near-unanimous disagreement -- 1,900 +pairs differing out of 3,392 -- which looked like a real conflict. It was a +category error in the harness: `key()` masks the **first four words**, while the +reference fingerprints the **whole function**. Comparing a four-word summary +against a whole-body hash is not a comparison of two clusterings. + +With `mask()` over the entire body instead, the numbers above are what the two +methods actually say. Recording it because the invalid version would have read +as a significant finding, and the correction is not visible in the numbers alone. + +The gate's second half is therefore met, with the caveat that "agrees" means +"never contradicts", and our result is the finer of the two partitions. diff --git a/docs/roadmap.md b/docs/roadmap.md index 4b132fc..4412e4f 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -690,7 +690,12 @@ reference function's copy on another overlay. twenty-seven and shift every id-keyed lookup after the gap. Asserted. **Gate:** every level-01 function's relocated copy is found on all 27 overlays; -cross-checked against an independent cluster hash. +cross-checked against an independent cluster hash. **Both halves met.** The +cross-check is `OpenRAC/rac2-gc-decomp`'s `config/levels/functions.tsv`: 3,452 +functions appear on all 27 levels in 2,984 distinct content fingerprints. Against +our own masking of the level-0 copies, **our grouping never merges two the +reference separates -- 0 cases** -- and splits 3,231 pairs the reference keeps +together, so our clustering is strictly finer rather than contradictory. **Why this is high-value:** it turns "27 overlays of unknown code" into a table lookup, and it is the main thing inherited from ReRAC.