Skip to content

fix(github): count reviewCheckMode toward installation health's Checks permission#5377

Merged
JSONbored merged 1 commit into
mainfrom
fix/installation-health-review-check-permission
Jul 12, 2026
Merged

fix(github): count reviewCheckMode toward installation health's Checks permission#5377
JSONbored merged 1 commit into
mainfrom
fix/installation-health-review-check-permission

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • refreshInstallationHealthRecords (installation health, persisted for GET /v1/installations/:id/repair) only checked checkRunMode === "enabled" ("Gittensory Context" check) when deciding whether an installation needs the checks: write permission -- it never checked the separate reviewCheckMode axis ("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.
  • Confirmed live: none of JSONbored's own 3 production self-hosted repos set checkRunMode, but all 3 set reviewCheckMode -- so the persisted installation-health check has never correctly flagged the Checks permission requirement for them.
  • Found incidentally while fixing Fix gate.enabled/gate.checkMode ambiguity at the code level (root cause of the Orb Review Agent check-run incident) #5355 (the gate.enabled/gate.checkMode ambiguity); unrelated bug, split out as its own PR.

Test plan

  • npm run typecheck
  • New regression test in backfill.test.ts proven to fail on pre-fix code (status: "healthy", missing the checks permission) and pass on the fix (status: "needs_attention", missingPermissions: ["checks"])
  • Full backfill.test.ts + backfill-2.test.ts suite green (239/239)

…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.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.37%. Comparing base (a0639fd) to head (2af5255).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
shard-1 43.76% <100.00%> (-0.38%) ⬇️
shard-2 34.14% <100.00%> (-0.41%) ⬇️
shard-3 32.18% <0.00%> (+0.63%) ⬆️
shard-4 31.22% <0.00%> (-0.06%) ⬇️
shard-5 33.11% <0.00%> (-0.21%) ⬇️
shard-6 43.62% <0.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/github/backfill.ts 97.21% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 12, 2026
@JSONbored
JSONbored merged commit f026a96 into main Jul 12, 2026
16 checks passed
@JSONbored
JSONbored deleted the fix/installation-health-review-check-permission branch July 12, 2026 15:37
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant