Skip to content

Commit 18bc5e5

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-iwpzxs
2 parents 367d09d + 34daac1 commit 18bc5e5

237 files changed

Lines changed: 7758 additions & 4053 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): a disabled package's validation rule no longer stands as the packaged rule of the object it extends
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`SchemaRegistry.getPackagedObjectBase` built the packaged rule set from every code extender of the object, a disabled package included, while the served object withholds a disabled package's extension. Where an enabled extender and a later, disabled one both ship a rule of one name, the base carried the disabled rule while the served object carried the enabled one, so the enabled rule's `message` read as rewritten by the tenant: `/meta` served it in the source language under every other locale, and a refused write quoted it untranslated. The base now leaves a disabled package's extensions out of its rules as it already did for its fields and tabs, so the enabled rule's message is translated again. Nothing to change in your metadata.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/rest': patch
3+
'@objectstack/runtime': patch
4+
---
5+
6+
fix(rest,runtime): the draft and layered `_env` reads of a name only disabled packages hold answer their own 404
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`GET /meta/:type/_env/:name` already answered `404` for a name that only disabled packages hold. Three spellings of the same read still answered `409 RESOURCE_CONFLICT` and named the disabled package: `?state=draft`, `?preview=draft` and `?layers=true`, for a caller who may read pending drafts. Each now answers what the bare by-name read answers, on both transports (`RestServer` and the runtime dispatcher), and names no package:
12+
13+
- `?state=draft` (any case): `404 NO_DRAFT`
14+
- `?preview=draft`: `404 RESOURCE_NOT_FOUND`
15+
- `?layers=true`: `404 RESOURCE_NOT_FOUND`
16+
17+
A package-less draft stored under such a name is the disabled holder's customization, so it is withheld too. Once the holder is enabled again, each read refuses `409` and names it, as before.
18+
19+
The door judges the read the caller actually gets. For a draft read, both the plain read and the draft read must withhold the name. Sometimes an enabled package holds a stored draft of the name that the plain read does not see, and the bare draft read serves that draft to an admitted builder. In that case `_env` keeps the `409` and never serves the draft. The layered view is judged by the plain read, because its chain withholds every layer whenever the plain read withholds a disabled holder's item.
20+
21+
FROM → TO for a client: a `409` on these three reads of a disabled-only name becomes a `404` (`NO_DRAFT` for `?state=draft`). Both are refusals, so code that already handles a missing item needs no change.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-upgrade entry file becomes a router
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-upgrade/SKILL.md` goes from 24.7 KB to 9.0 KB (481 lines to 159). It now holds five things: the boundary (the four "never" rules and one `conversionId` per commit), four first checks (the authored major, the `os validate` control, where the prescriptions ship, the skills re-install), the Quickstart command block, seven traps that each look finished and are not, and the rule for when you decide a residue item alone and when you ask the owner. A table at the end says which section of the reference file to open. No rule's teaching changes. Text moved, and this entry says where it went. The skill's two authored files are 0.3 KB smaller together (29.5 KB to 29.2 KB).
11+
12+
**What the entry keeps.** The seven traps: `os migrate meta` rewrites no source file by default, so the printed edits are ported by hand, or `--write` is passed and the edits it only lists are ported, then the range is replayed; a green `validate` does not mean the chain has nothing left, so replay `--from <authored-major> --to <target-major> --json` until `applied` is `[]` with no `replayedNothing`; stored `sys_metadata` rows are rewritten only at read and only while the release carries their conversions, so run the `--stored` pass before you leave it; data migrations are per-deployment gates the report carries as `pending`; code on a retired API can keep compiling while it reads `undefined`; prose that still teaches the old shape fails nothing; and the parse-gate probe is a plain data literal with no `define*` call.
13+
14+
**What left, and where it is now.** `references/examples-upgrade.md` now holds the whole run in order, around the three blocks it already had (the worked R1, the report template, the v17-canonical shapes, all unchanged):
15+
16+
- `0 · Preflight` (`#0--preflight`): the three sources of the FROM major, the `.upgrade/` workspace, the commands that re-install the skills.
17+
- `1 · Mechanical layer` (`#1--mechanical-layer`): what a run does and prints, stored rows, data gates.
18+
- `2 · Semantic residue` (`#2--semantic-residue`): where the prescriptions ship and how to harvest them, the residue classes, what each decide-or-ask condition looks like, the R2 and R3 searches.
19+
- `3 · Acceptance` (`#3--acceptance`): typed, parse-gated, validate, the reverse check (`#reverse-check`) with its three outcomes, the stored-row assertion.
20+
- `Failure modes` (`#failure-modes`) and the `--json` error codes.
21+
- Anchors that no longer exist in `SKILL.md`: `#-the-boundary--read-this-before-the-first-command` (now `#-the-boundary`), `#0--preflight`, `#establish-the-from-major--do-not-guess-it`, `#make-the-work-reviewable-before-you-change-anything`, `#re-install-the-skills-from-the-moved-catalog`, `#1--mechanical-layer--invoke-the-chain`, `#what-os-migrate-meta-actually-does`, `#-the-one-fact-that-surprises-every-operator`, `#stored-rows-rehydration-replays-what-the-release-carries`, `#data-migrations-are-not-metadata-migrations`, `#2--semantic-residue--the-part-that-is-yours` and its `2.1` to `2.6` sections, `#3--acceptance--what-upgraded-means` and its `3.1` to `3.6` sections, `#reverse-check`, `#failure-modes`. `#quickstart`, `#decide-alone-or-ask` and `#cross-skill-routing` still do.
22+
23+
**Not carried over, because something else already says it.** The list of `os migrate meta` forms (`os migrate meta --help` prints the same forms and describes every flag; the Quickstart keeps the ones a run needs), and two `Failure modes` rows. "Reports changes, but the files are unchanged": its symptom and cause are trap 1, and its fix (pass `--write`, or port the printed edits by hand, then replay) is kept as that trap's last sentence. "Findings that have nothing to do with retired keys" restated first check 2, the control.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@objectstack/organizations": patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
A per-organization seed replay that refuses rows now logs at warn, naming the object, the first error and the organization id, instead of an info line.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/metadata-protocol': minor
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(lint)!: the publish gate refuses a subflow or map step that calls a flow the deployment does not hold
8+
9+
Clause-②: yes (narrowing)
10+
Metadata-protocol: narrowed
11+
12+
<!-- adr-0087: not-required (already-registered publish-refuses-flows-that-save-and-do-not-run) the same subflow-target rule at one more door; this change extends that entry's text from a CLI warning to an error at the runtime publish gate, judged against every flow the deployment holds -->
13+
14+
**BREAKING** accept-set narrowing, shipped as `minor`: an active publish of a flow whose `subflow` or `map` step names a flow that no part of the deployment holds was accepted before and is refused now (`422 INVALID_METADATA`, rule `flow-subflow-unknown`), with the fix named. The schema is unchanged, stored flows are not rewritten or refused at boot, and drafts are not gated.
15+
16+
A `subflow` or `map` step runs the flow its `config.flowName` names. When the engine holds no flow of that name, the step fails on every run (`Flow 'X' not found`). `flow-subflow-unknown` reported this only as a CLI warning, because the publish gate judged one flow at a time and could not tell a call to another stored flow from a call to a missing one.
17+
18+
- **The refusal.** On a flow publish the host now states the names of every flow the deployment holds: every installed package's flows (a disabled package's included), the stored flow rows in every state (a draft counts), the flows the same publish batch or package install carries, and every flow the automation engine holds (a flow registered straight into the engine has no metadata row). A call naming none of them, and not the written flow itself, is an `error` at the publish gate. The names are read only for a flow that calls another flow, and the stored ones in one read of the `name` column.
19+
- **A package install.** An unmanaged install writes its flows one at a time and states the package's flow names on each, so a flow calling a sibling the package declares after it installs. A copy installed under another namespace renames its flows whose names carry the source prefix, but not the `config.flowName` that calls them, so its install is refused, and rolled back whole, unless the deployment holds the old name.
20+
- **No verdict.** When the host cannot read one of those sources (no automation service, a failed store read, said once at `warn`), or the set is empty, the gate does not judge the call.
21+
- **Not judged.** Whether the engine's package-scoped name resolution (ADR-0150 D3) lets the calling flow reach the called one: the set is the whole deployment, never narrowed to the written package's dependency closure.
22+
- **The CLI.** `os validate` / `lint` / `compile` / `build` still report `flow-subflow-unknown` as a warning: the stack is one app, and another installed package may ship the called flow.
23+
- **Exports.** `@objectstack/lint`: `validateFlowSubflowTargets` takes an optional second argument (`FlowSubflowTargetOptions`, `deploymentFlowNames`); `AuthoringRuleContext` gains `deploymentFlowNames`; `runRuntimeAuthoringRules` takes an optional `deploymentFlowNames`. `@objectstack/metadata-protocol`: `saveMetaItem`'s request gains an optional, server-only `copyPlanFlowNames` (the flows the same package install writes; set by the unmanaged install, forwarded by no HTTP door). All optional; an omitted value keeps the earlier behaviour.
24+
25+
FROM → TO:
26+
27+
- `{ type: 'subflow', config: { flowName: 'notfy_owner' } }` (no such flow) → `{ type: 'subflow', config: { flowName: 'notify_owner' } }`
28+
29+
One-line fix: name a flow the deployment holds, or save the called flow first (a draft is enough) and publish the caller after it.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): a gallery app exports only when it also installs as a trial copy, with its sample data, and answers there
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`gallery-refresh` now runs `run-scenarios --modes scratch,template --template-sample-data`. The new `--template-sample-data` flag makes template mode install the passing scratch build unmanaged with the card's seed rows as the package's sample data (the same rows the export writes into `source/src/sample-data.json`) and the install door's seed copy on (`seedSampleData: true`). Its Run half then seeds nothing itself: it reads the card's rows back from the copy, binds the copied rows to the persona users it creates afterwards (`owner_id`, a persona record's `user` field, a user-handle field), and asks every question and operation over those rows. A card row the copy does not hold is refused by name, so every turn that reads it is not measured. The record keeps the door's report (`seed.copied`) and the bound fields (`seed.bound`), `template.seedSampleData` says the install asked for the copy, and the scorecard's Seed cell reads `N/M copied by the install`. Without the flag, template mode seeds as before. The flag is refused when `--modes` leaves template out.
11+
12+
The exporter's pass rule now owes the template mode run that way, beside scratch mode's six halves. A record without it, a template mode run without the sample data copied, a refused unmanaged install (the door's status, code and message are the reason) or a failed template half keeps the card out of the gallery. The reason shows in the refresh PR body under `Refused`.
13+
14+
The exported `source/` now installs as the customer's own editable copy. `objectstack.config.ts`'s `manifest` gains `installModes: ['unmanaged']` and `objectstack.manifest.json` gains `solutionType: 'template'`. A build that carries code `plugins` is refused, because `defineStack` refuses that install mode beside code. Install modes the build already declares with `'unmanaged'` are kept as they are.
15+
16+
`export-gallery --check` gains the `app-install-modes` finding: an app whose `source/objectstack.config.ts` `manifest:` literal, read as written, declares no `installModes` containing `'unmanaged'`. A gallery tree exported before this release carries that finding until the next refresh rewrites it.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/verify': patch
3+
---
4+
5+
fix(verify): a `bootStack` boot of a compiled artifact fills its `metadata` slot the way `os dev` does, so it seeds the way `os dev` seeds
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`bootStack` could pass a seed that `os dev` stored wrongly. The case measured: a module package adds a lookup to the app package's object through `objectExtensions`, and seeds it by the target's natural key. On `os dev` the metadata service holds each object as its own package wrote it, because the `MetadataPlugin` that loads the artifact starts before the app seeds. Under `bootStack` that plugin started after the app's seed, or was not composed at all, so the seed read the registry's copy with the extension folded in. With the seed loader as it was before it learned to read the engine's schema first, `os dev` stored the raw key and `bootStack` stored the target's id, so a `bootStack` test could not catch the defect.
11+
12+
Now:
13+
14+
- `bootStack(config, { artifact })` composes a `MetadataPlugin` that loads the same artifact, ahead of the app, and the app leaves the four security collections (`positions`, `permissions`, `capabilities`, `sharingRules`) to it, as `os dev` declares it.
15+
- A `MetadataPlugin` passed in `extraPlugins` is registered in the `metadata` slot, ahead of the app, instead of after it. The harness composes no `MetadataPlugin` of its own beside it, as before.
16+
17+
A source boot (no `artifact`, no `MetadataPlugin` in `extraPlugins`) is unchanged.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
'@object-ui/i18n': patch
5+
'@objectstack/platform-objects': patch
6+
---
7+
8+
feat(studio)!: forms are listed in Studio's menu, and the console's Developer → Public Forms page is retired (objectstack#37087, ADR-0159)
9+
10+
Clause-②: yes (narrowing) — released translation keys, a Studio navigation entry and a console page are removed (listed below); two `publicFormsSetup` keys are added in every locale
11+
Metadata-protocol: none
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) The removed operands are translation keys in the published i18n catalogues, one navigation entry of the platform's own Studio app and a console page: no packages/spec schema, registered metadata type or ADR-0087 conversion surface names them, and no stored item stops parsing: a translation item that names the removed navigation key still saves and loads, and translates nothing, so there is nothing for objectstack migrate meta to rewrite -->
14+
15+
**Forms in Studio's menu.** `form` is a metadata type of its own (ADR-0159), and Studio now lists it: under UI, in the common tier, after Reports. A package's menu always shows the row, whether the package holds a form or not, and the type directory lists it too. The row opens the package's list of forms, and a form opens in Studio's form editor. ADR-0084's type-to-group table gains the `form` row.
16+
17+
**Developer → Public Forms is retired.** The console page that listed public forms and edited each one in a dialog read and wrote forms as views. A public form is a `form` item now: it is designed in Studio's form editor, and its public link is switched on or off in Setup → Public forms. Studio's Developer group no longer shows the entry. Both addresses of the page, `/apps/<app>/developer/public-forms` and `/apps/<app>/component/developer/public-forms`, redirect to Studio's list of forms, so a bookmark still lands somewhere useful. Setup's Public Forms entry is unchanged.
18+
19+
**Setup names both forms when an address is taken.** Switching a public form on while another form holds its address is refused. The message now names the form that holds the address beside the form being switched on, so the administrator knows which two forms to tell apart. When the other form cannot be read, the message says another form holds the address.
20+
21+
**BREAKING**: released keys and one navigation entry are removed. No code in the platform reads them any more.
22+
23+
- `@object-ui/i18n`, `./namespaces/developer`, every locale: the 47 keys under `console.developer.publicForms` (shipped since 18.2.0). The retired page was their only reader.
24+
- `@objectstack/platform-objects`: the Studio app's navigation entry `nav_public_forms` (component `developer:public-forms`) and its label key `apps.studio.navigation.nav_public_forms.label` in every locale. Setup's entry of the same id, `apps.setup.navigation.nav_public_forms`, stays.
25+
- `@object-ui/console`: the `PublicFormsPage` module. The component key `developer:public-forms` stays registered, as the redirect above.
26+
27+
If a deployment overrides one of the removed keys (in its own i18next resources), that override no longer applies: nothing asks for the key. Remove the override. A project's translation bundle could never name `apps.studio.navigation.nav_public_forms`: the Studio app is the platform's, and `translation-target-unknown` already refused a key under an app the project does not define. A `translation` item saved in an environment, in Studio or through the metadata API, is not checked against navigation: one that names the removed key still saves and publishes, and translates nothing. Delete the key from such an item.
28+
29+
New keys, in every locale of `@object-ui/i18n`: `publicFormsSetup.refusalAddressTaken` and `publicFormsSetup.refusalAddressTakenUnknown`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/lint': patch
3+
---
4+
5+
fix(lint): the `action-record-write-discarded` hint prescribes a write a sandboxed body can run
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The hint now reads `ctx.api.object('<object>').update({ id: ctx.recordId, <field>: … })`. It used to prescribe `ctx.api.object('<object>').updateById(ctx.recordId, { … })`, and the sandbox an action body runs in installs no `updateById` on `ctx.api.object(…)`: following the hint turned the discarded write into `TypeError: not a function` on the action's first run. The `os explain action-body-write-unknown-field` text no longer lists `create` and `updateById` among the calls an action body persists through, for the same reason. What lint judges is unchanged: an `updateById` payload in a body is still graded.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
'@objectstack/rest': patch
4+
---
5+
6+
fix(metadata-protocol): the history of a name only disabled packages hold is not served
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`GET /api/v1/meta/:type/:name/history` naming no package, for a type stored per package (an `email_template`, a `flow`, an `agent`, …), now answers `404 RESOURCE_NOT_FOUND` for a name that only disabled packages hold. The body is the same one `GET /api/v1/meta/:type/:name` gives for that name. A disabled package holds no name, so the item read already answered not found, but the history door kept listing every version of the name, at any `?member=`. That included the history of a row stored under no package, which is that package's customization, and the history of a row that was deleted. In process, `historyMetaItem` throws the same `404`.
12+
13+
- Enable the package again and the history is listed as before.
14+
- The history naming the package (`?package=`) is unchanged.
15+
- The rollback naming no package keeps its `409` refusal, which says to enable the package first.
16+
- A name that an enabled package or the environment holds answers as before.

0 commit comments

Comments
 (0)