noCV
AMIGRATE-106 · Bridge old and new writers

Protect customer-code renames during the backfill window

Practice briefBugExpert

A rename races a batch lookup and attaches a legacy case to the wrong customer when the old code is reused.

Focused work estimate
5h + prerequisites
Priority in the scenario
High
Engineering practice
Concurrency · Migration safety

Estimated field mix

  • Database engineering80%
  • Backend20%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional support platform stores a mutable external account code as its primary relationship key. Renames and imports now break references in several tables.

Setup prerequisites

  • Create a disposable database with synthetic customers and dependent records.
  • Apply real migration files; never use production db push.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Resolve against a stable captured mapping or guarded revision.
  • Prevent ambiguous code reuse during transition.
  • Keep committed references bound to immutable customer identity.

Implementation constraints

  • Document the locking or mapping-version strategy.

Verification to include

  • Race rename with backfill using two database clients.
  • Reuse an old code after the allowed boundary and preserve earlier references.

Deliverables

  • Rename/backfill concurrency guard

Rollout and recovery

Temporarily constrain code reuse under the migration policy; pause backfill on mapping conflicts.

Value of the work

For the engineer: Practice migration ordering, compatibility and referential integrity.

For the team: Review a reversible schema transition with measurable completeness checks.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.