fix(track-record): exempt the GitHub login line from the public-field blocklist scan (#6772) - #6865
Conversation
… blocklist scan (JSONbored#6772) renderTrackRecordSummaryMarkdown scanned the whole rendered block -- including the caller-provided `- GitHub login: <login>` identity line -- against PUBLIC_FIELD_BLOCKLIST via assertPublicSummaryText, which throws on any match. A genuine GitHub username containing a blocklisted word bounded by hyphens (a legal username character), e.g. "team-wallet", therefore crashed rendering entirely. The blocklist exists to keep COMPUTED private fields (trust score, reward, ranking, wallet/hotkey/coldkey data) off public surfaces. The login is caller-provided identity, not computed private data, and is already markdown-escaped. This scans only the computed body lines, then renders the login line outside the scan -- byte-identical output, fail-closed behavior preserved for a genuinely-injected term in a computed field. Adds a ROOT vitest suite (the render path was previously covered only by the engine's node:test, which is outside the Codecov patch measurement) exercising the regression, the still-fails-closed computed-field case, the disabled-summary early return, and the optional open-ignored / evidence lines. Closes JSONbored#6772
|
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 #6865 +/- ##
==========================================
+ Coverage 93.64% 93.69% +0.04%
==========================================
Files 685 685
Lines 68243 68243
Branches 18707 18707
==========================================
+ Hits 63908 63942 +34
+ Misses 3350 3304 -46
- Partials 985 997 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 09:34:42 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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.
|
Summary
renderTrackRecordSummaryMarkdown(packages/loopover-engine/src/track-record-summary.ts) built the fullMarkdown block — including the caller-provided
- GitHub login: <login>identity line — and then ranassertPublicSummaryTextover the whole thing, which throws if anyPUBLIC_FIELD_BLOCKLISTpattern (/\bwallet\b/,/\breward\b/,/\branking\b/,/\bhotkey\b/, …) matches anywhere.A hyphen is a legal GitHub username character and a word boundary, so a genuine login like
team-wallet,reward-hunter, ortop-rankingmatched the blocklist and crashed rendering entirely — no track-recordsummary could be produced for that contributor.
The blocklist exists to keep computed private fields (trust score, reward, ranking, wallet/hotkey/coldkey
data) off public surfaces. The login is caller-provided identity, not computed private data, and is already
markdown-escaped. This fix scans only the computed body lines and renders the login line outside the scan:
incident label of
"trust score leaked") still throws.Closes #6772
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6772).Validation
git diff --checknpm run typechecknpm run test:coveragelocally — the rewrittenrenderTrackRecordSummaryMarkdownis exercised on every line and branch (disabled early-return; both optional-line conditionals true/false; theassertPublicSummaryTextthrow path; the login-excluded regression), verified viacoverage-final.json. The render path was previously covered only by the engine'snode:test, which is outside the Codecov patch measurement — this adds a ROOT vitest suite so the changed lines are measured.build+node --test(588 passing, incl. the existing "fails closed if a blocked public field is introduced") +engine-parity:drift-checkIf any required check was skipped, explain why:
Safety
UI Evidencesection is required.Notes