Skip to content

refactor: remove dead exports and stale fallow exemptions - #4931

Merged
thymikee merged 3 commits into
mainfrom
t3/remove-dead-exports
Nov 22, 2026
Merged

thymikee merged 3 commits into
mainfrom
t3/remove-dead-exports

Conversation

@thymikee

@thymikee thymikee commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Remove dead code found by a research pass at 4075dd1; each item was re-verified repo-wide first.

  • .fallowrc.json: 12 ignoreExports entries fallow 3.34 now credits on its own — the Apple lazy-facade entries (expo-dev-client-launch, runner-operations, tool-provider, macOS, launch-confirmation, detectSoleRunningIosSimulatorApp), the daemon route-handler and interaction-handler entries, the CLI/MCP process-entry entry, platform-runtime-runtime-hints, and the two agent-browser-lifecycle names no longer exported. Plus the Maestro and HarmonyOS entries below.
  • Dead exports: the Maestro fallback constant; the HarmonyOS archive bundle-name resolver with its two tests; ProviderDeviceRuntime.installInstallablePath? and its WebDriver implementations. The published agent-device/limrun class keeps the method.
  • Test support with no importer: src/__tests__/test-utils/fake-adb.ts, createLifecycleDeviceRuntimeGateway, HUMAN_CONTROL_HOLD, IPADOS_TEST_SIMULATOR, SCREENSHOT_RESULT; two harness mocks lose export.
  • Unimported barrel types: ten from maestro, AdReplayTargetObservation, DaemonCommandRoute, PolicyResolutionOutcome; layering pins updated.

LimrunIosCommandExecution is live through src/sdk/limrun.ts; installApp? and configurePortReverse? stay pending a maintainer decision.

Before / after

No observable change: every removed symbol had zero importers, call sites, or gate consumers; the contract member sits in a private package and wire-compat reports the protocol unchanged.

Value

  • Removed exports: 26 names in 30 declarations, each with 0 consumers at base and head.
  • Fallow exemptions: 43 to 31 entries, 83 to 48 waived names.
  • Diff: 380 deletions, 10 insertions, 19 files.

Validation

Head 658a7a2b1c, exactCommit: true receipt: format, lint, typecheck, layering, fallow, production-exports, build, package, integration-node and macos-coverage pass. The unit lane timed out locally only under a ~100 host load average; each timed-out suite passes standalone at head. CI validates the pushed head; no unresolved risks.

🤖 Generated with Claude Code

Delete exports with no consumer anywhere in the repository and the
.fallowrc.json ignoreExports entries that fallow 3.x now credits on its
own: the lazy-facade and dynamic-loader exemptions for Apple, daemon
route handlers, CLI/MCP process entries and runtime hints.

Remove MAESTRO_NON_HITTABLE_FALLBACK_MESSAGE, the HarmonyOS archive
bundle-name resolver with its tests, test-support exports no importer
reaches, unimported barrel type re-exports, and the unused
installInstallablePath member of the provider device-runtime contract.
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.49 MB 6.49 MB -339 B
Package (unpacked) 6.49 MB 6.49 MB -339 B
Package (download) 1.98 MB 1.98 MB -82 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.6 ms 25.7 ms -1.9 ms
CLI --help 59.4 ms 54.8 ms -4.5 ms

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed 658a7a2. The PR deletes the public method LimrunRuntime.installInstallablePath(device, installablePath, options) from a class that the published agent-device/limrun entry exports (src/provider-limrun-runtime.ts:69, reached through src/sdk/limrun.ts). An embedding bridge, like the one the "Embed the Node.js runtime" section of the Limrun docs describes, calls runtime.installInstallablePath(device, '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/path/app.ipa'). At base that call works. At head it throws TypeError: runtime.installInstallablePath is not a function, and TypeScript consumers get a compile error. A repo grep cannot see npm consumers, and the deleted comment called this method part of the public Limrun SDK. The PR body says the member sits in a private package, but that is true only of the contract type. This breaks a published class in a PR whose invariant is unchanged behavior, and the body does not say so. The same PR keeps installApp and configurePortReverse pending a maintainer decision, so this member got different treatment without a reason.

The rule: a member reachable from a package.json export of the published package is public API, whatever its contract type says. Please either keep LimrunRuntime.installInstallablePath and remove only the ProviderDeviceRuntime contract member and the WebDriver implementations, or hold it for the maintainer decision like the other two and state the SDK break in the PR body. The entries in scripts/build-entries.ts list the public surface to check, not the repo importers.

Not blocking, and fine to take or leave: the rewritten comment at scripts/layering/package-boundaries.test.ts:816 uses SelectorResolution as a nested-field leak, but it is a top-level re-exported type, so a nested field of a still-exported type would fit better; and installInstallablePath in packages/provider-limrun/src/runtime.ts:315 is now called only inside its own class, so it could become private or be inlined into installApp in a follow-up.

The remaining non-passing checks are the Body rules runs, which grade the PR title and body and not the diff. The newest Body rules run on 658a7a2 passed, so CI looks unrelated to the code. Not verified here: fallow, wire-compat and the test suites were not run locally, and any external caller of agent-device/limrun is inferred from the published entry, not observed. Before merge, the installInstallablePath break needs to be reverted or explicitly approved.

Only the ProviderDeviceRuntime contract member and the WebDriver implementations go;
the agent-device/limrun class keeps the method, now declared on its own runtime type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

Fixed at b06c548fb4: LimrunRuntime.installInstallablePath is back on the published agent-device/limrun class, so there is no SDK break. Only the optional ProviderDeviceRuntime member and the WebDriver implementations are removed; the inner Limrun runtime type now declares the method itself. I checked the published entries in scripts/build-entries.ts: no other removed name is re-exported by an SDK entry (plugins/webdriver exports only its options type, so the WebDriver runtime class is not public). Typecheck, lint, 243 Limrun tests and the Fallow audit pass. The method stays public rather than private because the SDK class calls it through that type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 8ae89aa

Since the review of 658a7a2: 0 new · 0 still open · 0 no longer raised

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (d6767e0910fc).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The installInstallablePath SDK break from the earlier review (#4931 (comment)) is fixed at 8ae89aa, and no new problems turned up in the remaining export removals. All 20 checks pass on 8ae89aa, and there are no conflicts. Nothing else stands in the way of merge. Not verified here: tests, typecheck and fallow were not run locally, external npm consumers of agent-device/limrun were not observed, and the emitted .d.ts was not inspected. The published surface was judged from scripts/build-entries.ts and the src/sdk re-exports. LimrunRuntime still implements ProviderDeviceRuntime, and removing an optional member from that unexported contract type does not change the class's own declared members.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 21, 2026
@thymikee
thymikee merged commit 3730d58 into main Nov 22, 2026
20 checks passed
@thymikee
thymikee deleted the t3/remove-dead-exports branch November 22, 2026 07:00
thymikee added a commit that referenced this pull request Nov 22, 2026
…-reasons

* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
…n-client-reasons

* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
…android-reasons

* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
…er-errors

* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	packages/platform-harmonyos/src/app-lifecycle.ts
#	website/docs/docs/error-reasons.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant