Skip to content

test(reborn): wiring-parity guard — harness runtime shape vs production local-dev (#5637) - #5642

Merged
henrypark133 merged 4 commits into
mainfrom
w5-wiring-parity
Jul 5, 2026
Merged

henrypark133 merged 4 commits into
mainfrom
w5-wiring-parity

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

Closes #5637 (W5-WIRING-PARITY).

What

A wiring-drift tripwire for the integration harness, test-tree only (zero src//crates/ changes):

  • Shape tripwire — tests/integration/support/planned_runtime_parts_shape.rs: exhaustive no-.. destructure over DefaultPlannedRuntimeParts (32 fields, 13 Option). Production adding/removing a field breaks this compile the day it lands, forcing a conscious wire-or-allowlist decision instead of a silent None.
  • Parity assertion — tests/integration/wiring_parity.rs: the harness-built shape (both test_default() and builtin_tools() configs) compared against EXPECTED_PRODUCTION_SHAPE, hand-derived from build_reborn_runtime's literal with a pinned re-derive instruction. ALLOWED_DIVERGENCES documents the 5 deliberate substitutions, one row per double/seam; mask() validates every row against the real field set and panics on unknown names, so renames can't leave stale entries inert.
  • Companion subset check — every harness/profiles/<domain> capability-id list ⊆ the production registry surface (builtin_first_party_package() ∪ extension ∪ github id sets), with an evidence-backed skip-list for synthetic ids. Ids reference production constants, so renames fail compile.

Falsification evidence (all fired red, then reverted)

  1. Allowlist row removed → parity diff names exactly that field.
  2. Destructure field removed → E0027 compile error (tripwire proof).
  3. Bogus allowlist field name → unknown-name panic.
  4. Bogus capability id injected → subset check names domain + id.

Known accepted gap

A silent production rewiring of an existing field isn't auto-detected (the expected shape is a hand-derived constant); #5641 tracks the machine-derived variant, which needs a production-crate test-support accessor and was deliberately excluded here. #5640 tracks the hook_security_audit_sink double gap behind one allowlist row.

Verification

reborn_integration_wiring_parity 10/10; cargo check --tests clean; clippy zero warnings (full workspace, all features); suite-boundary guard OK; git diff origin/main --name-only | grep -E '^(src|crates)/' empty.

🤖 Generated with Claude Code

…s shape vs production local-dev (#5637)

Adds a test-tree-only tripwire so the integration harness's
DefaultPlannedRuntimeParts construction cannot silently drift from
production's local-dev build:

- support/planned_runtime_parts_shape.rs: exhaustive no-`..` destructure
  of all 32 fields into a 13-bool Some/None shape — a new/removed field
  in ironclaw_reborn fails this file to compile.
- into_group captures the shape at the real construction site and
  stashes it on GroupSharedStorage; harness/group accessors expose it.
- wiring_parity.rs asserts parity against a hand-derived
  EXPECTED_PRODUCTION_SHAPE modulo 5 named ALLOWED_DIVERGENCES rows
  (each with a reason), plus a smoke build of the local-dev profile.
- Companion check: every harness/profiles/*.rs capability id is a
  subset of the production capability surface, modulo a documented
  synthetic-id skip list.

All four falsifications verified red (allowlist-row removal, destructure
field removal E0027, capability-id rename, bogus-id injection); suite
green with zero production-crate edits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 20:00
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5642 July 4, 2026 20:01 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the scope: dependencies Dependency updates label Jul 4, 2026
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 53c369a9-dec2-46be-8a14-d66a94439400

📥 Commits

Reviewing files that changed from the base of the PR and between c5e519e and 6da585e.

📒 Files selected for processing (3)
  • Cargo.toml
  • tests/integration/support/builder.rs
  • tests/integration/support/group.rs

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added a new integration test target to enforce harness-vs-production wiring parity, including exact “planned runtime parts” Some/None shape checks with controlled allowlisted field divergences.
    • Added capability-id surface assertions across harness profiles, including local-dev-only synthetic skip handling and a permanent falsification check to ensure failures when parity regresses.
    • Reduced duplication by centralizing harness profile capability-id lists into shared helpers.
    • Improved extension-surface test support by deriving bundled extension capability ids from bundled manifest.toml assets.

Walkthrough

Adds a new integration test target that asserts planned-runtime shape parity and capability-id subset parity between harness profiles and production-derived surfaces.

Changes

Wiring-parity integration test

Layer / File(s) Summary
Planned runtime shape extractor
tests/integration/support/mod.rs, tests/integration/support/planned_runtime_parts_shape.rs
Adds DefaultPlannedRuntimePartsShape and harness_planned_runtime_parts_shape, with exhaustive field destructuring and module registration.
Capability surface helpers
tests/integration/support/extension_surface.rs, tests/integration/support/harness/profiles/core_builtin.rs, tests/integration/support/harness/profiles/qa_smoke.rs, tests/integration/support/harness/profiles/web_access.rs
Derives bundled-extension capability ids from manifests and centralizes the harness capability-id lists used by the subset check.
Harness and group wiring
tests/integration/support/builder.rs, tests/integration/support/group.rs
Adds planned-runtime shape accessors, persists the computed shape in group shared storage, and computes it during group assembly from the planned-runtime parts value.
Wiring-parity test suite
Cargo.toml, tests/integration/wiring_parity.rs
Registers the new integration test target and adds the parity/subset assertions plus the falsification test.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

  • nearai/ironclaw#5584: Touches the same planned-runtime wiring surface that this PR now snapshots in parity tests.

Suggested reviewers: italic-jinxin

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and verification, but it omits most required template sections and headings. Fill the required Summary, Change Type, Linked Issue, Validation, Security Impact, Trust-Boundary, Database, Blast Radius, Rollback, Review Follow-Through, and Review track sections.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Conventional Commits style is followed and the title accurately summarizes the wiring-parity test change.
Linked Issues check ✅ Passed The changes implement the requested runtime-shape parity tripwire and the companion capability-id subset check for #5637.
Out of Scope Changes check ✅ Passed The added support helpers and test target all directly serve the wiring-parity and capability-surface enforcement goals.

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.

@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs labels Jul 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new integration test, reborn_integration_wiring_parity, to ensure that the test harness's runtime configuration matches production's local-dev configuration and that capability IDs do not drift. It adds a helper module to extract the Some/None shape of DefaultPlannedRuntimeParts and updates the integration group and harness builders to capture this shape. Feedback on the changes points out an unused support module declaration in the new test file that should be verified and cleaned up.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/integration/wiring_parity.rs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 154d9d0050

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/integration/wiring_parity.rs Outdated
Comment thread tests/integration/wiring_parity.rs Outdated
@github-actions

github-actions Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ 9 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_embeddings, ironclaw_gateway, ironclaw_hooks, ironclaw_oauth, ironclaw_process_sandbox, ironclaw_prompt_envelope, ironclaw_scripts, ironclaw_skill_learning, ironclaw_tui

Reborn integration-tier coverage

Line coverage (Reborn crates): 28.54% — 49242 / 172553 lines

Per-crate breakdown (62 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_embeddings 0% 0 / 337
ironclaw_gateway 0% 0 / 283
ironclaw_hooks 0% 0 / 4468
ironclaw_oauth 0% 0 / 155
ironclaw_process_sandbox 0% 0 / 795
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 347
ironclaw_skill_learning 0% 0 / 61
ironclaw_tui 0% 0 / 4776
ironclaw_outbound 0.22% 3 / 1339
ironclaw_event_projections 0.4% 6 / 1489
ironclaw_reborn_event_store 0.66% 6 / 906
ironclaw_reborn_config 1.36% 15 / 1101
ironclaw_llm 3.62% 437 / 12075
ironclaw_event_streams 3.87% 40 / 1034
ironclaw_product_adapter_registry 5.38% 25 / 465
ironclaw_extractors 6.18% 26 / 421
ironclaw_wasm_sandbox_core 7.37% 7 / 95
ironclaw_product_workflow 7.97% 768 / 9635
ironclaw_webui_v2 8.5% 228 / 2683
ironclaw_processes 8.61% 98 / 1138
ironclaw_common 10.22% 74 / 724
ironclaw_events 12.45% 143 / 1149
ironclaw_product_adapters 12.53% 280 / 2234
ironclaw_network 13.25% 66 / 498
ironclaw_skills 14.58% 377 / 2585
ironclaw_first_party_extensions 22.46% 1125 / 5010
ironclaw_triggers 23.1% 663 / 2870
ironclaw_reborn_traces 23.24% 1492 / 6420
ironclaw_secrets 26.22% 450 / 1716
ironclaw_reborn 29.03% 2538 / 8742
ironclaw_reborn_composition 30.35% 9250 / 30477
ironclaw_capabilities 32.97% 580 / 1759
ironclaw_auth 33.09% 667 / 2016
ironclaw_runtime_policy 33.2% 80 / 241
ironclaw_memory_native 37.02% 857 / 2315
ironclaw_host_api 39.9% 942 / 2361
ironclaw_filesystem 40.17% 1403 / 3493
ironclaw_host_runtime 41.16% 6170 / 14989
ironclaw_threads 41.98% 1326 / 3159
ironclaw_trust 42.56% 326 / 766
ironclaw_loop_support 42.62% 3142 / 7372
ironclaw_memory 47.47% 357 / 752
ironclaw_first_party_extension_ports 48.74% 637 / 1307
ironclaw_wasm 48.79% 363 / 744
ironclaw_projects 50% 147 / 294
ironclaw_extensions 51.4% 1211 / 2356
ironclaw_agent_loop 51.5% 2400 / 4660
ironclaw_resources 51.63% 1109 / 2148
ironclaw_run_state 52.73% 222 / 421
ironclaw_authorization 53.54% 461 / 861
ironclaw_turns 57.79% 5206 / 9009
ironclaw_safety 59.38% 1035 / 1743
ironclaw_observability 61.54% 16 / 26
ironclaw_conversations 66.13% 937 / 1417
ironclaw_approvals 66.63% 549 / 824
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_mcp 67.42% 569 / 844
ironclaw_reborn_identity 70.91% 156 / 220
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_product_context 78.57% 11 / 14
ironclaw_attachments 84.92% 107 / 126

This signal is informational: coverage never gates the PR — not the percentage, not the per-crate holes, not the 0-coverage callout.

Exemptions (0 file(s) excluded from the accounting above)

No exemptions configured.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/wiring_parity.rs`:
- Around line 62-131: Replace the stringly-typed field identifiers used by
ALLOWED_DIVERGENCES and mask() with a dedicated enum for the planned-runtime
fields, and update the allowlist to store enum values instead of raw strings.
Keep the exhaustive behavior by matching on the enum variants in mask(), and
make sure the enum stays aligned with DefaultPlannedRuntimePartsShape so field
additions/removals fail loudly at compile time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c25e3a9e-6196-41ed-bcf9-9a64f5a28c9e

📥 Commits

Reviewing files that changed from the base of the PR and between 79b188d and 154d9d0.

📒 Files selected for processing (6)
  • Cargo.toml
  • tests/integration/support/builder.rs
  • tests/integration/support/group.rs
  • tests/integration/support/mod.rs
  • tests/integration/support/planned_runtime_parts_shape.rs
  • tests/integration/wiring_parity.rs

Comment thread tests/integration/wiring_parity.rs
@railway-app

railway-app Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-5642 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 5, 2026 at 2:18 am

@henrypark133 henrypark133 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review (multi-agent)

Intent: Add test-only Reborn wiring parity guards to catch integration harness drift from production local-dev runtime shape.

Stats: 2 findings (from 5 raw, 2 after dedup) across 1 file. Reviewers run: security, bugs, performance, tests, conventions, local-patterns, maintainability, approach. Reviewers failed: none. Body-only: 0.

Maintainability

  1. Medium Capability parity test hand-copies the profile surfaces (tests/integration/wiring_parity.rs:274-281, confidence 100) — anchor: tests/integration/wiring_parity.rs:274
    The new subset check says each row is hand-transcribed from harness/profiles/*.rs, so the test now has a second manually maintained copy of every harness capability list. If a profile adds or removes an id and this table is not edited, the drift guard still passes against the stale copy, which makes the test harder to trust precisely where it is meant to prevent drift.

Local Patterns

  1. Low Allowlist reason points at the wrong group.rs line (tests/integration/wiring_parity.rs:89-92, confidence 75) — anchor: tests/integration/support/group.rs:726
    The hook-security-audit-sink allowlist reason sends readers to group.rs:704, but in the checked-out file line 704 is the skill-context-source comment and the actual hook_security_audit_sink: None assignment is at line 726. This makes the re-derive trail misleading in a test whose comments are meant to be the maintenance map.

Comment thread tests/integration/wiring_parity.rs
Comment thread tests/integration/wiring_parity.rs Outdated
…fixes on PR #5642

Addresses 4 accepted review findings on wiring_parity.rs:

1. Capability subset check restructured (henrypark133 Medium 3524106126,
   codex P2 3523787910). LHS now reads each harness/profiles/*.rs domain's
   REAL capability_ids off its actual ToolsProfile/harness constructor
   instead of a hand-transcribed table; three bespoke (non-ToolsProfile)
   constructors (core_builtin, qa_smoke, web_access) got a small pure
   accessor shared with their own harness-literal builder, so there's one
   source, not two. RHS (production_capability_surface()) now unions only
   production-derived sources: builtin_first_party_package() +
   github_support::capability_ids() + a new
   extension_surface::bundled_extension_manifest_capability_ids(), which
   parses the other 9 bundled extensions' real manifest.toml assets the
   same way github's is already parsed. BUNDLED_EXTENSION_CAPABILITY_IDS
   (hand-typed, verified byte-identical to the real manifests — no drift
   found) is no longer unioned into RHS.

   STOP/report (not papered over): EXTENSION_LIFECYCLE_CAPABILITY_IDS'
   real values live in ironclaw_reborn_composition::extension_lifecycle_capabilities
   as pub(crate) with no public accessor — visibility-blocked from this
   test crate without a crates/ change, which is out of scope here (ZERO
   crates/ changes on this branch). The "extension" domain row now skips
   those 4 ids explicitly (documented) rather than silently re-including
   the old hand-list to make the check pass.

   Falsification: added a permanent regression test
   (harness_profile_capability_ids_subset_falsifies_on_narrowed_surface)
   that removes one real id from a copy of the surface and asserts the
   subset check would catch it on the right domain — proving the
   restructured shape still detects drift instead of two hand-lists
   trivially agreeing with each other. Verified by hand first: an
   over-strict version of this assertion caught the removal on
   "core_builtin" (which also grants that id) before being loosened to
   "profile is among the failing domains", proving the mechanism fires.

2. model_budget_accountant scope (codex P2 3523787909): doc-commented that
   EXPECTED_PRODUCTION_SHAPE's `false` models the no-LLM local-dev shape,
   and verified (by reading runtime.rs's model_gateway_override match arm)
   that the harness's scripted TraceLlm path forces the same None
   cost-table outcome unconditionally — so the comparison is genuinely
   like-for-like, not two different scopes glossed over. A real
   resolved-LLM production build would set this Some instead; noted as
   the field's variance boundary.

3. Stale line ref (henrypark133 Low 3524106127): hook_security_audit_sink's
   ALLOWED_DIVERGENCES reason no longer cites group.rs:704 (now :726, and
   volatile); replaced with the field name, plus a same-line comment at the
   assignment site itself.

4. mod support" necessity (gemini 3523784389): verified by actually
   removing it and running cargo check — compile fails (5 errors,
   "cannot find `support` in `crate`") because reborn_support's
   builder.rs/group.rs/reply.rs/scripted_provider.rs/triggered_submit.rs
   all reference `crate::support::trace_llm::{TraceLlm, ...}`. Restored;
   recommendation is keep as-is (dual-mount is required, not boilerplate).

Verified: cargo test --all-features --test reborn_integration_wiring_parity
(11/11 green, including the new falsification test), cargo check --tests
--all-features (clean), cargo clippy on the touched target (clean),
cargo fmt, and scripts/ci/check-test-suite-boundaries.sh (pass). Also
spot-ran reborn_integration_web_access, reborn_integration_process_port,
and reborn_integration_secret_injection to confirm the core_builtin/
qa_smoke/web_access accessor extraction is behavior-preserving.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5642 July 5, 2026 01:52 Destroyed

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/wiring_parity.rs`:
- Around line 371-379: The "extension" domain in wiring_parity is using an
order-dependent skip over capability_ids, which can exclude the wrong entries if
the concatenation order changes. Update the logic in the extension branch to
filter capability_ids by membership against EXTENSION_LIFECYCLE_CAPABILITY_IDS
instead of relying on position, using the existing
extension_lifecycle_tools_profile() and CapabilityId symbols to keep the
intended lifecycle set excluded regardless of ordering. Confirm CapabilityId
supports equality checks before switching to the membership-based filter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fdf73e47-21b6-4efb-8c7a-0bbfd6d55335

📥 Commits

Reviewing files that changed from the base of the PR and between 154d9d0 and a9ecab4.

📒 Files selected for processing (6)
  • tests/integration/support/extension_surface.rs
  • tests/integration/support/group.rs
  • tests/integration/support/harness/profiles/core_builtin.rs
  • tests/integration/support/harness/profiles/qa_smoke.rs
  • tests/integration/support/harness/profiles/web_access.rs
  • tests/integration/wiring_parity.rs

Comment thread tests/integration/wiring_parity.rs
…n subset row

Positional .skip(4) assumed the profile concatenates lifecycle ids first;
a set-based filter is robust to internal reordering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 02:03
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5642 July 5, 2026 02:03 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5642 July 5, 2026 02:10 Destroyed

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/support/builder.rs`:
- Around line 119-124: The tool disclosure plumbing is duplicated across the
harness and group builders, with mirrored bridged/off setters and a match in
build(); consolidate this into a single passthrough setter on
RebornIntegrationGroupBuilder that accepts Option<ToolDisclosureMode> and
forward the harness field directly to it. Update RebornIntegrationHarnessBuilder
and RebornIntegrationGroupBuilder to use the shared tool_disclosure path,
removing the separate with_tool_disclosure_bridged/with_tool_disclosure_off
duplication and the match-based re-dispatch in build().

In `@tests/integration/support/group.rs`:
- Around line 850-879: The FanOutTurnEventSink::publish implementation preserves
only the first sink error and silently discards any later failures, so add an
explicit log for each discarded error while keeping the existing “return first
error after trying all sinks” behavior. Update FanOutTurnEventSink::publish to
record/log subsequent sink.publish(event.clone()) errors (for example via a
debug-level message) before continuing the loop, so failures from both the
in-memory recorder and trace-capture sink remain observable without changing the
caller-facing Result contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 53c369a9-dec2-46be-8a14-d66a94439400

📥 Commits

Reviewing files that changed from the base of the PR and between c5e519e and 6da585e.

📒 Files selected for processing (3)
  • Cargo.toml
  • tests/integration/support/builder.rs
  • tests/integration/support/group.rs

@coderabbitai coderabbitai 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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/support/builder.rs`:
- Around line 119-124: The tool disclosure plumbing is duplicated across the
harness and group builders, with mirrored bridged/off setters and a match in
build(); consolidate this into a single passthrough setter on
RebornIntegrationGroupBuilder that accepts Option<ToolDisclosureMode> and
forward the harness field directly to it. Update RebornIntegrationHarnessBuilder
and RebornIntegrationGroupBuilder to use the shared tool_disclosure path,
removing the separate with_tool_disclosure_bridged/with_tool_disclosure_off
duplication and the match-based re-dispatch in build().

In `@tests/integration/support/group.rs`:
- Around line 850-879: The FanOutTurnEventSink::publish implementation preserves
only the first sink error and silently discards any later failures, so add an
explicit log for each discarded error while keeping the existing “return first
error after trying all sinks” behavior. Update FanOutTurnEventSink::publish to
record/log subsequent sink.publish(event.clone()) errors (for example via a
debug-level message) before continuing the loop, so failures from both the
in-memory recorder and trace-capture sink remain observable without changing the
caller-facing Result contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 53c369a9-dec2-46be-8a14-d66a94439400

📥 Commits

Reviewing files that changed from the base of the PR and between c5e519e and 6da585e.

📒 Files selected for processing (3)
  • Cargo.toml
  • tests/integration/support/builder.rs
  • tests/integration/support/group.rs
🛑 Comments failed to post (2)
tests/integration/support/builder.rs (1)

119-124: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a single passthrough setter instead of two mirrored methods + match.

with_tool_disclosure_bridged/with_tool_disclosure_off on the harness builder each just set self.tool_disclosure, and build() then re-dispatches via a 3-arm match into the group builder's own equivalent pair of setters. A single fn tool_disclosure(mut self, mode: Option<ToolDisclosureMode>) -> Self on RebornIntegrationGroupBuilder, forwarded directly as group_builder.tool_disclosure(self.tool_disclosure), would drop the match and the duplicated method pair on the group side.

Not blocking — the current shape is explicit and well-documented — but it's straightforward duplication across two builders for a single enum field.

Also applies to: 221-252, 411-419

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/support/builder.rs` around lines 119 - 124, The tool
disclosure plumbing is duplicated across the harness and group builders, with
mirrored bridged/off setters and a match in build(); consolidate this into a
single passthrough setter on RebornIntegrationGroupBuilder that accepts
Option<ToolDisclosureMode> and forward the harness field directly to it. Update
RebornIntegrationHarnessBuilder and RebornIntegrationGroupBuilder to use the
shared tool_disclosure path, removing the separate
with_tool_disclosure_bridged/with_tool_disclosure_off duplication and the
match-based re-dispatch in build().
tests/integration/support/group.rs (1)

850-879: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Fan-out sink silently drops every error after the first.

publish attempts all sinks but only ever surfaces the first error — any later sink's failure (e.g. a broken trace-capture write while the in-memory recorder also errors) is thrown away with no trace at all, not even a log line. This is a mild instance of the repo's "fail loud" concern: errors should propagate or at minimum be observable, not vanish.

Since this is test-support infra with at most two sinks today, impact is low, but a debug!("sink publish failed: {error}") for the discarded errors would make double-failure debugging possible without changing the single-error contract callers rely on.

As per path instructions: "Fail loud: flag silent-failure patterns — .unwrap_or_default() on a Result, .ok()? dropping errors, let-else returning None to swallow failures, warn-and-continue that poisons state."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/support/group.rs` around lines 850 - 879, The
FanOutTurnEventSink::publish implementation preserves only the first sink error
and silently discards any later failures, so add an explicit log for each
discarded error while keeping the existing “return first error after trying all
sinks” behavior. Update FanOutTurnEventSink::publish to record/log subsequent
sink.publish(event.clone()) errors (for example via a debug-level message)
before continuing the loop, so failures from both the in-memory recorder and
trace-capture sink remain observable without changing the caller-facing Result
contract.

Source: Path instructions

@henrypark133
henrypark133 merged commit 85c02c2 into main Jul 5, 2026
62 checks passed
@henrypark133
henrypark133 deleted the w5-wiring-parity branch July 5, 2026 03:11

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5642 — 6da585eb Deployed Jul 5, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: dependencies Dependency updates size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(reborn): wiring-parity tripwire — assert harness runtime shape matches production local-dev composition

2 participants