Skip to content

chore: PII scrub phase 1B — synthetic test data, prevention infrastructure - #467

Merged
forkwright merged 3 commits into
mainfrom
chore/privacy-scrub-phase1b
Mar 3, 2026
Merged

chore: PII scrub phase 1B — synthetic test data, prevention infrastructure#467
forkwright merged 3 commits into
mainfrom
chore/privacy-scrub-phase1b

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Summary

Comprehensive privacy scrub handling everything PR #464 missed. Zero personal data remains in tracked files.

What changed:

  • All test fixtures now use synthetic identities (Alice, Bob, acme.corp, 192.168.1.100)
  • Operator name ("Cody") replaced with "the operator" in docs, "Alice" in test data, "forkwright" in author fields
  • Personal facts (Pitman arm, Baby chore(deps): bump valibot from 1.0.0 to removed in /infrastructure/runtime in the npm_and_yarn group across 1 directory #2, chrome-tanned leather, MBA) replaced with synthetic equivalents (Widget torque, Project Alpha, high-grade polymer)
  • Ardent Leatherworks references removed from UI comments, specs, and scripts
  • Personal emails, phone numbers, and internal IPs replaced with synthetic values
  • .mailmap deleted (mapped pseudonyms to real email)
  • 7 corpus JSON files with heavy personal content deleted
  • Operator-specific configs untracked and gitignored (shared/config/tools.yaml, shared/prosoche/activity_model.json, infrastructure/prosoche/config.yaml)

Prevention infrastructure:

  • .github/pii-patterns.txt — 14 regex patterns for automated PII detection
  • .githooks/pre-commit — PII scanning section appended to existing hook
  • .github/workflows/ci.ymlpii-scan job on PRs targeting main
  • docs/STANDARDS.md — Test Data Policy section
  • CLAUDE.md — Test Data & Instance Boundary section

Test plan

  • cargo clippy --workspace --exclude aletheia-mneme-engine passes
  • cargo test -p aletheia-mneme -p aletheia-symbolon -p aletheia-agora -p integration-tests
  • npx vitest run in infrastructure/runtime
  • grep -riE 'cody|ardent|pflugerville|pitman|chrome.tanned' --include='*.{ts,rs,py,md}' returns only legitimate exceptions (pii-patterns.txt, scrub-callback.py, vendor/)

🤖 Generated with Claude Code

forkwright and others added 3 commits March 3, 2026 15:32
…cture

- Replace all personal facts in test fixtures with synthetic equivalents
  (Pitman arm → Widget torque, Baby #2 → Project Alpha, chrome-tanned → polymer)
- Rename test username 'cody' → 'alice' across Rust, TypeScript, and Python
- Depersonalize docs (emails → noreply, phone → placeholder, IPs → generic)
- Remove .mailmap (connected pseudonym to real identity)
- Remove Ardent Leatherworks references from UI CSS/HTML and specs
- Replace entity resolver personal aliases with synthetic equivalents
- Untrack operator-specific config (tools.yaml, activity_model.json)
- Add pre-commit PII scanner and CI pii-scan job
- Add test data policy to STANDARDS.md and CLAUDE.md

Remaining: corpus JSON files, store.test.ts, pii.test.ts allowlist,
digest.py weather location, spec 29 Ardent ref need follow-up pass.
…personalization

- Replace "Cody" → "Alice" in all remaining test fixtures (Python, TS, Rust)
- Depersonalize specs (author fields, wireframe greetings, operator references)
- Depersonalize WORKING-AGREEMENT.md, STANDARDS.md, git-workflow.md
- Replace internal IP 192.168.0.120 → 192.168.1.100 in prosoche defaults
- Untrack operator-specific prosoche/config.yaml, add to .gitignore
- Delete syn-session-08.json corpus file (heavy personal content)
- Replace "Kendall" → "Bob", "Ardent" → generic in remaining locations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xamples

Untrack operator-specific content from repo:
- shared/config/provider-failover.json → .example
- shared/config/changelog/* → .gitkeep
- infrastructure/evaluation/triggers.json → .example
- .mailmap → .example
- shared/skills/* (131 learned skills) → _examples/ with 2 samples
- shared/bin/{gcal,pplx,browse,credential-refresh,ingest-doc,scholar,transcribe,wiki} → .example stubs

Parameterize development template (remove hardcoded git author).
Update .gitignore with complete instance boundary rules.

Principle: the repo ships clean to a stranger. Everything produced
by a deployment lives in instance/ (gitignored).
@forkwright
forkwright force-pushed the chore/privacy-scrub-phase1b branch from 1e8a6e2 to 137cd3e Compare March 3, 2026 21:35
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Large PR detected — 100 files, 2993 lines changed.

Consider splitting into smaller PRs for easier review. Not a blocker, just a signal.

@forkwright
forkwright merged commit d3a6448 into main Mar 3, 2026
9 of 16 checks passed
@forkwright
forkwright deleted the chore/privacy-scrub-phase1b branch March 3, 2026 21:36
@sonarqubecloud

sonarqubecloud Bot commented Mar 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
4.1% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant