Skip to content

feat(contacts): --dry-run and --on-conflict on contacts import and import-csv - #69

Merged
thedogwiththedataonit merged 9 commits into
mainfrom
claude/contact-import-dry-run
Oct 24, 2026
Merged

thedogwiththedataonit merged 9 commits into
mainfrom
claude/contact-import-dry-run

Conversation

@thedogwiththedataonit

@thedogwiththedataonit thedogwiththedataonit commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #65 (base claude/contact-imports). App PR: GetBrew/brew-v2#2220; SDK PR: GetBrew/typescript-sdk#79.

  • contacts import and contacts import-csv take --dry-run and --on-conflict upsert|skip (shared in src/commands/contacts/import-modes.ts; an unknown mode is a usage error, exit 2). An absent flag leaves a value from --input or the file alone.
  • The terminal summary (import-summary.ts) of a dry run reads Dry run of contacts.csv — nothing was written: 1 to add, 0 to update, 0 to fail, 1 to skip (2 rows submitted). and "Custom fields it would create"; CONTACT_EXISTS_SKIPPED rows show in the WARNINGS table.
  • SDK pin → 1e11f3f (sdk#79 head, with the base merged through 25f8e1e; bun.lock from a real install; RELEASING gate SHA updated), vendored spec + generated types synced, command docs regenerated, CHANGELOG.

Checks: bun run test 697/697 (incl. parity), tsc --noEmit clean, biome clean, command docs fresh. A real run without importId prints no "as undefined". Needs the matching API deployment.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with the matching API deployment.

Summary

Adds --dry-run and --on-conflict to both contact import commands, with preview summaries, updated API types, and command docs.

  • Contact imports can preview a batch or leave matching contacts unchanged.
  • Flow lookups can select one send stream from a listed slug or --kind.
  • Email designs can carry a chosen language for their copy.
  • Notification types include alerts when a connected integration needs attention.

Reviews (6) · Last reviewed commit: "fix(contacts): an empty --on-conflict st..." · Reviewed by Greptile

thedogwiththedataonit and others added 2 commits October 21, 2026 13:54
…port-csv

Both import commands take `--dry-run` (the API's `dryRun: true`: the
response the import would return, nothing written) and
`--on-conflict upsert|skip` (`skip` leaves existing contacts unchanged).
An unknown mode is a usage error. The terminal summary of a dry run says
"Dry run — nothing was written" and counts what it would add, update,
fail and skip. The SDK pin moves to the commit that types both options
(GetBrew/typescript-sdk claude/contact-import-dry-run), and the vendored
spec and generated types are synced from GetBrew/brew-v2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SDK pin -> 3ff0329 (sdk#79 head with the base merged), bun.lock from a
  real install, RELEASING gate SHA updated.
- A real run without importId no longer prints "as undefined".
- Tests: dry run requested through --input, invalid --on-conflict on
  contacts import, a real envelope for the import dry-run case.
- CHANGELOG wording for the dry-run summary and importId.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit
thedogwiththedataonit marked this pull request as ready for review October 21, 2026 10:37
Comment thread tests/commands/contacts.test.ts Outdated
thedogwiththedataonit and others added 6 commits October 21, 2026 20:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A body's dryRun/onConflict reach the request unchanged when no flag is
given, and --on-conflict overrides a conflicting body value (contacts
import and import-csv); the --input dry-run test asserts the request too.
Greptile on 2bec9ce.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ws get --kind

- Re-vendor the spec from brew-v2 main 87ac2c6242 (#2220 merged) and pin
  the SDK at its #79 head (a02b304) until the release.
- flows get takes a <domain>/<kind> slug and --kind, via the SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	RELEASING.md
#	bun.lock
#	package.json
Comment thread src/commands/contacts/import-modes.ts Outdated
@thedogwiththedataonit
thedogwiththedataonit changed the base branch from claude/contact-imports to main October 24, 2026 18:38
flagString read an empty value as unset, so --on-conflict "" (an unset
shell variable) ran an upsert. Every supplied value is checked first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit
thedogwiththedataonit merged commit 1daa79f into main Oct 24, 2026
2 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.

1 participant