refactor(queue): extract AI-review orchestration into its own module - #4968
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4968 +/- ##
==========================================
+ Coverage 84.42% 94.27% +9.85%
==========================================
Files 450 451 +1
Lines 38900 38900
Branches 14172 14172
==========================================
+ Hits 32841 36674 +3833
+ Misses 4818 1574 -3244
+ Partials 1241 652 -589
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 05:45:46 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 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.
|
84b9d33 to
2178ddb
Compare
Part of #4013. Moves the AI-review lock cluster, the advisory-eligibility and manifest/token resolution helpers, and the ~625-line runAiReviewForAdvisory orchestration (grounding/RAG/enrichment/impact-map/ culture-profile/inline-findings) out of processors.ts into queue/ai-review-orchestration.ts. processors.ts re-exports the symbols still imported directly by existing tests. Also fixes two grounding/enrichment wiring tests that registered a repo outside the default GITTENSORY_REVIEW_REPOS allowlist, which silently no-op'd their own "no installationId" assertions, and adds coverage for the GitHub-token and PR-body optional-chain fallbacks.
2178ddb to
4e0f0c6
Compare
Summary
runAiReviewForAdvisoryorchestration (grounding/RAG/enrichment/impact-map/culture-profile/inline-findings)out of
processors.tsintosrc/queue/ai-review-orchestration.ts. Pure mechanical move, no behavior change.processors.tsimports the symbols back for its own remaining internal call sites and re-exports the oneswith an existing direct
import { ... } from "../../src/queue/processors"in the test suite.GITTENSORY_REVIEW_REPOSallowlist, which silently no-op'd the "no installationId" branch they claimed tocover (grounding is
allowlistRequired), plus adds coverage for the GitHub-token and PR-body optional-chainfallbacks these tests were meant to exercise.
Test plan
npx tsc --noEmit -p .cleannpm run test:coverage: 703 files / 13934 tests passed, 0 failedsrc/queue/ai-review-orchestration.ts: 100% statements/branches/functions/linesnpm run docs:drift-check,manifest:drift-check,engine-parity:drift-checkall passnpm audit --audit-level=moderate: 0 vulnerabilities