You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Four copies of the email-masking regex disagree, so josé@example.com reaches the Assay engine unmasked while PEOPLE masks it #2866
The email pattern the scrubbers use for masking is defined in four files, in two different forms. Two are ASCII-only: LIFEOS/RELAY/context/Status.ts:79 and LIFEOS/ASSAY/Engine.ts:150 (used by redactForEngine, :173, on text sent to the engine). Two accept Unicode letters: LIFEOS/PEOPLE/Identity.ts:73 and LIFEOS/RELAY/bridge/record.ts:133. On the same text, "write to josé@example.com" is masked by the Unicode two and left whole by the ASCII two, and "write to a%b@example.com" becomes "write to a%[email]" in Engine.ts. Addresses with non-ASCII characters are uncommon, so the practical reach is small (not measured). Measured on 94bd8f2.
From the repo root, bun emails.ts, with emails.ts:
import{readFileSync}from"node:fs";constcopies={"LIFEOS/RELAY/context/Status.ts": "EMAIL","LIFEOS/ASSAY/Engine.ts": "EMAIL_RE","LIFEOS/PEOPLE/Identity.ts": "EMAIL","LIFEOS/RELAY/bridge/record.ts": "EMAIL"};for(constsof["write to josé@example.com","write to a%b@example.com"]){console.log(JSON.stringify(s));for(const[f,name]ofObject.entries(copies)){constsrc=readFileSync(`LifeOS/install/${f}`,"utf8").match(newRegExp(`const ${name} = (/.*/[a-z]*);`))![1];console.log(" "+f.padEnd(34),JSON.stringify(s.replace(eval(src),"[email]")));}}
Output:
"write to josé@example.com"
LIFEOS/RELAY/context/Status.ts "write to josé@example.com"
LIFEOS/ASSAY/Engine.ts "write to josé@example.com"
LIFEOS/PEOPLE/Identity.ts "write to [email]"
LIFEOS/RELAY/bridge/record.ts "write to [email]"
"write to a%b@example.com"
LIFEOS/RELAY/context/Status.ts "write to [email]"
LIFEOS/ASSAY/Engine.ts "write to a%[email]"
LIFEOS/PEOPLE/Identity.ts "write to [email]"
LIFEOS/RELAY/bridge/record.ts "write to [email]"
Fix
Root cause: each scrubber keeps its own copy of the pattern, so the Unicode form that PEOPLE/Identity.ts and record.ts use never reached the other two. A general fix is one module that holds the contact patterns and that every scrubber imports: a change to the pattern then reaches all of them at once, and they can no longer disagree.
Activity