fix(review): predict path-independent pre-merge checks and disclaim diff-dependent gates - #1411
Merged
Merged
Conversation
…iff-dependent gates The predict_gate oracle (buildPredictedGateVerdict) ran the advisory + gate but ignored the repo's review.pre_merge_checks, focus-manifest path policy, and slop — all of which the LIVE gate enforces. So a PR the gate would auto-close on an enforced title/description rule predicted 'success', misleading contributors. Evaluate the PATH-INDEPENDENT pre-merge checks (empty whenPaths — title / description / label assertions) from the SAME public .gittensory.yml the predictor already reads; their inputs are exactly the real PR's, so the result matches the live gate. Path-gated checks, manifest-policy, and slop need the PR's changed files/diff (unavailable pre-submission) — they are now explicitly disclaimed in the verdict note so a 'success' is not misread as complete. Full parity for those ships when the predictor accepts changed paths (follow-up). No output-schema change (PredictedGateVerdict shape unchanged), so no OpenAPI regen.
Contributor
|
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 #1411 +/- ##
=======================================
Coverage 95.36% 95.36%
=======================================
Files 192 192
Lines 20777 20779 +2
Branches 7512 7512
=======================================
+ Hits 19814 19816 +2
Misses 383 383
Partials 580 580
🚀 New features to boost your workflow:
|
Merged
10 tasks
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
The pre-submit
predict_gateoracle (buildPredictedGateVerdict) ran the advisory +evaluateGateCheckbut ignored the repo'sreview.pre_merge_checks, focus-manifest path policy, and slop score — all of which the LIVE gate enforces. So a PR the gate would auto-close on an enforced title/description rule predicted "success", misleading contributors (audit #11/#18; the slop/manifest arms are #13/#12).This is part one of a two-part fix (scoped this way per maintainer direction — the rest needs a public-contract change):
whenPaths— title / description / label assertions), from the same public.gittensory.ymlthe predictor already reads. Their inputs (title/body/labels) are exactly the real PR's, so the predicted result is identical to live for those checks — including the enforced →pre_merge_check_requiredblock.Follow-up (part two): extend the
predict_gateMCP/API input with the contributor's changed paths so manifest-policy + path-gated pre-merge checks reach full parity (and decide how slop is signalled). That's a public-contract change + OpenAPI regen, kept separate.No GitHub issue — internal review-subsystem audit finding. The
PredictedGateVerdictoutput shape is unchanged, so no OpenAPI regen.Scope
src/) only —src/rules/predicted-gate.tswrangler.jsonc, or UI change (verdict output shape unchanged)Validation
npm run test:ci— green (4469 passed | 4 skipped)npm run test:coverage— every changed line and branch covered (verified againstcoverage/lcov.info)npm audit --audit-level=moderate— 0 vulnerabilities;typecheck/ui:typecheck/ui:openapi:checkclean;git diff --checkcleanfailure+pre_merge_check_required; satisfied check → pass; non-enforced → warning not blocker; a path-gated check is skipped pre-submit (no false block, nopre_merge_check_unresolvednoise) and the note discloses the slop/manifest/path gap.Safety
publicSafeFinding/sanitizePublicComment; only public.gittensory.ymlconfig is read