Skip to content

Add faker strategy backed by the fake crate#39

Merged
ababic merged 10 commits into
mainfrom
cursor/faker-strategy-dynamic-b7fb
May 2, 2026
Merged

Add faker strategy backed by the fake crate#39
ababic merged 10 commits into
mainfrom
cursor/faker-strategy-dynamic-b7fb

Conversation

@ababic

@ababic ababic commented May 2, 2026

Copy link
Copy Markdown
Owner

Additional CI fix (run 25257045604)

  1. E0063 in pipeline_anonymizes_nested_json_pathsAnonymizerSpec for payload.profile.secret was missing faker / format; added None for both.

  2. clippy::unnecessary_sort_bylookup_json_path_rules_for_column in settings.rs now uses sort_by_key(|(path, _)| Reverse(path.len())) instead of sort_by (Rust 1.95 clippy).

Pushed as 324329a. Local: cargo fmt, cargo clippy --all-targets --all-features, cargo test --all-targets --all-features all pass.

Slack Thread

Open in Web Open in Cursor 

@ababic ababic marked this pull request as ready for review May 2, 2026 16:54
cursoragent and others added 3 commits May 2, 2026 17:54
Replace built-in email, name, first_name, and last_name strategies with
strategy = "faker" plus faker = "module::Type" paths backed by the
Rust fake crate. Legacy strategy names still load via normalize_anonymizer_spec.

Add src/faker_dispatch.rs as the single extension surface for supported
generators, with config validation and README/example updates.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
- Revert incomplete RawAnonymizerSpec/RawColumnCase references so config
  deserializes again.
- Validation error and docs: config never executes user Rust; faker
  values are string keys for built-in generators only.
- Module docs: allowlist wording instead of implying config extension.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
Replace removed 'name' strategy with faker + name::Name in the mdBook
configuration template. Update policy-lint docs to describe
inconsistent-domain-strategy without referencing removed strategies.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
@ababic ababic force-pushed the cursor/faker-strategy-dynamic-b7fb branch from ac60f5d to 8d0532a Compare May 2, 2026 16:54
cursoragent and others added 7 commits May 2, 2026 16:58
- sql tests: string/phone specs must use faker/format = None (not SafeEmail).
- scan: keep portable Luhn check; allow unknown clippy::manual_is_multiple_of
  so 1.95 CI stays warning-free while 1.83 MSRV avoids unstable is_multiple_of.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
- pipeline_anonymizes_nested_json_paths: add faker/format None.
- lookup_json_path_rules_for_column: use sort_by_key(Reverse(len)) for
  clippy::unnecessary_sort_by on Rust 1.95.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
pipeline_filters_rows and column_cases_first_match_wins had faker set on
date_fuzz and hash rules; validation rejects faker unless strategy=faker.
Use faker/format None so configs match production rules.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
Add explicit docs.rs (crate + faker module), crates.io, and GitHub links in
README, mdBook configuration guide, .dumplingconf.example, AGENTS.md,
faker_dispatch module docs, AnonymizerSpec comment, and validation error.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
upload-pages-artifact + pages:write fails on many fork PRs. Build mdBook on
all triggers; use upload-pages-artifact only on main push; use
upload-artifact on pull requests. Move pages/id-token permissions to the
deploy job only.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
- rust-toolchain.toml: stable + rustfmt + clippy (matches CI components).
- scripts/setup-dev.sh: rustup components, cargo fetch, pinned mdBook to
  .tools/ (MDBOOK_VERSION, default 0.4.52).
- .gitignore: .tools/ for vendored mdbook binary.
- AGENTS.md, CONTRIBUTING.md, docs: document one-shot setup.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
- docs.yml: push to main only; build + upload-pages-artifact + deploy (no PRs).
- docs-pr.yml: pull_request only; mdbook build verify (no Pages/upload).

deploy-pages must consume the artifact from the same workflow run, so PR
checks use a separate workflow. Update docs index wording.

Co-authored-by: Andy Babic <ababic@users.noreply.github.com>
@ababic ababic merged commit 099d03e into main May 2, 2026
10 checks passed
@ababic ababic deleted the cursor/faker-strategy-dynamic-b7fb branch May 2, 2026 17:28
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