Skip to content

Delete dead iroh control-plane code - #10765

Open
lawrencecchen wants to merge 7 commits into
mainfrom
feat-iroh-dead-code
Open

lawrencecchen wants to merge 7 commits into
mainfrom
feat-iroh-dead-code

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Deletes provably dead iroh control-plane code left behind by the migration from client-minted broker credentials to registry-based relay admission: 7,467 lines removed, 80 added, across five single-cluster commits. Every deletion was verified by repo-wide grep, tsgo --noEmit, and the full relay/iroh web test files; the Swift deletion by swift build + swift test on the package.

Clusters and evidence

1. Legacy broker relay-token route (721d8bc, 130 lines). POST /api/devices/iroh/relay-token had zero callers: grep for the path, relay_token, and issueRelayToken across Packages/, Sources/, ios/, CLI/, cmux-tui/, daemon/, scripts/, tests_v2/ hits only the route file and web tests, and full-history git log -S shows no client ever referenced it. The Swift client has fetched relay credentials from POST /api/relay/token since #7908; #10731 documents the same finding. Removed the route dir, the relay_token operation, the broker issueRelayToken API, and their tests.

2. n0-hosted relay minter compatibility path (017a52e, 6,549 lines). Production has never set CMUX_IROH_MINT_URL / CMUX_IROH_MINT_HMAC_SECRET_B64, so every registration already took the unconfigured branch and returned relay.status = "unavailable". The only importers of web/services/iroh/relayMinter.ts and minterUrlPolicy.ts were trustBroker.ts, env.ts, and tests; the Rust service services/iroh-relay-minter/ (929-line lib.rs plus a 4,590-line Cargo.lock) belongs to no workspace and was referenced only by its own dispatch-only workflow. register now returns unavailable/not_requested directly, byte-identical to today's production responses (minus a failed issuance audit row nobody read). This removes the dormant n0-hosted fallback option deliberately: the registry / relay allow-hook path is the go-forward. Operational follow-up outside the repo: retire the minter Vercel project and delete the two env vars.

3. Orphaned relay-issuance plumbing (226af47, 363 lines). With clusters 1-2 gone, reserveRelayIssuance / completeRelayIssuance / failRelayIssuance had no callers outside their tests, the two IROH_RELAY_TOKEN_* constants had none at all, and IrohQuotaExceededError has had no producer since #9269 removed the broker quotas (grep for new IrohQuotaExceededError is empty), making both 429 mappings unreachable. The iroh_relay_token_issuances table, its migrations, and retention cleanup stay: production still holds rows.

4. Never-wired offline-pair server subgraph and unreferenced exports (2b5b6c4, 340 lines). createOfflinePairSessionRecord / verifyAndConsumeOfflineSameAccountPair plus private helpers, types, and constants were reachable from no route, broker method, or repository call; the shipping Swift offline-pairing feature verifies attestations peer-to-peer and never calls a server session endpoint. Also serverPublishedIrohPathHints (zero references, not even tests), IROH_SIGNED_PATH_HINT_UPDATE_FOLLOWUP (definition-only), and bindingMatchesDiscoveryScope moved from production into the trust-broker test that uses it as fixture logic.

5. Unreferenced Swift struct (51198c1, 18 lines). CmxIrohInboundStream's only occurrence in any Swift source is its own definition.

Spared

  • Packages/Shared/CmuxIrohTransport otherwise untouched: every other candidate file has live references (the package ships).
  • iroh_relay_token_issuances schema, migrations, retention SQL, and the account-deletion fence coverage: production data still drains through them.
  • IROH_ENDPOINT_ATTESTATION_SCOPE = "cmux.offline-pair.same-account": live in endpoint attestations, kept despite the name.

Tests

  • cd web && bun run typecheck (tsgo) green after every commit.
  • Full relay/iroh web files: 178 pass / 0 fail (iroh-model-crypto, iroh-route-handler, iroh-trust-broker, relay-policy, relay-preferences-route, relay-token-route, relay-token, relay-workflows, client-config-env, connectivity-authority).
  • DB lane against local Postgres: iroh-db-behavior 33 pass / 0 fail.
  • swift test --package-path Packages/Shared/CmuxIrohTransport: 615 tests in 66 suites pass. CmxConnectivityPeerSessionTests was skipped because it deadlocks on current main regardless of this change; the fix is on origin/fix-peer-session-test-deadlock.

Revert

Each cluster is one commit; git revert <sha> restores it independently. Two later commits sit on top: defdffe (merge of origin/main, no manual edits) and 7bd2a24 (drops two stale env.ts/.env.example comments that referenced the deleted minter; revert independently). Revert order for a full rollback: 51198c1, 2b5b6c4, 226af47, 017a52e, 721d8bc (clusters 3-4 depend on 1-2 being gone, so partial reverts of 017a52e or 721d8bc also need 226af47 and 2b5b6c4 reverted first).

Dictionary:

  • mint: one server-side issuance of a signed relay credential.
  • broker: the authenticated web service that registers iroh endpoints and issues grants.
  • relay admission: the relay accepting a connection based on a credential or registry entry.
  • issuance audit row: the database record tracking one relay-credential mint attempt.
  • retention cleanup: the cron that deletes expired iroh rows on a schedule.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Breaking Changes

    • Removed built-in relay-token minting and hosted relay-minter support.
    • New Iroh registrations no longer issue relay credentials automatically; relay status may appear as unavailable or not requested.
    • Removed offline same-account pairing support.
    • Removed legacy relay-minter environment settings and related API routes.
  • Documentation

    • Removed relay-minter deployment, configuration, and verification documentation.

Review-gate P1 refutation (429 quota mapping)

At the PR base (3f98f5d) the only construction of IrohQuotaExceededError in the entire tree is web/tests/iroh-route-handler.test.ts:368, mocking issueRelayToken, which this PR deletes. No production code constructs the error: repository.ts carries only the import, an error-union member, and a tag type-guard. No challenge or pair-grant deny site produces it; cmux#9269 removed every broker quota on 2026-07-31 (the stale README text is corrected in cmux#10731). The 429 arms in connectivity/routeHandler.ts and iroh/routeHandler.ts were unreachable, so their removal changes no client-observable behavior.

POST /api/devices/iroh/relay-token has zero callers: repo-wide grep for the
path and its relay_token operation hits only the route file and web tests,
and full-history git log -S over Packages/ Sources/ ios/ CLI/ cmux-tui/
daemon/ returns no commit in which any client referenced it. The Swift
client has fetched relay credentials from POST /api/relay/token since the
route was introduced in #7908.

Removes the route dir, the relay_token IrohRouteOperation and dispatch,
the public broker issueRelayToken (issueRelayTokenForBinding stays for the
register bootstrap), its tests, and the stale README sentence.
Production has never set CMUX_IROH_MINT_URL / CMUX_IROH_MINT_HMAC_SECRET_B64,
so every registration already took the mint-unconfigured branch and returned
relay.status="unavailable"; clients get endpoint-bound fleet credentials
from POST /api/relay/token instead. The only importers of the minter client
(web/services/iroh/relayMinter.ts, minterUrlPolicy.ts) were trustBroker.ts,
env.ts, and their tests; the Rust service services/iroh-relay-minter/ is in
no Cargo workspace, package.json, or vercel config, and its only external
reference was its own dispatch-only GitHub workflow.

register now returns relay unavailable/not_requested directly, preserving
the env-unset behavior exactly (minus the failed-issuance audit row). This
deliberately removes the dormant n0-hosted fallback option; the registry
/ relay allow-hook path is the go-forward. Operational follow-up outside
this repo: decommission the minter Vercel project and drop the two env
vars from the web project.
…rror

With the legacy relay-token route and the n0 minter gone, nothing calls
IrohRepository.reserveRelayIssuance/completeRelayIssuance/failRelayIssuance
(grep: definitions and their direct tests only), and the model constants
IROH_RELAY_TOKEN_LIFETIME_SECONDS/IROH_RELAY_TOKEN_REFRESH_SECONDS have zero
remaining users. IrohQuotaExceededError has had no producer since #9269
removed the broker quotas (grep for 'new IrohQuotaExceededError' hits
nothing); its 429 mappings in the iroh and connectivity route handlers were
unreachable.

The iroh_relay_token_issuances table, its migrations, and the retention
cleanup that drains historical rows all stay: production still holds rows.
…d iroh exports

createOfflinePairSessionRecord / verifyAndConsumeOfflineSameAccountPair and
their private helpers and types were added in #7908 but no route, broker
method, or repository call ever reached them; repo-wide grep hits only
crypto.ts and their unit test. The Swift offline-pairing feature verifies
attestations peer-to-peer and never calls a server session endpoint.
Also removes the constants that existed only for that subgraph
(IROH_OFFLINE_PAIR_SESSION_*), serverPublishedIrohPathHints (zero
references, not even tests), IROH_SIGNED_PATH_HINT_UPDATE_FOLLOWUP (its
only occurrence is its definition; the literal string appears nowhere
else, including Swift), and bindingMatchesDiscoveryScope from production
(used only by the trust-broker test's in-memory repository, where it now
lives as a local fixture helper).
The struct's only occurrence in the entire repo (all Swift under
Packages/, Sources/, ios/, CLI/, daemon/, Native/, tests) is its own
definition; no code constructs, returns, or names it, including the
package's tests. swift build and swift test on the package pass after
removal (615 tests in 66 suites; CmxConnectivityPeerSessionTests skipped
because it deadlocks on current main independent of this change - the fix
is in flight on origin/fix-peer-session-test-deadlock).
@coderabbitai

coderabbitai Bot commented Aug 25, 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: eb651bb2-8c55-4d62-b9cf-b3d088a17bd7

📥 Commits

Reviewing files that changed from the base of the PR and between 75ba559 and 7bd2a24.

⛔ Files ignored due to path filters (1)
  • services/iroh-relay-minter/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (33)
  • .github/workflows/iroh-relay-minter.yml
  • Packages/Shared/CmuxIrohTransport/Sources/CmuxIrohTransport/CmxIrohInboundStream.swift
  • services/iroh-relay-minter/.env.example
  • services/iroh-relay-minter/.gitignore
  • services/iroh-relay-minter/Cargo.toml
  • services/iroh-relay-minter/README.md
  • services/iroh-relay-minter/api/relay-token.rs
  • services/iroh-relay-minter/examples/loopback.rs
  • services/iroh-relay-minter/rust-toolchain.toml
  • services/iroh-relay-minter/src/lib.rs
  • services/iroh-relay-minter/vercel.json
  • tests/fixtures/iroh/relay-minter-request-v1.json
  • web/.env.example
  • web/app/api/devices/iroh/relay-token/route.ts
  • web/app/env.ts
  • web/services/connectivity/routeHandler.ts
  • web/services/iroh/README.md
  • web/services/iroh/config.ts
  • web/services/iroh/crypto.ts
  • web/services/iroh/discoveryScope.ts
  • web/services/iroh/errors.ts
  • web/services/iroh/minterUrlPolicy.ts
  • web/services/iroh/model.ts
  • web/services/iroh/publicationPolicy.ts
  • web/services/iroh/relayMinter.ts
  • web/services/iroh/repository.ts
  • web/services/iroh/routeHandler.ts
  • web/services/iroh/trustBroker.ts
  • web/tests/client-config-env.test.ts
  • web/tests/iroh-db-behavior.test.ts
  • web/tests/iroh-model-crypto.test.ts
  • web/tests/iroh-route-handler.test.ts
  • web/tests/iroh-trust-broker.test.ts
💤 Files with no reviewable changes (24)
  • web/services/connectivity/routeHandler.ts
  • services/iroh-relay-minter/vercel.json
  • services/iroh-relay-minter/.gitignore
  • services/iroh-relay-minter/.env.example
  • services/iroh-relay-minter/rust-toolchain.toml
  • web/services/iroh/discoveryScope.ts
  • tests/fixtures/iroh/relay-minter-request-v1.json
  • services/iroh-relay-minter/README.md
  • services/iroh-relay-minter/examples/loopback.rs
  • Packages/Shared/CmuxIrohTransport/Sources/CmuxIrohTransport/CmxIrohInboundStream.swift
  • services/iroh-relay-minter/src/lib.rs
  • web/tests/iroh-model-crypto.test.ts
  • services/iroh-relay-minter/api/relay-token.rs
  • web/services/iroh/crypto.ts
  • web/app/api/devices/iroh/relay-token/route.ts
  • web/services/iroh/model.ts
  • web/services/iroh/publicationPolicy.ts
  • web/tests/client-config-env.test.ts
  • web/services/iroh/minterUrlPolicy.ts
  • web/tests/iroh-db-behavior.test.ts
  • web/services/iroh/config.ts
  • .github/workflows/iroh-relay-minter.yml
  • services/iroh-relay-minter/Cargo.toml
  • web/services/iroh/relayMinter.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The PR removes the Rust relay-minter service and hosted relay-token flow. It removes related configuration, errors, repository state, trust-broker APIs, offline pairing support, deployment artifacts, and tests. Registration now reports relay credentials as unavailable.

Changes

Iroh capability retirement

Layer / File(s) Summary
Retired contracts and configuration
.github/workflows/iroh-relay-minter.yml, services/iroh-relay-minter/..., Packages/Shared/CmuxIrohTransport/..., web/app/env.ts, web/services/iroh/config.ts, web/services/iroh/errors.ts, web/services/iroh/model.ts, web/services/iroh/discoveryScope.ts, web/services/iroh/publicationPolicy.ts, web/services/iroh/crypto.ts
Removes relay-minter configuration, offline-pairing APIs, relay-related constants, error types, discovery matching, publication filtering, and the Rust service artifacts.
Relay issuance flow removal
web/services/iroh/trustBroker.ts, web/services/iroh/repository.ts, web/services/iroh/routeHandler.ts, web/services/connectivity/routeHandler.ts, web/services/iroh/README.md
Removes relay-token issuance, reservation state, broker wiring, route operations, quota responses, and hosted-minter documentation. Registration reports unavailable; refresh reports not_requested.
Test and fixture alignment
web/tests/client-config-env.test.ts, web/tests/iroh-db-behavior.test.ts, web/tests/iroh-model-crypto.test.ts, web/tests/iroh-route-handler.test.ts, web/tests/iroh-trust-broker.test.ts, tests/fixtures/iroh/relay-minter-request-v1.json
Removes retired flow setup and assertions, relay-minter and offline-pairing tests, relay issuance fixtures, and obsolete environment validation. Updates trust-broker expectations and fixtures.

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

Merge Risk: ⚪ Minimal · up to 7bd2a

The PR removes unused legacy control-plane code with documented validation and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: azooz2003-bit

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
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.
Cmux Swift Actor Isolation ✅ Passed PASS: The complete pull-request diff contains one Swift production change, and it is deletion-only: CmxIrohInboundStream.swift removes an unused public struct ...: Sendable and its initializer/pro…
Cmux Swift Blocking Runtime ✅ Passed PASS: The pull-request diff contains one Swift path, and it only deletes CmxIrohInboundStream.swift. The deleted 18-line struct contained stored properties and an initializer only. It introduced no …
Cmux Browser Automation Off-Main ✅ Passed PASS: The PR diff contains no changes to Sources/TerminalController.swift or Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Wire/ControlCommandExecutionPolicy.swift. The diff also cont…
Cmux Expensive Synchronous Load ✅ Passed PASS: The PR changes only one Swift path, deleting CmxIrohInboundStream.swift (0 additions, 18 deletions). The diff adds or moves no synchronous loader, file parsing, directory scan, syscall loop, `…
Cmux Cache Substitution Correctness ✅ Passed PASS. The production Swift/TypeScript diff removes relay, offline-pair, and configuration code. It does not replace a fresh authoritative read with a cached or opportunistic value. Added production co…
Cmux No Hacky Sleeps ✅ Passed PASS: The PR introduces no fixed sleeps, timers, polling, delayed dispatch, or wall-clock synchronization in covered TypeScript, JavaScript, shell, or build/runtime code. The PR diff contains only del…
Cmux Algorithmic Complexity ✅ Passed PASS: The pull-request diff is predominantly deletions (72 additions, 7,401 deletions). The added production TypeScript lines only restore union members, comments, and a constant-status branch; they a…
Cmux Swift Concurrency ✅ Passed PASS: The PR changes only one Swift file, and the diff deletes CmxIrohInboundStream.swift entirely (18 lines removed, no Swift additions). The diff adds no DispatchQueue, DispatchGroup, Combine,…
Cmux Swift @Concurrent ✅ Passed PASS — The PR’s only Swift change deletes Packages/Shared/CmuxIrohTransport/Sources/CmuxIrohTransport/CmxIrohInboundStream.swift. The deleted file contains only a Sendable struct, stored propertie…
Cmux Swift Package Boundaries ✅ Passed PASS — The only Swift change deletes CmxIrohInboundStream.swift (18 lines) from the existing CmuxIrohTransport SwiftPM target. The diff introduces no app-target logic and does not materially expan…
Cmux Swiftpm Lockfiles ✅ Passed PASS. The changed .gitignore belongs to the deleted Rust service and did not ignore Package.resolved. Packages/Shared/CmuxIrohTransport/Package.swift and its local Package.resolved are unchang…
Cmux Swift Logging ✅ Passed The isolated PR diff contains one Swift change: deletion of CmxIrohInboundStream.swift (18 lines). It adds or materially changes no print, debugPrint, dump, NSLog, file/stdout logging, `Logg…
Cmux User-Facing Error Privacy ✅ Passed PASS. The pull-request diff does not add a user-facing error or diagnostic that exposes a prohibited implementation detail. The retained API responses use generic values such as `iroh_service_unavaila…
Cmux Full Internationalization ✅ Passed PASS: The PR introduces no new user-facing Swift text, web UI copy, localized metadata, or locale message keys. The only surviving production additions are developer comments and the internal `web/ser…
Cmux Swiftui State Layout ✅ Passed PASS: The PR has no SwiftUI state-layout change. The only changed Swift path deletes CmxIrohInboundStream, a plain Sendable struct with two stored properties and an initializer. The PR diff adds n…
Cmux Architecture Rethink ✅ Passed PASS — The only Swift change deletes the unreferenced CmxIrohInboundStream file. The full PR diff adds no Swift code and introduces no timing, blocking, mutable-state, observer, duplicate-wiring, or…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The only Swift change deletes the unused CmxIrohInboundStream struct. The diff adds or changes no NSWindow, NSPanel, NSWindowController, Window, or WindowGroup code, and it adds no s…
Cmux Source Artifacts ✅ Passed PASS. The diff from origin/main to HEAD adds no files and adds no artifact-like paths. It removes the dormant relay-minter service, its Cargo.lock, workflow, fixture, and related source. The remaining…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The only changed Swift production source is the deletion of CmxIrohInboundStream.swift. The patch adds no #if DEBUG block, test/debug-named member, widened visibility, or test wrapper. The d…
Cmux No Ambient Global State ✅ Passed PASS: The pull request has one production Swift change, and it deletes CmxIrohInboundStream.swift entirely. The diff adds no Swift declarations, mutable globals, static namespaces, or singletons. Th…
Title check ✅ Passed The title clearly and concisely describes the primary change: removal of dead Iroh control-plane code.
Description check ✅ Passed The description is detailed and directly aligned with the pull request. It explains what changed, why the code was safe to remove, preserved components, testing results, and rollback steps. It does no…
Full details: Docstring Coverage

Explanation

Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (2 skipped: 2 unsupported.)

Full details: Cmux Swift Actor Isolation

Explanation

PASS: The complete pull-request diff contains one Swift production change, and it is deletion-only: CmxIrohInboundStream.swift removes an unused public struct ...: Sendable and its initializer/properties (0 additions, 18 deletions). No Swift declarations were added or modified, and the deleted symbol has no remaining Swift references. Therefore the diff does not introduce or materially worsen any listed actor-isolation mistake.

Full details: Cmux Swift Blocking Runtime

Explanation

PASS: The pull-request diff contains one Swift path, and it only deletes CmxIrohInboundStream.swift. The deleted 18-line struct contained stored properties and an initializer only. It introduced no semaphore, blocking wait, sleep, delayed dispatch, polling, main-queue sync, or manual lock. The remaining synchronization calls found in Swift files are unchanged and therefore are not caused by this pull request.

Full details: Cmux Browser Automation Off-Main

Explanation

PASS: The PR diff contains no changes to Sources/TerminalController.swift or Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Wire/ControlCommandExecutionPolicy.swift. The diff also contains no added or removed browser automation, WebKit, socket-worker, or routing lines. Therefore, the PR does not introduce or worsen a failure covered by the browser automation off-main rule.

Full details: Cmux Expensive Synchronous Load

Explanation

PASS: The PR changes only one Swift path, deleting CmxIrohInboundStream.swift (0 additions, 18 deletions). The diff adds or moves no synchronous loader, file parsing, directory scan, syscall loop, Task.detached, or interactive Swift path. The deleted type had no Swift references outside its own definition at the base revision.

Full details: Cmux Cache Substitution Correctness

Explanation

PASS. The production Swift/TypeScript diff removes relay, offline-pair, and configuration code. It does not replace a fresh authoritative read with a cached or opportunistic value. Added production code contains no cache, stale, snapshot, history, undo, or persistence signals. Retained Iroh persistence paths still read from the database through cloudDb() and Drizzle queries.

Full details: Cmux No Hacky Sleeps

Explanation

PASS: The PR introduces no fixed sleeps, timers, polling, delayed dispatch, or wall-clock synchronization in covered TypeScript, JavaScript, shell, or build/runtime code. The PR diff contains only deletions plus comments, configuration cleanup, an immediate unavailable response, and test-only changes. The deleted GitHub Actions workflow is out of scope, and the Swift deletion is covered by the separate Swift check. Existing timing code in unrelated runtime files is not changed or worsened.

Full details: Cmux Algorithmic Complexity

Explanation

PASS: The pull-request diff is predominantly deletions (72 additions, 7,401 deletions). The added production TypeScript lines only restore union members, comments, and a constant-status branch; they add no loops, collection scans, sorting, filtering, joins, or rescans. The only added collection lookup (bindingMatchesDiscoveryScope) is in web/tests/iroh-trust-broker.test.ts, which the rule explicitly excludes. The Swift and shell changes only delete code.

Full details: Cmux Swift Concurrency

Explanation

PASS: The PR changes only one Swift file, and the diff deletes CmxIrohInboundStream.swift entirely (18 lines removed, no Swift additions). The diff adds no DispatchQueue, DispatchGroup, Combine, completion-handler, or fire-and-forget Task patterns. The deleted type has no other Swift references. Therefore, the PR does not introduce or materially expand any legacy async pattern covered by the check.

Full details: Cmux Swift `@Concurrent`

Explanation

PASS — The PR’s only Swift change deletes Packages/Shared/CmuxIrohTransport/Sources/CmuxIrohTransport/CmxIrohInboundStream.swift. The deleted file contains only a Sendable struct, stored properties, and a synchronous initializer; it contains no async, nonisolated, @concurrent, actor isolation, or heavy async call site. No changed Swift code can violate the concurrent-annotation conditions.

Full details: Cmux Swift Package Boundaries

Explanation

PASS — The only Swift change deletes CmxIrohInboundStream.swift (18 lines) from the existing CmuxIrohTransport SwiftPM target. The diff introduces no app-target logic and does not materially expand any feature in Sources/. The removed type had no other Swift references.

Full details: Cmux Swiftpm Lockfiles

Explanation

PASS. The changed .gitignore belongs to the deleted Rust service and did not ignore Package.resolved. Packages/Shared/CmuxIrohTransport/Package.swift and its local Package.resolved are unchanged, so no external SwiftPM dependency pin changed without a lockfile diff. cmux.xcodeproj/project.pbxproj and the root Xcode Package.resolved are also unchanged. The workflow deletion introduces no package-reference or dependency change.

Full details: Cmux Swift Logging

Explanation

The isolated PR diff contains one Swift change: deletion of CmxIrohInboundStream.swift (18 lines). It adds or materially changes no print, debugPrint, dump, NSLog, file/stdout logging, Logger, or sensitive-data logging. The Swift logging rule therefore has no failure condition to report.

Full details: Cmux User-Facing Error Privacy

Explanation

PASS. The pull-request diff does not add a user-facing error or diagnostic that exposes a prohibited implementation detail. The retained API responses use generic values such as iroh_service_unavailable and connectivity_service_unavailable. The registration status values unavailable and not_requested are safe generic terms. The removed quota response previously exposed only retry timing, and the other changes remove relay-minter and environment-variable paths. New provider, environment, and relay details appear only in comments, examples, tests, or documentation, which the rule allows.

Full details: Cmux Full Internationalization

Explanation

PASS: The PR introduces no new user-facing Swift text, web UI copy, localized metadata, or locale message keys. The only surviving production additions are developer comments and the internal web/services/iroh/README.md/.env.example operational updates. The changed relay statuses and error strings are literal API/protocol tokens, which the rule explicitly allows. The Swift change deletes an unused data struct and its documentation comments. No web/messages/, web/i18n/, or Swift string catalogs are changed.

Full details: Cmux Swiftui State Layout

Explanation

PASS: The PR has no SwiftUI state-layout change. The only changed Swift path deletes CmxIrohInboundStream, a plain Sendable struct with two stored properties and an initializer. The PR diff adds no ObservableObject, @Published, @Observable, GeometryReader, lazy/list row state, or render-time mutation. The remaining changes are Rust, TypeScript, workflow, configuration, and documentation files.

Full details: Cmux Architecture Rethink

Explanation

PASS — The only Swift change deletes the unreferenced CmxIrohInboundStream file. The full PR diff adds no Swift code and introduces no timing, blocking, mutable-state, observer, duplicate-wiring, or split-lifecycle pattern covered by the rule. The parent-tree search found no references to CmxIrohInboundStream.

Full details: Cmux Swift Auxiliary Window Close Shortcuts

Explanation

PASS: The only Swift change deletes the unused CmxIrohInboundStream struct. The diff adds or changes no NSWindow, NSPanel, NSWindowController, Window, or WindowGroup code, and it adds no shortcut handling or window identifier assignment. The auxiliary-window close-shortcut rule is therefore inapplicable.

Full details: Cmux Source Artifacts

Explanation

PASS. The diff from origin/main to HEAD adds no files and adds no artifact-like paths. It removes the dormant relay-minter service, its Cargo.lock, workflow, fixture, and related source. The remaining additions are hand-written source, configuration, documentation, and tests. No logs, screenshots, recordings, temporary directories, caches, build output, dependency checkouts, or broad scratch directories enter source control. The .gitignore change removes ignore rules with the deleted service.

Full details: Cmux No Test Or Debug Seam In Production Source

Explanation

PASS. The only changed Swift production source is the deletion of CmxIrohInboundStream.swift. The patch adds no #if DEBUG block, test/debug-named member, widened visibility, or test wrapper. The deleted type had no other Swift references at the base revision, so this change does not introduce or worsen a production test/debug seam.

Full details: Cmux No Ambient Global State

Explanation

PASS: The pull request has one production Swift change, and it deletes CmxIrohInboundStream.swift entirely. The diff adds no Swift declarations, mutable globals, static namespaces, or singletons. The deleted type was a constructable public struct with instance properties, so it did not match the ambient-global-state failure conditions.

Full details: Description check

Explanation

The description is detailed and directly aligned with the pull request. It explains what changed, why the code was safe to remove, preserved components, testing results, and rollback steps. It does not include the template checklist, review-trigger comment, or demo-video section, but these omissions are non-critical because the change is not a UI change and the required summary and testing information are present.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-iroh-dead-code

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.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Autoreview P1 (429 mapping removal) refuted with evidence at the PR base (3f98f5d): the only construction of IrohQuotaExceededError in the entire tree is web/tests/iroh-route-handler.test.ts:368, mocking issueRelayToken, which this PR deletes. Production code never constructs it: repository.ts carries only the import, an error-union member, and a tag type-guard, and no challenge or pair-grant deny site produces the error (cmux#9269 removed every broker quota on 2026-07-31; the README text claiming otherwise was stale and is corrected in cmux#10731). The 429 arms in connectivity/routeHandler.ts and iroh/routeHandler.ts were therefore unreachable, and deleting them changes no client-observable behavior.

@teamleaderleo teamleaderleo added area: cloud Cloud machines and workspaces, relay transport difficulty:4 Architecture: security, protocol, migration, release, or broad design labels Sep 30, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Still live; this broad dead-code removal currently conflicts with main, so leaving it for owner review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cloud Cloud machines and workspaces, relay transport difficulty:4 Architecture: security, protocol, migration, release, or broad design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants