Skip to content

chore: remove orphaned dead code from v1.0 entrypoint consolidation - #1727

Open
Abdullah-Builds wants to merge 1 commit into
anthropics:mainfrom
Abdullah-Builds:chore/remove-orphaned-dead-code-1668
Open

Abdullah-Builds wants to merge 1 commit into
anthropics:mainfrom
Abdullah-Builds:chore/remove-orphaned-dead-code-1668

Conversation

@Abdullah-Builds

Copy link
Copy Markdown
Contributor

Closes #1668.

What this does

Removes the three confirmed-dead pieces of code from the v1.0 run.ts consolidation:

  1. src/entrypoints/prepare.ts (103 lines) — orphaned duplicate of the prepare phase. action.yml only ever invokes run.ts, cleanup-ssh-signing.ts, and post-buffered-inline-comments.ts; nothing imports this file.
  2. updateTrackingComment (src/github/operations/comments/update-with-branch.ts) — the file's only export, no callers. Superseded by updateCommentLink via checkAndCommitOrDeleteBranch.
  3. checkTriggerAction (src/github/validation/trigger.ts) — thin wrapper around checkContainsTrigger that also set a contains_trigger output nobody declares in action.yml. Removed the now-unused @actions/core import along with it; ParsedGitHubContext stays, since checkContainsTrigger still needs it.

On the confirmation question in the issue

The issue asks for confirmation that prepare.ts is genuinely dead before opening a PR. I re-ran the same checks independently against current main:

$ grep -rn "entrypoints/prepare" --include="*.ts" --include="*.yml" src action.yml test base-action
(no output)

Same for updateTrackingComment and checkTriggerAction — each symbol's only match is its own definition. I also confirmed action.yml never declares a contains_trigger output, and checked test/prepare-context.test.ts isn't related (it tests prepareContext from src/create-prompt, unconnected to the deleted prepare.ts entrypoint — naming coincidence).

Item 4 — left untouched

Per the issue, the ALLOWED_TOOLS/DISALLOWED_TOOLS dead env var exports in src/create-prompt/index.ts are intentionally not touched here. The existing code comment says they're kept so an H1 report's referenced file stays in sync with the live fix — that's a maintainer call, not mine.

Testing

I don't have a working bun toolchain in the environment I used to prepare this, so I wasn't able to run bun test / bun run typecheck / bun run format:check myself. The change is a pure deletion (no logic touched in surviving code besides the one import), but please treat CI as the real verification here rather than my word for it.

@Abdullah-Builds

Copy link
Copy Markdown
Contributor Author

@chrislloyd waiting for approval

@Abdullah-Builds

Copy link
Copy Markdown
Contributor Author

@dougbarth waiting for approval

@Abdullah-Builds

Copy link
Copy Markdown
Contributor Author

@chrislloyd I am following up on this PR Please let me know if anything to do further

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead code from the v1.0 single-entrypoint refactor: orphaned src/entrypoints/prepare.ts and three unused exports

1 participant