Skip to content

Migrate record-reorder onto the record-mutation lifecycle driver#55

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

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

Conversation

@HynLcc

@HynLcc HynLcc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Third record-mutation member. record-reorder rides the existing
record-mutation-lifecycle driver unchanged (useRecordWindow: true).

Scope

  • Runner kind: record-reorder (1 case) → record-reorder/10k-move-last-1k-to-front

Change

  • record-reorder.runner.ts keeps only its case-specific diff logic (seed-cache
    order fixture, the measured block-reorder + routing + position-verification
    bundle, result assembly, restore-order-or-drop cleanup) and wires into the
    driver via a spec. A small buildResult adapter maps the driver's
    primaryMeasurement onto the runner's existing reorderMeasurement param, so
    the artifact assembly is byte-for-byte untouched.

G1 mask additions (scripts/diff-artifacts.mjs)

record-reorder is newly G1-diffed, and its baseline A vs B surfaced run-to-run
noise the comparator did not yet mask. All are genuinely volatile on unchanged
code, none semantic:

  • details.verification.firstRecordId / anchorRecordId / movedRecordIds:
    generated record ids (added to GENERATED_ID_KEYS, like the existing
    recordId / createdRecordIds).
  • details.prepare.seedBatchDurations: raw per-batch seed timings (masked like
    every other *Ms / maxSeedBatchMs duration).

The semantic reorder proof stays visible and asserted: perturbing
verification.checkedPositions[].expectedOriginalRowNumber still fails the diff.

Verification

  • pnpm check: green.
  • Local v1+v2 baseline A, baseline B, candidate: all pass.
  • G1 diff: baseline A↔B and A↔candidate pass on both engines (with the noted
    mask additions, confirmed sufficient by A↔B).
  • Negative tests: phases[0].name AND checkedPositions[].expectedOriginalRowNumber
    both fail the diff; a masked movedRecordIds tamper correctly passes.
  • The updated comparator still passes for the already-migrated record-create /
    record-update artifacts (no comparator regression).
  • record-reorder candidate: v1/v2 pass, phases [prepare, moveLast1kToFrontMs, seedReady], operation move-last-block-to-front, routing matched
    (feature=reorderRecords), checkedPositions=4.

Protected case-contract surface (cases/**, registry.ts, framework/types.ts
config, framework/artifacts.ts schema, ../teable-ee) untouched. The
scripts/diff-artifacts.mjs mask change is explicitly task-sanctioned and masks
only run-to-run-volatile fields.

🤖 Generated with Claude Code

Third record-mutation member. record-reorder rides the existing
record-mutation-lifecycle driver unchanged (useRecordWindow: true): the
runner keeps only its diff logic (seed-cache order fixture, the measured
block-reorder + routing + position verification bundle, result assembly,
restore-order-or-drop cleanup) and wires into the driver via a spec. A small
buildResult adapter maps the driver's primaryMeasurement onto the runner's
existing reorderMeasurement param so the artifact assembly is untouched.

G1 mask additions (scripts/diff-artifacts.mjs): the record-reorder baseline
A vs B diff surfaced run-to-run noise the comparator did not yet mask — this
runner is newly G1-diffed. All are genuinely volatile on unchanged code, none
semantic:
  - details.verification.firstRecordId / anchorRecordId / movedRecordIds:
    generated record ids (added to GENERATED_ID_KEYS, like the existing
    recordId / createdRecordIds).
  - details.prepare.seedBatchDurations: raw per-batch seed timings (masked like
    every other *Ms / maxSeedBatchMs duration).
The semantic reorder proof stays visible and asserted: a perturbation of
verification.checkedPositions[].expectedOriginalRowNumber still fails the diff.

Verification: pnpm check green; baseline A/B and A↔candidate pass on v1+v2;
negative tests fail for phases[0].name AND checkedPositions expectedRowNumber;
masked movedRecordIds tamper correctly passes; the updated comparator still
passes for the already-migrated record-create / record-update artifacts.

Tracker: record-reorder Not migrated -> Migrated. Counts 14->15 / 35 runner
kinds, 16->17 / 55 cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HynLcc HynLcc merged commit 8f962b6 into main Jun 19, 2026
6 checks passed
@HynLcc HynLcc deleted the migrate-record-reorder-lifecycle branch June 19, 2026 13:07
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