fix(signals): sync extension overlay redaction with canonical PUBLIC_UNSAFE_TERMS - #6119
Conversation
…UNSAFE_TERMS FORBIDDEN_EXTENSION_TERMS in extension-contributor-context.ts had drifted from src/signals/redaction.ts's canonical PUBLIC_UNSAFE_TERMS, letting bare cohort, bare ranking, miner-originated/human-originated, and standalone reviewability reach the contributor overlay unredacted. Extend the pattern to cover them (matching PUBLIC_UNSAFE_TERMS's [-_\s]? separator on the originated pair, and keeping the compound reviewability/ranking terms ordered so they still match as a whole). Strictly additive -- no existing term removed or narrowed, and redactExtensionText's replacement behavior is unchanged. Adds regression tests for each newly-covered term plus a drift-guard test that fails if the two vocabularies diverge again (bare score stays the one documented, band-gated exception). Closes JSONbored#5840
|
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 #6119 +/- ##
==========================================
+ Coverage 95.24% 95.31% +0.06%
==========================================
Files 595 595
Lines 47096 47097 +1
Branches 15030 15030
==========================================
+ Hits 44858 44890 +32
+ Misses 1493 1476 -17
+ Partials 745 731 -14
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-15 10:21:05 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 non-blocking
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://gittensory.aethereal.dev/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.
|
Closes #5840.
FORBIDDEN_EXTENSION_TERMSinsrc/signals/extension-contributor-context.ts(the browser-extension overlay's defense-in-depth scrubber) had drifted from the canonicalPUBLIC_UNSAFE_TERMSinsrc/signals/redaction.ts, letting these economic-identity terms reach the contributor overlay unredacted: barecohort, bareranking,miner-originated/human-originated, and standalonereviewability.Change
cohort\w*,ranking\w*,miner[-_\s]?originated,human[-_\s]?originated, and barereviewability— matchingPUBLIC_UNSAFE_TERMS's own[-_\s]?separator convention. The compoundreviewability/rankingalternatives stay ordered before the bare words so"reviewability internals"/"private reviewability"/"private rankings"still redact as a whole.redactExtensionText's"[redacted]"+ whitespace-collapse behavior and its call sites are unchanged. Kept hand-synced (no import) so the module stays cycle-free.Tests
PUBLIC_UNSAFE_TERMSand asserts each is also scrubbed byredactExtensionText, so the two vocabularies can't silently diverge again. Barescoreis the one documented, intentional exception (this surface returns readiness as public bands;redaction.tsitself records sibling surfaces that deliberately don't redact barescore).Validation
extension-contributor-context.test.tssuite passes locally (17 tests).vitest --coverage. No other file imports these helpers, so no cross-cutting breakage.