Skip to content

Orb bridges: WireClaw adapter (tinyagentos/orb/bridges/wireclaw.py, spec s5 row) - #3978

Merged
jaylfc merged 4 commits into
devfrom
exec/tsk-5w32v3
Oct 27, 2026
Merged

jaylfc merged 4 commits into
devfrom
exec/tsk-5w32v3

Conversation

@jaylfc

@jaylfc jaylfc commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

CARD TITLE (intent, not commit subject): Orb bridges: WireClaw adapter (tinyagentos/orb/bridges/wireclaw.py, spec s5 row)

Autonomous build of board card tsk-5w32v3.

test: harness-measured red for tsk-5w32v3

RED-FIRST proof measured by the harness (measure_red.sh): the changed tests run
against product code at base 25c10f6, then against this branch.

RED on the base:

E       ImportError: cannot import name 'wireclaw' from 'tinyagentos.orb.bridges' (/tmp/measure-red-ciJkej/wt/tinyagentos/orb/bridges/__init__.py)
E       AssertionError: assert 'wireclaw' in ['mimiclaw']
E           assert None is not None
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_installed_true_when_nats_available
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_installed_false_when_nats_unavailable
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_with_wireclaw_orb
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_without_wireclaw_orb
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_with_wireclaw_orb_but_nats_unavailable
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_no_nats_url_in_result
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_top_level_instruction_contains_wireclaw_nats_url
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_in_adapters_list - As...
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_all_includes_wireclaw
9 failed in 0.34s

GREEN on the fix:

9 passed in 0.26s

Add WireClaw bridge adapter

  • Fix: move import shutil to module top in wireclaw.py
  • Fix: adjust installed() return type hint to match implementation (bool, not Optional[bool])
  • Add: test case for evaluate() with wireclaw orb but nats unavailable
  • Add: newline at end of wireclaw.py
  • Add: newline at end of test_bridge_wireclaw.py
  • Add: newline at end of changelog fragment
  • Fix: typo in test_wireclaw_top_level_instruction_contains_wireclaw_nats_url

Add WireClaw bridge adapter

  • Created tinyagentos/orb/bridges/wireclaw.py mirroring mimiclaw.py structure
  • Added tests in tests/orb/test_bridge_wireclaw.py covering all requirements
  • Added changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md
  • Tests pass with mocked nats CLI for installed() checks

RED proof saved in RED-PROOF.md as required by RED-FIRST gate.

Files:
changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md | 7 ++
tests/orb/test_bridge_wireclaw.py | 163 ++++++++++++++++++++++++++
tinyagentos/orb/bridges/wireclaw.py | 48 ++++++++
3 files changed, 218 insertions(+)

In-house review (pre-PR)

in-house-review: BLOCK -> 1 fix round (fix round committed 456d4cd3f) -> PASS (kilo/nvidia/nemotron-3-ultra-550b-a55b:free)

reviewer output

VERDICT: PASS

  • NIT: tinyagentos/orb/bridges/wireclaw.py:11 import order — stdlib imports (shutil) should come before local imports

In-house-Review: PASS model=kilo/nvidia/nemotron-3-ultra-550b-a55b:free head=456d4cd3f needs-lead=0


Summary by Gitar

  • Test coverage:
    • Added pytest cases for WireClaw installed(), evaluate(), and adapters() registration in tests/orb/test_bridge_wireclaw.py
  • Changelog:
    • Added changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md describing the new adapter

This will update automatically on new commits.

Summary by CodeRabbit

  • New Features
    • Added support for configuring WireClaw on compatible devices found on the local network.
    • The app checks whether the required NATS command-line tool is available and provides setup guidance when a compatible device is found.
    • If no compatible device is found, the app displays a no-device message.
    • The adapter does not make network or device-discovery requests.

- Created tinyagentos/orb/bridges/wireclaw.py mirroring mimiclaw.py structure
- Added tests in tests/orb/test_bridge_wireclaw.py covering all requirements
- Added changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md
- Tests pass with mocked nats CLI for installed() checks

RED proof saved in RED-PROOF.md as required by RED-FIRST gate.
- Fix: move import shutil to module top in wireclaw.py
- Fix: adjust installed() return type hint to match implementation (bool, not Optional[bool])
- Add: test case for evaluate() with wireclaw orb but nats unavailable
- Add: newline at end of wireclaw.py
- Add: newline at end of test_bridge_wireclaw.py
- Add: newline at end of changelog fragment
- Fix: typo in test_wireclaw_top_level_instruction_contains_wireclaw_nats_url
RED-FIRST proof measured by the harness (measure_red.sh): the changed tests run
against product code at base 25c10f6, then against this branch.

RED on the base:
```
E       ImportError: cannot import name 'wireclaw' from 'tinyagentos.orb.bridges' (/tmp/measure-red-ciJkej/wt/tinyagentos/orb/bridges/__init__.py)
E       AssertionError: assert 'wireclaw' in ['mimiclaw']
E           assert None is not None
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_installed_true_when_nats_available
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_installed_false_when_nats_unavailable
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_with_wireclaw_orb
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_without_wireclaw_orb
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_with_wireclaw_orb_but_nats_unavailable
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_no_nats_url_in_result
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_top_level_instruction_contains_wireclaw_nats_url
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_in_adapters_list - As...
FAILED tests/orb/test_bridge_wireclaw.py::test_wireclaw_evaluate_all_includes_wireclaw
9 failed in 0.34s
```

GREEN on the fix:
```
9 passed in 0.26s
```
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 23dfeda and 5634225.

Files selected for processing: 3
  • changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md
  • tests/orb/test_bridge_wireclaw.py
  • tinyagentos/orb/bridges/wireclaw.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

The change adds a WireClaw bridge adapter. It checks whether the host has the nats CLI, evaluates matching LAN Orbs, and returns targets and configuration instructions. Tests cover availability detection, evaluation results, URL handling, and adapter integration.

Changes: WireClaw bridge

Layer / File(s) Summary
Adapter evaluation and validation
tinyagentos/orb/bridges/wireclaw.py, tests/orb/test_bridge_wireclaw.py, changelog.d/tsk-5w32v3-orb-bridge-wireclaw.md
Adds bridge identifiers, NATS CLI detection, and evaluation of matching LAN Orbs with hosts. The adapter returns configuration instructions when targets exist and a no-device instruction otherwise. Tests cover these behaviors and adapter integration. The changelog describes the adapter.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Possibly related PRs

  • jaylfc/taOS#3966: Defines the BridgeResult contract, adapter discovery, evaluate_all, and helpers used by the WireClaw adapter.
Merge Risk: Minimal · up to 56342

The WireClaw adapter has no established merge-blocking defect and is ready to merge subject to normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: adding the WireClaw adapter for Orb bridges. The file path and specification reference add detail but do not make the title misleading.
Docstring Coverage Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviv…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 2 files. (1 skipped: 1 unsupported.)

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Gitar is working

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Gitar

@jaylfc

jaylfc commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Lead review (taosc-dev, card tsk-5w32v3, head 236424c): PASS.

Checked against the card line by line: constants, installed(), instruction strings verbatim, matching rule, pure (no network/subprocess/discovery), only the adapter + its test + the changelog fragment touched. Red-first fence is real and names tests that ship here. All five adapter PRs (#3972 #3973 #3976 #3977 #3978) applied together on origin/dev: pytest tests/orb 228 passed.

Cosmetic, no card: installed() -> bool where the card said bool | None, import shutil sits after the relative import, and the module docstring says "has no host-side tool" though installed() checks for the nats CLI.

The only red check is bot-review-gate (no CodeRabbit artifact on this head yet, CR rate-limited). Merge waits a CR artifact + Jay (tinyagentos/orb/ path).

@jaylfc
jaylfc merged commit e1c3778 into dev Oct 27, 2026
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-jay Automerge refused (sensitive path / unreadable compare): Jay merges. Not counted in the lane PR cap.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant