Migrate record-create onto the record-mutation lifecycle driver#54
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second record-mutation example. Promotes the record-update driver into a real
family driver and migrates
record-create.Scope
record-create(1 case) →record-create/mixed-1k-20fields-bulk-createrecord-updateis re-verified in this PR.Change
record-update-lifecycle.ts→record-mutation-lifecycle.tsandgeneralize the parts that differ between the two members:
useRecordWindowflag (record-update wraps the bulk write in a recordwindow; record-create has none),
baseIdthreaded intoassertSeedReady/runMeasuredOperation,primaryMeasurementpassed tocleanupso a runner can undo exactly whatthe measured op produced (record-create deletes the created records).
record-create.runner.tskeeps only case-specific diff logic (seed-cacheempty-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.tsswitches to the renamed driver withuseRecordWindow: true.record-mutation-lifecycle.ts. Counts 13→14 / 35 runner kinds · 15→16 / 55 cases.Verification
pnpm check: green.scripts/diff-artifacts.mjs): baseline A↔B andA↔candidate pass for record-create AND record-update on both engines —
proving the shared-driver change did not regress record-update. No mask
changes.
phases[0].namemakes the diff fail.pass, phases[prepare, bulkCreate1kMs, seedReady], routing matched (feature=createRecord), sql-count verificationsqlRowCount=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