Skip to content

test(reborn): freeze the LocalDev* type-name ratchet (§4.4/§10) - #6205

Merged
ilblackdragon merged 2 commits into
mainfrom
refactor/reborn-localdev-typename-ratchet
Jul 17, 2026
Merged

ilblackdragon merged 2 commits into
mainfrom
refactor/reborn-localdev-typename-ratchet

Conversation

@ilblackdragon

@ilblackdragon ilblackdragon commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

§4.4/§10 ratchet — freeze the LocalDev* type-name inventory

Stacked on #6204. Adds the deployment-mode-as-type ratchet §4.4/§10 of docs/reborn/2026-07-17-architecture-simplification-dto-dyn-local.md calls for, ahead of Slice B (collapsing the LocalDev* shadow runtime to a DeploymentConfig value).

§4.4's rule: a deployment mode is a config value, never a type the kernel or a substrate names. Today a whole LocalDev* type family encodes local-dev as types (approval/capability/lease/mount/network/outbound policy, the store aliases, the root filesystem, the turn-state store, the synthetic-capability + extension-surface families). This test freezes that inventory and enforces the direction.

What it does

crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs scans crates/ for pub/pub(crate) LocalDev* type definitions (struct/enum/trait/type alias) and asserts the set exactly equals a frozen allowlist (the current 31):

  • a new LocalDev* type → fails: resolve the mode to policy data at the composition edge, don't grow another type.
  • deleting one without trimming the allowlist → fails: the list shrinks in lock-step as Slice B lands (§10: compare set membership, never a count).

Definition of done for this axis: the allowlist reaches empty — local-dev is one DeploymentConfig constant, no LocalDev* type remains.

Notes

  • Scoped to LocalDev* (clean empty-set goal). The broader §4.4 name audit — Bucket 2 renames (LocalFilesystem→DiskFilesystem, LocalHostProcessPort→HostProcessPort) and Bucket 3 false positives (Locale, HostedMcp* = hosted MCP endpoint not deployment mode, LocalTraceSubmission*) — is a separate concern, deliberately not folded in so this ratchet stays high-signal.
  • The scanner is exhaustive: it surfaced 9 LocalDev* types a line-oriented grep had missed (synthetic-capability, extension-surface, auth-read-model, capability-wiring families) — exactly the §4.4.1 category-3 "genuine local-only mechanism" cluster Slice B must promote to first-party capabilities.

Safety

Test-only, ships with a scanner self-test. No production code touched.

🤖 Generated with Claude Code


Update (review pass)

ee85b4ca8 consolidates both §10 ratchets onto a shared hardened scanner (tests/ratchet_support/mod.rs) — comment/string stripping, restricted-visibility + unsafe/auto matching, occurrence-preserving scans, production-scoped walk — so this PR now also refactors reborn_inmemory_store_ratchet.rs onto that module (behavior identical, self-tests preserved). The LocalDev ratchet additionally gains cfg-aware multiplicity: factory's durable/no-durable #[cfg]-gated alias pairs (incl. multi-line gates) are exempt from the duplicate check only when every occurrence is gated; mixed pairs still fail. Regression-tested for all of the above.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@ironloopai

ironloopai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: 12692536057e807c59c51ee4a0187321f5b5b60f
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-17T23:19:38.095Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Superseded N/A N/A 2026-07-17T20:29:53.628Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Superseded by a newer PR head. New head: a6061d9. Previous verdict: Changes requested.
Recent activity
Time Reviewer State Detail
2026-07-17T20:19:27.505Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head 7a2d4e5.
2026-07-17T20:19:27.505Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-17T20:19:28.294Z ironloop/common-reviewer (reviewer) Started Reviewer worker started.
2026-07-17T20:19:30.876Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (merge_ref) at cfa11c9.
2026-07-17T20:25:28.435Z ironloop/common-reviewer (reviewer) Result captured Changes requested; 1 blocking finding.
2026-07-17T20:25:28.435Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
2026-07-17T20:29:53.628Z ironloop/common-reviewer (reviewer) Superseded A newer PR head replaced this review (a6061d9).
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.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added safeguards to detect unintended additions, removals, and duplicate exported LocalDev* types.
    • Improved checks for in-memory store type definitions, including conditional compilation scenarios.
    • Added coverage ensuring type detection ignores comments and string contents while recognizing supported visibility and trait modifiers.
  • Refactor
    • Consolidated shared type-definition scanning and duplicate-detection utilities for more consistent architectural checks.

Walkthrough

Adds shared Rust scanner utilities for exported type definitions, migrates the InMemoryStore ratchet to them, and introduces a LocalDev type allowlist ratchet with duplicate and cfg-gating tests.

Changes

Anti-slippage ratchet scanning

Layer / File(s) Summary
Shared scanner implementation
crates/ironclaw_architecture/tests/ratchet_support/mod.rs
Adds occurrence tracking, workspace discovery, recursive Rust-source collection, cfg-aware duplicate detection, visibility/type scanning, and comment/string stripping.
InMemoryStore ratchet migration
crates/ironclaw_architecture/tests/reborn_inmemory_store_ratchet.rs
Migrates inventory and self-tests to the shared scanner contracts and removes duplicated local helpers.
LocalDev type allowlist ratchet
crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs
Adds a frozen LocalDev* inventory, only-shrinks validation, scanner self-tests, same-file duplicate checks, and cfg-gated alias coverage.

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

Sequence Diagram(s)

sequenceDiagram
  participant RatchetTest
  participant collect_type_defs
  participant scan_type_defs
  participant duplicate_definitions
  RatchetTest->>collect_type_defs: scan crates for matching exported types
  collect_type_defs->>scan_type_defs: parse Rust source
  scan_type_defs-->>collect_type_defs: identifiers and cfg_gated flags
  collect_type_defs-->>RatchetTest: occurrence map
  RatchetTest->>duplicate_definitions: validate multiplicity
  duplicate_definitions-->>RatchetTest: duplicate definitions
Loading

Possibly related PRs

  • nearai/ironclaw#6204: Refactors the InMemoryStore ratchet to consume the shared scanner utilities introduced here.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR body is detailed, but it does not follow the required template and omits major sections like Change Type, Linked Issue, Validation, and the review checklists. Reformat the body to the template and fill the missing sections: Summary bullets, Change Type, Linked Issue, Validation, Security/DB/Blast Radius/Rollback, and review checklists.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is Conventional Commits-style and clearly names the LocalDev ratchet freeze.
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.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6205 July 17, 2026 20:19 Destroyed
@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jul 17, 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
❌ Changes requested 1 0 1 7a2d4e513642

Head: 7a2d4e513642817c457726e35e954fc9228ef504
Next: Fix the blocking findings, push the PR branch, then re-run this reviewer.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

The focused stack-layer review found one blocking correctness issue: the new architecture ratchet does not reliably distinguish Rust type definitions from non-code text and misses valid trait syntax.

Findings

Blocking: 1 / Notes: 0

Blocking findings

1. ❌ [MEDIUM] The line scanner does not enforce an exact Rust type inventory

Location: crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs:157-186
This scans isolated lines without tracking comments or string literals. A line beginning pub struct LocalDevFoo inside a block comment or multiline/raw string is therefore counted as a definition; it can cause false CI failures or keep an allowlisted name present after the real type is deleted. Conversely, the declared trait coverage misses valid definitions such as pub unsafe trait LocalDevFoo. Because exact set membership is the sole behavior introduced here, use Rust-aware lexing/parsing and extend the self-test with block-comment, raw-string, and qualified-trait cases.

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.

/// Line-based scan: pull the identifier from any `pub`/`pub(crate)`
/// `struct`/`enum`/`trait`/`type` definition whose name starts with `LocalDev`.
fn scan_source_for_localdev_type_defs(source: &str, out: &mut BTreeSet<String>) {
for line in source.lines() {

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.

This line-oriented scan is not an exact type-definition scanner: it counts pub struct LocalDevFoo inside block comments or multiline/raw strings, while missing valid declarations such as pub unsafe trait LocalDevFoo. That can either create false CI failures or let non-code text keep an allowlisted name alive after the real type is deleted. Please use Rust-aware lexing/parsing and add self-test cases for those contexts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in ee85b4c by consolidating both §10 ratchets onto one hardened scanner (tests/ratchet_support/mod.rs) instead of duplicating a weaker copy: comments and plain/raw string literals are stripped by a minimal lexer before matching (so definition-shaped text in them neither adds a false positive nor keeps an allowlisted name alive), pub unsafe trait / pub(crate) unsafe trait / auto trait declarations are matched, and the scan is occurrence-preserving with a multiplicity check. That last part surfaced a real subtlety your comment predicted: composition's factory.rs defines the same LocalDev* alias twice under mutually exclusive #[cfg] gates (incl. rustfmt-split multi-line gates) — the duplicate check now exempts a name only when every occurrence is cfg-gated, and a mixed gated/ungated pair still fails. Self-tests cover comment/string fixtures, unsafe-trait forms, same-file duplicates, and both cfg-pair shapes.

@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-inmemory-store-ratchet branch from d0a8e97 to 92dbd8b Compare July 17, 2026 20:29
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-localdev-typename-ratchet branch from 7a2d4e5 to a6061d9 Compare July 17, 2026 20:29
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6205 July 17, 2026 20:29 Destroyed
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

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

railway-app Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 17, 2026 at 11:10 pm

@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-inmemory-store-ratchet branch from 92dbd8b to 5d950f6 Compare July 17, 2026 20:45
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-localdev-typename-ratchet branch from a6061d9 to cb64b5b Compare July 17, 2026 20:45
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

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-6205 July 17, 2026 20:45 Destroyed
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-inmemory-store-ratchet branch from 5d950f6 to 661b020 Compare July 17, 2026 22:19
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-localdev-typename-ratchet branch from cb64b5b to 7aa2029 Compare July 17, 2026 22:20
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

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-6205 July 17, 2026 22:20 Destroyed
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-inmemory-store-ratchet branch 2 times, most recently from 47bc5b4 to 661b020 Compare July 17, 2026 22:24
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-localdev-typename-ratchet branch from 7aa2029 to 3fec1bd Compare July 17, 2026 22:24
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

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-6205 July 17, 2026 22:40 Destroyed
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…for LocalDev ratchet

Addresses the IronLoop finding on #6205 (line-oriented scan matches
comment/string text and misses `pub unsafe trait`) by consolidating both
§10 ratchets onto one hardened scanner instead of duplicating a weaker
copy:

- New `tests/ratchet_support/mod.rs`: comment/string-stripping lexer,
  `pub`/`pub(crate)`/`pub(super)`/`pub(in ...)` visibility, `unsafe`/`auto`
  modifiers, occurrence-preserving scans, production-scoped walk
  (skips tests/, examples/, benches/), and a multiplicity check.
- `reborn_inmemory_store_ratchet.rs` refactored onto the shared module
  (behavior identical; self-tests preserved).
- `reborn_localdev_typename_ratchet.rs` gains everything above plus
  cfg-aware multiplicity: the composition factory defines durable/
  no-durable alias pairs for the same `LocalDev*` name under mutually
  exclusive `#[cfg(...)]` gates (including rustfmt-split multi-line
  gates) — those are exempt from the duplicate check only when every
  occurrence is cfg-gated; a mixed pair still fails. Regression tests
  cover the cfg pair (single- and multi-line), the mixed pair, same-file
  duplicates, and marker-bearing comment/string fixtures.

Also rebased onto #6204's current head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6205 July 17, 2026 22:59 Destroyed
@ilblackdragon

Copy link
Copy Markdown
Member Author

✅ Ready for merge

Reviewed, all findings addressed, CI fully green (18 pass / 0 fail) on head ee85b4ca8. Stacked on #6204 — GitHub will retarget to main when that merges; the diff is only the ratchet slice.

What was done:

  • Rebased onto test(reborn): freeze the InMemory*Store allowlist ratchet (§10) #6204's current head (the hardened InMemory-ratchet scanner).
  • Review verdict: the §4.4/§10 frozen-inventory design matches the merged-sibling pattern; the frozen 31 verified against the stronger scanner (all live in src/, none dropped by the production-scope walk).
  • IronLoop finding + my review finding, fixed in ee85b4ca8: instead of duplicating a weaker line-scanner, both §10 ratchets now share one hardened implementation (tests/ratchet_support/mod.rs): comment/string stripping (the reported false-positive/false-negative source), pub unsafe trait/auto trait matching, restricted visibility, occurrence-preserving scans, and multiplicity checking. That surfaced a real subtlety: composition factory.rs defines the same LocalDev* alias twice under mutually exclusive #[cfg] gates (including rustfmt-split multi-line gates) — the duplicate check exempts a name only when every occurrence is cfg-gated; a mixed gated/ungated pair still fails. All pinned by self-tests (comment/string fixtures, unsafe-trait forms, same-file duplicates, single- and multi-line cfg pairs, mixed pair).
  • Local gates: both ratchet binaries (4+4 tests) + full architecture suite green; clippy -D warnings clean; pre-commit safety within budget. PR body updated for the expanded (shared-support) scope.

🤖 Generated with Claude Code

ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Base automatically changed from refactor/reborn-inmemory-store-ratchet to main July 17, 2026 23:18
ilblackdragon and others added 2 commits July 17, 2026 23:19
…simplification)

Adds the deployment-mode-as-type ratchet §4.4/§10 of
docs/reborn/2026-07-17-architecture-simplification-dto-dyn-local.md calls for on
the `Local*` axis, ahead of Slice B (collapsing the `LocalDev*` shadow runtime to
a `DeploymentConfig` value).

`crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs` scans
`crates/` for `pub`/`pub(crate)` `LocalDev*` type definitions (struct/enum/trait/
type alias) and asserts the set exactly equals a checked-in frozen allowlist (the
current 31):

- a NEW `LocalDev*` type fails — a deployment mode must resolve to policy data at
  the composition edge, never grow another type;
- deleting one without trimming the allowlist also fails — so the list shrinks in
  lock-step as Slice B lands (§10: compare set membership, never a count).

Definition of done for this axis: the allowlist reaches empty — local-dev is one
`DeploymentConfig` constant, no `LocalDev*` type remains.

Scoped to `LocalDev*` specifically (clean empty-set goal); the broader §4.4 name
audit — Bucket 2 renames (`LocalFilesystem`->`DiskFilesystem`,
`LocalHostProcessPort`->`HostProcessPort`) and Bucket 3 false positives (`Locale`,
`HostedMcp*`, `LocalTraceSubmission*`) — is a separate concern.

Ships with its own scanner self-test (per "guardrails are code"). The scanner is
exhaustive: it surfaced 9 `LocalDev*` types a line-oriented grep had missed
(synthetic-capability + extension-surface + auth-read-model families).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…for LocalDev ratchet

Addresses the IronLoop finding on #6205 (line-oriented scan matches
comment/string text and misses `pub unsafe trait`) by consolidating both
§10 ratchets onto one hardened scanner instead of duplicating a weaker
copy:

- New `tests/ratchet_support/mod.rs`: comment/string-stripping lexer,
  `pub`/`pub(crate)`/`pub(super)`/`pub(in ...)` visibility, `unsafe`/`auto`
  modifiers, occurrence-preserving scans, production-scoped walk
  (skips tests/, examples/, benches/), and a multiplicity check.
- `reborn_inmemory_store_ratchet.rs` refactored onto the shared module
  (behavior identical; self-tests preserved).
- `reborn_localdev_typename_ratchet.rs` gains everything above plus
  cfg-aware multiplicity: the composition factory defines durable/
  no-durable alias pairs for the same `LocalDev*` name under mutually
  exclusive `#[cfg(...)]` gates (including rustfmt-split multi-line
  gates) — those are exempt from the duplicate check only when every
  occurrence is cfg-gated; a mixed pair still fails. Regression tests
  cover the cfg pair (single- and multi-line), the mixed pair, same-file
  duplicates, and marker-bearing comment/string fixtures.

Also rebased onto #6204's current head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ilblackdragon
ilblackdragon force-pushed the refactor/reborn-localdev-typename-ratchet branch from ee85b4c to 1269253 Compare July 17, 2026 23:19
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6205 July 17, 2026 23:19 Destroyed
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

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

@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 `@crates/ironclaw_architecture/tests/ratchet_support/mod.rs`:
- Around line 16-19: Update the duplicate-detection logic around the
matched-definition cfg handling to prove that cfg predicates are mutually
exclusive before suppressing a duplicate; do not treat mere presence of #[cfg]
as sufficient, and account for definitions in separate modules. Preserve valid
mutually exclusive alias pairs, while keeping identical or overlapping
predicates—including the LocalDev fixture’s disabled-feature combination—as
duplicates. Add regression cases covering identical and overlapping gates, and
revise the documentation near the matched-definition model to describe the
behavior actually enforced.

In `@crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs`:
- Line 48: Update the KEYWORDS constant in the LocalDev typename scanner to
include "union " so named Rust unions are inventoried alongside structs, enums,
traits, and type aliases. Add a regression fixture covering a pub union
LocalDev* declaration and assert it is detected, preserving the documented
§4.4/§10 freeze guarantees.
🪄 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: b03b519a-4e07-45aa-9269-4876aaf853b4

📥 Commits

Reviewing files that changed from the base of the PR and between d51cc14 and 1269253.

📒 Files selected for processing (3)
  • crates/ironclaw_architecture/tests/ratchet_support/mod.rs
  • crates/ironclaw_architecture/tests/reborn_inmemory_store_ratchet.rs
  • crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs

Comment on lines +16 to +19
/// One matched definition: where it was found and whether the definition line
/// sits under a `#[cfg(...)]` attribute (mutually exclusive compile branches —
/// e.g. the durable/no-durable alias pairs in composition's `factory.rs` — are
/// legitimate same-name definitions, not duplicate debt).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Prove cfg exclusivity before suppressing duplicates.

Line 45 equates “every occurrence has a #[cfg]” with “mutually exclusive.” Identical or overlapping gates—and unrelated gates in separate modules—are therefore hidden from both ratchets.

The current LocalDev fixture at Lines 230-236 also overlaps when inmemory-turn-state, libsql, and postgres are disabled. Preserve predicates and prove disjointness, or narrowly exempt explicitly reviewed alias pairs. Add identical/overlapping-gate regression cases that remain duplicates.

As per coding guidelines, “Comments and documentation that promise guarantees must match the behavior implemented in code and covered by tests.”

Also applies to: 34-46

🤖 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 `@crates/ironclaw_architecture/tests/ratchet_support/mod.rs` around lines 16 -
19, Update the duplicate-detection logic around the matched-definition cfg
handling to prove that cfg predicates are mutually exclusive before suppressing
a duplicate; do not treat mere presence of #[cfg] as sufficient, and account for
definitions in separate modules. Preserve valid mutually exclusive alias pairs,
while keeping identical or overlapping predicates—including the LocalDev
fixture’s disabled-feature combination—as duplicates. Add regression cases
covering identical and overlapping gates, and revise the documentation near the
matched-definition model to describe the behavior actually enforced.

Source: Coding guidelines

TypeDefOccurrence, collect_type_defs, duplicate_definitions, scan_type_defs, workspace_root,
};

const KEYWORDS: &[&str] = &["struct ", "enum ", "trait ", "type "];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Include Rust unions in the LocalDev* inventory.

pub union LocalDevState { ... } defines a named type but bypasses this scanner, violating the §4.4/§10 freeze. Add "union " and a scanner regression fixture.

Proposed fix
-const KEYWORDS: &[&str] = &["struct ", "enum ", "trait ", "type "];
+const KEYWORDS: &[&str] = &["struct ", "enum ", "trait ", "type ", "union "];

As per coding guidelines, every bug fix requires regression coverage and documented guarantees must match behavior.

Also applies to: 140-182

🤖 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 `@crates/ironclaw_architecture/tests/reborn_localdev_typename_ratchet.rs` at
line 48, Update the KEYWORDS constant in the LocalDev typename scanner to
include "union " so named Rust unions are inventoried alongside structs, enums,
traits, and type aliases. Add a regression fixture covering a pub union
LocalDev* declaration and assert it is detected, preserving the documented
§4.4/§10 freeze guarantees.

Source: Coding guidelines

ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

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

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.94% (304812 / 354688 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 354688 lines now vs 320188 at floor capture (+34500 lines, +10.77%) — 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): 85.94% — 304812 / 354688 lines

Per-crate breakdown (62 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 345
ironclaw_runtime_policy 31.75% 80 / 252
ironclaw_event_projections 43.31% 673 / 1554
ironclaw_observability 61.54% 16 / 26
ironclaw_authorization 62.46% 604 / 967
ironclaw_mcp 64.89% 595 / 917
ironclaw_triggers 65.44% 2142 / 3273
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_filesystem 67.69% 3932 / 5809
ironclaw_memory 69.2% 773 / 1117
ironclaw_reborn_migration 71.57% 1551 / 2167
ironclaw_trust 72.88% 661 / 907
ironclaw_reborn_cli 74.19% 7010 / 9449
ironclaw_capabilities 74.36% 1685 / 2266
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.67% 958 / 1283
ironclaw_extractors 74.72% 538 / 720
ironclaw_projects 76.48% 400 / 523
ironclaw_llm 78.25% 20193 / 25805
ironclaw_product_context 78.57% 11 / 14
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_wasm_product_adapters 80.71% 1448 / 1794
ironclaw_first_party_extensions 81.06% 5965 / 7359
ironclaw_memory_native 81.22% 3205 / 3946
ironclaw_events 81.43% 1539 / 1890
ironclaw_secrets 82.79% 2794 / 3375
ironclaw_reborn_identity 83.59% 433 / 518
ironclaw_processes 83.76% 939 / 1121
ironclaw_run_state 83.96% 424 / 505
ironclaw_wasm 83.97% 1011 / 1204
ironclaw_reborn_config 84.06% 1814 / 2158
ironclaw_auth 84.81% 3233 / 3812
ironclaw_turns 85.04% 13722 / 16136
ironclaw_host_api 85.34% 2695 / 3158
ironclaw_product_workflow 85.79% 10917 / 12725
ironclaw_network 86.12% 670 / 778
ironclaw_common 86.66% 1741 / 2009
ironclaw_slack_v2_adapter 86.79% 1806 / 2081
ironclaw_threads 86.93% 4708 / 5416
ironclaw_product_adapters 87.18% 3265 / 3745
ironclaw_skills 87.6% 4471 / 5104
ironclaw_hooks 87.78% 9921 / 11302
ironclaw_product_adapter_registry 88.06% 531 / 603
ironclaw_reborn_traces 88.19% 11946 / 13546
ironclaw_webui 88.42% 7333 / 8293
ironclaw_host_runtime 88.65% 17840 / 20123
ironclaw_reborn_composition 88.97% 75489 / 84850
ironclaw_extensions 89.38% 2971 / 3324
ironclaw_runner 89.5% 16989 / 18983
ironclaw_reborn_openai_compat 89.5% 3778 / 4221
ironclaw_approvals 90.18% 1598 / 1772
ironclaw_conversations 90.39% 3123 / 3455
ironclaw_event_streams 90.82% 1009 / 1111
ironclaw_resources 91.73% 4490 / 4895
ironclaw_loop_host 92.25% 15051 / 16316
ironclaw_attachments 93.06% 630 / 677
ironclaw_telegram_v2_adapter 93.91% 2592 / 2760
ironclaw_agent_loop 94.88% 9184 / 9680
ironclaw_safety 95.04% 3677 / 3869
ironclaw_outbound 95.59% 3556 / 3720
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

@ilblackdragon

Copy link
Copy Markdown
Member Author

Post-rebase confirmation: after #6204's squash-merge, this branch was rebased onto main (only its two commits remain; conflict resolved) and the full main-targeted CI matrix is green — 56 pass / 0 fail on head 126925360. Still ready for merge.

@ilblackdragon
ilblackdragon merged commit d985b64 into main Jul 17, 2026
65 checks passed
@ilblackdragon
ilblackdragon deleted the refactor/reborn-localdev-typename-ratchet branch July 17, 2026 23:33
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 17, 2026
…4 Bucket 2) (#6206)

* refactor(reborn): rename LocalHostProcessPort -> HostProcessPort (§4.4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

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

* docs(reborn): repoint guidance at HostProcessPort after the rename

Addresses the IronLoop finding on #6206: the source rename left live
agent/safety guidance naming the old type. Updates the three guidance
files — .claude/rules/safety-and-sandbox.md (prose + the re-verify rg
audit command, keeping `ProcessBackendKind::LocalHost` which is not
renamed), crates/ironclaw_host_runtime/AGENTS.md, and
tests/integration/CLAUDE.md (`.with_live_shell()` docs). The security
semantics are unchanged: the unsandboxed port remains single-user-local
only, with the rename noted inline so greps for the old name still land
on the rule. Historical plan/spec docs (arch-simplification note, dated
superpowers spec) deliberately keep the old name — they narrate the
pre-rename state and the rename mapping itself.

[skip-regression-check] documentation-only follow-up to the rename.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilblackdragon added a commit that referenced this pull request Jul 18, 2026
…* (§4.4 Bucket 3) (#6207)

* refactor(reborn): rename LocalHostProcessPort -> HostProcessPort (§4.4 Bucket 2)

The §4.4 Bucket-2 trust-boundary rename: `Host` states the boundary this port
crosses (an OS process run directly on the host, unsandboxed, no tenant mount
containment — the §6 shell cross-tenant escape surface) where `Local` obscured
it (`docs/reborn/2026-05-11-trust-boundary-stack-note.md`). Pure identifier
rename, behavior-preserving; the sibling `pub(crate)` helpers
`LocalHostProcessEnvMode`/`LocalHostWorkdirAlias` are renamed to `Host*` for
consistency, and the struct doc now states the boundary explicitly.

No `Local*` type name here is the deployment-mode `LocalDev*` family (that is the
#6205 ratchet); this advances the broader §4.4 name audit.

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

* docs(reborn): repoint guidance at HostProcessPort after the rename

Addresses the IronLoop finding on #6206: the source rename left live
agent/safety guidance naming the old type. Updates the three guidance
files — .claude/rules/safety-and-sandbox.md (prose + the re-verify rg
audit command, keeping `ProcessBackendKind::LocalHost` which is not
renamed), crates/ironclaw_host_runtime/AGENTS.md, and
tests/integration/CLAUDE.md (`.with_live_shell()` docs). The security
semantics are unchanged: the unsandboxed port remains single-user-local
only, with the rename noted inline so greps for the old name still land
on the rule. Historical plan/spec docs (arch-simplification note, dated
superpowers spec) deliberately keep the old name — they narrate the
pre-rename state and the rename mapping itself.

[skip-regression-check] documentation-only follow-up to the rename.

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

* refactor(reborn): rename LocalTraceSubmission* -> NodeTraceSubmission* (§4.4 Bucket 3)

The §4.4 Bucket-3 name-audit rename: these types are this-**node**'s submission
records to Trace Commons, not a deployment mode — `Node` says that where `Local`
was a false friend for the `Local*` deployment-mode audit. Renames the four types
(`LocalTraceSubmission{Record,Status,HistoryEvent,HistoryKind}` ->
`NodeTraceSubmission*`) across `ironclaw_reborn_traces` and its v1 consumers
(`src/agent`, `src/channels/web`) via the `crate::trace_contribution` re-export.

Pure identifier rename, behavior-preserving and **wire-safe**: the struct/enum
names never appear in serialized output (serde emits field names and the
`rename_all = "snake_case"` variant strings `submitted`/`revoked`/… — unchanged),
and no persisted record-kind/string tag used the type name. Removes four
false-friend `Local*` names so the eventual §4.4 `Local*` type-name ban (the
#6205 ratchet's endgame) doesn't have to permanently allowlist them.

`ironclaw_reborn_traces` tests green (215); clippy `-D warnings` + `cargo fmt`
clean. large_file arch-exempts added for the three >1,500-line files the rename's
lines touch (contribution.rs 17K, plus two v1 files) — no logic change.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-6205 — 12692536 Deployed Jul 17, 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: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant