fix(review): publish the authoritative surface-lane verdict on the gate check-run - #1410
Merged
Conversation
…te check-run The published Gittensory Gate check re-derived its verdict via evaluateGateCheck inside createOrUpdateGateCheckRun, ignoring the surface/content-lane override already merged into gateEvaluation. The surface codes (surface_lane_reject / surface_lane_manual) are unknown to that generic path, so a content-lane PR that was REJECTED or routed to MANUAL review published a GREEN required check while the disposition auto-closed / held it — the check disagreed with the action. Thread the authoritative gateEvaluation into the check-run (optional precomputed `gate`); when present it is used verbatim so the conclusion + output match the disposition exactly. Callers without a surface lane omit it and re-derive as before (byte-identical).
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 #1410 +/- ##
=======================================
Coverage 95.36% 95.36%
=======================================
Files 192 192
Lines 20777 20777
Branches 7511 7512 +1
=======================================
Hits 19814 19814
Misses 383 383
Partials 580 580
🚀 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
The published
Gittensory Gatecheck re-derived its verdict (evaluateGateCheckinsidecreateOrUpdateGateCheckRun,app.ts:165), ignoring the surface/content-lane override already merged into the authoritativegateEvaluation(processors.ts, viaevaluateWithSurfaceLane). The surface codes —surface_lane_reject/surface_lane_manual— are unknown to that generic path (isConfiguredGateBlocker), so a content-lane PR that was rejected or routed to manual review published a GREEN required check while the disposition auto-closed / held it. The check disagreed with the action (audit #5).The fix threads the authoritative
gateEvaluationinto the check-run via an optional precomputedgate:createOrUpdateGateCheckRunnow usesoptions.gate ?? evaluateGateCheck(advisory, policy)— when the caller supplies the merged evaluation, the check-run conclusion and output (formatGateCheckOutput) match the disposition exactly.applySurfaceGatealready produces a fully-formedGateCheckEvaluation(reject →failure+ asurface_lane_rejectblocker; manual →action_required+ asurface_lane_manualwarning), so no new code path is needed inisConfiguredGateBlocker.gateand re-derive exactly as before — byte-identical when the content lane is off (which is also the default).No GitHub issue — internal review-subsystem audit finding (#5). Narrow: only the flag-gated, per-repo-allowlisted content lane changes behavior.
Scope
src/) only —src/github/app.ts,src/queue/processors.tswrangler.jsonc, or UI changeValidation
npm run test:ci— green (4465 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:typecheckclean;git diff --checkcleangithub-app.test.ts— a CLEAN advisory (would re-derive tosuccess) with a precomputed surface-lanefailuregate publishesfailure+ the surface title, proving the override is honored (the omitted-gatere-derivation path stays covered by the existing gate-check tests).Safety
gate⇒ identical re-derivation); content-lane off ⇒ byte-identical