Skip to content

gft interpreter: pin renormalisation carry at all four sites (Refs #2161) - #2648

Merged
gHashTag merged 3 commits into
masterfrom
w699-renorm-carry
Aug 24, 2026
Merged

gft interpreter: pin renormalisation carry at all four sites (Refs #2161)#2648
gHashTag merged 3 commits into
masterfrom
w699-renorm-carry

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

enc, _magmul, _magadd and _magsub all end in the same line:

if mant >= 512: mant = 0; <exponent> += 1

All four survived >= -> >, and one mechanism explains all four: the mutant leaves mant == 512, and (off << 9) | 512 is identical to ((off + 1) << 9) whenever off is even512 == 1 << 9 is the low bit of the exponent field, so the stuck mantissa renormalises the value by accident. Half the exponent space hides the defect.

Three probes read "no difference", all three about the probe

probe why it read clean
sweep of 1.0 + k/4096 every value in one binade, off = 40 — even, so the mutant is invisible
sweep of (512+k)·2^(e−9) exactly representable, and mant == 512 is reached only by rounding up from 511 — the branch is never entered
four separate builds the mutant changes one character, so file size is unchanged and Python reused the first build's __pycache__

The third is the sharpest: all four sites reported the same difference count at the same position, in a function three of them do not touch. An impossible result is the cheap signal — a plausible one would have shipped.

A positive control on the harness (planting a known-live mutant, expecting differences) is what proved the harness worked while its answers were still wrong.

One site is structurally different

In _magmul the carry path cannot reach mant == 512 in principle: the largest product is 1023 * 1023 == 1046529, giving q == 1022, mant == 510. Only the no-carry path distinguishes that site. My hand-derivation said q == 1021; the computation said 1022. Computed, not derived.

Assertions

Each was checked both ways — holds clean, fails when its own site is mutated — and none catches any other site's mutant, so all four are load-bearing rather than three plus a duplicate.

Boundary column for this file, measured after the change: killed 8/31 → 12/31.

Refs #2161

)

`enc`, `_magmul`, `_magadd` and `_magsub` all end in

    if mant >= 512: mant = 0; <exponent> += 1

and all four survived the `>=` -> `>` boundary mutant, for one shared
reason: the mutant leaves mant == 512, and `(off << 9) | 512` is
IDENTICAL to `((off + 1) << 9)` whenever `off` is EVEN, because
512 == 1 << 9 is the low bit of the exponent field. The stuck mantissa
renormalises the value by accident across half the exponent space.

Two further reasons a sweep misses this, both measured:
  * mant == 512 is reached only by rounding UP from 511, so a sweep of
    exactly-representable inputs never enters the branch;
  * in `_magmul` the carry path cannot reach it in principle -- the
    largest product 1023 * 1023 == 1046529 gives q == 1022, mant == 510.

Four assertions, each checked both ways: holds clean, fails when its own
site is mutated, catches no other site's mutant. Boundary column for this
file, measured after the change: killed 8/31 -> 12/31.
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-24 02:12:10 UTC

Summary

Status Count
Total Open PRs 2
PRs with Failing Checks 1
PRs with All Checks Green 1
READY 0
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e6333575ec10 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

…#2161)

The gate asks for docs/now/<date>-<slug>.md, which is where 184 entries
live. Root NOW.md has not changed on master since 2026-08-09; editing it
satisfied nothing and was the wrong file.
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-24 02:15:31 UTC

Summary

Status Count
Total Open PRs 2
PRs with Failing Checks 1
PRs with All Checks Green 1
READY 0
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e6333575ec10 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

… (Refs #2161)

Section 116. The mechanism (512 == 1 << 9 is the low bit of the exponent
field, so a stuck mantissa renormalises for free on even exponents), the
three probe failures that hid it, and the two controls that localised the
fault to the input space rather than the harness.
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-24 02:16:34 UTC

Summary

Status Count
Total Open PRs 2
PRs with Failing Checks 1
PRs with All Checks Green 1
READY 0
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e6333575ec10 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit ce6a6fc into master Aug 24, 2026
23 of 24 checks passed
@gHashTag
gHashTag deleted the w699-renorm-carry branch August 24, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant