Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/standalone-stamp-comment-accuracy.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions packages/cli/src/utils/schema-migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/metadata-protocol/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/metadata-protocol/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/objectql/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading