Skip to content

Redact an order number given in a sentence, not only after a colon - #36

Merged
aryanorastar merged 1 commit into
BasedHardware:mainfrom
singhharsh1708:fix/order-number-in-a-sentence
Oct 11, 2026
Merged

aryanorastar merged 1 commit into
BasedHardware:mainfrom
singhharsh1708:fix/order-number-in-a-sentence

Conversation

@singhharsh1708

Copy link
Copy Markdown
Contributor

Customer problem

A customer who writes "my order number is 22777" in a report gets the number published in the public GitHub issue. redactSensitive removes "Order number: 22777" and "order 22777", but not the same thing said in a sentence: "order ID is 31415", "the ticket number was 138637367", "order no. is #27182".

Change

The order rule also accepts "is", "was", "=" and "-" between the word and the number. That form needs four digits or more, so "my order was 299 dollars" and "the order is 2 weeks late" are left alone.

Evidence

privacy.js sets the rule itself: public GitHub issues must never carry raw customer identifiers. Old and new redaction run over every string literal in the repo's sources, tests and scripts (3174) differ on the new test line and on one log line in test/shopify.test.js, where order=1042 now becomes [order number].

Verification

  • Added or updated a focused behavior test: two in test/privacy.test.js. The first fails on main; the second keeps prices and counts unchanged
  • npm test: 628/628
  • EVAL_NO_MODEL=1 node scripts/customer-eval.js: 8/8
  • Live-model evaluation not needed: no prompt, routing or model path changes
  • No secrets, customer PII, .env, or railway.toml (the numbers in the tests are made up)
  • No new claim that a person was pinged, an issue was filed, or an email was sent without confirmed success

Touches different lines from #34 and merges cleanly with it.

"Order number: 22777" was removed from a public issue, but "my order
number is 22777", "order ID is 31415" and "the ticket number was
138637367" were published as written. The rule now also accepts "is",
"was", "=" and "-" before the number, for four digits or more so a
price or a count after "order was" is left alone.
@aryanorastar
aryanorastar merged commit 6d42f6e into BasedHardware:main Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants