fix(signals): centralize public local-path redaction across drifted surfaces - #1748
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-29 22:37:05 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1748 +/- ##
=======================================
Coverage 95.59% 95.59%
=======================================
Files 204 204
Lines 22316 22321 +5
Branches 8067 8068 +1
=======================================
+ Hits 21332 21337 +5
Misses 408 408
Partials 576 576
🚀 New features to boost your workflow:
|
…l-path-redaction # Conflicts: # src/signals/focus-manifest.ts # test/unit/focus-manifest.test.ts
1b25eab to
52aebf4
Compare
What
src/signals/redaction.tsis the canonical public/private boundary, but several other public surfaces carried their own copy of the local-path denylist and had drifted. Most were missing/root/and several were missing/var/, so a contributor or operator running from a/root/...or/var/...path could leak an absolute local path through those surfaces even though the canonical boundary already blocks them. This centralizes the local-path roots in one source so the surfaces cannot drift again.How
redaction.tsnow exports the local-path root vocabulary as a single source,PUBLIC_LOCAL_PATH_INLINE, plus a shared.replace()scrubber (PUBLIC_LOCAL_PATH_SCRUB_PATTERN) and an anchored prefix pattern (PUBLIC_LOCAL_PATH_PREFIX_PATTERN).PUBLIC_UNSAFE_PATTERNis recomposed from that source with identical behavior.Every drifted surface now composes from that source while keeping its own trailing and anchoring semantics, so behavior on the roots that already worked is unchanged and only the missing
/root/and/var/(and the forward-slash Windows formC:/Users/) are added:signals/focus-manifest.tsisFocusManifestPublicSafe: split into its existing term vocabulary plus a path check composed from the shared source, which adds/var/.services/control-panel-roles.tssanitizeRoleTextandservices/weekly-value-report.tssanitizeReportText: use the shared scrub pattern, which adds/root/and/var/.services/agent-action-explanation-card.tsTOKEN_OR_PATH_PATTERN: keeps its token alternatives and composes the path alternatives from the shared source, adding/root/,/var/, andC:/Users/.services/miner-dashboard-recommendations.tsLOCAL_PATH: rebuilt from the shared source, preserving its trailing class and case sensitivity.db/repositories.tsproduct-usage scrubber: aliases the shared scrub pattern, unifying the Windows form.signals/local-branch.tssafeRepoPath: uses the shared anchored prefix pattern, which adds/var/.The context-specific phrase vocabularies in
agent-action-explanation-card.tsandminer-dashboard-recommendations.ts, and the richer term vocabulary infocus-manifest.ts, stay local by design.pr-body-draft.tskeeps its generic local-path matcher (out of scope per the issue).Tests
Extended the existing unit test for each wired surface to prove
/root/,/var/, and the forward-slashC:/Users/form are now redacted or blocked, with no regression on the previously handled roots.Closes #1418