Skip to content

chore: delete dead modules, exports, fixtures, scripts, and unused dependencies - #654

Merged
ScriptedAlchemy merged 3 commits into
mainfrom
chore/ponytail-dead-code
Sep 6, 2026
Merged

ScriptedAlchemy merged 3 commits into
mainfrom
chore/ponytail-dead-code

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Deletes code, fixtures, scripts, and dependencies that nothing in the repository reaches. Every item was re-verified with git grep -n -w '<name>' -- ':!repos' before deletion; the only references were the definition itself, its own test cases, or prose in historical docs/superpowers/** plans.

  • Files: docs/canvases/agent-bundle-walkthrough.canvas.tsx, packages/agent-bundle/fixtures/contracts/epoch-atomicity/local-linux.json, scripts/measure-preflight-cold-start.mjs, packages/agent-bundle/src/core/durability-test-hook.ts, packages/agent-bundle/src/contracts/playground.ts — zero importers or invokers (the Symbol.for('…durability-test-hook') strings in the stores are unrelated).
  • Root scripts: removed bench:preflight-cold-start (script deleted) and test:host-install:packed:build (zero refs). Added record:claude-hooks-fixtures so scripts/record-claude-hooks-schema-fixtures.mjs, the recorder named by adapters/schemas/claude/PROVENANCE.json, is reachable from package.json.
  • core/durable-fs.ts: the only production importer is dev/dev-lock.ts (publishFileByLink). Deleted syncDirectorySync, writeJsonFileAtomically, writeNewPinnedFile, openPinnedContainedFile, readPinnedFile, readTornTailJsonl and their option types; kept syncPath (used by publishFileByLink). Header comment no longer claims the playground/eval/epoch stores use these.
  • core/owner-lock.ts: deleted OwnerMutationSerializer and sharedOwnerMutationSerializer (test-only).
  • core/strict-json.ts: deleted isStrictJsonValue.
  • dev/mcp-apps/mcp-app-sandbox.ts: deleted createMcpAppSandboxBridge, its types (McpAppSandboxBridge, CreateMcpAppSandboxBridgeOptions, McpAppSandboxLifecycle, McpAppSandboxMessage, McpAppSandboxMessageEvent, McpAppSandboxResource, McpAppSandboxWindow, McpAppSandboxRequestId), and the private JSON-RPC helpers only the bridge used. The proxy, frame, policy, and consent surface is untouched.
  • dev/mcp-apps/mcp-app-json.ts: deleted requireMcpAppJsonRecord (no importer; mcp-app-action-validation.ts defines its own record guard). cloneMcpAppJson, snapshotMcpAppJson, snapshotMcpAppJsonRecord, and McpAppJsonRecord were dead when this PR opened but refactor(agent-bundle): dedupe route, JSON, and IP-range helpers onto shared owners #660 rewired mcp-app-bridge.ts onto them, so the merge from main restores them.
  • schemas/skill-hosts/contract.ts: deleted the validatePortableSkillFrontmatter alias. test/registry.ts: deleted hasRegisteredRoutes.
  • effect/boundary.ts (agent-bundle): deleted interruptWhenAborted, abortToInterrupt, interruptAs, runPromiseExit — zero production callers. (rsc-runtime): deleted runPromiseExit, runSync; interruptWhenAborted/abortToInterrupt stay (live in project-mcp.ts and reconciler.ts). Two tests that used runPromiseExit incidentally to inspect an Exit now use runPromise(Effect.exit(…)), the pattern already in effect-platform.test.ts.
  • rsc-runtime/src/effect/render-stream.ts: deleted boundRenderEventStream (emitBoundRenderEvent stays, used by reconciler.ts).
  • Workbench: deleted eventsForActiveEvalRun, discardedSequenceForActiveEvalRun (evals-page.tsx) and problemFailureCount (build-status-model.ts).
  • Dependencies: removed open from packages/agent-bundle (only 'open' string literals remain, used as a shell command name), scheduler from packages/workbench (zero imports; still resolved transitively by react-dom), and commander from root devDependencies (its only importer, src/cli.ts, declares it in packages/agent-bundle/package.json). pnpm install refreshed pnpm-lock.yaml.
  • Docs: three prose lines in docs/effect-conventions.md and agent-patterns/effect-errors.md that named runPromiseExit/boundRenderEventStream now name the surviving helpers.

Dead-module check after deletion: git grep -l '<stem>' -- ':!repos' for every deleted stem returns only the expected unrelated hits (historical plan docs, Effect.runPromiseExit inside the boundaries, the lint rule's banned-name list).

Validation

pnpm install --frozen-lockfile   # then pnpm install after the dependency removals
pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit

All green: 283 files, 4227 tests, 0 failures. One earlier test:unit run had a single unrelated timing flake in mcp-probe-service.test.ts ("removes the fresh plugin data directory after every probe"); it passed 3/3 in isolation and on the full-suite rerun, and its module imports nothing this PR touched.

Deslop

Deslop: Claude Fable 5.1, 1 edit (dropped a header sentence in durable-fs.ts that restated the DurableHandleOpen doc line).

Self-review

Reviewer: GPT-5.6 Sol (generalPurpose; the TraceDecay-backed change-risk-reviewer was unavailable). Findings and disposition:

  1. Changeset summary read as an implementation inventory — fixed: rewritten to the user-facing effect (one fewer installed package, no exported API change).
  2. package.json gains record:claude-hooks-fixturesdismissed, intentional: the script is the recorder adapters/schemas/claude/PROVENANCE.json names; wiring it is the alternative to deleting a documented tool.
    3–5. docs/superpowers/plans/2026-08-14-…, plans/2026-08-19-durable-filesystem-plan.md, specs/2026-08-19-thermo-review-refactors-design.md still name createMcpAppSandboxBridge / syncDirectorySyncdismissed: dated historical plans and specs, not reference docs; the docs rule covers website/docs/** and reference prose, both of which never mentioned these names.

No surviving production callers, weakened tests, or dependency-import regressions were found.

Second pass after the changeset rewrite (same reviewer): no merge risks found.

Merged origin/main after #655/#657/#660 landed: one textual conflict in mcp-app-sandbox.ts (helpers this PR deletes, which #660 had modified — deletion kept) and one semantic conflict in mcp-app-json.ts (above). Full gate re-run green locally (build, typecheck, lint, 4223 unit tests) before push.

@changeset-bot

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 77bb1b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
agent-bundle Patch
@agent-bundle/runtime Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy force-pushed the chore/ponytail-dead-code branch from d42a2a3 to 6f33143 Compare September 6, 2026 00:24
@pkg-pr-new

pkg-pr-new Bot commented Sep 6, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@654
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@654
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/rsc-markdown-stream@654
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@654

commit: a063d6c

@ScriptedAlchemy
ScriptedAlchemy force-pushed the chore/ponytail-dead-code branch from 6f33143 to a063d6c Compare September 6, 2026 00:29
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review September 6, 2026 00:33
@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) September 6, 2026 00:33
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@ScriptedAlchemy
ScriptedAlchemy merged commit 46e8e7d into main Sep 6, 2026
3 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the chore/ponytail-dead-code branch September 14, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant