Skip to content

feat(cutover): --account-ids cohort filter for phased prepare#438

Merged
islandbitcoin merged 1 commit into
mainfrom
jabariennis/cutover-cohort-filter
Jul 7, 2026
Merged

feat(cutover): --account-ids cohort filter for phased prepare#438
islandbitcoin merged 1 commit into
mainfrom
jabariennis/cutover-cohort-filter

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Summary

The runbook calls for a phased cutover (internal accounts first, then the beta cohort), but prepare discovered and prepared all unlocked accounts. Adds an optional cohort filter — the last code gap for runbook-faithful phased prod cutover.

  • preparePrimaryCashWalletCutover({ accountIds }) — when set, discoveries are filtered to the cohort right after discovery, so preflight, planning, and record upsert all scope to it; the rest of the population is untouched. Omitted → unchanged whole-population behavior.
  • Requested-but-not-found ids surface as cohortNotFound (catches typos / locked / already-migrated accounts before the operator hits go).
  • CLI: --account-ids <comma,separated> on the prepare command.

Test plan

  • 3 new tests (whole population; cohort subset; not-found reporting + scoped preflight)
  • 82 cutover unit tests green; tsc + eslint clean

Pairs with the operator guide's phasing steps.

🤖 Generated with Claude Code

The runbook's phased cutover (internal accounts first, then beta cohort)
needed a way to prepare a subset — `prepare` discovered ALL unlocked
accounts. Adds an optional accountIds cohort: when set, only those
accounts are prepared (preflight, plan, and records all scope to the
cohort); everything else is left untouched. When omitted, behavior is
unchanged (whole population).

- prepare.ts: optional accountIds param filters discoveries right after
  discovery; requested-but-not-found ids are surfaced as cohortNotFound
  so the operator catches typos / locked / missing accounts.
- CLI: `--account-ids <comma,separated>` on the prepare command.

Closes the last cutover code gap for runbook-faithful phased prod
cutover. 3 tests (whole population, cohort subset, not-found reporting);
82 cutover tests green.
@islandbitcoin islandbitcoin merged commit d4cce98 into main Jul 7, 2026
14 checks passed
@islandbitcoin islandbitcoin deleted the jabariennis/cutover-cohort-filter branch July 7, 2026 12:38
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