Skip to content

Port gHashTag/trinity:src/phi-engine/runtime/simd_ternary.zig (Zig, 8 functions) to specs/port/trinity/src/phi-engine/ru - #9378

Merged
gHashTag merged 2 commits into
masterfrom
queen-9372
Oct 13, 2026
Merged

gHashTag merged 2 commits into
masterfrom
queen-9372

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #9372

Written by a bee on queen-9372 and published by tools/queen/publish.py. The branch itself is the bee's; the second commit is the coordination entry every pull request must add, which a bee has no way to know about.

1 file changed, 269 insertions(+)

🤖 Generated with Claude Code

Trinity Bee and others added 2 commits October 13, 2026 09:49
Port gHashTag/trinity src/phi-engine/runtime/simd_ternary.zig
(e71d166ad6ef) to specs/port/trinity/src/phi-engine/runtime/
simd_ternary.t27 under the t27 port spec.

All 8 original functions are ported with real bodies (no stubs):
- vec32_splat, vec32_zero, vec32_one: vector constructors
- tritAddVec, tritSubVec: lane-wise add/sub (the original's
  @addWithOverflow/@subWithOverflow results equal plain i8 ops
  for trits in -13..13, so the wrap-free ops are used)
- tritNegVec: lane-wise 0 - a[i]
- tritMaxVec, tritMinVec: lane-wise max/min

.t27 has no type aliases, so the original's Trit = i8 /
Vec32Trit = [32]Trit is spelled [32]i8 in every signature.
PHI and GOLDEN_IDENTITY are kept as pub constants.

13 test blocks mirror the original's tests (splat(1) fills every
lane, splat(1)+splat(0)=splat(1), splat(1)-splat(0)=splat(1),
neg(splat(1))=splat(-1), max/min of splat(5)/splat(10), and the
golden identity phi^2 + 1/phi^2 = 3) plus per-lane independence
cases with mixed trit values.

Verified: t27c parse OK, typecheck 0 errors, test-report 13/13
pass (0 vacuous, 0 BLOCKED), coverage 8/8 functions, spec-status
IMPLEMENTED, gen emits 253 lines of Zig with 0 'not yet
implemented'.

Closes #9372
A pull request must add exactly one docs/now entry and a bee has no way
to know that: its brief names a boundary file and acceptance criteria,
and docs/now/ is neither. The publisher adds it rather than failing the
gate.

Closes #9372

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-13 10:34:47 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)=e769ef021713 != 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).

@tri-claw tri-claw Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer bee verdict for head e7cf1bb47ff37a0612529efba56349ea50772a52 (tools/bees/reviewer.py, zai glm-4.7-flash, 4 turns, 296 s; then glm-4.5-flash, 3 turns, 126 s).

BEE-VERDICT: APPROVE
summary: All 6 acceptance criteria passed per runner; generated code compiles with 0 BLOCKED; no red check is specific to this head as all also fail on master.
criterion: "file exists and is present" -- met -- evidence: brief:655
criterion: "8 functions present under exact names" -- met -- evidence: brief:656
criterion: "generated code has 0 not yet implemented" -- met -- evidence: brief:657
criterion: "file parses (not NOPARSE)" -- met -- evidence: brief:659
criterion: "at least 8 test blocks" -- met -- evidence: brief:660
criterion: "no BLOCKED in test-report" -- met -- evidence: brief:661
discounted-check: cli-tri -- failure exists on master (29cf18d), error in cli/tri/nownote.rs unrelated to this port (brief:556)
discounted-check: duplicate-bodies -- failure exists on master (b79946d), new file does not introduce new duplicates (brief:544-546)
discounted-check: t27b-native-ratchet -- failure exists on master (b79946d), ratchet infrastructure red independent of the new file (brief:640-641)

Evidence

Now let me verify the critical parts of the acceptance criteria against the actual file content.

Analysis

1. Does the change do what issue #9372 asks?

The issue requires creating specs/port/trinity/src/phi-engine/runtime/simd_ternary.t27 with:

  • 8 functions with exact names from the original Zig code
  • At least 8 test blocks asserting on behavior from the original
  • Generated code must compile (no "not yet implemented")
  • File must parse (not NOPARSE)
  • Tests must run (no BLOCKED)

Evidence:

  • Criterion 1 - File exists: Brief shows present ✓ (line 655)
  • Criterion 2 - 8 functions present: Brief shows 8 ✓ (line 656)
  • Criterion 3 - Generated code has no "not yet implemented": Brief shows 0 ✓ (line 657)
  • Criterion 4 - File parses: Brief shows IMPLEMENTED (not NOPARSE) ✓ (line 659)
  • Criterion 5 - At least 8 tests: Brief shows 13 ✓ (line 660)
  • Criterion 6 - No BLOCKED: Brief shows 0 ✓ (line 661)

The actual file contains:

  • All 8 functions with exact names: vec32_splat, vec32_zero, vec32_one, tritAddVec, tritSubVec, tritNegVec, tritMaxVec, tritMinVec (lines 22-101)
  • 13 test blocks covering various scenarios (lines 107-269)
  • No "not yet implemented" messages in generated code
  • All tests pass (0 BLOCKED)

The generated code produces 253 lines (brief line 658), far exceeding the 12-line minimum.

Boundary check: Only the required file was added (per diff: lines 18-269 of pr.diff). The docs/now/2026-10-13-published-port-ghashtag-trinity-src-phi-engine-runtime-simd-ternary-zi.md is added by the publisher, not the bee, and is within the exception noted in the brief.

2. Red checks analysis

All 3 red checks also fail on master for the same reason, so they do NOT count against this head:

duplicate-bodies -- discounted

  • Evidence: Log shows "a body written under build_level is now copied [3] time(s) and was in no ledger" (brief lines 544-546)
  • This failure exists on master (line 499: "master b79946d: failure")
  • The new file does not introduce any new duplicate bodies
  • The check scans the entire repository, not just the new file

cli-tri -- discounted

  • Evidence: Error in cli/tri/src/nownote.rs:437:8 (brief line 556), unrelated to this port
  • This failure exists on master (line 551: "master 29cf18d: failure")
  • The new t27 spec file cannot cause compilation errors in cli/tri

t27b-native-ratchet -- discounted

  • Evidence: Ratchet verdict is "red, exit 1" (brief line 640-641)
  • This failure exists on master (line 603: "master b79946d: failure")
  • The new file is a t27 spec, and the ratchet failure is in the ratchet infrastructure itself

No blocking-check exists because all acceptance criteria are met by the generated code and the runner's verification.

Second, independent review (glm-4.5-flash): APPROVE -- Successfully ports all 8 functions from simd_ternary.zig to .t27 with comprehensive test coverage

@tri-claw tri-claw Bot added the bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525) label Oct 13, 2026
@gHashTag
gHashTag enabled auto-merge (squash) October 13, 2026 11:20
@gHashTag
gHashTag merged commit a8b52e6 into master Oct 13, 2026
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bee-reviewed A reviewer bee reviewed and verified this PR at its current head; the only merge signal (#5525)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port gHashTag/trinity:src/phi-engine/runtime/simd_ternary.zig (Zig, 8 functions) to specs/port/trinity/src/phi-engine/runtime/simd_ternary.t27

2 participants