Skip to content

feat(cloning): add template anonymization strategy with {fakerMethod} placeholders#122

Merged
rokde merged 3 commits into
mainfrom
split/template-strategy
May 22, 2026
Merged

feat(cloning): add template anonymization strategy with {fakerMethod} placeholders#122
rokde merged 3 commits into
mainfrom
split/template-strategy

Conversation

@rokde
Copy link
Copy Markdown
Contributor

@rokde rokde commented May 22, 2026

Summary

  • Add a new `template` column strategy that expands `{fakerMethod}` placeholders against FakerPHP — e.g. `{userName}@acme.test` or `+49 {numerify}`.
  • Validator rejects empty templates and unknown faker method names at config-load time; engine renders unknown placeholders as empty strings as a runtime fallback.
  • Wire the new strategy through `ColumnCloningConfigData`, the cloning YAML loader/writer, the PII matcher reader/writer, the `column:edit` command, and `matchers:check` / `matchers:list` display.
  • Document the strategy in `docs/cloning-yaml.md`, `specs/PRD-cloning-yaml-schema.md`, and `specs/PRD-pii-matchers.md` with examples.

Test plan

  • `composer test` green
  • `clonio cloning:column-edit --strategy=template --template='{userName}@acme.test'` round-trips through YAML
  • A cloning run with a templated email column produces values like `john_doe@acme.test` (real user-shaped local part, fixed domain)
  • Validator errors on `template: ''` and on unknown placeholders like `{notARealMethod}`

🤖 Generated with Claude Code

@rokde rokde self-assigned this May 22, 2026
@rokde rokde merged commit e1acd96 into main May 22, 2026
16 checks passed
@rokde rokde deleted the split/template-strategy branch May 22, 2026 15:19
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