Migrate conditional-lookup onto a new field-add lifecycle driver#59
Merged
Conversation
conditional-lookup fits neither existing driver: it has no single "prepare" phase (its create/seed measurements ride the fixture with cache-variant names), its primary is two phases (createLookupField + fullLookupScanReady) feeding a computed conditionalLookupReadyMs threshold, and its cleanup is restore-or-delete (drop the added lookup field) rather than field-convert's keep-or-delete. So this introduces field-add-lifecycle.ts — the sibling for runners whose measured op ADDS a field over a seeded table, waits for the new column to backfill, and restores the seed by deleting that field. field-duplicate and field-create join it next. The driver owns the repeated protocol (seedReady phase, diagnostic wrapping, cleanup invocation). conditional-lookup declares only what varies: the dual-table seed fixture, the seed assertion, the trace-wrapped field-add + full-scan readiness bundle, the result assembly (reusing buildConditionalLookupCaseResult unchanged), and the restore-or-delete cleanup. The exported seed helpers field-duplicate reuses are untouched. diff-artifacts.mjs: add masks for conditional-lookup's generated ids/names (table ids, seedFields ids, host record ids, table names) — proven volatile by an unmodified-main baseline A vs B — and for details.seed.seedHash/seedHashShort, the same content-addressed seed-cache key every other migrated runner already masks under a `cache` object (it digests the seed code, so it moves on a pure refactor while staying identical run-to-run). Validation (local, lookup/conditional-10k, v1+v2): baseline A vs B clean after the noise masks; pnpm check green; G1 baseline vs candidate clean for both engines; negative tests confirm phase/expected/threshold/recordCount/seedNamePrefix drift is still caught and only the seedHash key is ignored; trace ref count unchanged (23). No other driver members to regress (new driver). Tracker: 20/35 runner kinds, 24/55 cases. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Jun 19, 2026
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.
What
Migrates the conditional-lookup runner kind (
lookup/conditional-10k) onto a brand-new shared driver,field-add-lifecycle.ts.conditional-lookup fits neither existing driver:
preparephase — its create/seed measurements ride the fixture with cache-variant names (seedBuild/createTables/seedRestore), likefield-convert-lifecyclebut unlikerecord-mutation-lifecycle.createLookupField+fullLookupScanReady) feeding a computedconditionalLookupReadyMsthreshold — unlikefield-convert-lifecycle's single metric-named phase.So this introduces the sibling family driver for runners whose measured op adds a field over a seeded table, waits for the new column to backfill, then restores the seed by deleting that field. field-duplicate and field-create ride it next (rounds 2–3), generalizing it as the family migrates.
The driver owns the repeated protocol (the
seedReadyphase, diagnostic-error wrapping, cleanup invocation). conditional-lookup declares only what varies: the dual-table seed fixture, the seed assertion, the trace-wrapped field-add + full-scan readiness bundle, the result assembly (reusingbuildConditionalLookupCaseResultunchanged), and the restore-or-delete cleanup. The exported seed helpers field-duplicate reuses are untouched.diff-artifacts.mjs masks
sourceFields/hostFieldsids, host record ids, table names) — proven volatile by an unmodified-main baseline A vs B (the case was never diff-validated before).details.seed.seedHash/seedHashShort— the same content-addressed seed-cache key every other migrated runner already masks under acacheobject. It digests the seed code files, so it moves on a pure refactor while staying identical run-to-run; conditional-lookup just placed it directly underdetails.seed.Validation (local,
lookup/conditional-10k, v1+v2)pnpm checkgreen.verifiedSamples.expected/ threshold metric /recordCount/seedNamePrefixdrift all still caught; only the seedHash key is ignored.conditionalLookupReadyMs= createLookupField + fullScan, full 10k scan verified, no routing assertion (correct for a computed-lookup case).Tracker: 20/35 runner kinds, 24/55 cases.
🤖 Generated with Claude Code