Skip to content

Use neutral names in fixtures, mocks, tests and docs - #216

Merged
MehdiMamas merged 4 commits into
mainfrom
scrub-fixtures
Nov 14, 2026
Merged

MehdiMamas merged 4 commits into
mainfrom
scrub-fixtures

Conversation

@MehdiMamas

Copy link
Copy Markdown
Owner

Replaces real-looking logins, a group name, device names, a path fixture and the private attachments repo name with neutral ones (alice, bob, carol, alice-desktop, bobs-macbook.local, Alice & friends, owner/attachments-repo, /claude-sync-data). Assertions keep their meaning; expected strings changed with their inputs. The sample commit text that named outside services is generic now. Adds .gitleaksignore with the 5 fake fixture fingerprints.

Kept on purpose: MehdiMamas/claude-sync links (releases, relay, update URL, feedback text, triage default), com.mehdimamas.claudesync, DEFAULT_REPO, LICENSE, Cargo.toml authors, tauri publisher, SECURITY.md.

Commands run:

  • pnpm -C app/ui test: 30 pass, 0 fail
  • pnpm -C app/ui build: ok
  • pnpm -C relay test: 138 pass, 0 fail
  • pnpm -C relay typecheck: ok
  • cargo fmt --all -- --check: ok
  • cargo test -p claude-sync-core -p claude-sync-cli -p claude-sync-app (macOS): all result lines ok, 0 failed (core 534 passed)
  • gitleaks detect --source . --log-opts=--all: no leaks found
  • git grep for the old names: only the kept items

Part of #200

Before: the mock data, activity tests and comments held real-looking logins, a group name and device names.
Now: they use alice, bob, carol, alice-desktop and bobs-macbook.local; the tests keep the same assertions.
…README

Before: relay fixtures used the maintainer login and the real private attachments repo name.
Now: they use alice and owner/attachments-repo; the public repo links stay.
Before: gitleaks reported 5 hits, all fake values in tests.
Now: .gitleaksignore lists their fingerprints and a scan finds no leaks.
Before: tests and docs held a real-looking login, group name, path and project folder name.
Now: they use alice, Alice & friends, ana and webapp, with <owner>/claude-sync-data in the docs; expected strings changed with the inputs.
@MehdiMamas

Copy link
Copy Markdown
Owner Author

Check: PR 216 against the Plan edge cases (CI: 3 checks green; app/ui test 30 pass, relay test 138 pass, cargo tests ok, gitleaks clean with the ignore file)

  • pass: given the renamed logins and devices in the activity tests -> expect pnpm -C app/ui test still passes with the same assertions (case-insensitive login match, device name lowercase, .local removed) — app/ui/src/activity.test.mjs:24
  • pass: given the renamed mock data -> expect pnpm -C app/ui build passes and the mock group still shows the signed-in user as host — app/ui/src/mock.ts:24
  • pass: given the bundle identifier and DEFAULT_REPO constants -> expect them unchanged — app/src-tauri/src/config.rs:45
  • pass: given the docs edits -> expect no code constant or link to the public repo changed — docs/architecture.md:43
  • pass: given gitleaks run over the working tree and all history after the change -> expect only the 5 known fixture hits, all ignored by .gitleaksignore — .gitleaksignore:1
  • pass: given the owner-decision items (author email, real name in LICENSE/Cargo/publisher/SECURITY.md) -> expect them untouched in this PR — Cargo.toml:9

@MehdiMamas

Copy link
Copy Markdown
Owner Author

Check: PR 216, all Plan cases including the Tests line

  • pass: pnpm -C app/ui test, pnpm -C app/ui build, pnpm -C relay test, pnpm -C relay typecheck, cargo test -p claude-sync-core (group.rs), cargo test -p claude-sync-app for commands.rs, cargo fmt --all -- --check, gitleaks detect --source . --log-opts=--all. — .gitleaksignore:1 (app/ui 30 pass, relay 138 pass, cargo ok, gitleaks clean; CI 3 green)

@MehdiMamas

Copy link
Copy Markdown
Owner Author

Check: PR 216 against the Plan edge cases (CI: 3 checks green; app/ui test 30 pass, relay test 138 pass, cargo tests ok, gitleaks clean with the ignore file)

  • pass: given the renamed logins and devices in the activity tests -> expect pnpm -C app/ui test still passes with the same assertions (case-insensitive login match, device name lowercase, .local removed) — app/ui/src/activity.test.mjs:24

  • pass: given the renamed mock data -> expect pnpm -C app/ui build passes and the mock group still shows the signed-in user as host — app/ui/src/mock.ts:24

  • pass: given the bundle identifier and DEFAULT_REPO constants -> expect them unchanged — app/src-tauri/src/config.rs:45

  • pass: given the docs edits -> expect no code constant or link to the public repo changed — docs/architecture.md:43

  • pass: given gitleaks run over the working tree and all history after the change -> expect only the 5 known fixture hits, all ignored by .gitleaksignore — .gitleaksignore:1

  • pass: given the owner-decision items (author email, real name in LICENSE/Cargo/publisher/SECURITY.md) -> expect them untouched in this PR — Cargo.toml:9

  • pass: pnpm -C app/ui test, pnpm -C app/ui build, pnpm -C relay test, pnpm -C relay typecheck, cargo test -p claude-sync-core (group.rs), cargo test -p claude-sync-app for commands.rs, cargo fmt --all -- --check, gitleaks detect --source . --log-opts=--all. — .gitleaksignore:1 (app/ui 30 pass, relay 138 pass, cargo ok, gitleaks clean; CI 3 green)

@MehdiMamas

Copy link
Copy Markdown
Owner Author

Diff review: no problems found

Checked against the Plan and its amendment on #200. All named files are covered, including the added ones: personal/tests.rs, service.rs:273, architecture.md, triage.test.ts and all of mock.ts. Input and expected strings changed together. A grep of the PR head for the old names finds only the kept items: LICENSE, Cargo.toml, tauri.conf.json, SECURITY.md, public-repo links and the bundle id. DEFAULT_REPO and the bundle identifier are untouched, and I found no new secrets or cost concerns. I did not run the tests; I relied on the CI results reported in the PR.

@MehdiMamas
MehdiMamas merged commit 8056cb0 into main Nov 14, 2026
3 checks passed
@MehdiMamas
MehdiMamas deleted the scrub-fixtures branch November 14, 2026 08:04
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.

Launch 1/5: scan history and tree for secrets, personal data and private links

1 participant