fix(github): count reviewCheckMode toward installation health's Checks permission#5377
Merged
Merged
Conversation
…s permission
refreshInstallationHealthRecords only checked checkRunMode ("Gittensory
Context") when deciding whether an installation needs the Checks: write
permission, missing the separate reviewCheckMode axis ("Gittensory Orb
Review Agent"). buildInstallationRepairDiagnostics already ORs both
(checkRunRepoCount / gateCheckRepoCount); the persisted health record
was missing the second arm. Confirmed live against JSONbored's own 3
production repos, none of which set checkRunMode but all of which set
reviewCheckMode -- the health check has never correctly flagged the
Checks permission requirement for them.
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 #5377 +/- ##
==========================================
- Coverage 94.41% 94.37% -0.04%
==========================================
Files 551 551
Lines 44168 44168
Branches 14632 14632
==========================================
- Hits 41702 41685 -17
- Misses 1791 1808 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Jul 12, 2026
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
refreshInstallationHealthRecords(installation health, persisted forGET /v1/installations/:id/repair) only checkedcheckRunMode === "enabled"("Gittensory Context" check) when deciding whether an installation needs thechecks: writepermission -- it never checked the separatereviewCheckModeaxis ("Gittensory Orb Review Agent" check).buildInstallationRepairDiagnostics(the on-demand repair-diagnostics endpoint) already correctly ORs both (checkRunRepoCount/gateCheckRepoCount); the persisted health record was missing the second arm.checkRunMode, but all 3 setreviewCheckMode-- so the persisted installation-health check has never correctly flagged theCheckspermission requirement for them.gate.enabled/gate.checkModeambiguity); unrelated bug, split out as its own PR.Test plan
npm run typecheckbackfill.test.tsproven to fail on pre-fix code (status: "healthy", missing thecheckspermission) and pass on the fix (status: "needs_attention",missingPermissions: ["checks"])backfill.test.ts+backfill-2.test.tssuite green (239/239)