Skip to content

test(reborn): triggered Slack delivery skips terminal non-Completed runs - #5719

Merged
henrypark133 merged 1 commit into
mainfrom
w6-outbound-b
Jul 6, 2026
Merged

henrypark133 merged 1 commit into
mainfrom
w6-outbound-b

Conversation

@henrypark133

@henrypark133 henrypark133 commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Lane: W6 OUTBOUND SCENARIO-B, unblocked by test(reborn): W5-SLACK-PAIR — slack pairing coverage + slack-v2-host-beta onto the int-tier lane #5656 (slack-v2-host-beta wired onto the int-tier lane).
  • Covers the catch-all _ => Ok(None) arm in triggered_notification_for_state (crates/ironclaw_reborn_composition/src/slack_delivery.rs:2467-2587): TurnStatus::RecoveryRequired/Failed/Cancelled are terminal but have no explicit match arm, so they fall through to Ok(None). deliver_triggered_run treats this as a normal skip (TriggeredRunDeliveryOutcomeKind::Skipped, no Slack message ever built). This is the intentional behavior tracked by Triggered/scheduled runs that terminate Failed deliver no Slack notification (silent automation failures) #5713 (closed not-planned) — previously untested.
  • One new test, driver_terminal_recovery_required_run_records_skipped_without_egress, added next to its closest sibling (driver_wait_timeout_records_failed_without_egress), reusing the existing driver-test harness. Proved RED via a temporary mutation of the catch-all arm (routed it through a Some(...) delivery), confirmed the test failed for the right reason, then reverted before committing.

Why crate-tier, not the integration harness (tier-fallback rationale)

Per the integration-first rule, crate-tier is the fallback only when the integration tier can't reach the path — this is such a case, stated explicitly:

  • The outcome is not observable at the int tier. The production public entry TriggeredRunDeliveryDriver::on_trigger_submitted (slack_delivery.rs:1925) dispatches the delivery via a detached tokio::spawn (slack_delivery.rs:1970) — fire-and-forget, so a harness driving the public path cannot deterministically capture the TriggeredRunDeliveryOutcomeKind. There is no outcome-capture injection seam on this driver (the delivery/binding sinks are constructed inline as Noop in the production factory), so the Skipped-without-egress result cannot be asserted from tests/integration/. This is the same C-TRIGGERED-DELIVERY services-shell blocker already tracked on the coverage roadmap; E-OUTBOUND's RecordingOutboundDeliverySink covers the final-reply outbound path, a different code path that does not see this driver.
  • The test therefore calls the internal deliver_triggered_run (slack_delivery.rs:2033) directly and inspects its returned outcome — the same tier and pattern as the pre-existing sibling driver tests in this file. An int-tier version becomes possible only once the services-shell delivery-outcome seam exists (the same convergence work tracked for gate-dispatch in Reborn harness: real gate-dispatch (submit_inbound Approval/AuthResolution) unreachable at int tier — interaction services read a disjoint turn-run store #5722).

Production call site (for reachability, not observability): deliver_triggered_run ← on_trigger_submitted (slack_delivery.rs:1925) ← trigger_poller.rs:385,407 and slack_host_beta/runtime_setup.rs:662 — real composition-root wiring, compiled into the int-tier binary since #5656.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all --benches --tests --examples --all-features — 0 warnings
  • cargo test -p ironclaw_reborn_composition --lib --features slack-v2-host-beta slack_delivery:: — 77 passed, 0 failed

🤖 Generated with Claude Code

RecoveryRequired/Failed/Cancelled fall through the catch-all in
triggered_notification_for_state (slack_delivery.rs:2587), which
deliver_triggered_run records as Skipped with no Slack egress. Intentional
per #5713 (closed not-planned) — this pins the behavior, uncovered until now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 6, 2026 19:57
@ironloopai

ironloopai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ IronLoop Review Status

Head: e3fa3100b7eefc4e534e28cdd1657b710afedb24
Result: 1/1 reviewers completed without blocking findings.
Next: Ready for normal human review and CI checks.
Updated: 2026-07-06T19:58:32.651Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Completed Approved 0 blocking findings / 0 notes 2026-07-06T19:58:32.576Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Approved; 0 blocking findings; No blocking issues found. The PR only adds a focused regression test for triggered Slack delivery handling of terminal RecoveryRequired runs, and the expected Skipped/no-egress be…
Recent activity
Time Reviewer State Detail
2026-07-06T19:57:28.876Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head e3fa310.
2026-07-06T19:57:28.876Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-06T19:57:28.946Z ironloop/common-reviewer (reviewer) Queued Added to the local review work handoff.
2026-07-06T19:57:29.781Z ironloop/common-reviewer (reviewer) Started Reviewer worker started attempt 1.
2026-07-06T19:57:32.670Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (merge_ref) at b3e802a.
2026-07-06T19:58:05.550Z ironloop/common-reviewer (reviewer) Running Codex is reviewing; process live; elapsed 34s; timeout in 19m 26s; last heartbeat 2026-07-06T19:58:05.550Z. Activity (stderr): ...: ack-feedback and delivery-error feedback tests ─────────────── /// Build a minimal `SlackFinalReplyDeliveryObserve….
2026-07-06T19:58:32.576Z ironloop/common-reviewer (reviewer) Result captured Approved; 0 blocking findings.
2026-07-06T19:58:32.576Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
Available commands
  • @ironloop agents
  • @ironloop review
  • @ironloop review --agent <agent-id-or-alias>
  • @ironloop status
Run metadata

Admission: webhook accepted the request and IronLoop persisted review state before this projection.

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-5719 July 6, 2026 19:57 Destroyed
@github-actions github-actions Bot added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added coverage for delivery handling when a run is in a terminal recovery-required state.
    • Verified these runs are recorded as skipped and do not send Slack notifications.

Walkthrough

Adds a new unit test in slack_delivery.rs verifying that triggered-run delivery for a terminal RecoveryRequired run state records a Skipped outcome and does not issue any Slack chat.postMessage egress calls.

Changes

Terminal State Delivery Test

Layer / File(s) Summary
RecoveryRequired skip test
crates/ironclaw_reborn_composition/src/slack_delivery.rs
New async test asserts TriggeredRunDeliveryOutcomeKind::Skipped and no /api/chat.postMessage calls for terminal RecoveryRequired state.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

  • nearai/ironclaw#5166: Refactors triggered-run delivery driver construction used by the logic this test covers.
  • nearai/ironclaw#5463: Changes the triggered-run delivery hook execution flow that dispatches to the driver tested here.

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.

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

✅ IronLoop Review: reviewer

Verdict: ✅ Approved
Findings: 0 blocking / 0 notes
Next: No reviewer action needed.
Head: e3fa3100b7eefc4e534e28cdd1657b710afedb24

Run details

Status: Current
Needs human: no
Needs validation: no

**Inline candidates:** 0

Summary

No blocking issues found. The PR only adds a focused regression test for triggered Slack delivery handling of terminal RecoveryRequired runs, and the expected Skipped/no-egress behavior matches the current delivery path.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloop review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloop review when the fix may affect multiple areas.
  4. Use @ironloop status to check queued/running/completed/stale/stalled state while reviewers run.

@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 adds a new integration test, driver_terminal_recovery_required_run_records_skipped_without_egress, to verify that a terminal RecoveryRequired run is correctly recorded as Skipped and does not trigger any Slack egress messages. I have no feedback to provide as there are no review comments.

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.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ 3 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts, ironclaw_skill_learning

Reborn integration-tier coverage

Line coverage (Reborn crates): 85.31% — 273178 / 320230 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 347
ironclaw_skill_learning 0% 0 / 61
ironclaw_wasm_sandbox_core 7.37% 7 / 95
ironclaw_runtime_policy 33.2% 80 / 241
ironclaw_event_projections 43.34% 673 / 1553
ironclaw_run_state 52.73% 222 / 421
ironclaw_authorization 53.54% 461 / 861
ironclaw_triggers 60.32% 1736 / 2878
ironclaw_observability 61.54% 16 / 26
ironclaw_reborn_cli 64.58% 3988 / 6175
ironclaw_webui_v2 65.47% 2391 / 3652
ironclaw_filesystem 65.86% 3212 / 4877
ironclaw_reborn_migration 67.01% 1172 / 1749
ironclaw_memory 67.12% 747 / 1113
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_mcp 67.42% 569 / 844
ironclaw_trust 72.88% 661 / 907
ironclaw_reborn_event_store 73.27% 940 / 1283
ironclaw_capabilities 74.08% 1658 / 2238
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_extractors 74.72% 538 / 720
ironclaw_first_party_extensions 77.62% 5410 / 6970
ironclaw_llm 77.67% 19044 / 24519
ironclaw_product_context 78.57% 11 / 14
ironclaw_network 79.82% 621 / 778
ironclaw_wasm_product_adapters 80.58% 1510 / 1874
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_reborn_openai_compat 80.95% 956 / 1181
ironclaw_memory_native 81.86% 3226 / 3941
ironclaw_secrets 82.33% 2716 / 3299
ironclaw_wasm 82.54% 950 / 1151
ironclaw_events 83.44% 1759 / 2108
ironclaw_processes 84.06% 965 / 1148
ironclaw_host_api 84.5% 3119 / 3691
ironclaw_threads 84.85% 3249 / 3829
ironclaw_turns 85.63% 9819 / 11467
ironclaw_slack_v2_adapter 85.82% 1786 / 2081
ironclaw_projects 85.92% 659 / 767
ironclaw_product_workflow 86.26% 10656 / 12354
ironclaw_auth 86.32% 2727 / 3159
ironclaw_common 86.59% 1472 / 1700
ironclaw_product_adapters 86.66% 3152 / 3637
ironclaw_reborn_config 86.98% 1730 / 1989
ironclaw_hooks 87.25% 9782 / 11211
ironclaw_skills 87.34% 4334 / 4962
ironclaw_reborn_traces 87.35% 10325 / 11820
ironclaw_product_adapter_registry 87.96% 526 / 598
ironclaw_extensions 88.26% 2631 / 2981
ironclaw_reborn_identity 88.43% 344 / 389
ironclaw_reborn_composition 89.01% 68432 / 76883
ironclaw_host_runtime 89.12% 17250 / 19355
ironclaw_conversations 90.11% 2924 / 3245
ironclaw_approvals 90.51% 1507 / 1665
ironclaw_reborn 91.17% 17238 / 18908
ironclaw_event_streams 91.48% 1009 / 1103
ironclaw_reborn_webui_ingress 91.68% 2094 / 2284
ironclaw_loop_support 92.34% 14093 / 15262
ironclaw_attachments 93.06% 630 / 677
ironclaw_telegram_v2_adapter 94.01% 2447 / 2603
ironclaw_resources 94.25% 3625 / 3846
ironclaw_agent_loop 94.49% 8290 / 8773
ironclaw_outbound 94.54% 3517 / 3720
ironclaw_safety 94.78% 3668 / 3870
ironclaw_first_party_extension_ports 95% 3094 / 3257

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

Exemptions (4 entry/entries excluded from the accounting above)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_oauth v1-only: consumed only by root ironclaw (src/auth/oauth.rs); no crates/* dependents. Crate's own doc comment confirms v1-only. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@railway-app

railway-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 6, 2026 at 8:04 pm

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5719 — e3fa3100 Deployed Jul 6, 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: low Changes to docs, tests, or low-risk modules size: M 50-199 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants