Skip to content

feat: tri railway batch — FFI fixes, CLI commands, hybrid v2, golden tests, pre-commit gate#561

Closed
gHashTag wants to merge 22 commits intomasterfrom
feat/tri-railway-543
Closed

feat: tri railway batch — FFI fixes, CLI commands, hybrid v2, golden tests, pre-commit gate#561
gHashTag wants to merge 22 commits intomasterfrom
feat/tri-railway-543

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

Test plan

  • cargo check -p tri passes (3 warnings, pre-existing)
  • cargo check -p t27c passes (259 warnings, pre-existing)
  • CI green on merge

gHashTag added 22 commits April 19, 2026 00:10
…spec

Closes #519

- Add gf16_zero(), gf16_from_u32(), gf16_to_u32() to specs/numeric/gf16.t27
- Add EmitResult, emit_rust_stmt(), emit_rust() to specs/compiler/meta_compile.t27
- 9 tests + 6 invariants across both specs
- Verified: tri test compiler::meta_compile PASSED, tri test compiler::numeric/gf16 PASSED

PHI LOOP: edit spec → seal hash → gen → test → verdict → save experience → skill commit → git commit
- Restore bridge.rs from c539af3 (40+ unresolved merge conflicts)
- Add Cyrillic docs to legacy allowlist
- Fix duplicate if-branch in compiler.rs (Dot -> ColonColon)
- Create gen/c/numeric/gf4.c stub
- Exclude ffi crate from workspace (broken C codegen)
…lparam

Fixes test_roundtrip_uart_spec regression. The lexer emits :: as a
single ColonColon token but the use-statement parser expected two
separate Colon tokens, causing all const declarations after use
statements to be skipped. Also enhances HirVerilogEmitter to emit
constants with values as localparam instead of bare wire.

524 passed 1 failed -> 525 passed 0 failed
Adds spec specs/cli/railway.t27 (12 tests, 6 invariants, 2 benches) and the
Rust backend cli/tri/src/railway.rs with subcommands login/link/up/status/
logs/gate2. The 'up --confirm' command prints the exact GraphQL bodies that
WOULD be POSTed to backboard.railway.com/graphql/v2 and exits with code 2 to
signal 'planned but not executed' (R5-honest: tri has no HTTP client yet,
operator runs the actual mutation).

Gate-2 stop rule: 3 seeds (43,44,45) with BPB<1.85 AND step>=4000, deadline
2026-04-30 23:59 UTC. Anchor: phi^2 + phi^-2 = 3.

Workspace member added (cli/tri); clap env feature enabled.
19 tests pass: cargo test -p tri railway::

Closes #543
…sive tests (Closes #549)

Add add/sub/mul/div and is_zero/is_inf/is_nan for GF4, GF8, GF12, GF20, GF24.
32 tests covering roundtrip, arithmetic, overflow, and special values.
…erge conflicts (Closes #332)

Gate 1: NOW freshness via tri check-now (L1)
Gate 2: Seal coverage for staged .t27 specs (L2)
Gate 3: Cargo check in bootstrap/ (L4)
Gate 4: Block new .sh files on critical path (L7)
Also fixes tri script merge conflicts and corrects --repo-root flag position.
…threshold (Closes #278)

Spec now has 9 tests, 5 invariants, 5 benchmarks = 19 declarations.
Closes #287, Closes #339

- Add --hybrid-v2 flag for L2 cosine similarity between phi^k and Pell P_{k+1}
- Add --theta flag to print arccos(H_v2) in degrees
- Add --n flag for dimension N (default 152, checkpoints at 5,10,15,20,50,152)
- Print all 6 checkpoint values for golden test reproducibility
- JSONL fields: hybrid_v2, hybrid_v2_N, hybrid_v2_cosine, hybrid_v2_theta_deg
- 5 unit tests: positivity, N=152 target > 0.95, monotonicity, golden checkpoints, trinity identity
- Fix Cyrillic in README.md (L3 PURITY)
- Whitelist docs/README_RU_UPDATE.md in legacy docs
…nesses, seal specs (Closes #289)

Phase 0: verify_precision.py — already complete (100-digit mpmath)
Phase 1: gf_competitive.t27 — 8 tests, 7 invariants, 3 benchmarks
Phase 2: pellis_precision_verify.t27 — 9 tests, 7 invariants, 2 benchmarks
Phase 3: Add missing python_decimal.py and python_fractions.py harnesses
FORMULA_TABLE row 31: Pellis α⁻¹ checkpoint already registered
@gHashTag
Copy link
Copy Markdown
Owner Author

Closing mega-batch PR — individual clean PRs: #562 (memory), #563 (phi-bias), #564 (weinberg), #542 (igla, rebased).

@gHashTag gHashTag closed this Apr 29, 2026
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