Parent roadmap: #525
Parent phase: #529
Background
isPublicSafeText is a private local function in src/signals/local-branch.ts (~line 1164, 8 in-file call sites, no external importers). Every new public surface in this wave (extension payloads, notifications, badge, slop reasons, check annotations) needs the same canonical filter.
Goal
Lift it into a shared src/signals/redaction.ts and re-export, with no behavior change.
Current Behavior
The function is not exported; new surfaces would otherwise re-derive the regex and drift.
Desired Behavior
- New
src/signals/redaction.ts exports isPublicSafeText (and a reusable PUBLIC_UNSAFE_PATTERN constant); local-branch.ts imports it. Identical matching behavior.
Implementation Requirements
- Keep the regex non-global so
.test() stays stateless. Update the single import; no call-site behavior change.
Public/Private Output Boundaries
- This IS the public/private boundary primitive; it must reject wallets/hotkeys/rewards/raw trust/farming + local filesystem paths exactly as today.
Acceptance Criteria
- All existing local-branch redaction tests stay green; the function is importable by other modules.
Testing Requirements
npm run test:ci, 97%+ coverage. Move/keep the redaction unit tests against the shared module.
Parent roadmap: #525
Parent phase: #529
Background
isPublicSafeTextis a private local function insrc/signals/local-branch.ts(~line 1164, 8 in-file call sites, no external importers). Every new public surface in this wave (extension payloads, notifications, badge, slop reasons, check annotations) needs the same canonical filter.Goal
Lift it into a shared
src/signals/redaction.tsand re-export, with no behavior change.Current Behavior
The function is not exported; new surfaces would otherwise re-derive the regex and drift.
Desired Behavior
src/signals/redaction.tsexportsisPublicSafeText(and a reusablePUBLIC_UNSAFE_PATTERNconstant);local-branch.tsimports it. Identical matching behavior.Implementation Requirements
.test()stays stateless. Update the single import; no call-site behavior change.Public/Private Output Boundaries
Acceptance Criteria
Testing Requirements
npm run test:ci, 97%+ coverage. Move/keep the redaction unit tests against the shared module.