Skip to content

Port gHashTag/trios:crates/trios-rainbow-bridge/src/bridge.rs (Rust, 5 functions) to specs/port/trios/crates/trios-rainb - #9485

Open
gHashTag wants to merge 2 commits into
masterfrom
queen-9474
Open

gHashTag wants to merge 2 commits into
masterfrom
queen-9474

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #9474

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

🤖 Generated with Claude Code

Trinity Bee and others added 2 commits October 14, 2026 06:30
Spec for gHashTag/trios crates/trios-rainbow-bridge (8b229e9489ee, 252
lines, 5 public functions), per issue #9474.

- Seven-branch legality predicate (INV-8) inside Bridge_accept, in the
  original's order: channel/payload mismatch, Lamport monotonicity,
  duplicate claim, heartbeat staleness, unsigned honey, split-brain
  State commits, funnel latency budget. Every branch keeps real code.
- BridgeError is an enum with payloads; the verdict is a struct: the
  error kind plus one named slot per variant payload.
- The agent -> lamport HashMap and the lane -> claim/heartbeat maps are
  fixed-capacity parallel arrays with a len slot (MAX_SLOTS = 8).
- FunnelClient.publish (network), HoneySigner.verify (crypto) and
  MerkleChain.root_hex (crypto) are caller-driven plumbing: the measured
  funnel latency and the honey signature verdict arrive as parameters,
  and Bridge_merkle_root_hex keeps its name with an undefined body that
  no test calls.

Verified: t27c parse + typecheck clean (0 errors, 0 warnings);
spec-status IMPLEMENTED; t27c gen emits 580 lines with zero
"not yet implemented" markers; t27c test-report runs 11 tests,
11 pass, 0 vacuous, 0 BLOCKED.

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

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-14 06:46:38 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 1
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 48 + 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)=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 fb4fe3f373c3a63e1587c27d3751ded0f4ef3e61 (tools/bees/reviewer.py, zai glm-4.5-flash, 9 turns, 332 s).

BEE-VERDICT: REQUEST_CHANGES
summary: Port meets all acceptance criteria but introduces RainbowEvent type conflict
criterion: "test -f specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27 && echo present" -- met -- brief.md:794
criterion: "grep -cE '^\s*(pub )?fn (Bridge_new|Bridge_register_honey_key|Bridge_merkle_root_hex|Bridge_lamport|Bridge_accept)(' specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27" -- met -- brief.md:795
criterion: "t27c gen specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig" -- met -- brief.md:796
criterion: "t27c spec-status specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27" -- met -- brief.md:798
criterion: "grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27" -- met -- brief.md:799
criterion: "t27c test-report specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27 2>&1 | grep -c BLOCKED" -- met -- brief.md:800
discounted-check: cli-tri -- build errors in unrelated files (cli/tri/src/piddir.rs, cli/tri/src/nownote.rs), not in ported code
discounted-check: duplicate-bodies -- same failure on master, no new duplicate bodies added (brief.md:638-639)
discounted-check: t27b-native-ratchet -- same failure on master (brief.md:741-743)
blocking-check: Corpus ratchet (expected-failure ledger) -- RainbowEvent type name conflict: bridge.t27 defines a complete struct while subscriber.t27 has a placeholder (brief.md:585-634)

Evidence

Based on my analysis, here's the evidence:

Acceptance Criteria Verification:

All 6 acceptance criteria were verified as PASSED:

  1. ✅ File exists: test -f specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27 && echo present printed present
  2. ✅ All 5 functions present: grep found exactly 5 functions (Bridge_new, Bridge_register_honey_key, Bridge_merkle_root_hex, Bridge_lamport, Bridge_accept)
  3. ✅ Generated code has no "not yet implemented": grep returned 0
  4. ✅ File parses: t27c spec-status returned IMPLEMENTED
  5. ✅ At least 5 tests: grep found 11 tests
  6. ✅ No BLOCKED tests: grep returned 0 BLOCKED

Red Checks Analysis:

  1. Corpus ratchet (expected-failure ledger) - BLOCKING CHECK

    • This IS a defect introduced by this PR
    • The logs show "+ RainbowEvent NEW conflict"
    • The PR defines RainbowEvent in bridge.t27 (lines 109-116) as:
      pub struct RainbowEvent {
          agent: u64,
          lamport: u64,
          channel: Channel,
          payload: Payload,
          is_signed: bool,
          sig_ok: bool
      }
      
    • This conflicts with the existing placeholder definition in subscriber.t27 (lines 18-21):
      pub struct RainbowEvent {
          // Fields would be defined in the original event module
          // For this port, we'll use a placeholder struct
      }
      
  2. duplicate-bodies - DISCOUNTED

    • NOT a defect from this PR - same failure on master
    • The log shows "No new duplicate body, and no known group grew"
    • This is a ledger issue unrelated to the port
  3. cli-tri - DISCOUNTED

    • NOT a defect from this PR - build errors in unrelated files
    • Errors are in cli/tri/src/piddir.rs and cli/tri/src/nownote.rs
    • These are unrelated to the ported code
  4. t27b-native-ratchet - DISCOUNTED

    • NOT a defect from this PR - same failure on master
    • The ratchet verdict was already red before this PR

Conclusion:

The port successfully implements all required functions and passes all acceptance criteria. The only real defect introduced is the RainbowEvent type conflict, which occurs because this PR needs a complete RainbowEvent struct for the bridge implementation, while subscriber.t27 has an incomplete placeholder definition.

This branch has not been deployed

No deployments
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.

Port gHashTag/trios:crates/trios-rainbow-bridge/src/bridge.rs (Rust, 5 functions) to specs/port/trios/crates/trios-rainbow-bridge/src/bridge.t27

2 participants