Repository navigation
Scope in schema, reserved-name guards, conformance context, and 0.10.20 back-compat - #211
Merged
Merged
Conversation
…s, conformance context - Scope moves from @adobe/data/ecs to @adobe/data/schema (it annotates a schema); presence documented as not yet synced by data-sync - the store throws when a component and a resource share a name (either order) instead of a resource silently replacing the component schema; hopper's board width/height resources renamed boardWidth/boardHeight - Database.Plugin.create rejects reserved component/resource names (id, nonPersistent, nonShared) at compile time - Conformance.implementation takes concurrency + seedContext, so p2p presence conforms through checkFeature - conventions script: no runtime file imports spec/, ecs/conformance, @adobe/data-testing or vitest - rules: element.md absorbs the binding-element contract (file removed); service.md matches the samples (no nonexistent singletonFactory) - bump to 0.10.24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema declares schema?: never, so passing a { name, schema } parameter where
its schema is expected is a compile error instead of a silent runtime
mismatch (found while updating a consumer to named parameters).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cy conformance, clash warning, legacy rules) - signature.parameters accepts a named Parameter or a bare Schema; Parameter.schemaOf reads either - Conformance.feature / FeatureSpec restored; checkSpec/checkFeature accept the old shape and run the 0.10.20 runner - a resource sharing a component's name warns once and keeps the 0.10.20 overwrite instead of throwing - data-ai keeps the data/state and services/main-service rules for legacy-layout features Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 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.
Summary
Follow-up to #210: small fixes and guards found while porting the samples, plus back-compat so a 0.10.20 consumer can take this release as a version bump.
Scopemoves to@adobe/data/schema. It only annotates a schema with its scope flags, sodata/files no longer import the ECS module to declare a column's scope.presenceis documented as not yet synced.@adobe/data-syncdeliberately skipsnonPersistentdata, so a presence value currently stays local.Database.Plugin.createrejectsid,nonPersistentandnonSharedas component or resource names. A type test covers both.Parameteris not assignable toSchema(Schema.schema?: never), so a named parameter can't be passed where its schema is expected.Conformance.implementationtakesconcurrencyandseedContext. p2p presence (whose action reads the peeruserId) now uses plaincheckFeatureinstead of the lower-level runners. There is a new library test for this.spec/,ecs/conformance/,@adobe/data-testingorvitest. TS project references already enforce this fordata/,services/andecs/; this extends it toui/andapp/.features/ui/binding-element.mdis removed. Its unique contract (the presentation exports, callback naming, cleanup via hooks) moved intoelement.md.service.mdnow matches the samples (flatcreate/createFake) and drops the nonexistentsingletonFactory.Back-compat for 0.10.20 consumers
The samples stay on the new spec-based layout; existing code on the 0.10.20 state-based layout keeps working unchanged.
signature.parametersaccepts a namedParameteror (deprecated) a bareSchema.ToTypeandtoTypeScripthandle both; a bare entry renders asargN. NewParameter.schemaOf(p)reads either form. Code that reads parameters through the genericSchematype and needs aSchemashould call it.Conformance.featureandFeatureSpecare restored (@deprecated).checkSpec/checkFeatureaccept either shape and run the 0.10.20 runner for the old one: transactions plus actions, schemas from the plugin, and lenient doubles. The new path is unchanged and stays strict.console.warnper name. The hopper sample's rename (width→boardWidth/boardHeight) stays. A component redefining a resource's name with a different schema still throws, as in 0.10.20.features/data/state.mdandfeatures/services/main-service/*for features that still havedata/state/orservices/main-service/. The shared feature rules and the build/review skills each say in one line to follow the legacy rules for such a feature and not migrate it unless asked.Not included: the struct-packing crash, where an object schema of optional
Vec2fields with a{}default crashes atStore.create. It needs a decision on how struct detection should treat optional fields.Testing
pnpm run build,pnpm run lint,pnpm run typecheck(with build caches cleared) andpnpm run check:workspacepass.pnpm run testpasses in every package:data3,581 tests,data-testing56 (2 skipped), plusdata-gpu,data-sync,data-persistence,data-lit,data-rpcand all seven feature samples.Parameter.schemaOfand mixed/bare parameter type tests, bare-parametertoTypeScriptoutput andIsValidWithCompleteSchema, the once-per-name clash warning, the restored legacy type test, a runtime legacy-conformance fixture (a transaction-only op and an unscheduled fake call), and the lenient-double mode.Parameter.schemaOfchange in one file, typecheck is clean and its full test suite passes.🤖 Generated with Claude Code