Skip to content

feat(conformance): manifest-based feature-conformance standard; eliminate old glob/co-located API - #208

Merged
krisnye merged 1 commit into
mainfrom
krisnye/feature-tests
Sep 27, 2026
Merged

krisnye merged 1 commit into
mainfrom
krisnye/feature-tests

Conversation

@krisnye

@krisnye krisnye commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

What

Replaces the old co-located { fn, cases } + import.meta.glob conformance pattern with an explicit, compile-checked manifest standard, and eliminates the old API.

  • Each feature authors a data/state/spec.ts manifest (Conformance.feature({...})) consumed by Conformance.checkSpec (pure) and Conformance.checkFeature (ecs).
  • Transforms are single-export pure functions with zero test-tier imports. Cases move to inert sibling *.cases.ts (SpecCases/SpecDerivations): data-only args, service returns scheduled as data (responses), calls asserted as effects.
  • Service doubles move to *.fake.ts, out of the production public.ts barrel.
  • A per-package composite tsconfig wall isolates the test tier: a runtime data//services/ file importing test-tier code is a compile error (TS6307).
  • The manifest enforces four compile-time guards: exact cases coverage, exact hydrate, services completeness, computedPlugin presence — with positive + negative type-tests.
  • Old API removed: casesBuilder/derivationsBuilder, glob transitions.ts, per-feature conformance-case.ts, old case types, and public runSpec/runFeature (kept internal behind the new API). runTransactions/runActions/runComputeds remain as a documented escape hatch fed via adaptCases.

Scope

@adobe/data-testing (new API + guards, old API deleted), @adobe/data-ai (rules rewritten to the new standard), all 7 sample apps migrated, version bump 0.10.20.

Verification

  • pnpm -r typecheck = 0 errors; pnpm run lint = 0; check:workspace OK.
  • 558 sample tests + 27 @adobe/data-testing tests (incl. all positive/negative type-tests) green.
  • Walled typecheck 0 errors per package; wall verified to fire (TS6307) on a runtime→test-tier import.

🤖 Generated with Claude Code

…nate old co-located/glob API

Author each feature's conformance as an explicit spec.ts manifest
(Conformance.feature) consumed by checkSpec (pure) and checkFeature (ecs).
Transforms become single-export pure functions with zero test-tier imports;
cases move to inert sibling *.cases.ts with service returns scheduled as data
(responses) and calls asserted as effects; service doubles move to *.fake.ts
out of the production barrel. A per-package composite tsconfig wall isolates the
test tier so a runtime import of it is a compile error. The manifest enforces at
compile time: cases coverage, exact hydrate, service completeness, and
computedPlugin presence. Removes casesBuilder/derivationsBuilder, the glob
transitions discovery, and the old co-located case types. Migrates all seven
sample apps and updates the data-ai feature rules to match. Bump to 0.10.20.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@krisnye
krisnye merged commit b09879e into main Sep 27, 2026
3 checks passed
@krisnye
krisnye deleted the krisnye/feature-tests branch September 27, 2026 17:48
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