noCV
AMETA-105 · Validate and migrate records

Backfill document timestamps without guessing missing offsets

Practice briefTaskAdvanced

Legacy created-at values mix UTC strings with offset-free dates; blindly casting them uses the database session timezone.

Focused work estimate
4h + prerequisites
Priority in the scenario
Medium
Engineering practice
Data migration · Time zones

Estimated field mix

  • Database engineering60%
  • Data engineering40%

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 records portal stores every property in one JSON column. Queries disagree about missing values, and malformed records make ordinary filters fail.

Setup prerequisites

  • Create synthetic document metadata with malformed and legacy versions.
  • Use migrations and a local query API.

Preceding work

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

Acceptance criteria

  • Convert only timestamps with an unambiguous documented interpretation.
  • Quarantine missing-offset and malformed values.
  • Use resumable batches with counts by conversion outcome.

Implementation constraints

  • Preserve original metadata for later review.

Verification to include

  • Backfill valid offset-bearing values under two session timezones with identical UTC results.
  • Process ambiguous dates and retain null target fields plus explicit errors.

Deliverables

  • Timestamp backfill and timezone regression

Rollout and recovery

Dry-run first; pause on unexpected conversion categories and keep the checkpoint.

Value of the work

For the engineer: Practice relational/JSON boundaries, versioned validation and query semantics.

For the team: Review a data model that stays inspectable while allowing controlled variation.

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.