Skip to content

refactor(composition): shrink deployment-mode branching ratchet 5->3 (#6274 Track 1) - #6387

Merged
ilblackdragon merged 3 commits into
mainfrom
refactor/deployment-mode-ratchet-shrink
Jul 21, 2026
Merged

ilblackdragon merged 3 commits into
mainfrom
refactor/deployment-mode-ratchet-shrink

Conversation

@ilblackdragon

Copy link
Copy Markdown
Member

What & why

Track 1 of finishing DeploymentConfig adoption (#6274): shrink the
reborn_deployment_mode_branching_ratchet allowlist toward its §4.4 target of
{deployment.rs} — the one sanctioned place a profile name becomes deployment
data.

Two of the five allowlisted files were kept on the list only by inline
#[cfg(test)] fixtures that name a RebornCompositionProfile variant. The
ratchet scanner excludes *tests.rs files, so extracting those test modules to
sibling files retires the entries — no production change.

Changes

  • webui/facade.rs → webui/facade/tests.rs — the profile literals were
    entirely in the trailing #[cfg(test)] mod tests.
  • factory.rs → factory/tests.rs — same; production factory.rs names no
    profile variant (it reads DeploymentConfig::storage_shape()). Matches the
    crate's existing mod auth_tests; / mod local_dev_host_tests; pattern.
    Shrinks factory.rs 8566 → 5599 lines.
  • Ratchet allowlist 5 → 3. Now {deployment.rs (TARGET), local_runtime_profile.rs, readiness.rs}.

The two remaining entries (not retired — with rationale)

  • local_runtime_profile.rs — investigated for folding into deployment.rs.
    It keeps one production branch selecting the hosted-single-tenant-volume
    build input, whose libsql-feature requirement no DeploymentConfig axis yet
    captures (hosted_single_tenant_volume() sets the same StorageShape::LocalDevRoot
    as local_dev(), so no existing axis distinguishes it). Cleanly retiring it
    needs a new config axis → deferred to Phase 4 / §5.11 (the build_runtime(cfg)
    collapse). Documented on the allowlist entry.
  • readiness.rs — profile is an operator-facing wire label
    (RebornReadinessDiagnostic::profile), not a branch; retires only if that
    field is reshaped.

Verification

  • cargo test -p ironclaw_architecture — green; the branching ratchet confirms
    factory.rs / webui/facade.rs no longer name a profile variant and the
    trimmed allowlist matches reality (only_shrinks + sorted_and_unique pass).
  • cargo test -p ironclaw_reborn_composition — green (30 suites; the relocated
    test modules compile and run unchanged).
  • cargo clippy -p ironclaw_reborn_composition -p ironclaw_architecture --all-targets -- -D warnings — clean.
  • scripts/pre-commit-safety.sh — pass (factory/tests.rs carries an
    arch-exempt: large_file note for the mechanical extraction).

Behavior-preserving: the extractions are pure moves (super-relative paths
unchanged). No production code changed.

🤖 Generated with Claude Code

…(§4.4/#6274 Track 1)

The `reborn_deployment_mode_branching_ratchet` allowlist tracks every file in
`ironclaw_reborn_composition` still permitted to name a deployment-mode profile
variant; the §4.4 target is `{deployment.rs}` (the one sanctioned profile->config
edge). Two of the five entries were kept alive only by inline `#[cfg(test)]`
fixtures — retire them by extracting the test modules to sibling `tests.rs`
files (which the ratchet scanner excludes):

- `webui/facade.rs` -> `webui/facade/tests.rs`: the `RebornCompositionProfile`
  literals were entirely in the trailing `#[cfg(test)] mod tests`.
- `factory.rs` -> `factory/tests.rs`: same — all profile literals lived in the
  inline test module (production factory.rs names no variant; it reads
  `DeploymentConfig::storage_shape()`). Matches the crate's existing
  `mod auth_tests;` / `mod local_dev_host_tests;` sibling-file pattern. Shrinks
  factory.rs 8566->5599.

Allowlist now `{deployment.rs (target), local_runtime_profile.rs, readiness.rs}`:

- `local_runtime_profile.rs` — investigated for folding into `deployment.rs`; it
  keeps one production branch selecting the hosted-single-tenant-volume build
  input, whose `libsql`-feature requirement no `DeploymentConfig` axis yet
  captures. Cleanly retiring it needs a new config axis, so it's deferred to
  Phase 4 / §5.11 (the `build_runtime(cfg)` collapse), documented on the entry.
- `readiness.rs` — profile is an operator-facing wire **label**
  (`RebornReadinessDiagnostic::profile`), not a branch; stays until that field
  is reshaped.

Behavior-preserving: the extractions are pure moves (super-relative paths
unchanged); `factory/tests.rs` carries an `arch-exempt: large_file` note. No
production code changed.

[skip-regression-check] test-module relocation + ratchet-allowlist trim; the
architecture ratchet itself is the pinning test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@ironloopai

ironloopai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: 510d55ecfc190d536604f64c8583aef477ce31e5
Result: One or more review results were superseded by a newer PR head.
Next: Run @ironloopai review on the latest PR head.
Updated: 2026-07-21T04:48:58.710Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Superseded N/A N/A 2026-07-21T03:55:19.697Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Superseded by a newer PR head. New head: ec98223. Previous verdict: Needs validation.
Recent activity
Time Reviewer State Detail
2026-07-21T01:09:40.280Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head 6e357cb.
2026-07-21T01:09:40.280Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-21T01:09:41.195Z ironloop/common-reviewer (reviewer) Started Reviewer worker started.
2026-07-21T01:09:44.005Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (merge_ref) at 00fb447.
2026-07-21T01:13:05.118Z ironloop/common-reviewer (reviewer) Result captured Needs validation; 0 blocking findings.
2026-07-21T01:13:05.118Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
2026-07-21T03:55:19.697Z ironloop/common-reviewer (reviewer) Superseded A newer PR head replaced this review (ec98223).
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent>
Run metadata

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

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6387 July 21, 2026 01:09 Destroyed
@github-actions github-actions Bot added size: XL 500+ changed lines risk: low Changes to docs, tests, or low-risk modules labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (2)
  • crates/ironclaw_reborn_composition/src/factory.rs
  • crates/ironclaw_reborn_composition/src/factory/tests.rs
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c3b9092a-4409-482a-a38f-9db03d3ca0e2

📥 Commits

Reviewing files that changed from the base of the PR and between 6e357cb and 510d55e.

📒 Files selected for processing (2)
  • crates/ironclaw_reborn_composition/src/factory.rs
  • crates/ironclaw_reborn_composition/src/factory/tests.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Factory and WebUI test suites move into standalone modules. The added tests cover composition invariants, persistence, secrets, runtime integrations, skill boundaries, readiness diagnostics, operator authorization, tool catalogs, and WebUI skill lifecycle behavior.

Changes

Composition regression coverage

Layer / File(s) Summary
Test module extraction and allowlist update
crates/ironclaw_architecture/tests/reborn_deployment_mode_branching_ratchet.rs, crates/ironclaw_reborn_composition/src/factory.rs, crates/ironclaw_reborn_composition/src/webui/facade.rs
Factory and WebUI inline tests are declared as external modules, and the deployment branching allowlist is updated.
Composition foundations and durable state tests
crates/ironclaw_reborn_composition/src/factory/tests.rs
Adds tests for storage routing, resource governance, trigger errors, composition guards, memory, product authentication, secrets, and durable state initialization.
Runtime integrations and lifecycle tests
crates/ironclaw_reborn_composition/src/factory/tests.rs
Adds coverage for extension dispatch, runtime identity, MCP bootstrap, thread persistence, execution contexts, outbound allocation sharing, and trust policy evaluation.
Local skills and readiness composition
crates/ironclaw_reborn_composition/src/factory/tests.rs
Adds coverage for workspace and skill boundaries, migration behavior, management capabilities, mount routing, disabled substrates, and readiness diagnostics.
WebUI operator catalog and lifecycle behavior
crates/ironclaw_reborn_composition/src/webui/facade/tests.rs
Adds catalog ownership filtering, fail-closed reads, lifecycle authorization, readiness, and auto-activation tests.
WebUI skill access and lifecycle tests
crates/ironclaw_reborn_composition/src/webui/facade/tests.rs
Adds tenant and owner isolation, unsafe-content rejection, skill updates/removal, and supporting test helpers.

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

Suggested reviewers: henrypark133

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It covers intent, changes, rationale, and verification, but misses most required template sections and headings. Add the missing template sections/headings: Summary, Change Type, Linked Issue, Validation, Security Impact, Trust-Boundary Checklist, Database Impact, Blast Radius, Rollback Plan, Review Follow-Through, and Review track.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Conventional-commits style and accurately describes the test extraction plus ratchet reduction.
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 the contributor: core 20+ merged PRs label Jul 21, 2026

@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
⚠️ Needs validation 0 0 0 6e357cb5e2e6

Head: 6e357cb5e2e67c3e08412b83ba80b3bd5aaeaa11
Next: Human review or validation is required before merging.

Run details

Status: Current
Needs human: no
Needs validation: yes

Summary

No concrete defect found in static review. Production portions are byte-identical; the change relocates 96 test functions and tightens the ratchet allowlist. Toolchain validation could not run because cargo and rustfmt are unavailable.

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.

@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 `@crates/ironclaw_reborn_composition/src/webui/facade/tests.rs`:
- Line 1: The new tests.rs file exceeds the repository’s size threshold without
the required exemption or modularization. Either add a valid inline
`arch-exempt: large_file, <reason>, plan `#NNNN`` annotation to the test module,
or split the operator-catalog and skills test suites into separate modules.
🪄 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: f7e5701f-b025-4333-99e7-7cb4ebd7da89

📥 Commits

Reviewing files that changed from the base of the PR and between 84d4471 and 6e357cb.

📒 Files selected for processing (5)
  • crates/ironclaw_architecture/tests/reborn_deployment_mode_branching_ratchet.rs
  • crates/ironclaw_reborn_composition/src/factory.rs
  • crates/ironclaw_reborn_composition/src/factory/tests.rs
  • crates/ironclaw_reborn_composition/src/webui/facade.rs
  • crates/ironclaw_reborn_composition/src/webui/facade/tests.rs

Comment thread crates/ironclaw_reborn_composition/src/webui/facade/tests.rs
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 86.31% (318346 / 368836 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 368836 lines now vs 320188 at floor capture (+48648 lines, +15.19%) — material change (>5%)

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

Reborn integration-tier coverage

Line coverage (Reborn crates): 86.31% — 318346 / 368836 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 345
ironclaw_runtime_policy 33.84% 89 / 263
ironclaw_event_projections 43.31% 673 / 1554
ironclaw_observability 61.54% 16 / 26
ironclaw_authorization 62.46% 604 / 967
ironclaw_dispatcher 62.88% 83 / 132
ironclaw_mcp 64.89% 595 / 917
ironclaw_filesystem 68.64% 4139 / 6030
ironclaw_channel_host 68.65% 219 / 319
ironclaw_memory 69.2% 773 / 1117
ironclaw_reborn_migration 70.39% 2361 / 3354
ironclaw_trust 72.88% 661 / 907
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_extractors 74.72% 538 / 720
ironclaw_capabilities 75.76% 2103 / 2776
ironclaw_projects 76.48% 400 / 523
ironclaw_reborn_cli 76.54% 9891 / 12922
ironclaw_triggers 77.33% 2531 / 3273
ironclaw_llm 78.39% 20412 / 26038
ironclaw_product_context 78.57% 11 / 14
ironclaw_telegram_extension 80.18% 4842 / 6039
ironclaw_wasm_product_adapters 80.36% 1448 / 1802
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_first_party_extensions 81.06% 5965 / 7359
ironclaw_memory_native 81.17% 3195 / 3936
ironclaw_events 81.95% 1594 / 1945
ironclaw_network 82.98% 673 / 811
ironclaw_reborn_event_store 83.03% 1169 / 1408
ironclaw_reborn_identity 83.59% 433 / 518
ironclaw_processes 83.76% 939 / 1121
ironclaw_secrets 83.79% 2548 / 3041
ironclaw_wasm 84.44% 1069 / 1266
ironclaw_reborn_config 84.66% 2152 / 2542
ironclaw_product_workflow 84.75% 11088 / 13083
ironclaw_auth 84.97% 3279 / 3859
ironclaw_run_state 85.61% 458 / 535
ironclaw_channel_delivery 85.79% 1383 / 1612
ironclaw_common 86.13% 1714 / 1990
ironclaw_threads 87.22% 4838 / 5547
ironclaw_slack_v2_adapter 87.3% 1491 / 1708
ironclaw_skills 87.6% 4471 / 5104
ironclaw_turns 87.97% 13931 / 15836
ironclaw_product_adapter_registry 88.06% 531 / 603
ironclaw_product_adapters 88.1% 3384 / 3841
ironclaw_reborn_traces 88.2% 11946 / 13544
ironclaw_host_runtime 88.69% 18153 / 20467
ironclaw_reborn_openai_compat 88.79% 3778 / 4255
ironclaw_host_api 88.83% 4635 / 5218
ironclaw_webui 89.33% 7700 / 8620
ironclaw_extensions 89.33% 2955 / 3308
ironclaw_reborn_composition 89.5% 72996 / 81559
ironclaw_telegram_v2_adapter 89.65% 2712 / 3025
ironclaw_approvals 90.18% 1598 / 1772
ironclaw_conversations 90.39% 3123 / 3455
ironclaw_event_streams 90.82% 1009 / 1111
ironclaw_hooks 90.88% 10075 / 11086
ironclaw_runner 91.09% 16926 / 18581
ironclaw_resources 91.67% 4477 / 4884
ironclaw_loop_host 92.24% 15992 / 17338
ironclaw_attachments 93.06% 630 / 677
ironclaw_agent_loop 94.95% 9424 / 9925
ironclaw_safety 95.09% 3682 / 3872
ironclaw_outbound 95.52% 3451 / 3613
ironclaw_first_party_extension_ports 95.62% 3672 / 3840

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 (3 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_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 21, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ❌ Build Failed (View Logs) Web Jul 21, 2026 at 4:49 am

…ode-ratchet-shrink

# Conflicts:
#	crates/ironclaw_reborn_composition/src/factory.rs
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6387 July 21, 2026 03:55 Destroyed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6387 July 21, 2026 04:49 Destroyed
@ilblackdragon
ilblackdragon merged commit 0c7a1d1 into main Jul 21, 2026
61 of 62 checks passed
@ilblackdragon
ilblackdragon deleted the refactor/deployment-mode-ratchet-shrink branch July 21, 2026 05:09
BenKurrek added a commit that referenced this pull request Jul 21, 2026
…y cutover, #6386 authorize() consolidation, #6408 outbound caller-scoping)

Eighth fold. Dispositions follow the standing philosophy (never merge-as-is,
never drop a feature); ledger entry lands in the PR body.

- Tier B adopted wholesale: src/ + gateway/tui crates deleted, root package is
  the test-only ironclaw_reborn_integration_tests host, root Dockerfile is the
  Reborn image (de-migrated per owner decision D1 — this tree deletes
  ironclaw_reborn_migration; the D1 absence pin moves to the root Dockerfile),
  legacy test_rig/support files gone with their [[test]] entries.
- #6386 authorize() consolidation: production side taken verbatim; the
  local-manifest trust test main relocated to ironclaw_capabilities::trust is
  re-expressed in this tree's manifest dialect (host_api sections + contracts
  registry arg).
- #6408 outbound caller-scoping made structural on the generic lane: the
  OutboundDeliveryTargetOwner vocabulary + owner field are defined locally in
  composition (ironclaw_channel_host stays deleted), both registry paths keep
  main's entry_owned_by_caller filtering, and the generic channel provider
  stamps owners from the resolved resource (subject route / DM record user),
  never the caller.
- #6374 trigger-fire access as config: main's TriggerFireAccessPolicy wiring
  and serve tests adopted; the LocalTriggerAccess* store lane stays deleted.
- #6395 SSO/admin identity resolver: production-substrate branch adopted;
  the legacy libSQL identity fold stays out (greenfield blank-slate).
- #6387 factory/facade test extraction: main's module topology adopted; this
  branch's test-module content three-way-merged into factory/tests.rs and
  webui/facade/tests.rs.
- CI: package allowlist keeps this tree's crate set + main's root-package
  exclusion; bucket lanes for deleted crates removed (self-test repinned).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-6387 — 510d55ec Deployed Jul 21, 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: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant