Repository navigation
Conversation
sam-xif
force-pushed
the
nori/fix-22-boot-ids
branch
from
October 10, 2026 01:47
29f94b1 to
67a049f
Compare
`intMetaId`/`strMetaId` are now `opaque` definitions read off the prelude-booted heap, so adding a bootstrap class or boot-time eigenclass no longer requires editing `State.lean` (PR #21 moved them 76/85 -> 87/96 by hand). `opaque` keeps proofs from unfolding the prelude, which the kernel cannot reduce. The values stay 76/85, so the corpus is unaffected, and a new `#eval` names the offending id if the derivation lands on 0 or a non-class object. `ConstantReachControls`'s scratch heap size is now `Boot.mainId + 3` for the same reason. Gate: `run_typed_ratchet.sh` GREEN, 125/125 clinks, 256 agree / 0 disagree, 131/263 corpus rungs, 46/46 negative controls. Authored by Nori, an agent.
sam-xif
force-pushed
the
nori/fix-22-boot-ids
branch
from
October 10, 2026 04:04
67a049f to
57a187c
Compare
2 tasks
Contributor
Contributor
|
Superseded by #84, which makes the same change to the same two files against current Closed by Jiro, an autonomous coding agent. |
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
Closes #22. The boot metaclass ids and the one concrete control-heap size are now
derived rather than pinned, so adding a bootstrap class no longer requires hand-editing
them.
Authored by Nori, an agent — both this code and this description.
What changed
Denote/Sem/Core/State.lean—intMetaId/strMetaId. These are the metaclassesInteger === xandString === xdispatch through. They were literals (76/85)that PR #21 had to move to
87/96by hand when the VFS step-1 classes shifted everylater id. They are now
opaquedefinitions read offSemantics.bootedMachine:opaqueis the load-bearing choice: proofs that mention the ids treat them asconstants, so none unfolds the prelude, which the kernel cannot reduce (checked —
by decidegets stuck onSemantics.bootedMachine, while#evalevaluates it throughthe compiled boot). The value is fixed once at definition time and stays
76/85, sothe corpus and the gate are unchanged.
The derivation is still checked, not merely computed:
coreDataB'sclassOf h intId == intMetaIdis evaluated at the booted heap by#guard bootOkB, and anew
#evalreports the offending id and value if the derivation lands on0or anon-class object — closing acceptance criterion 2 with a message instead of a bare
did not evaluate to true:Denote/Controls/ConstantReachControls.lean— control-heap size. The literalArray.replicate 47(the same fragility: #21 bumped47 → 48) is nowBoot.mainId + 3, expressed in terms of the id it sits just past.notes/ratchet/implementation-notes.md— a short entry recording the change.Verification
cd ruby-lean && ./scripts/run_typed_ratchet.sh— RATCHET GREEN:./scripts/run_clink_rebuild.shalso PASS on its own, same standard-axiom auditThe derived ids were confirmed to equal the literals they replace (
76,85), so noobservable behavior changes.
New issue filed
#46 —
make gen-checkis not run by any CI job, andmake gatesilently regenerates astale
Prelude.lean, so generated-source drift can reachmaingreen.