Skip to content

Commit 9ca3698

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-5930-step2-seam-lowering
2 parents 5ccdd85 + 085ca6b commit 9ca3698

61 files changed

Lines changed: 2058 additions & 403 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
The `manifest`, `dataset` and `permission` liveness ledgers cite the commit that decided each note, or say the decision in words, instead of a tracker number that no longer resolves
6+
7+
Clause-②: no
8+
9+
Notes in these three ledgers named GitHub issues that no longer exist, so a reader could
10+
not tell why a row carries its verdict. Each such note now either names the commit that
11+
made the decision or, where the number alone carried the meaning, says what was decided. The
12+
`liveness/` ledgers ship in this package's tarball, which is why this is a release note at
13+
all. Note text only: no row's status, evidence, proof or date changes, and no schema,
14+
export or runtime behaviour changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/trigger-schedule': patch
3+
---
4+
5+
Provenance comments in `trigger-schedule` were re-anchored
6+
7+
Comment and docblock lines under `src/` that cited tracker numbers which no
8+
longer resolve on GitHub now cite the commit in this repository's history that
9+
decided the matter, and say in their own words what was decided. Comments
10+
only: no type, schema, export, log or refusal text, or runtime behaviour changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/platform-objects': minor
4+
'@objectstack/metadata-protocol': minor
5+
---
6+
7+
fix(objectql,platform-objects,metadata-protocol)!: the platform's `sys_migration` primary-key lookups go through `findOne`, so an existing deployment no longer prints "Paged read of 'sys_migration' is NOT deterministic" on every boot and every `os migrate plan` (#20648)
8+
9+
Clause-②: no (narrowing)
10+
11+
<!-- adr-0087: not-required (runtime-interface-only packages/platform-objects/src/system/migration-flag.ts#MigrationFlagEngine, packages/metadata-protocol/src/migrations/seed-tenancy-backfill.ts#SeedTenancyLedger) two duck-typed engine interfaces, each the parameter type of a published helper, whose one read method moves from `find` to `findOne`. Neither is a Zod schema, a `packages/spec` declaration or an object definition, neither is a projection of a schema, and no metadata surface references either, so `objectstack migrate meta` has nothing to rewrite. The body carries no migration prescription. The only party affected is the TypeScript author of a hand-written stand-in, and that author's fix is carried by the compiler at their own call site, which names the missing `findOne`. The other categories are closed on facts: both packages publish (not `unpublished`); no ADR-0087 id covers an engine interface's method set, and this diff adds none (not `registered` / `already-registered`); and both interfaces were concretely typed at the merge base, not erased (not `type-surface-only`). This category, not the broader `no-migration-prescription`, because the positive reading it verifies is available here: the named symbols have no metadata surface. -->
12+
13+
The deployment ledger is read one row at a time, by primary key. Five readers
14+
spelled that read as `find(sys_migration, { where: { id }, limit: 1 })`: the
15+
engine's migration-gate read (`readMigrationFlagVerified`, behind
16+
`haveFileColumnsMoved`, `isFileReferencesMigrationVerified` and
17+
`isValueShapesMigrationVerified`), the engine's deviation marker and
18+
creation-attestation revocation, `readDataMigrationFlag` in
19+
`@objectstack/platform-objects/system`, and the seed-tenancy repair's receipt.
20+
The SQL driver cannot tell that read from page one of a walk. The engine's gate
21+
read runs at boot before the schema pass registers `sys_migration` with the
22+
driver, and on a table the driver has not registered an unsorted paged read
23+
warns that its pages may repeat or skip rows. Measured on a SQLite database
24+
created by 17.4.0: every 17.5.0 boot and every `os migrate plan` printed that
25+
warning once, for a lookup that cannot return two rows. All five readers now use
26+
`findOne`, the single-row route the driver already exempts. The driver's check is
27+
unchanged: an unsorted `limit` read on a table the driver did not create still
28+
warns.
29+
30+
**BREAKING**: this narrows what two published engine interfaces accept. The
31+
first is `MigrationFlagEngine` in `@objectstack/platform-objects/system`. It is
32+
the parameter type of `readDataMigrationFlag`, `isDataMigrationVerified`,
33+
`mayActIrreversibly`, `recordDataMigrationRun`, `recordFileColumnMove` and
34+
`attestFreshDatastore`, and part of `FilesToReferencesEngine` in
35+
`@objectstack/service-storage`. The second is `SeedTenancyLedger` in
36+
`@objectstack/metadata-protocol`, the type of a `SeedTenancySeam`'s `ledger`.
37+
Each now requires `findOne` where it required `find`, so a hand-written stand-in
38+
that provides only `find` no longer satisfies either type. It ships as `minor`
39+
under the launch-window convention for accept-set narrowings. The ObjectQL engine
40+
has both methods, so a host that passes the engine needs no change.
41+
42+
**Your fix:** a stand-in that implemented `find` for these helpers implements
43+
`findOne(object, options)` instead, answering the row whose `where.id` matches,
44+
or `null`.
45+
46+
At run time, a stand-in that still provides only `find` fails the read.
47+
`readDataMigrationFlag` then answers `null`, the same answer as a missing row, so
48+
the gates it feeds stay closed. `resolveSeedTenancySeam` now attaches a `ledger`
49+
only for a host that has `getObject`, `findOne`, `insert` and `update`. For a
50+
find-only host the seam's `ledger` is `undefined`, and when the seed-tenancy
51+
repair applies, it says at `warn` that it could not record its receipt.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
---
4+
5+
fix(metadata-protocol): `getPackagedViewBase(name)` answers the view a code package ships, before any overlay (#20731)
6+
7+
`ObjectStackProtocolImplementation` gains `getPackagedViewBase(name)`, the view twin of `getPackagedDashboardBase`. It returns the packaged (code-layer) declaration of a view, which is the `packagedBase` that `translateView` compares a served view against, so that a tenant's published overlay is not overwritten by the packaged translation catalog.
8+
9+
`name` is the view's registry identity, the qualified `<object>.<viewKey>` that each view of a `defineView` container is registered under and that the overlay row and both reads carry. The bare view key that the catalog uses under its object is not an identity (another object may ship a view with the same key), and it answers `undefined`.
10+
11+
It reads the artifact registry's code-package entry only, through the same lookup as `getPackagedDashboardBase`. An overlay that was hydrated under the plain registry key can therefore never be returned as the base it is compared against. It returns `undefined` for a view that no code package ships, for an unknown or empty name, and for a registry that cannot answer. A caller treats `undefined` as "no base known", and the catalog applies as before.
12+
13+
The method is additive. No existing read changes answer, and `getPackagedDashboardBase` answers exactly as before. Nothing is removed or renamed.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
fix(spec): `translateView` lets an explicit override beat the packaged catalog when it is handed the packaged view (#20731)
6+
7+
`translateView` (`@objectstack/spec/system`) now follows the rule ADR-0029 D9.2a records for objects, and that `translateDashboard` already follows: an explicit override beats a packaged default. When the caller supplies `packagedBase` (the view as its code package ships it, before any tenant overlay), a catalog string replaces a served string only while that string still equals its packaged counterpart. It is the same comparison, not a second one.
8+
9+
The comparison is made per string: the view `label` and `description`, each bulk-action def's `label`, `confirmText` and `confirmLabel`, and each of its params' `label`, `help` and `placeholder`. A def or param is matched by the `name` the bundle addresses it by, and one that the packaged view does not carry counts as authored, so its strings keep their values.
10+
11+
Why: an org overlay on a packaged view (ADR-0126 Regime O) changed the label of the showcase's `showcase_task.in_progress` and published. The metadata protocol's item and list reads served the edit, but a `zh-CN` reader was served `进行中`, the catalog's translation of the label the package shipped. The catalog (`objects.<object>._views.<viewKey>`) translated the packaged view and was applied over the tenant's edit.
12+
13+
What changes for a caller:
14+
15+
- `translateView`'s third parameter is typed `TranslateDocumentOptions` (was `ResolveOptions`). That type is `ResolveOptions` plus the optional `packagedBase`, and `translateMetadataDocument` already passed it through. Every existing call compiles unchanged.
16+
- Without `packagedBase` (`undefined` or `null`), the output is byte-identical to before: the catalog applies. No serving layer in this release passes a view base yet, so no served view changes answer with this package alone.
17+
- An edit back to exactly the shipped string is a no-op: the catalog still translates it. A label written as an inline locale map is not an override either; only a string is compared.
18+
19+
Nothing is removed or renamed, and there is nothing to migrate.

0 commit comments

Comments
 (0)