Skip to content

fix(review): scope ops-scan, self-tune, and maintainer-recap by isInstalled - #5702

Merged
JSONbored merged 1 commit into
mainfrom
fix/review-ops-isinstalled
Jul 14, 2026
Merged

fix(review): scope ops-scan, self-tune, and maintainer-recap by isInstalled#5702
JSONbored merged 1 commit into
mainfrom
fix/review-ops-isinstalled

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • opsScanRepos (src/review/ops-wire.ts), selfTuneRepos (src/review/selftune-wire.ts), and recapScanRepos (src/review/maintainer-recap-wire.ts) all filtered their candidate repo list on repo.isRegistered before narrowing further to agent-configured repos.
  • Each function's own doc comment claims to mirror fanOutAgentRegateSweepJobs's repo population (the actual re-gate sweep), but that function has no isRegistered filter at all — it sweeps every review-active (allowlisted or webhook-installed) repo.
  • The data these three functions operate on — gate false-positive rate, slop-score calibration, review-burst/stuck-CI detection, gate self-tuning confidence floor, PR/issue backlog digests — is core review-quality monitoring for any repo the review agent actually runs the gate on, unrelated to gittensor-subnet registry membership. An installed-but-unregistered self-host repo was silently excluded from ops anomaly monitoring, self-tune calibration, and the maintainer recap digest even though the review agent was actively gating PRs on it.
  • Found via the epic Untangle gittensor-subnet integration from core self-host review features #5016 isRegistered/isInstalled exhaustive audit. Adversarially verified (2 independent verifiers per candidate, reading real call chains) against 6 other candidates from the same sweep that turned out to be legitimately subnet-specific (decision-pack/scoring semantics: refreshContributorActivity, buildContributorOpportunities, buildContributorFit, processContributorEvidenceLogins, loadIssueQualityReportMap, evidenceGraphTouchedRepoFullNames) and were correctly left unchanged.

Test plan

  • Added #5016 positive regression (installed-not-registered included) + negative regression (registered-not-installed excluded) for all 3 functions (6 new tests total)
  • test/unit/ops-wire.test.ts + test/unit/selftune-wiring.test.ts + test/unit/maintainer-recap-wire.test.ts + test/unit/selfhost-queue-common.test.ts — 174/174 passed
  • Full local gate (npm run test:ci + npm audit --audit-level=moderate) green: 829 test files passed, 0 failed

Advances #5016

…talled

opsScanRepos (ops-wire.ts), selfTuneRepos (selftune-wire.ts), and
recapScanRepos (maintainer-recap-wire.ts) all filtered their candidate
repo list on repo.isRegistered before narrowing further to
agent-configured repos. Each function's own doc comment claims to
mirror fanOutAgentRegateSweepJobs's repo population (the actual
re-gate sweep), but that function has no isRegistered filter at all --
it sweeps every review-active (allowlisted or webhook-installed) repo.

The data these three functions operate on (gate false-positive rate,
slop-score calibration, review-burst detection, gate self-tuning
confidence floor, PR/issue backlog digests) is core review-quality
monitoring for any repo the review agent actually runs the gate on --
unrelated to gittensor-subnet registry membership. An
installed-but-unregistered self-host repo was silently excluded from
ops anomaly monitoring, self-tune calibration, and the maintainer
recap digest even though the review agent was actively gating PRs on
it. Found via the epic #5016 isRegistered/isInstalled exhaustive
audit, adversarially verified against 6 other candidates that turned
out to be legitimately subnet-specific (decision-pack/scoring
semantics) and were left unchanged.

Advances #5016
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (1c7c771) to head (9f195cd).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5702   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         578      578           
  Lines       46064    46064           
  Branches    14738    14738           
=======================================
  Hits        43781    43781           
  Misses       1524     1524           
  Partials      759      759           
Flag Coverage Δ
shard-1 43.56% <33.33%> (-0.43%) ⬇️
shard-2 35.79% <66.66%> (+0.06%) ⬆️
shard-3 32.33% <33.33%> (-0.09%) ⬇️
shard-4 31.20% <0.00%> (-1.88%) ⬇️
shard-5 32.51% <0.00%> (+0.79%) ⬆️
shard-6 44.89% <33.33%> (+0.37%) ⬆️

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

Files with missing lines Coverage Δ
src/review/maintainer-recap-wire.ts 98.07% <100.00%> (ø)
src/review/ops-wire.ts 98.50% <100.00%> (ø)
src/review/selftune-wire.ts 96.66% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-14 05:42:19 UTC

6 files · 1 AI reviewer · 2 blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • AI review could not be completed: The dual-model AI review did not return a usable verdict for this change.

Review summary
This PR fixes a real behavioral bug: three review-quality-monitoring functions (opsScanRepos, selfTuneRepos, recapScanRepos) filtered on `repo.isRegistered` (gittensor-subnet registry membership) instead of `repo.isInstalled` (whether the review agent actually runs on the repo), silently excluding installed-but-unregistered self-host repos from ops anomaly monitoring, self-tune calibration, and the maintainer recap digest. The fix is consistent across all three call sites, matches the doc comments' own stated intent (mirroring fanOutAgentRegateSweepJobs, which has no isRegistered filter), and each function retains its existing inner `installationId` guard so the fallback-to-all-repos path still requires a real GitHub App installation. Six new tests (positive/negative pairs per function) directly exercise the isInstalled vs isRegistered distinction using real DB rows, not fabricated payloads, and CI is green.

Nits — 3 non-blocking
  • The `Untangle gittensor-subnet integration from core self-host review features #5016` issue reference in the doc comments (src/review/maintainer-recap-wire.ts:102, src/review/selftune-wire.ts:105, src/review/ops-wire.ts) is a bare numeric literal in prose — fine as a comment convention already used elsewhere in this codebase, but worth confirming issue Untangle gittensor-subnet integration from core self-host review features #5016 actually documents this specific isInstalled/isRegistered audit for future readers.
  • Consider whether the same isRegistered-vs-isInstalled audit should be run against any other scheduled fan-outs not touched by this PR, since the description implies this was one sweep of several candidates.
  • AI review could not be completed — The gate is held for a human reviewer rather than passed automatically; it re-evaluates on the next update.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 45 registered-repo PR(s), 37 merged, 320 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 45 PR(s), 320 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — The diff is a narrow, well-tested three-line filter fix that closes a real monitoring gap for installed-but-unregistered self-host repos, directly tied to the referenced #5016 audit issue.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 45 PR(s), 320 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 14, 2026
@JSONbored
JSONbored merged commit 7515471 into main Jul 14, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/review-ops-isinstalled branch July 14, 2026 05:51
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Untangle gittensor-subnet integration from core self-host review features

1 participant