Repository navigation
spec(port): port specs/port/trios-railway/crates/trios-igla-race/src/invariants.t27 (Closes #9677) - #9812
Conversation
…invariants.t27 (Closes gHashTag#9677) Port gHashTag/trios-railway:crates/trios-igla-race/src/invariants.rs (at 8b229e9489ee, 15 lines) as specs/port/trios-railway/crates/ trios-igla-race/src/invariants.t27 - Roadmap Stage 6, goal gHashTag#4548, target t27c gen-rust. The constitutional anchor check is ported as pure functions and tested (5 tests, 5 pass, 0 vacuous, 100% function coverage): the language has no sqrt builtin, so sqrt(5) is computed by Newton's iteration (forty halving steps from 5.0, far past f64 precision), phi as (1 + sqrt(5)) / 2, the anchor as phi^2 + 1/phi^2, and the tolerance check carries the original's 1e-10 bound as its decimal form. No transport exists in this port. Verified: parse OK, spec-status IMPLEMENTED, typecheck 0 errors, coverage 5/5, test-report 5/5 pass, 0 BLOCKED, gen 69 lines with 0 'not yet implemented', boundary exactly this one file, dupe_scan: all 5 names unique across 2040 specs, bare body scan adds no duplicate group (752 bodies / 221 groups unchanged). Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
|
@gHashTag Please merge this PR into master via the golden chain — rights on gHashTag/t27 are read-only for me (403), so the merge itself needs your action. What this is: the #9677 port — What is verified:
CI (head 17f13be): required trio green — The 3 reds are the base-red trio, not this change: After the merge I will: verify the spec file live on the merge SHA, confirm #9677 auto-closed, and file the 14-step report. Dmitrii Fedorov (@dmitrii-f-t27) |
|
Correction to my merge request above: the t27b-native-run artifact run id is 38992184549 (the ratchet job of this head), not the number I typed there. The artifact facts stand as verified from the downloaded run.json of that run: commit Dmitrii Fedorov (@dmitrii-f-t27) |
Summary
Port
gHashTag/trios-railway:crates/trios-igla-race/src/invariants.rs(at8b229e9489ee, 15 lines) asspecs/port/trios-railway/crates/trios-igla-race/src/invariants.t27— Roadmap Stage 6 (goal #4548), target t27c gen-rust. Closes #9677. This is the first spec underspecs/port/trios-railway/— the directory is created by this one file.The original is the constitutional anchor check: it computes phi as
(1 + sqrt(5)) / 2and verifiesphi^2 + 1/phi^2 = 3within 1e-10. Per the issue's rule ("Port the decision, not the plumbing"), the one listed function is ported under its name as a tested pure decision, and the language's missing sqrt builtin is computed honestly rather than hardcoded:sqrt5_newton— Newton's iterationx <- (x + 5/x) / 2, forty rounds from 5.0 (quadratic convergence, far past f64 precision);phi_from_sqrt5—(1 + sqrt(5)) / 2(original line 2);anchor_of_phi—phi^2 + 1/phi^2(original line 3);within_anchor_tolerance— the(anchor - 3).abs() < 1e-10bound, carried as its decimal form0.0000000001(the parser's literal set has no scientific notation) (original line 4);check_phi_anchor— the composed check (original lines 1-5), asserted true like the original's own test.Verification (all run live from the worktree root, zig 0.16.0)
t27c parse: OK.t27c spec-status: IMPLEMENTED.t27c typecheck: 0 errors, 0 warnings.t27c coverage: 5/5 tested (100%) — no transports in this port.t27c test-report: 5 tests / 5 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes — including the sqrt convergence window (2.2360679774 < s < 2.2360679775), the golden-ratio window, the tolerance bounds on both sides of 3, and the anchor identity at the golden ratio.t27c gen | grep -c 'not yet implemented': 0;gen | wc -l: 69 (> 12).grep -cE '^\s*(pub )?fn (check_phi_anchor)\(': 1.grep -cE '^\s*test\s+(["|[A-Za-z_])': 5 (≥ 1).git status --short— exactly this one file. The repo's lefthook pre-commit passed.dupe_scan: all 5 names unique across 2040 specs; the bare body scan adds no duplicate group (752 bodies / 221 groups on base, identical with this spec present).Dmitrii Fedorov (@dmitrii-f-t27)