fix(gate): refresh PR files for merge readiness - #925
Conversation
|
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. |
|
gittensory · advisory review Reviewed 2 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 · Worth double-checking
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #925 +/- ##
=======================================
Coverage 96.60% 96.60%
=======================================
Files 109 109
Lines 14894 14894
Branches 5383 5383
=======================================
Hits 14389 14389
Misses 104 104
Partials 401 401 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The webhook gate path refreshes the PR's files before evaluating the slop and manifest-policy gates (#866/#925), but the manual 'Re-run Gittensory review' retrigger called the same publish path without refreshing. A user re-running after pushing commits got the slop/manifest gate evaluated against stale (or empty) cached files, so the re-published Gate check reflected the wrong diff. Mirror the webhook guard: refresh the PR files before publishing on the retrigger path too. refreshPullRequestDetails is fail-safe (preserves the cache on a fetch error). Closes #927 Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com> Co-authored-by: reviewwed[bot] <292611012+reviewwed[bot]@users.noreply.github.com>
Motivation
slopGateModeormanifestPolicyGateModewere enabled, butmergeReadinessGateModealso consumes slop/file evidence so stale cached file lists could let a merge-readiness gate pass incorrectly.Description
settings.slopGateMode !== "off"check withshouldCollectSlopEvidence(settings)so PR details are refreshed whenever slop evidence is needed (including merge-readiness-only configs) while preserving manifest refresh behavior.test/unit/queue.test.tsto assert that the PR files endpoint is hit during the slop-off + merge-readiness scenario and verify the refresh occurs.src/queue/processors.tsandtest/unit/queue.test.ts.Testing
npm test -- --run test/unit/queue.test.ts -t "clears the persisted dashboard slop score"and it passed.npm run typecheck(TStsc --noEmit) and it succeeded.Codex Task