Repository navigation
GoldenFloat course specs: phi_ratio, phi_split_optimality, radix_economy discard 331 tokens on master and assert false things #7804
Description
Problem
Three specs the t27.ai GoldenFloat course teaches from do not survive the site's compiler on master, and several of their tests assert false things:
| spec | master, site wasm compiler | master, t27c parse-complete (0.5.0) |
|---|---|---|
specs/numeric/phi_ratio.t27 |
151 discarded | 145 top-level tokens discarded |
specs/math/phi_split_optimality.t27 |
131 discarded | 131 discarded |
specs/math/radix_economy.t27 |
59 discarded | 55 discarded |
Examples of false claims: phi_ratio's GF24/GF32 rows say the phi split is 6/17 and 8/23 and does not match (it is 9/14 and 12/19, and matches); radix_economy says 27 balanced trits need 43 bits (they need 42); ln with 4-5 series terms misses its own test tolerances.
The corrected versions exist only in gHashTag/trinity's vendored mirror (apps/website/public/t27/files), so every catalog refresh reverts them to master and the course loses its lessons (gHashTag/trinity#1540, fixed on the site side by trinity#1539, which keeps the course's copy until master has a clean one).
Solution
Take the corrections here: PR #7496 carries them byte-identically to trinity's copy (it also removes the cannot assign to immutable warnings from gf8, gf12, gf20, gf24, gf32 with let mut).
Acceptance
- The three specs consume every token under
t27c parse-completeand compile clean on all seven backends in the site's wasm compiler. - Seals for the eight touched specs refreshed (
t27c seal <spec> --save).
User Scenarios
- Given the three GoldenFloat course specs on master, when
t27c parse-completeruns on each, then all tokens are consumed (zero discarded) and each spec compiles cleanly on all seven backends in the site's wasm compiler. - Given the corrected spec contents from PR spec(numeric,math): the GoldenFloat lesson specs compile clean and say only true things #7496, when the specs are updated in this repository, then the false assertions (phi split values, radix economy bit count, ln series tolerances) are replaced with correct values and all internal tests pass.
- Given the eight specs referenced in the acceptance criteria, when
t27c seal <spec> --saveis run for each, then the seal files are refreshed and match the corrected behavior.
Requirements
- FR-001: The three cited specs MUST consume every token under
t27c parse-completewith zero top-level tokens discarded. - FR-002: The three cited specs MUST compile cleanly on all seven backends in the site's wasm compiler.
- FR-003: phi_ratio.t27 MUST assert correct phi split values (GF24: 9/14, GF32: 12/19) and those splits MUST match.
- FR-004: radix_economy.t27 MUST assert that 27 balanced trits need 42 bits (not 43).
- FR-005: ln series tests with 4-5 terms MUST meet their stated tolerances.
- FR-006: The
let mutbindings for gf8, gf12, gf20, gf24, gf32 MUST be applied to eliminate "cannot assign to immutable" warnings. - FR-007: Seals for all eight touched specs MUST be refreshed via
t27c seal <spec> --save.
Success Criteria
t27c parse-complete specs/numeric/phi_ratio.t27exits 0 with 0 tokens discardedt27c parse-complete specs/math/phi_split_optimality.t27exits 0 with 0 tokens discardedt27c parse-complete specs/math/radix_economy.t27exits 0 with 0 tokens discarded- All three specs compile clean on all seven wasm backends (site compiler test passes)
t27c seal specs/numeric/phi_ratio.t27 --saveexits 0 and updates sealt27c seal specs/math/phi_split_optimality.t27 --saveexits 0 and updates sealt27c seal specs/math/radix_economy.t27 --saveexits 0 and updates seal- 5 additional spec seals refreshed (gf8, gf12, gf20, gf24, gf32) via
t27c seal --saveeach exiting 0
Boundary
- specs/numeric/phi_ratio.t27
- specs/math/phi_split_optimality.t27
- specs/math/radix_economy.t27
Activity
Merge origin/master into the GoldenFloat lesson specs (Refs #7804)
spec(math): radix_economy's ln reduces its argument instead of copyin…
chore(seals): reseal the eight GoldenFloat lesson specs this branch c…
chore(suite): drop the three GoldenFloat discard pins this change ret…
Merge origin/master into the GoldenFloat lesson specs (Refs #7804)