Migrate field-duplicate onto the field-add lifecycle driver#60
Merged
Conversation
Second member of field-add-lifecycle, proving the driver generalizes beyond the member it was born from. field-duplicate's prepare builds the conditional-lookup source + host seed AND adds the source lookup field that gets duplicated (all seed-build phases ride the fixture); its measured op duplicates that field and waits for the copy to backfill, asserting engine routing (feature "duplicateField"); its cleanup removes ONLY the duplicated field so the source lookup field stays part of the reusable seed. The driver was unchanged — field-duplicate declares its spec (prepareFixture, assertSeedReady, runPrimary, buildResult delegating to buildFieldDuplicateResult unchanged, cleanup) and rides runFieldAddLifecycle / seedFieldAddLifecycle. The cleanup re-resolves the duplicated field by config.duplicate.name rather than "delete all non-seed fields", because the source lookup field is also non-seed and must survive. Validation (local, field-duplicate/conditional-lookup-10k, v1+v2): baseline A vs B clean with no new masks (round 1's conditional-lookup id/name/seedHash masks already cover the shared structure, and the routing headers are deterministic per engine); pnpm check green; G1 baseline vs candidate clean for both engines; negative tests confirm phase / routing.routeMatched / routing.feature / threshold / verifiedSamples.expected drift is still caught and only the seedHash key is ignored; routing asserts v1 actualXTeableV2=false, v2=true; trace ref count unchanged (24). Shared driver untouched, so no sibling regression needed. Tracker: 21/35 runner kinds, 25/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
Second member of
field-add-lifecycle.ts(introduced for conditional-lookup in #59), proving the driver generalizes beyond the member it was born from.field-duplicate (
field-duplicate/conditional-lookup-10k):duplicateField).config.duplicate.name— the source lookup field it was copied from is part of the reusable seed and must survive (so it can't use conditional-lookup's "delete all non-seed fields").The driver was unchanged — field-duplicate just declares its spec (
prepareFixture,assertSeedReady,runPrimary,buildResultdelegating tobuildFieldDuplicateResultunchanged,cleanup) and ridesrunFieldAddLifecycle/seedFieldAddLifecycle. That a second runner slots in with zero driver edits is the generality signal.Validation (local,
field-duplicate/conditional-lookup-10k, v1+v2)pnpm checkgreen.routing.routeMatched/routing.feature/ threshold metric /verifiedSamples.expecteddrift all caught; masked seedHash ignored.routeMatched=true, featureduplicateField, v1actualXTeableV2=false/ v2true.Tracker: 21/35 runner kinds, 25/55 cases.
🤖 Generated with Claude Code