Skip to content

Migrate record-create onto the record-mutation lifecycle driver#54

Merged
HynLcc merged 1 commit into
mainfrom
migrate-record-create-lifecycle
Jun 19, 2026
Merged

Migrate record-create onto the record-mutation lifecycle driver#54
HynLcc merged 1 commit into
mainfrom
migrate-record-create-lifecycle

Conversation

@HynLcc

@HynLcc HynLcc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Second record-mutation example. Promotes the record-update driver into a real
family driver and migrates record-create.

Scope

  • Runner kind: record-create (1 case) → record-create/mixed-1k-20fields-bulk-create
  • Also touches the shared driver, so record-update is re-verified in this PR.

Change

  • Rename record-update-lifecycle.tsrecord-mutation-lifecycle.ts and
    generalize the parts that differ between the two members:
    • useRecordWindow flag (record-update wraps the bulk write in a record
      window; record-create has none),
    • baseId threaded into assertSeedReady / runMeasuredOperation,
    • primaryMeasurement passed to cleanup so a runner can undo exactly what
      the measured op produced (record-create deletes the created records).
  • record-create.runner.ts keeps only case-specific diff logic (seed-cache
    empty-table fixture, payload build, sql-count verification, the bundled
    measured op, result assembly, delete-created-or-drop cleanup) and wires into
    the driver via a spec.
  • record-update.runner.ts switches to the renamed driver with
    useRecordWindow: true.
  • Tracker: record-create Not migrated → Migrated; both rows point at
    record-mutation-lifecycle.ts. Counts 13→14 / 35 runner kinds · 15→16 / 55 cases.

Verification

  • pnpm check: green.
  • Local v1+v2 baseline A, baseline B, candidate for BOTH cases: all pass.
  • G1 artifact diff (scripts/diff-artifacts.mjs): baseline A↔B and
    A↔candidate pass for record-create AND record-update on both engines —
    proving the shared-driver change did not regress record-update. No mask
    changes.
  • Semantic negative test: perturbing phases[0].name makes the diff fail.
  • record-create candidate: v1/v2 pass, phases [prepare, bulkCreate1kMs, seedReady], routing matched (feature=createRecord), sql-count verification
    sqlRowCount=1000.

Protected surface (cases/**, registry.ts, framework/types.ts config,
framework/artifacts.ts schema, scripts/diff-artifacts.mjs, ../teable-ee)
untouched.

🤖 Generated with Claude Code

record-create is the second record-mutation example, so promote the
record-update driver to a real family driver: rename
record-update-lifecycle.ts -> record-mutation-lifecycle.ts and make the
parts that differ between the two members configurable —
  - useRecordWindow flag (record-update wraps the bulk write in a record
    window; record-create has none),
  - baseId threaded into assertSeedReady/runMeasuredOperation,
  - primaryMeasurement passed to cleanup so a runner can undo exactly what
    the measured op produced (record-create deletes the created records).

record-create.runner.ts now keeps only its case-specific diff logic
(seed-cache empty-table fixture, payload build, sql-count verification,
the bundled measured op, result assembly, delete-created-or-drop cleanup)
and wires into the driver via a spec. record-update.runner.ts switches to
the renamed driver with useRecordWindow: true.

Behavior unchanged for both runner kinds: G1 artifact diff is byte-identical
(masked fields aside) for record-create AND record-update on v1+v2, proving
the shared-driver change did not regress the already-migrated record-update.

Tracker: record-create moved Not migrated -> Migrated; both rows point at
record-mutation-lifecycle.ts. Counts 13->14 / 35 runner kinds, 15->16 / 55
cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HynLcc HynLcc merged commit 4f98738 into main Jun 19, 2026
6 checks passed
@HynLcc HynLcc deleted the migrate-record-create-lifecycle branch June 19, 2026 12:48
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