Skip to content

math/constants: compile again and pass 36 of 36, seal v2 (Closes #8301) - #8209

Merged
gHashTag merged 3 commits into
masterfrom
claude/math-constants-compile
Oct 9, 2026
Merged

gHashTag merged 3 commits into
masterfrom
claude/math-constants-compile

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #8301.

Taken over on 2026-10-09 (the branch was idle since 13:43Z): merged current master, resealed specs/math/constants.t27 as seal v2 (36 of 36, 0 vacuous), twin Constants.json carries the same v2 record. That clears the stale-seal failures in coverage and spec-guards.

What

specs/math/constants.t27 did not compile. It is the largest root in the #8095 frontier: 259 specs import it directly or transitively, so every one of them was marked closure and rebuilt on every run instead of reusing its seal v2 verdict.

Changes (spec only, no compiler edits)

  • 0.0/0.0, 1.0/0.0 -> std.math.nan(f64) / std.math.inf(f64) (comptime division by zero)
  • free-variable prose invariants (floor_monotonic, floor_integer_consistency, abs_zero_only_for_zero) -> sampled concrete asserts; the codegen lowered them over undeclared x/y
  • exact float identities (phi^2 = phi + 1, 1/phi = phi - 1, phi^2 + phi^-2 = 3, 2cos(pi/5) = phi) get a 1e-12 tolerance (L5)
  • pow / exp_approx: typed locals, @intFromFloat, @rem / @divTrunc for signed ints
  • ln_approx / exp_approx use @log / @exp: the hand series was off by 3.2e-3 at pow(4.0, 0.5) against a 1e-6 tolerance
  • pi_range_validity / euler_number_range_validity read the constant through a call so the check runs at runtime (they were vacuous)

Evidence

t27c test-report specs/math/constants.t27: 36 pass, 0 fail, 0 vacuous.

Not in this PR

No seal file. My local t27c predates the latest bootstrap/src/compiler.rs on master, so a seal written by it would carry a stale toolchain identity. The seal should come from the CI reseal lane.

Refs #8095

🤖 Generated with Claude Code

specs/math/constants.t27 did not compile, so every spec that imports it
(259 in the frontier closure) was rebuilt on every run instead of reusing
its seal v2 verdict.

- 0.0/0.0 and 1.0/0.0 become std.math.nan/inf (comptime division by zero)
- free-variable prose invariants become sampled concrete asserts
- exact float identities get a 1e-12 tolerance (L5)
- pow/exp_approx: typed locals, @intFromFloat, @rem/@divTrunc
- ln_approx/exp_approx use @log/@exp: the hand series was off by 3e-3
  at pow(4.0, 0.5)
- pi/e range tests read the constant through a call, so they run at
  runtime and are no longer vacuous

t27c test-report: 36 pass, 0 fail, 0 vacuous.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-09 13:41:36 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 45
PRs with All Checks Green 5
READY 1
FAILING 45
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 45 + 0 + 0 = 46, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=557cd271f4e3 != 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).

Written by python3 tools/dupe_scan.py --bless; the only change is the
removed 'ln 2' group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-09 14:17:32 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 0
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 48 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=557cd271f4e3 != 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).

This was referenced Oct 9, 2026
#8301)

Takes over #8209, which had been idle since 13:43Z: merges current master
and reseals specs/math/constants.t27 as v2 (36 of 36 tests pass, 0
vacuous). Its twin seal Constants.json gets the same v2 record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag changed the title math/constants: compile again and pass 36 of 36 (Refs #8095) math/constants: compile again and pass 36 of 36, seal v2 (Closes #8301) Oct 9, 2026
@gHashTag
gHashTag enabled auto-merge (squash) October 9, 2026 19:37
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-09 19:47:18 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 0
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 48 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=557cd271f4e3 != 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 c250e59 into master Oct 9, 2026
29 of 33 checks passed
gHashTag pushed a commit that referenced this pull request Oct 9, 2026
… blog-share with t27c 0.5.2

Corpus ratchet was red on this PR, and on every PR built on master after
#8209 (#8316 and #8335 too): #8209 made specs/math/constants.t27 compile
again, its 37 top-level-resync tokens are gone, and the ratchet asks for
the pin to follow ("DISCARD IMPROVED ... re-bless to pin it"). The pin is
lowered by hand, only that row: 349 tokens, all bdd-block-fallback.
Local `t27c suite --ratchet --corpus-only`: RATCHET: CLEAN (it was FAIL
with the same constants.t27 line before).

The blog-share seal is rewritten by t27c 0.5.2 (seal_schema 2, toolchain
recorded), as master's seals are; the first one was written by a 0.5.1
build. Gen hashes are unchanged; 20/20 tests.

Refs #8318

phi^2 + 1/phi^2 = 3 | TRINITY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
gHashTag added a commit that referenced this pull request Oct 9, 2026
#8209 made specs/math/constants.t27 sample its forall properties, so the
top-level-resync channel fell 37 -> 0 (discard 386 -> 349). The ratchet
reads a moved pin as a failure on purpose, so the Corpus ratchet was red
on every PR. The entry is re-recorded with `t27c suite --bless-expectations`.
The cap follows the count down, 74 -> 71: the ledger already held 71
entries. The writer drops the hand-written _why_* history notes, so they
are restored, with this change added.

Re-checked: t27c suite --corpus-only --ratchet prints RATCHET: CLEAN.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 9, 2026
…loses #8371) (#8372)

After the hubs (#8177, #8209) every spec that imported them compiles
again. t27c seal --save ran on the 1203 specs missing a v2 seal:
- 31 were refused (failing tests);
- of the 1172 written, only v2 seals with 0 failed tests and at least one
  test were kept;
- blocked and zero-test seals were reverted (#8354).
727 specs remain, and each one's twin seal files carry the same record.

t27c frontier on this branch: 1109 of 1743 reused (636 permille), up from
424 (243 permille) on master; closure 73, missing 520.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

specs/math/constants.t27 does not compile, so 223 specs rebuild on closure (#8095)

2 participants