fix(mcp): count pending approvals accurately#878
Conversation
|
gittensory · advisory review Reviewed 4 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
67ed0a2 to
cb012bd
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #878 +/- ##
==========================================
- Coverage 96.72% 96.72% -0.01%
==========================================
Files 109 109
Lines 14750 14758 +8
Branches 5340 5343 +3
==========================================
+ Hits 14267 14274 +7
Misses 95 95
- Partials 388 389 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 4413983 | Commit Preview URL Branch Preview URL |
Jun 19 2026, 06:01 AM |
Motivation
gittensory_get_automation_statetool reportedpendingActionCountusing the length of a paginated list, which was capped by the list API default limit and could undercount repos with >200 pending approvals.Description
pendingAgentActionConditionshelper to centralize therepoFullName/statusfilter logic used by list and count queries insrc/db/repositories.ts.countPendingAgentActionswhich performs a SQLcount(*)with the shared filters so callers can obtain the true total.getAutomationStateinsrc/mcp/server.tsto callcountPendingAgentActionsand reportpendingActionCountand the human summary from that value.reports the total pending-approval count beyond the list page sizetotest/unit/mcp-automation-state.test.tsthat seeds 201 pending actions and asserts the MCP tool reports201.Testing
npx vitest run test/unit/mcp-automation-state.test.ts --reporter=verbose, and the test file passed (all tests succeeded).npm run typecheck, which completed successfully with no type errors.201as expected.Codex Task