fix(commands): resolve duplicate @gittensory review handler breaking typecheck - #4259
Merged
Merged
Conversation
…typecheck Two independently-merged PRs (#4050 and #4175) both implemented the @gittensory review command, leaving two colliding declarations of maybeProcessReviewCommand/recordReviewCommandSkip and two dispatch call sites -- a hard tsc "Duplicate function implementation" error that blocks every PR's typecheck/validate check on main. Keeps the earlier, more complete implementation (which also wires the paired resume command and a real hasAutoreviewPausedMarker fix), and folds in two things only the later, now-removed duplicate got right: - needsMinerDetection: true on the authorization call. "review" is deliberately widened to confirmed_miner (self-rerun precedent, same as review-now), so without this flag a confirmed miner re-triggering review on their own PR had no other role to match and was always denied. - A resolveAgentActionMode pause/dry-run gate before dispatching, matching every other action command (pause/resolve/explain/ gate-override/generate-tests). The kept implementation had no such gate at all, so review always dispatched live regardless of a maintainer's global pause or dry-run setting. Removes the redundant duplicate test suite for the same command and adds regression coverage for both fixes above.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
12 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4259 +/- ##
=======================================
Coverage ? 93.80%
=======================================
Files ? 398
Lines ? 36768
Branches ? 13437
=======================================
Hits ? 34492
Misses ? 1622
Partials ? 654
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainis currently red fortsc --noEmit: two independently-merged PRs (feat(commands): wire @gittensory review / re-review command (#2163) #4050 and feat(commands): wire @gittensory review and resume PR-comment commands #4175) both implemented the@gittensory reviewcommand, leaving two colliding declarations ofmaybeProcessReviewCommand/recordReviewCommandSkipand two dispatch call sites insrc/queue/processors.ts— a hardTS2393: Duplicate function implementationerror. This blocks thetypecheckstep of every PR'svalidatecheck right now, confirmed via a cleannpm ci+npm run typecheckon a fresh checkout of currentmain.resumecommand and a realhasAutoreviewPausedMarkerbug fix the other PR never touched), and removes the later duplicate (feat(commands): wire @gittensory review / re-review command (#2163) #4050) entirely, along with its now-redundant duplicate test suite for the same command.needsMinerDetection: trueon the authorization call.DEFAULT_COMMAND_AUTHORIZATION_POLICYdeliberately widensreviewtoconfirmed_miner(the same self-rerun precedent already applied toreview-now), but without this flag a confirmed miner re-triggering review on their own PR had no other role to match and was always wrongly denied.resolveAgentActionModepause/dry-run gate before dispatching, matching every other action command (pause/resolve/explain/gate-override/generate-tests). The kept implementation had no such gate at all, so@gittensory reviewalways dispatched live regardless of a maintainer's global pause or dry-run setting.Closes #2163 (no functional change to what #2163 asked for — this only removes the accidental duplicate and restores the two missing correctness gates).
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typecheck— clean (was failing with 4TS2393errors before this fix, confirmed on a freshnpm cicheckout of currentmain)npm run test:coveragelocally (unsharded, in an isolated worktree with a freshnpm ci) — fulltest/unit/queue.test.tssuite (739 tests) passes; every changed/new line in this diff is covered.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAlso ran:
npm run db:migrations:check,npm run db:schema-drift:check,npm run selfhost:env-reference:check,npm run selfhost:validate-observability,npm run cf-typegen:check,npm run test:engine-parity, the@jsonbored/gittensory-enginepackage's own tests,npm run build:miner,npm run test:miner-pack,npm run rees:test,npm run ui:openapi:settings-parity,npm run ui:version-audit,npm run docs:drift-check,npm run manifest:drift-check,npm run command-reference:check,npm run ui:test.Note on unsharded coverage: one unrelated pre-existing failure surfaced during the full run —
test/unit/mcp-cli-tools.test.ts's tool-count assertion (33 vs 34) — reproduced on a clean checkout ofmainbefore this fix, so it is a separate, already-broken drift unrelated to this diff. Flagged separately rather than bundled into this urgent fix.Safety
Notes
This is a merge-collision cleanup, not new functionality — flagging for expedited review given
mainis currently red for every other open PR'stypecheckcheck until this lands.