diff --git a/.changeset/standalone-stamp-comment-accuracy.md b/.changeset/standalone-stamp-comment-accuracy.md new file mode 100644 index 00000000000..9e8254b9569 --- /dev/null +++ b/.changeset/standalone-stamp-comment-accuracy.md @@ -0,0 +1,18 @@ +--- +"@objectstack/metadata-protocol": patch +"@objectstack/objectql": patch +"@objectstack/cli": patch +--- + +docs(metadata-protocol,objectql,cli): comments describing the standalone stamp now name `env_local`, the value the tree actually produces + +The v5.0 `project` to `environment` rename reached the two remaining stamps in `@objectstack/runtime` and `@objectstack/metadata` in a previous release: `createStandaloneStack` and `MetadataPlugin` both stamp **`env_local`**. Six comments in three other packages still described that stamp as `'proj_local'`, so they named a value nothing in the tree produces any more. + +No behaviour changes. The reason this is a `patch` rather than a no-publish diff is measured, not assumed: two of the six sites are TSDoc on **exported** interface members (`AssembleMetadataProtocolOptions.runPlatformMigrations`, `ObjectQLPluginOptions.runPlatformMigrations`) and land in the shipped `dist/*.d.ts`, and the `@objectstack/cli` site lands in the shipped `dist/utils/schema-migrate.js` because that package builds with `removeComments` unset. All three packages ship `dist` in `files[]`, so the corrected text is what an author reads on hover after upgrading. + +The sites were judged individually rather than search-and-replaced, because they are not all the same edit: + +- Five sites whose verb describing the stamp is present indicative describe today's tree — two of them point the reader at `runtime/src/standalone-stack.ts` to go and look — and take the current spelling. +- `packages/cli/src/utils/schema-migrate.ts` names `'proj_local'` as the value the historical arming deduction consumed. There the literal is preserved as history and its present-tense relative clause moves into the past, with today's spelling named beside it; rewriting it to `env_local` would have falsified the record in the other direction. + +The causal claim at every site is about **presence**, not spelling: the retired gate read `environmentId === undefined`, so it would have misfired identically under either literal. That reading is preserved at all six. diff --git a/packages/cli/src/utils/platform-migrations-arming.integration.test.ts b/packages/cli/src/utils/platform-migrations-arming.integration.test.ts index 6c2a23ac0e1..643901dae23 100644 --- a/packages/cli/src/utils/platform-migrations-arming.integration.test.ts +++ b/packages/cli/src/utils/platform-migrations-arming.integration.test.ts @@ -12,7 +12,7 @@ * plane and must NOT provision these tables locally." * * The gate deduced that from `environmentId === undefined`, and - * `runtime/src/standalone-stack.ts` stamps `'proj_local'` on every boot. So the + * `runtime/src/standalone-stack.ts` stamps `'env_local'` on every boot. So the * block never ran on `os dev` / `os serve` / `os start` at all, and #8686's own * header — "repairs an install that is ALREADY in that state, which covers * every existing deployment" — covered no self-hosted deployment. diff --git a/packages/cli/src/utils/schema-migrate.ts b/packages/cli/src/utils/schema-migrate.ts index cf25edc4d00..803d12ea5d9 100644 --- a/packages/cli/src/utils/schema-migrate.ts +++ b/packages/cli/src/utils/schema-migrate.ts @@ -297,9 +297,10 @@ export async function bootSchemaStack( // #9380 armed the three `kernel:ready` platform-table migrations on the // standalone stack (they had never run on a self-hosted install, because // the assembly deduced "cloud per-project kernel" from the `'proj_local'` - // the stack stamps). Every boot through THIS function inherits that default - // unless it is turned off here, and every one of them is a command that - // reports or applies exactly what the operator asked for: + // the stack stamped then — `'env_local'` since #13366). Every boot through + // THIS function inherits that default unless it is turned off here, and + // every one of them is a command that reports or applies exactly what the + // operator asked for: // // • `os migrate plan` / `os migrate duplicates` boot deferred + read-only // and are declared dry runs; diff --git a/packages/metadata-protocol/src/plugin.ts b/packages/metadata-protocol/src/plugin.ts index ed025382fd3..f9c18f95516 100644 --- a/packages/metadata-protocol/src/plugin.ts +++ b/packages/metadata-protocol/src/plugin.ts @@ -130,7 +130,7 @@ export interface AssembleMetadataProtocolOptions { * Declared, not deduced — the same lesson `authoringChannel` records one * field above. The gate used to read `environmentId === undefined`, and * `environmentId` is a ROW-SCOPING KEY, not a topology signal: the - * standalone stack stamps `'proj_local'` on every `os dev` / `os serve` / + * standalone stack stamps `'env_local'` on every `os dev` / `os serve` / * `os start` / `os migrate` boot (`runtime/src/standalone-stack.ts`), so * the block the gate guards never ran on a self-hosted install at all — * #8686's "repairs an install that is ALREADY in that state, which covers @@ -276,7 +276,7 @@ export function assembleMetadataProtocol( // [#9380] The gate is now DECLARED (`runPlatformMigrations`) rather // than deduced from `environmentId === undefined`. The deduction was // wrong in the direction that mattered: the standalone stack stamps - // `'proj_local'`, so this whole block never armed on a self-hosted + // `'env_local'`, so this whole block never armed on a self-hosted // boot and the three migrations below reached no self-hosted // install. The registerApp block above keeps the old predicate on // purpose — see the note there. diff --git a/packages/metadata-protocol/src/protocol.ts b/packages/metadata-protocol/src/protocol.ts index 3d7ca6399ee..d5ba443269d 100644 --- a/packages/metadata-protocol/src/protocol.ts +++ b/packages/metadata-protocol/src/protocol.ts @@ -4755,9 +4755,9 @@ export class ObjectStackProtocolImplementation implements // This line used to read `if (this.environmentId === undefined) // return;` — the carve-out keyed off a ROW-SCOPING key. #6285 measured // that short-circuit and found every *regular* serving path safely on - // the gated side (`os dev` / `os start` bind `env_local`, the - // standalone artifact stack `proj_local`, a cloud per-project kernel - // its own), and concluded the only thing behind it was the + // the gated side (`os dev` / `os start` and the standalone artifact + // stack bind `env_local`, a cloud per-project kernel its own), and + // concluded the only thing behind it was the // control-plane bootstrap kernel. That conclusion was incomplete, and // #6710 measured the counter-example at boot level: the CLI's // lightweight host-config assembler (`serve.ts`'s diff --git a/packages/objectql/src/plugin.ts b/packages/objectql/src/plugin.ts index 7f91913db1c..394e45e06f2 100644 --- a/packages/objectql/src/plugin.ts +++ b/packages/objectql/src/plugin.ts @@ -141,7 +141,7 @@ export interface ObjectQLPluginOptions { * * Same lesson as `authoringChannel` right above: the gate used to be deduced * from `environmentId === undefined`, which is a row-scoping key and not a - * topology signal — the standalone stack stamps `'proj_local'`, so the three + * topology signal — the standalone stack stamps `'env_local'`, so the three * migrations never armed on a self-hosted boot at all. Forwarded verbatim to * `assembleMetadataProtocol`; see * `AssembleMetadataProtocolOptions.runPlatformMigrations` for the two facts