Skip to content

Migrate field-duplicate onto the field-add lifecycle driver#60

Merged
HynLcc merged 1 commit into
mainfrom
migrate-field-duplicate-lifecycle
Jun 19, 2026
Merged

Migrate field-duplicate onto the field-add lifecycle driver#60
HynLcc merged 1 commit into
mainfrom
migrate-field-duplicate-lifecycle

Conversation

@HynLcc

@HynLcc HynLcc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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):

  • prepare builds the conditional-lookup source + host seed and adds the source lookup field that gets duplicated — all seed-build phases ride the fixture.
  • measured op duplicates that field and waits for the copy to backfill, asserting engine routing (feature duplicateField).
  • cleanup removes only the duplicated field, by re-resolving 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, buildResult delegating to buildFieldDuplicateResult unchanged, cleanup) and rides runFieldAddLifecycle / seedFieldAddLifecycle. That a second runner slots in with zero driver edits is the generality signal.

Validation (local, field-duplicate/conditional-lookup-10k, v1+v2)

  • Baseline A vs B clean with no new masksMigrate conditional-lookup onto a new field-add lifecycle driver #59's conditional-lookup id/name/seedHash masks already cover the shared seed structure, and the routing headers are deterministic per engine.
  • pnpm check green.
  • G1 baseline vs candidate clean for both engines (only the documented seedHash key masked).
  • Negative tests: phase / routing.routeMatched / routing.feature / threshold metric / verifiedSamples.expected drift all caught; masked seedHash ignored.
  • Routing verified: routeMatched=true, feature duplicateField, v1 actualXTeableV2=false / v2 true.
  • Trace ref count unchanged (24 both engines).
  • Shared driver untouched → no sibling regression needed.

Tracker: 21/35 runner kinds, 25/55 cases.

🤖 Generated with Claude Code

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>
@HynLcc HynLcc merged commit c398e15 into main Jun 19, 2026
6 checks passed
@HynLcc HynLcc deleted the migrate-field-duplicate-lifecycle branch June 19, 2026 16:27
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