Skip to content

Remove unused GitHub helpers and review leftovers - #576

Merged
prathamdby merged 4 commits into
mainfrom
pd/refactor/reduce-complexity
Sep 5, 2026
Merged

Remove unused GitHub helpers and review leftovers#576
prathamdby merged 4 commits into
mainfrom
pd/refactor/reduce-complexity

Conversation

@prathamdby

@prathamdby prathamdby commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • src/github/reviewPublish.ts deletes listPullRequestReviewCommentsForReview and getPullRequestReviewComment. The diff also deletes src/github/reviewPublishRetry.ts.
  • src/settings/reviewConstants.ts deletes MAX_REVIEW_PUBLISH_CALLS, REVIEW_MIN_CONFIDENCE, PUBLISH_BUDGET_EXHAUSTED_MESSAGE, REVIEW_DIFF_CACHE_REQUIRED_MESSAGE, and ReviewSize. docs/configuration.md and CONTEXT.md drop those names.
  • Ask files import redactOutboundSecrets from src/security/redactOutboundSecrets.ts and MAX_ASK_QUESTION_CHARS from settings. sanitizeToolResultForAsk keeps the getWorkspaceBlame branch.
  • buildContext7Tools uses toExecutor from defineWorkspaceTool.ts.
  • buildReviewRunSetup no longer calls wrapListPullRequestFilesDiffIngestion. That function is gone from reviewDiffIndex.ts.
  • GITHUB_API_TOOL_NAMES keeps the essential publish and submit names plus searchCode.
  • canAckPublishProgress uses ACTIVE_WORK_STATUSES. The diff deletes unused helpers in askQuota.ts, agentAudit.ts, findingHistoryRepository.ts, withOperationIntent.ts, and types.ts.
  • ADR 0009 names MAX_THREAD_PUBLISH_CALLS and ingestListPullRequestFilesResult.

Details

The GitHub publish module loses two unused comment helpers. The retry file goes with them.

 src/github/
 ├── reviewPublish.ts
-├── reviewPublishRetry.ts
 └── rateLimitCircuit.ts
src/
├── github/       # unused publish helpers, retry file, circuit names
├── settings/     # unused review constants
├── agent/        # ask imports and Context7 executor
├── agentWork/    # unused helpers and ack statuses
└── review/       # file-list wrap and unused prompt suffixes
docs/
├── configuration.md
└── adr/0009-review-location-validation.md

Ask callers stop importing secrets and limits through askSafety.ts.

 askThreadContext / formatAskReply / recoverAskReply
-import { redactOutboundSecrets } from "./askSafety.js"
+import { redactOutboundSecrets } from "../../security/redactOutboundSecrets.js"
sanitizeToolResultForAsk
-  getBlame or getWorkspaceBlame -> redactEmailsInJson
+  getWorkspaceBlame -> redactEmailsInJson

Context7 executors share the workspace toExecutor parse path.

 buildContext7Tools
-  local toExecutor(name, tool, apiKey, maxResponseBytes)
+  toExecutor(name, { description, schema, run })

Review setup no longer wraps a listPullRequestFiles executor.

buildReviewRunSetup
  buildLocalWorkspaceTools
- wrapListPullRequestFilesDiffIngestion
  wrapExecutorsWithRateLimitCircuit

The circuit name set drops unused REST and submitReview aliases.

 ESSENTIAL_GITHUB_TOOL_NAMES
-  submitReview
   publish_thread
   publish_summary
   submit_specialist_brief
-  submitSpecialistReport
-  submit_specialist_report
   submitVerification
   submitTriage
   submitDescription
 GITHUB_API_TOOL_NAMES
   ...ESSENTIAL_GITHUB_TOOL_NAMES
-  getPullRequest, listPullRequests, listPullRequestFiles, ...
   searchCode

Ack progress reads the shared active-status list.

 canAckPublishProgress
-  local Set(["queued", "running"])
+  ACTIVE_WORK_STATUSES

ADR 0009 points the publish budget and cached-diff capture at the live symbols.

 ADR 0009 decision 1
- Capture listPullRequestFiles output during the review run
+ Load GitHub file listing via ingestListPullRequestFilesResult in workspace setup
 ADR 0009 decision 5
- MAX_REVIEW_PUBLISH_CALLS on submitReview (default 2)
+ MAX_THREAD_PUBLISH_CALLS on incremental inline batches (default 8)

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pr-agent Ready Ready Preview Sep 5, 2026 9:50pm UTC

@zeus-review

zeus-review Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Agent Review

Caution

PR merged.

- Delete unused GitHub, quota, audit, history, and intent helpers
- Drop unused submitReview constants and repair prompt suffixes
- Collapse askSafety re-exports, Context7 parsing, and the file-list
  wrap
- Trim GITHUB_API_TOOL_NAMES to live publish and submit tools
- Point ack progress at ACTIVE_WORK_STATUSES
- Name MAX_THREAD_PUBLISH_CALLS as the live inline-batch cap
- Point cached-diff capture at ingestListPullRequestFilesResult
@prathamdby
prathamdby force-pushed the pd/refactor/reduce-complexity branch from 15550fb to 503bda4 Compare September 5, 2026 20:00
@prathamdby prathamdby changed the title refactor: remove unused GitHub helpers and stale review leftovers Remove unused GitHub helpers and review leftovers Sep 5, 2026
@zeus-review zeus-review Bot added the size:M label Sep 5, 2026
- Fold triage and verification run harnesses into the executor-facing
  run functions
- Move summary-comment upsert lock and claim into
  summaryCommentUpsert.ts
- Share workspace free-space checks and the CI completed-run schema
- Delete parseInstallationId, assertBuiltinPiProvider, llmsTxtResponse,
  and scripts/bench-performance.mjs
Collapse duplicate wrappers and unused helper files
@prathamdby

Copy link
Copy Markdown
Owner Author

/review

@prathamdby
prathamdby merged commit fbde0d7 into main Sep 5, 2026
8 of 9 checks passed
@prathamdby
prathamdby deleted the pd/refactor/reduce-complexity branch September 5, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant