Skip to content

fix(queue): migrate burden-forecast fan-out from isRegistered to isInstalled - #5687

Merged
JSONbored merged 1 commit into
mainfrom
fix/burden-forecast-isinstalled-5022
Jul 14, 2026
Merged

fix(queue): migrate burden-forecast fan-out from isRegistered to isInstalled#5687
JSONbored merged 1 commit into
mainfrom
fix/burden-forecast-isinstalled-5022

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • buildBurdenForecasts (src/queue/processors.ts) filtered repos on repo.isRegistered instead of repo.isInstalled.
  • Burden forecasting is generic repo-health tracking, unrelated to gittensor-subnet economics — a self-host operator's installed-but-unregistered repos were silently getting zero coverage.
  • The blocking dependency BLOCKING: Fix isInstalled population for brokered self-host #5028 (isInstalled reliability on brokered self-host) is already merged, so this is unblocked.

Test plan

  • New regression test proving an installed-not-registered repo gets a forecast, and a registered-not-installed repo does not
  • npm run test:ci — full local gate, clean (0 failures)

Closes #5022

…stalled

buildBurdenForecasts filtered repos on repo.isRegistered instead of
repo.isInstalled. Burden forecasting is generic repo-health tracking
unrelated to gittensor-subnet economics, so a self-host operator's
installed-but-unregistered repos were silently getting zero coverage.
The blocking dependency #5028 (isInstalled reliability) is already merged.

Closes #5022
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 (66e927e) to head (87027e6).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5687   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         576      576           
  Lines       45977    45977           
  Branches    14724    14724           
=======================================
  Hits        43699    43699           
  Misses       1525     1525           
  Partials      753      753           
Flag Coverage Δ
shard-1 43.57% <100.00%> (-0.42%) ⬇️
shard-2 35.86% <0.00%> (+0.13%) ⬆️
shard-3 32.40% <0.00%> (-0.06%) ⬇️
shard-4 32.94% <0.00%> (-0.12%) ⬇️
shard-5 31.51% <0.00%> (-0.26%) ⬇️
shard-6 44.61% <0.00%> (+0.20%) ⬆️

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

Files with missing lines Coverage Δ
src/queue/processors.ts 95.67% <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 04:05:24 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): src/queue/processors.ts (matched src/queue/**).

Review summary
This PR flips a single filter predicate in buildBurdenForecasts from repo.isRegistered to repo.isInstalled, correctly scoping generic repo-health forecasting to installed repos regardless of subnet registration, and it's backed by a targeted regression test asserting both the positive (installed-not-registered gets a forecast) and negative (registered-not-installed does not) cases. The change is minimal, well-scoped, closes #5022 as claimed, and the referenced blocking dependency #5028 is stated as already merged. CI is fully green across validate/test/coverage checks on this commit.

Nits — 5 non-blocking
  • The long explanatory comment block in src/queue/processors.ts (lines above the filter) duplicates detail already in the PR description — consider trimming to a one-line pointer to Migrate burden-forecast fan-out from isRegistered to isInstalled #5022 for future readability.
  • test/unit/queue.test.ts adds a real DB upsert (upsertRepositoryFromGitHub) mid-test to mark the repo installed; a brief comment already explains why but verify this doesn't change timing/ordering assumptions for the other jobs processed in the same test.
  • If other fan-out jobs in processors.ts (e.g. rag-index-repo per the reference tests) intentionally use a registered+configured OR isInstalled union rather than isInstalled alone, double check buildBurdenForecasts's simpler isInstalled-only filter is the intended final semantics for this generic-health-tracking use case and not an oversimplification relative to other fan-outs in the same epic (Untangle gittensor-subnet integration from core self-host review features #5016).
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5022
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 45 registered-repo PR(s), 37 merged, 330 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 45 PR(s), 330 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
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: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 45 PR(s), 330 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
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 4855591 into main Jul 14, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/burden-forecast-isinstalled-5022 branch July 14, 2026 04:06
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.

Migrate burden-forecast fan-out from isRegistered to isInstalled

1 participant