Skip to content

Port gHashTag/trinity:src/brain/weber_tuning.zig (Zig, 5 functions) to specs/port/trinity/src/brain/weber_tuning.t27 - #6718

Merged
gHashTag merged 2 commits into
masterfrom
queen-6710
Oct 6, 2026
Merged

gHashTag merged 2 commits into
masterfrom
queen-6710

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Closes #6710

Written by a bee on queen-6710 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, 132 insertions(+)

🤖 Generated with Claude Code

Trinity Bee and others added 2 commits October 6, 2026 10:17
…y/src/brain/weber_tuning.t27

- Add 5 functions: weberQuantize, weberQuantizeLevels, adaptiveJND, ternaryEncode, ternaryStats
- Include PHI constant and WeberLevel enum
- Add 12 comprehensive tests covering edge cases and various scenarios
- Generated code compiles successfully with all tests passing

Closes #6710
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 #6710

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

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 10:22:37 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 36
PRs with All Checks Green 14
READY 13
FAILING 36
PENDING 0
NO CHECKS YET 0

These columns do not partition: 13 + 36 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3c78f3c7ffb7 != 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).

This was referenced Oct 6, 2026

@t27-bees t27-bees 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 9c4b0aaeee9b08a37ad59e9c06ae57d13fa204c2 (tools/bees/reviewer.py, zai glm-4.5-flash, 4 turns, 76 s; then glm-4.7-flash, 6 turns, 150 s).

BEE-VERDICT: APPROVE
summary: Successfully ported 5 functions from gHashTag/trinity:src/brain/weber_tuning.zig to specs/port/trinity/src/brain/weber_tuning.t27 with all acceptance criteria met
criterion: "1. test -f specs/port/trinity/src/brain/weber_tuning.t27 && echo present prints present" -- met -- brief.md:462
criterion: "2. grep -cE '^\s*(pub )?fn (weberQuantize|weberQuantizeLevels|adaptiveJND|ternaryEncode|ternaryStats)\(' specs/port/trinity/src/brain/weber_tuning.t27 prints 5" -- met -- brief.md:463
criterion: "3. t27c gen specs/port/trinity/src/brain/weber_tuning.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0" -- met -- brief.md:464
criterion: "3. t27c gen specs/port/trinity/src/brain/weber_tuning.t27 | wc -l prints at least 13" -- met -- brief.md:465
criterion: "4. t27c spec-status specs/port/trinity/src/brain/weber_tuning.t27 does not print NOPARSE" -- met -- brief.md:466
criterion: "5. grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/port/trinity/src/brain/weber_tuning.t27 prints at least 5" -- met -- brief.md:467
criterion: "6. t27c test-report specs/port/trinity/src/brain/weber_tuning.t27 2>&1 | grep -c BLOCKED prints 0" -- met -- brief.md:468
discounted-check: spec-guards -- Already failing on master for unrelated ring drifts, this port introduces no new issues (brief.md:410-458)

Evidence

Based on my review of the brief.md, pr.diff, and the actual ported file, here's my analysis:

Evidence

Acceptance Criteria Verification

  1. File exists: ✓ PASSED - The check test -f specs/port/trinity/src/brain/weber_tuning.t27 && echo present prints "present"

  2. All 5 functions present: ✓ PASSED - The check confirms all required functions (weberQuantize, weberQuantizeLevels, adaptiveJND, ternaryEncode, ternaryStats) are present, returning count "5"

  3. Generated code quality: ✓ PASSED -

    • grep -c 'not yet implemented' /tmp/t27-gen.zig prints "0" (no unimplemented functions)
    • Generated code has 140 lines (exceeds minimum requirement of 12 lines)
  4. File parses correctly: ✓ PASSED - t27c spec-status returns "IMPLEMENTED" (not "NOPARSE")

  5. Sufficient tests: ✓ PASSED - File contains 12 tests (exceeds minimum requirement of 5)

  6. No compilation issues: ✓ PASSED - t27c test-report shows 0 BLOCKED tests, meaning the generated code compiles and tests run successfully

Code Quality Assessment

The port successfully translates the original Zig code to .t27 format:

  • All 5 functions are correctly implemented with matching logic
  • Constants and enums are preserved
  • The port follows .t27 language conventions (using -> for return types)
  • 12 comprehensive tests cover edge cases and verify functionality
  • No edits were made outside the specified boundary

Red Check Analysis

spec-guards - FAILURE

  • This check was already failing on master for the same reason
  • The failure shows drifted rings in unrelated specs (numeric/arithemetic, brain/unified_state, etc.)
  • No new drift was introduced by this port
  • This red check should be discounted as it was pre-existing on master

Second, independent review (glm-4.7-flash): APPROVE -- Ported all 5 required functions with 12 passing tests, file parses and generates without errors; spec-guards failure is pre-existing project-wide drift unrelated to this change.

This was referenced Oct 6, 2026
@gHashTag
gHashTag merged commit ee1b3a5 into master Oct 6, 2026
26 of 27 checks passed
@gHashTag
gHashTag deleted the queen-6710 branch October 6, 2026 14:46
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/brain/weber_tuning.zig (Zig, 5 functions) to specs/port/trinity/src/brain/weber_tuning.t27

2 participants