You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observation-class finding, spotted while implementing #6760 (ADR-0048 addendum Phase A1). Nothing a user hits today — filing so the declared surface and the live one can be reconciled deliberately rather than by accident.
The drift
TemplateManifestSchema (packages/spec/src/cloud/template-manifest.zod.ts) is documented as the schema of the on-disk objectstack.manifest.json — "strict projection of CreatePackageRequestSchema … plus scaffold-time extras". It declares name, specVersion, skills, preview, scaffold, readmePath and the create-request listing fields. It does not declare namespace.
packages/create-objectstack/src/index.ts rewrites it at scaffold time — if ('namespace' in m) m.namespace = namespace;.
packages/create-objectstack/src/rewrite-identity.ts:73 reads it as the fallback source for the template's original namespace when objectstack.config.ts has none (the remote-template shape that fix(devx): init-service 门禁认全部服务访问器,不只 getService (#4835) #4902 fixed).
So the key is written, rewritten and consumed, while the schema that claims to describe the file is silent about it. Anything validating objectstack.manifest.json against TemplateManifestSchema strips it.
Why this is being filed rather than fixed in #6760
#6760 adds namespace to CreatePackageRequestSchema, and TemplateManifestSchema is derived from it by .omit(). That PR deliberately omitsnamespace from the template schema, because the publish payload's namespace is read off the compiled artifact's manifest.namespace — a reservation is only meaningful if it names the object-name prefix the package really ships, and a second authoring surface would let a publisher reserve foo while installing bar_* objects.
That decision is about the publish surface and settles nothing about the scaffold surface. Whether objectstack.manifest.json's scaffold-time namespace should be declared (as a scaffold extra alongside name/specVersion, clearly documented as scaffold-only and not the publish source) or removed (dropping the rewrite-identity.ts:73 fallback and making objectstack.config.ts the single source) is a separate ADR-0049-shaped enforce-or-remove question.
Observation-class finding, spotted while implementing #6760 (ADR-0048 addendum Phase A1). Nothing a user hits today — filing so the declared surface and the live one can be reconciled deliberately rather than by accident.
The drift
TemplateManifestSchema(packages/spec/src/cloud/template-manifest.zod.ts) is documented as the schema of the on-diskobjectstack.manifest.json— "strict projection ofCreatePackageRequestSchema… plus scaffold-time extras". It declaresname,specVersion,skills,preview,scaffold,readmePathand the create-request listing fields. It does not declarenamespace.But
namespaceis on that file and it is read:packages/create-objectstack/src/templates/blank/objectstack.manifest.jsonships"namespace": "blank".packages/create-objectstack/src/index.tsrewrites it at scaffold time —if ('namespace' in m) m.namespace = namespace;.packages/create-objectstack/src/rewrite-identity.ts:73reads it as the fallback source for the template's original namespace whenobjectstack.config.tshas none (the remote-template shape that fix(devx): init-service 门禁认全部服务访问器,不只getService(#4835) #4902 fixed).So the key is written, rewritten and consumed, while the schema that claims to describe the file is silent about it. Anything validating
objectstack.manifest.jsonagainstTemplateManifestSchemastrips it.Why this is being filed rather than fixed in #6760
#6760 adds
namespacetoCreatePackageRequestSchema, andTemplateManifestSchemais derived from it by.omit(). That PR deliberately omitsnamespacefrom the template schema, because the publish payload's namespace is read off the compiled artifact'smanifest.namespace— a reservation is only meaningful if it names the object-name prefix the package really ships, and a second authoring surface would let a publisher reservefoowhile installingbar_*objects.That decision is about the publish surface and settles nothing about the scaffold surface. Whether
objectstack.manifest.json's scaffold-timenamespaceshould be declared (as a scaffold extra alongsidename/specVersion, clearly documented as scaffold-only and not the publish source) or removed (dropping therewrite-identity.ts:73fallback and makingobjectstack.config.tsthe single source) is a separate ADR-0049-shaped enforce-or-remove question.Measured on
origin/main@578bdef. Files:packages/spec/src/cloud/template-manifest.zod.ts,packages/create-objectstack/src/index.ts(rewriteProjectIdentity),packages/create-objectstack/src/rewrite-identity.ts,packages/create-objectstack/src/templates/blank/objectstack.manifest.json.Generated by Claude Code