Skip to content

refactor(composition): group slack cluster under slack/ (dissection n8) - #5785

Merged
serrrfirat merged 3 commits into
mainfrom
reborn/composition-dissection-slack
Jul 8, 2026
Merged

serrrfirat merged 3 commits into
mainfrom
reborn/composition-dissection-slack

Conversation

@serrrfirat

Copy link
Copy Markdown
Collaborator

What

Dissection step n8 of the composition god-crate refactor (docs/plans/2026-07-02-reborn-internal-module-refactor.md §3): group the 17-module Slack cluster (the largest domain, ~34.6k lines) under a single slack/ internal module. Pure, behavior-preserving move — git mv + import repaths + 1:1 re-pointed crate-root pub use. No logic extracted, no public API change.

Stacked on #5783 (n7 extension_host). Base is the n7 branch; this PR's diff is n8 only. Retarget to main once #5783 merges.

Files moved → crates/ironclaw_reborn_composition/src/slack/ (17 modules, prefix kept)

slack_actor_identity · slack_channel_connection · slack_channel_routes (+dir) · slack_connectable_channel · slack_delivery · slack_dm_open · slack_egress · slack_host_beta (+dir) · slack_host_state · slack_outbound_targets · slack_pairing_notifier · slack_personal_binding · slack_personal_binding_pairing · slack_personal_binding_pairing_serve · slack_personal_binding_serve · slack_serve (+dir) · slack_setup

Subdirectories moved intact; slack_serve/e2e_tests.rs's #[path = "e2e_auth_challenge.rs"] relative include is preserved.

Deliberately left at root (slack-gated but not slack-domain, per leaf-first placement — candidates for later projection/automation/root steps): host_ingress (manifest ingress, 0 slack refs), delivered_gate_routing (triggered-run approval routing), channel_connection_resume (gate-resume read model).

cfg gates — uniform

mod slack; is ungated; all 17 inner mods are #[cfg(feature = "slack-v2-host-beta")] (the duplicated attribute on slack_channel_connection collapsed to one). The full-feature build confirms the parent gate is hung correctly — slack code is fully absent under default/--no-default-features and present under slack:: with the beta feature.

Public-API subtlety handled

slack_serve was a pub mod (public API surface). Moving it required pub use slack::slack_serve; at the crate root (lib.rs:266) so the external path ironclaw_reborn_composition::slack_serve::… resolves unchanged. External test consumers using that path were correctly left untouched.

Verification

  • ✅ cfg-matrix: default (1m13s) · --no-default-features (slack absent) · full feature set (slack present)
  • ✅ Consumer: reborn_cli compiles; architecture boundary tests pass (32, 0 fail)
  • ✅ Public-surface freeze: exported item-set identical to base — rigorous name-set diff shows nothing dropped; the single +slack_serve is the module re-export replacing the old pub mod (same public path). Snapshot regenerated.
  • ✅ Stale-path sweep empty; fmt clean; tree clean.
  • ✅ Slack tests: 373 slack-cluster tests pass. The 4 in-suite failures are the documented pre-existing non-deterministic runtime::/slack_host_beta:: parallelism flakes — each passes in isolation (-- --exact); not introduced here (pure repath).

Risk

Low — mechanical move, byte-identical public API, full cfg-matrix green. Draft pending human review (SOC 2 — nothing auto-merges).

@ironloopai

ironloopai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: 0a99d20cdba62b61b55aaff5ad01511bf048e558
Result: 1/1 reviewers completed without blocking findings.
Next: Ready for normal human review and CI checks.
Updated: 2026-07-08T14:31:03.712Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Completed Approved 0 blocking findings / 0 notes 2026-07-08T14:31:03.710Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Approved; 0 blocking findings; No concrete blocking issues found. The change is a scoped Slack module relocation under src/slack/ with updated internal references and preserved public re-exports, plus the mat…
Recent activity
Time Reviewer State Detail
2026-07-08T14:26:43.700Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head 0a99d20.
2026-07-08T14:26:43.700Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-08T14:26:43.702Z ironloop/common-reviewer (reviewer) Queued Added to the local review work handoff.
2026-07-08T14:26:44.797Z ironloop/common-reviewer (reviewer) Started Reviewer worker started attempt 1.
2026-07-08T14:26:47.489Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (merge_ref) at 7495311.
2026-07-08T14:31:03.252Z ironloop/common-reviewer (reviewer) Running Codex is reviewing; process live; elapsed 4m 17s; timeout in 15m 43s; last heartbeat 2026-07-08T14:31:03.252Z. Codex emitted stderr output at 2026-07-08T14:30:39.877Z.
2026-07-08T14:31:03.710Z ironloop/common-reviewer (reviewer) Result captured Approved; 0 blocking findings.
2026-07-08T14:31:03.710Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent-id-or-alias>
  • @ironloopai status
Run metadata

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

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5785 July 7, 2026 22:36 Destroyed
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 013281a1-f9fb-4355-b2aa-c3d6ac44fc52

📥 Commits

Reviewing files that changed from the base of the PR and between 053f550 and 0a99d20.

📒 Files selected for processing (36)
  • crates/ironclaw_reborn_composition/src/factory.rs
  • crates/ironclaw_reborn_composition/src/input.rs
  • crates/ironclaw_reborn_composition/src/lib.rs
  • crates/ironclaw_reborn_composition/src/product_auth/credentials/product_auth_providers.rs
  • crates/ironclaw_reborn_composition/src/product_auth/oauth/oauth_gate.rs
  • crates/ironclaw_reborn_composition/src/product_auth/serve/mod.rs
  • crates/ironclaw_reborn_composition/src/product_auth/serve/oauth.rs
  • crates/ironclaw_reborn_composition/src/runtime.rs
  • crates/ironclaw_reborn_composition/src/slack/mod.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_actor_identity.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_connection.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_routes.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_routes/allowed.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_routes/allowed/tests.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_routes/setup.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_channel_routes/subjects.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_connectable_channel.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_delivery.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_dm_open.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_egress.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_host_beta.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_host_beta/runtime_setup.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_host_state.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_outbound_targets.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_personal_binding.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_personal_binding_serve.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_personal_oauth.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_serve.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_serve/e2e_auth_challenge.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_serve/e2e_tests.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_serve/handler_tests.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_serve/installation.rs
  • crates/ironclaw_reborn_composition/src/slack/slack_setup.rs
  • crates/ironclaw_reborn_composition/src/trigger_poller.rs
  • crates/ironclaw_reborn_composition/src/webui_serve.rs
  • docs/plans/composition-pubuse.snapshot

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Consolidated Slack-related composition into a more consistent module structure.
    • Updated internal wiring and public re-exports to align with the new layout.
    • Reworked several Slack-related integrations, tests, and runtime hooks to use the same paths throughout.
    • No user-facing behavior changes were introduced.

Walkthrough

This PR consolidates Slack-related submodules (actor identity, channel routes/connection, delivery, egress, host beta/state, outbound targets, personal binding/oauth, setup, serve) under a new crate::slack module in ironclaw_reborn_composition, updating all internal imports, re-exports, and cross-crate references to the new paths without changing logic.

Changes

Slack module namespace consolidation

Layer / File(s) Summary
New slack module entry point and lib.rs wiring
crates/ironclaw_reborn_composition/src/slack/mod.rs, crates/ironclaw_reborn_composition/src/lib.rs, docs/plans/composition-pubuse.snapshot
Adds slack/mod.rs declaring feature-gated Slack submodules (slack_serve public, rest pub(crate)); lib.rs module declarations and pub use re-exports are rewritten to slack::slack_* paths; the pubuse snapshot doc mirrors the same path changes.
Slack submodule internal cross-references
.../slack/slack_channel_connection.rs, slack_channel_routes*.rs, slack_connectable_channel.rs, slack_delivery.rs, slack_host_beta*.rs, slack_host_state.rs, slack_outbound_targets.rs, slack_personal_binding*.rs, slack_personal_oauth.rs, slack_setup.rs, slack_serve/e2e_tests.rs
Imports and fully-qualified type references inside Slack submodules are updated to reference sibling modules via crate::slack::...; associated tests reflowed/reformatted with equivalent behavior.
External crate callers of Slack types updated
factory.rs, input.rs, product_auth/..., runtime.rs, trigger_poller.rs, webui_serve.rs
Callers outside the slack module update field/parameter types (setup slots, OAuth provider imports, identity helper paths, post-submit delivery hook types) to the new crate::slack::slack_* module paths.

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

Possibly related PRs

  • nearai/ironclaw#4799: Overlaps at Slack delivered-gate route resolution in the delivery/observer flow.
  • nearai/ironclaw#5318: Touches the same PostSubmitDeliveryHook mechanism in runtime.rs/trigger_poller.rs.
  • nearai/ironclaw#5644: Also modifies Slack personal OAuth wiring (slack_personal_oauth_lazy_slot, SlackPersonalSetupServiceSlot) in factory.rs.

Suggested reviewers: ilblackdragon

Path-rename churn only — no logic touched, gated entirely by slack-v2-host-beta. Verify with rg 'crate::slack_(setup|actor_identity|outbound_targets|delivery|personal_binding|channel_routes|personal_oauth)::' that no stale root-level path survives; that's the one invariant a mechanical rename like this can silently violate and rustfmt/clippy won't catch (it'll just fail to compile if truly missed, but a stale re-export under the wrong cfg won't).

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commits style and accurately summarizes the Slack module regrouping refactor.
Description check ✅ Passed It covers the refactor scope, stacked-base context, validation, and risk, so the template’s core information is present.
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.

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 scope: docs Documentation size: L 200-499 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jul 7, 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 reorganizes the Slack-related modules within the ironclaw_reborn_composition crate by grouping them under a new internal slack module. While the crate's public API remains unchanged due to preserved re-exports at the root, all internal references, module declarations, and tests have been updated to use the new nested paths. There are no review comments to address, and the changes look clean and well-structured.

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.

@railway-app

railway-app Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

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

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

Base automatically changed from reborn/composition-dissection-extension-host to main July 8, 2026 07:19
serrrfirat and others added 3 commits July 8, 2026 17:06
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…on n8)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serrrfirat
serrrfirat force-pushed the reborn/composition-dissection-slack branch from 4cb65ca to 0a99d20 Compare July 8, 2026 14:11
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5785 July 8, 2026 14:11 Destroyed
@serrrfirat

Copy link
Copy Markdown
Collaborator Author

⟳ Redone off current main (2026-07-08). #5643 (Slack personal OAuth + WebUI v2 remodel) restructured the slack cluster upstream — removed slack_pairing_notifier / slack_personal_binding_pairing / slack_personal_binding_pairing_serve, added slack_personal_oauth. A rebase would have been a rename-vs-edit conflict on 19 files, so this branch was reset to main and the move re-done against the current 15-module cluster. Verified against main: item-set freeze 255→256 (only the slack_serve module re-export added, nothing dropped), cfg-matrix green, architecture tests pass.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.16% (282160 / 331320 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 331320 lines now vs 320188 at floor capture (+11132 lines, +3.48%) — not a material change

⚠️ 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.16% — 282160 / 331320 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.36% 222 / 424
ironclaw_authorization 53.54% 461 / 861
ironclaw_triggers 59.99% 1736 / 2894
ironclaw_observability 61.54% 16 / 26
ironclaw_webui_v2 63.12% 2543 / 4029
ironclaw_mcp 63.15% 581 / 920
ironclaw_reborn_cli 63.41% 3816 / 6018
ironclaw_reborn_migration 67.01% 1172 / 1749
ironclaw_memory 67.12% 747 / 1113
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_filesystem 67.44% 3815 / 5657
ironclaw_trust 72.88% 661 / 907
ironclaw_capabilities 74.08% 1658 / 2238
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.61% 958 / 1284
ironclaw_extractors 74.72% 538 / 720
ironclaw_first_party_extensions 77.62% 5411 / 6971
ironclaw_llm 77.88% 19480 / 25013
ironclaw_product_context 78.57% 11 / 14
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_wasm 82.54% 950 / 1151
ironclaw_secrets 82.7% 2791 / 3375
ironclaw_events 83.47% 1762 / 2111
ironclaw_processes 84.06% 965 / 1148
ironclaw_turns 84.24% 13099 / 15549
ironclaw_host_api 85.17% 2549 / 2993
ironclaw_product_workflow 85.74% 10624 / 12391
ironclaw_projects 85.92% 659 / 767
ironclaw_network 86.12% 670 / 778
ironclaw_threads 86.45% 4021 / 4651
ironclaw_common 86.59% 1472 / 1700
ironclaw_slack_v2_adapter 86.79% 1806 / 2081
ironclaw_auth 86.96% 2995 / 3444
ironclaw_reborn_config 86.98% 1730 / 1989
ironclaw_reborn_identity 87.03% 557 / 640
ironclaw_product_adapters 87.29% 3207 / 3674
ironclaw_skills 87.37% 4337 / 4964
ironclaw_hooks 87.84% 9916 / 11289
ironclaw_product_adapter_registry 87.96% 526 / 598
ironclaw_reborn_traces 88.23% 11707 / 13268
ironclaw_extensions 88.26% 2631 / 2981
ironclaw_reborn_composition 88.77% 69714 / 78535
ironclaw_host_runtime 88.95% 17523 / 19700
ironclaw_reborn 89.14% 15703 / 17616
ironclaw_conversations 90% 2924 / 3249
ironclaw_approvals 90.51% 1507 / 1665
ironclaw_event_streams 91.48% 1009 / 1103
ironclaw_loop_support 92.46% 14723 / 15924
ironclaw_resources 93.05% 4607 / 4951
ironclaw_attachments 93.06% 630 / 677
ironclaw_reborn_webui_ingress 93.19% 2217 / 2379
ironclaw_telegram_v2_adapter 94.01% 2447 / 2603
ironclaw_agent_loop 94.58% 8776 / 9279
ironclaw_safety 94.8% 3668 / 3869
ironclaw_first_party_extension_ports 95% 3094 / 3257
ironclaw_outbound 95.59% 3556 / 3720

This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors.

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

@serrrfirat
serrrfirat marked this pull request as ready for review July 8, 2026 14:26

@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

Review at a glance

Verdict Blocking Notes Inline Head
✅ Approved 0 0 0 0a99d20cdba6

Head: 0a99d20cdba62b61b55aaff5ad01511bf048e558
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

No concrete blocking issues found. The change is a scoped Slack module relocation under src/slack/ with updated internal references and preserved public re-exports, plus the matching pub-use snapshot update.

Findings

None.

Developer follow-up

After fixing this feedback:

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

@serrrfirat
serrrfirat merged commit 0c6f11e into main Jul 8, 2026
61 checks passed
@serrrfirat
serrrfirat deleted the reborn/composition-dissection-slack branch July 8, 2026 16:17
@coderabbitai coderabbitai Bot mentioned this pull request Jul 10, 2026
17 of 22 tasks

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5785 — 0a99d20c Deployed Jul 8, 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 scope: docs Documentation size: L 200-499 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant