fix(review): stop bare hotkey/coldkey mentions from false-positiving as secret leaks#7994
Conversation
…as secret leaks
containsSecretLikeText matched the bare words "hotkey"/"coldkey" anywhere in a
registry document, unlike "wallet" (already scoped to "wallet path"). A Bittensor
hotkey is the standard PUBLIC miner identifier, not secret material, and appears
routinely in ordinary registry content -- API paths, field names, even notes
explicitly denying any such data ("No wallet/hotkey data"). Confirmed root cause
of 4 mis-closed metagraphed PRs in one day (#7469, #7589, #7591, #7594).
Scope hot/coldkey the same way wallet already is: require adjacency to something
that actually indicates key material (a keystore path, a private-key/password/
mnemonic/seed qualifier) rather than a bare word match.
Also fixes a companion bug: the privacy scrub that redacts private-rubric terms
from dynamically assembled/AI-generated public text was being applied to the
reviewer's own static, hardcoded secret-detection message too, rendering
"...secret, wallet, PAT..." as the confusing "...secret, [context], PAT...".
AdvisoryFinding gains an alreadyPublicSafe flag a producer can set when its
detail/publicText has no interpolated contributor or AI content, so a fixed
message an engineer already wrote and reviewed renders verbatim.
Closes #7981
|
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 #7994 +/- ##
=======================================
Coverage 91.91% 91.91%
=======================================
Files 739 739
Lines 75840 75842 +2
Branches 23016 23017 +1
=======================================
+ Hits 69707 69709 +2
Misses 5041 5041
Partials 1092 1092
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-22 16:12:57 UTC
Review summary Nits — 5 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.
|
…n parity The #7981 fix touched src/rules/advisory.ts (formatCheckRunOutput) without a matching edit to its gate-decision twin (packages/loopover-engine/src/advisory/gate-advisory.ts), which has no such function. check-engine-parity.ts requires a version bump in that case; expected-engine.version must stay in sync with it too.
…parity check runEngineParityChecks aliased an un-overridden baseEngineVersion straight to headEngineVersion, while its changedFiles default already resolved via a real git diff against origin/main. That asymmetry meant a genuine version bump could never be detected unless the caller passed baseEngineVersion explicitly (only runEngineParityMain did), so any branch with a single-sided gate-decision edit plus a correct version bump still failed this check. Discovered while landing the #7981 hotkey/coldkey fix, which needed exactly that bump for src/rules/advisory.ts's formatCheckRunOutput.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 307e179 | Commit Preview URL Branch Preview URL |
Jul 22 2026, 02:59 PM |
.release-please-manifest.json tracks packages/loopover-engine's version independently of package.json; the 3.4.0 -> 3.4.1 twin-pair parity bump needed a matching entry here too, caught by release-manifest:sync:check.
Bundle ReportBundle size has no change ✅ |
…ent (#8068) Closes #8067. heldForReview only checked for a hard-guardrail-path hit, so a PR whose manual-review label came from elsewhere (a since-resolved gate blocker on a protected author, a migration collision, ...) kept headlining "approve/merge recommended" while the executor's live-label guard silently denied every merge/approve attempt, indefinitely, with no visible explanation on the PR. Confirmed live on PR #7994, stuck 3+ hours despite fully green CI, before being merged manually. Broaden the check to also fire on the live, configured manual-review label being present — this only changes what the comment says, not the "only a maintainer removes the label" safety invariant itself.
Closes #7981.
Summary
containsSecretLikeTextmatched the bare wordshotkey/coldkeyanywhere in a registry document, unlikewallet(already scoped to the phrase"wallet path"). A Bittensor hotkey is the standard public miner identifier, not secret material, and appears routinely in ordinary registry content — API paths (/miners/hotkey/{hotkey}), field names (miner_hotkey), even a note explicitly denying any such data ("No wallet/hotkey data"). Confirmed root cause of 4 mis-closed metagraphed PRs in one day (fix(review): paginate preview-url.ts's PR-comment and check-run GitHub reads #7469, Epic: dual-path repo provisioning — BYOR + APR #7589, Design spec: idea-completion determination + customer-facing status for APR (no GitHub UI exposure) #7591, fix(ui): give four app-panel form controls a programmatic accessible name #7594 — all againstJSONbored/metagraphed). BecauseassessSubnetDocumentscans the whole file, not just the diff, any future PR touching an already-affected file was permanently blocked.walletalready is: require adjacency to something that actually indicates key material (a keystore path, a private-key/password/mnemonic/seed qualifier) rather than a bare word match."...secret, wallet, PAT..."as the confusing"...secret, [context], PAT..."to both contributors and the maintainer debugging the close. Added analreadyPublicSafeflag onAdvisoryFindinga producer can set when itsdetail/publicTexthas zero interpolated contributor/AI content — the content lane's deterministic assessment messages (never AI-judgment, never leaks) now opt in, so a fixed message an engineer already wrote and reviewed renders verbatim, in both the PR comment and the check-run output.Test plan
npm run typecheckcontainsSecretLikeText(genuine key-material leaks still caught; all 4 incident payloads now pass),surfaceVerdictToGate(alreadyPublicSafe: trueon close/manual findings),unified-comment-bridge(blocker renders verbatim with the flag, still scrubbed without it),formatCheckRunOutput(same, check-run path)npm run test:coverage: 1072/1072 files, 20095 tests, 0 failures