Skip to content

fix(api): audit registered-vs-installed dashboard/digest copy - #5776

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:feat/registered-installed-copy-audit
Jul 14, 2026
Merged

fix(api): audit registered-vs-installed dashboard/digest copy#5776
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:feat/registered-installed-copy-audit

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

  • Audits the "registered vs installed" dashboard/digest copy per Untangle gittensor-subnet integration from core self-host review features #5016's final phase: since the gittensor plugin is now opt-in (BLOCKING: Fix isInstalled population for brokered self-host #5028Product decision: contributor-open-pr-monitor scope for self-host #5025 all landed), registeredRepos: 0 is the normal, expected state for most self-host operators and must not read as broken.
  • buildDigestItems (src/api/routes.ts) now leads its summary item with installed repos — the correct "repos this instance operates on" signal — and only mentions the registered count when it's nonzero, instead of headlining 0 registered repositories tracked.
  • buildOperatorDashboardPayload (src/services/operator-dashboard.ts) replaces the "registry missing" delta (implies something is broken) with "gittensor plugin not enabled" (accurately describes why no registry snapshot has been persisted) when registry is null.
  • src/services/weekly-value-report.ts was audited too and needs no change — its "Coverage: N registered repo(s)..." copy is already neutral at zero.
  • No functional change: isRegistered/isInstalled computation and every other metric are untouched — wording only.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Fixes #5026

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

All ran via npm run test:ci (the full local gate) plus npm audit --audit-level=moderate, both clean.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Not applicable: this is a backend JSON copy change (digest/dashboard API response strings), not a rendered UI change — the generic Stat tile component that displays these fields is untouched.

Notes

  • Added a dedicated integration test (test/integration/api.test.ts) covering both branches for each changed conditional: no registry snapshot / zero registered repos, and a persisted registry snapshot / nonzero registered repos, asserting the exact copy on both /v1/app/digest and /v1/app/operator-dashboard.
  • Updated the one pre-existing assertion that hardcoded the old "registry missing" string to match the new wording.

…red#5026)

Repos that opt out of the gittensor plugin now legitimately show 0
registered repos, so wording that implied something was broken or
missing at that count was misleading. The digest headline now leads
with installed repos and only mentions the registered count when it's
nonzero; the operator dashboard's "registry missing" delta is replaced
with an accurate "gittensor plugin not enabled" when no registry
snapshot has ever been persisted. No functional/logic change to how
isRegistered or isInstalled are computed.
@galuis116
galuis116 requested a review from JSONbored as a code owner July 14, 2026 14:23
@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.07%. Comparing base (9f03eb2) to head (52bfb81).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5776   +/-   ##
=======================================
  Coverage   95.07%   95.07%           
=======================================
  Files         582      582           
  Lines       46217    46219    +2     
  Branches    14821    14822    +1     
=======================================
+ Hits        43941    43943    +2     
  Misses       1516     1516           
  Partials      760      760           
Flag Coverage Δ
shard-1 43.40% <0.00%> (-0.54%) ⬇️
shard-2 36.01% <0.00%> (+0.24%) ⬆️
shard-3 32.19% <0.00%> (-0.06%) ⬇️
shard-4 32.81% <0.00%> (-0.12%) ⬇️
shard-5 31.33% <0.00%> (-0.40%) ⬇️
shard-6 44.99% <100.00%> (+0.34%) ⬆️

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

Files with missing lines Coverage Δ
src/api/routes.ts 94.44% <100.00%> (+<0.01%) ⬆️
src/services/operator-dashboard.ts 100.00% <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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-14 14:32:13 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a well-scoped, wording-only fix that leads digest/dashboard copy with `installed` counts and replaces the alarming 'registry missing' delta with 'gittensor plugin not enabled' when `registry` is null, matching the stated intent of not making opt-in absence look broken. The diff correctly leaves `isRegistered`/`isInstalled` computation untouched and adds a solid integration test covering both the unregistered and registered branches for both endpoints. One minor grammar nit aside ('1 installed repositories'), the change is internally consistent and low-risk.

Nits — 4 non-blocking
  • src/api/routes.ts:4763 — the summary title uses plural 'repositories' even when the count is 1 (e.g. '1 installed repositories tracked'), a pre-existing grammar quirk this PR carries forward rather than introduces.
  • test/integration/api.test.ts — the new test is long (~65 lines) covering two scenarios in one `it` block; splitting into two tests would make failures easier to isolate.
  • Consider a simple pluralization helper for the digest summary title now that the copy is being actively audited (src/api/routes.ts:4763).
  • Consider splitting the new test in test/integration/api.test.ts into 'unregistered' and 'registered' cases for clearer failure isolation.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5026
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: 1867 registered-repo PR(s), 1235 merged, 49 issue(s).
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 1867 PR(s), 49 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: minor — The change is a targeted, low-risk copy/wording audit with no functional logic change, closing out a documented follow-up (#5016/#5026) rather than adding new capability.
Linked issue satisfaction

Addressed
The PR does exactly what the issue's deliverables ask: it audits the copy in buildDigestItems and operator-dashboard.ts, changes the alarming '0 registered'/'registry missing' wording to neutral installed-first phrasing, explicitly checked weekly-value-report.ts and left it unchanged with justification, and confirms no logic/metric computation changed. Tests were updated to reflect the new copy an

Review context
  • Author: galuis116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python, Dart, TypeScript, HTML, MDX, Rust, C++
  • Official Gittensor activity: 1867 PR(s), 49 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 0e02a32 into JSONbored:main Jul 14, 2026
15 checks passed
This was referenced Jul 14, 2026
This was referenced Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard 'registered vs installed' copy audit

1 participant