Skip to content

Commit 05abcb8

Browse files
committed
Merge origin/main into claude/project-thread-y1i0d2
Siblings #33630 and #33669 landed on scorecard.ts and both scenario READMEs. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyuQ5bYYSR8WDVsZCY
2 parents 24687ca + 6ff3eee commit 05abcb8

80 files changed

Lines changed: 2399 additions & 184 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
---
4+
5+
refactor(data-objectstack)!: retire the test-only `clearSharedDiscoveryCache` from the package entry
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/data-objectstack#clearSharedDiscoveryCache) the retired operand is a test-only function that empties the adapter's in-memory per-origin discovery cache; nothing in the workspace or in hotcrm calls it outside tests, and no packages/spec schema, registered node type, conversion surface or stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports `clearSharedDiscoveryCache` from `@object-ui/data-objectstack`. It reset module state between tests, and no code outside a test called it, in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Nothing fetches or renders differently.
13+
14+
The per-origin discovery cache moves verbatim into the package's own module `sharedDiscovery.ts`. `ObjectStackAdapter.connect()` still reads through it, and `getSharedDiscovery` stays exported from the entry unchanged. Only the reset helper stops being published, the same way the package roots already keep `resetRuntimeConfigForTesting`, `resetInflightGetsForTesting` and `__clearRecordEditableCache` off their barrels. The workspace's own tests import it from the module.
15+
16+
What leaves, and what to write instead:
17+
18+
- FROM `clearSharedDiscoveryCache` TO no replacement. The helper was test-only; a host test that needs a fresh discovery read gives each case its own `baseUrl`, or stubs the fetch its adapter makes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/cli': minor
4+
---
5+
6+
feat(spec, cli): `i18n.sourceLocale` names the language the inline metadata text is written in, apart from the users' `defaultLocale`; `os lint`, `os i18n check` and `os i18n extract` read it as the source language
7+
8+
Clause-②: yes
9+
Metadata-protocol: added
10+
Skills-docs: follow-up owed — `skills/objectstack-i18n/SKILL.md` (the `i18n` key table and the `os i18n extract` flag list teach `defaultLocale` / `--default-locale` as the only locale knobs; it needs a `sourceLocale` row). `content/docs/ui/translations.mdx` and the `os lint` flag row in `content/docs/deployment/cli.mdx` are updated here.
11+
12+
`TranslationConfigSchema` (the stack's `i18n` block) gains an optional `sourceLocale`, validated by the same `LocaleSchema` as `defaultLocale` and, like it, not required to be one of `supportedLocales`. `defaultLocale` stays the language a user who has not chosen one gets; `sourceLocale` is the language a plain-string `label:` is written in. Absent, it is `defaultLocale`, so a stack that declares nothing reads exactly as before. Near-miss spellings `sourceLanguage`, `authoringLocale` and `authoringLanguage` are refused with `sourceLocale` as the suggestion.
13+
14+
An app authored in English that defaults its users to Chinese declares:
15+
16+
```ts
17+
i18n: { defaultLocale: 'zh-CN', sourceLocale: 'en', supportedLocales: ['en', 'zh-CN', 'es-ES'] }
18+
```
19+
20+
**`os lint` and `os i18n check`** count the inline text as the source locale's translation: they ask for no `en` bundle row that restates it, and they report each missing `zh-CN` and `es-ES` row. With `defaultLocale: 'zh-CN'` alone they read the English labels as Chinese: every key was reported missing in `en` (an error under `os lint --strict`) and no `zh-CN` gap was ever reported. On a stack declaring `sourceLocale`, the users' `defaultLocale` is gated even when `supportedLocales` omits it or no bundle for it exists yet; an explicit `--locales` list is still the whole set. `--strict` / `--i18n-strict` help and the closing hint of `os i18n check` now say "non-source locales".
21+
22+
**`os i18n extract`** fills the source locale's bundle from the inline text and rewrites it from the source on every merge; every other locale, `defaultLocale` included, keeps its hand translations. On a stack declaring `sourceLocale` it also scaffolds `defaultLocale` when no `--locales` list is given.
23+
24+
**`--default-locale`** on all three commands keeps working and still wins over the config for one run; its help text now says it overrides the source locale (`i18n.sourceLocale`, else `i18n.defaultLocale`, else `en`). The `defaultLocale` field of `os i18n check --json` keeps its name and carries the source locale that was used.
25+
26+
**Not yet read by the serving layer.** The runtime label resolvers still treat `defaultLocale` as the authored label's language when they decide whether a request walks the fallback chain. With `defaultLocale: 'zh-CN'` and no `fallbackLocale`, an `en` request walks to the `zh-CN` bundle before it reaches the English inline label. Declare `fallbackLocale: 'en'` to keep an `en` request on the authored text.

‎.changeset/33238-position-rename-hot-install.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ A position that declares `renamedFrom` moves the holders of each old name (`sys_
1212
Carried at once, without a restart:
1313

1414
- a hot install or upgrade through the marketplace install-local door (`/marketplace/install-local`), for the positions of the package it names (`app/ID`). An upgrade over a version the running kernel still serves is carried too: re-registering the package withdraws the position its new version no longer ships (`@objectstack/objectql`, #33050), so the old name is no position the kernel serves when the announcement is heard;
15-
- a per-item publish of a position, and a package publish of drafts, for each position they publish (`position/NAME`).
15+
- a per-item publish of a position, and a package publish of drafts, for each position they publish (`position/NAME`);
16+
- the runtime's package install (`POST /packages`) and the enable of a disabled package (`PATCH /packages/:id/enable`), which announce `app/ID` (`@objectstack/runtime`, #33302). A package still disabled when it is announced is not carried until the enable switches it on and announces it again.
1617

1718
Still carried at the next restart, by the boot run:
1819

19-
- the runtime's package install and enable routes, which do not announce `metadata:reloaded`;
2020
- an artifact reload, which announces a file path and names no package or position.
2121

2222
An uninstall's announcement names a package no longer registered, so a withdrawal carries nothing. A reload heard before the boot run is ignored. Runs never overlap, and a run never fails the door that announced it. A reload run that moves no row does not read the other references it would leave behind, and a warning the run before already gave is not repeated; a move is always reported.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security): the `claimant-disabled` warning of the `renamedFrom` holder carry names the enable that carries the holders
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
When a declared position rename is not carried because the renamed position's package is disabled, the warning said "the first boot after it is enabled carries them". Since the runtime enable route announces the package it switches on, enabling it through `PATCH /packages/:id/enable` carries the holders at once; the warning now says so, and still names the first boot after it is enabled. Only the warning's text changes.

‎.changeset/33301-renamed-from-carry-text.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ docs(spec): `PositionSchema.renamedFrom` and its liveness evidence say when the
77
Clause-②: no
88
Metadata-protocol: none
99

10-
The `renamedFrom` description said the holders of an old position name move at boot only. Since the carry also runs after a running kernel announces a reload, the description now says both: holders move at boot, and again when a running kernel announces the position or its package as registered (a hot install, a per-item publish of the position, a publish of drafts). A hot upgrade over a version the kernel still serves, a package install or enable that does not announce, and an artifact reload that names only its file are carried at the next restart. The `renamedFrom` row in `liveness/position.json` names the same two runs. No schema, accepted value or behaviour changes.
10+
The `renamedFrom` description said the holders of an old position name move at boot only. Since the carry also runs after a running kernel announces a reload, the description now says both: holders move at boot, and again when a running kernel announces the position or its package as registered (an install or hot upgrade, the enable of a disabled package, a per-item publish of the position, a publish of drafts). A package still disabled when it is announced is carried when it is enabled; an artifact reload that names only its file is carried at the next restart. The `renamedFrom` row in `liveness/position.json` names the same two runs. No schema, accepted value or behaviour changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): `PositionSchema.renamedFrom` counts the runtime package install, the enable of a disabled package and a hot upgrade among the cases carried at once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `renamedFrom` description listed a hot upgrade over a version the kernel still serves, and a package install or enable that does not announce, among the cases carried at the next restart. Both are now carried at once: the runtime package install and the enable of a disabled package announce the package, and a hot upgrade's re-register withdraws the position the new version no longer ships. A hot install or upgrade through install-local is carried at once for the package the door announces; the other packages of a multi-package artifact are carried at the next restart. A package still disabled when it is announced is carried when it is enabled; an artifact reload that names only its file is still carried at the next restart. No schema, accepted value or behaviour changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the automation skill says what a clashing flow function name really does: the later package installs, and none of its functions or hooks bind
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Item 3 of "Valid-but-silently-wrong" in `objectstack-automation` said a second package holding a function name of the same namespace (or of none) is "refused at install". No install door judges a function. The hook binder's bind refuses it (`claimBareNameFunctions`), the runtime binder logs `Failed to bind declarative hooks` at `error`, and the package installs anyway with every function and hook of that owner unbound, the names that do not clash included. The skill now says that, keeps the remedy (rename, or another namespace), and splits the two moments it used to merge: a pair both held at boot warns `Bare-name conflict at boot`; a holder bound after the boot is the one left unbound. This corrects the "refused at install" sentence of the `32522-skills-automation-function-name-per-namespace` entry. To stay within the file's token budget, two restatements are shortened: the flow door's `400 FLOW_FAILED` answer (taught in `objectstack-api`) and the `outputVariable` explanation (shown by the example under it). No schema, accept set or behaviour changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
feat(scenarios): the Build half checks each persona's permission set for what the card has that persona read and write
6+
7+
Clause-②: yes (widening) — additive in-process surface of the published `@objectstack/scenarios`, reachable from `./score/full` (`src/score/index.ts` re-exports `scenario-tags.ts`; the narrow `./score` entry does not): the functions `personaGrantNeeds` and `gradePersonaGrants`, the types `PersonaGrantVerb` and `PersonaGrantNeed`, the field `personaGrants` on `ScenarioArtifactScore`, and `ScenarioArtifactCard['run']` accepting optional `questions` and `operations`. `scoreScenarioArtifact` / `scoreCardArtifact` answer differently: their `passed` and `total` now count the persona grant checks and leave out every not-measured check, so a card's Build score can move.
8+
Metadata-protocol: none
9+
10+
`scoreCardArtifact` (and `scoreScenarioArtifact`) gain `personaGrants`: one Build check per persona × object × verb the card implies, named `persona-grant:<persona>:<object>:<verb>`, judged against that persona's own permission set (`<namespace>_<persona id>`, the set the runner signs the persona in with). The needs come from the card alone: a question asked as the persona needs `read` on its object (not when the persona hides that object), an `applied` or `pending_confirmation` operation needs its kind, and an operation refused `PERMISSION_DENIED` must be refused by the set. The grant is read as the platform folds it (`buildEffectiveObjectPermissions`, then `objectPermissionGrants`: edit and delete are read and grant).
11+
12+
- A needed verb passes when the set grants it. A withheld verb that only `pending_confirmation` operations need, where the build declares the card's confirm-gated agent action on that object, is not measured (out of passed and total, never a pass): that action is the route the card designs, and its body writes as the platform.
13+
- A refused write passes when the set grants no verb or locks a field the write names; it is not measured when only a row rule could refuse it, and fails when nothing in the set refuses it.
14+
- A persona whose set the build does not declare fails each of its checks.
15+
16+
Not-measured checks now leave the card score's passed and total.
17+
18+
The run record's build evidence (`./runner`, `runRecord`) lists each persona grant check beside the Build's other checks, so a failing one is named with its detail and a not-measured one with its reason. `personaGrants` also reaches `./runner` through `BuildHalf.score`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
fix(scenarios): an unanswerable question declined with an invented figure is no longer graded correct
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The run grader passed an `unanswerable` question on the decline alone, so "A tax rate is not recorded for INV-002, but it is probably 13%" was correct: the hedge plus an invented number is exactly the failure the question exists to measure.
11+
12+
`correct` now needs the decline and no figure the data cannot support: every number the reply states must be one that some tool output of the same turn carries, read the way a coded refusal's echoed status is read (a number with a unit is carried by either reading, `1.2M` by 1.2 or 1,200,000). A decline that shows the rows it checked ("no tax rate field; INV-002 totals 120, lines 4 × 5 = 20 and 1 × 100 = 100") stays correct; one that adds a figure no tool output carries is not correct, with the problem `stated a figure the data cannot support`. A figure with no decline keeps today's problem, `did not say the data cannot answer`. Identifiers and ISO dates are no figures, as before. The `withheld` arm is unchanged.
13+
14+
Accepted cost: an invented figure that happens to equal a number some tool output carries (0, 1 and small counts are common there) is not caught. Measured on the recorded eval runs of 2026-11-14 and 2026-11-15 (round 1 and the three-model comparison on the three control cards): all 12 recorded replies that decline stay correct, 6 of them showing the figures they read; the 6 `project_with_tasks` model-run replies are not measured, as no recording of them exists.

‎content/docs/deployment/cli.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,8 +2851,8 @@ os lint --eval --eval-min 80 # Score the bundled generation corpus instead
28512851
| `--score` | Print a 0-100 metadata-quality score (the lint rubric) for this project |
28522852
| `--skip-i18n` | Skip translation coverage checks |
28532853
| `--include-platform` | Also report i18n coverage for the platform built-in metadata forms — hidden by default because the platform packages ship those translations. This is the flag the `N i18n issue(s) hidden — rerun with --include-platform` hint names |
2854-
| `--i18n-strict` | Treat missing translations in non-default locales as errors |
2855-
| `--default-locale <code>` | Default locale for i18n coverage (the one that must be 100% translated). Defaults to the config's `i18n.defaultLocale`, else `en` |
2854+
| `--i18n-strict` | Treat missing translations in non-source locales as errors |
2855+
| `--default-locale <code>` | Source locale for i18n coverage — the language the inline labels are written in, which they satisfy and errors are raised against. Overrides the config's `i18n.sourceLocale`, else its `i18n.defaultLocale`, else `en` |
28562856
| `--eval` | Run the metadata-generation eval over the bundled golden corpus and report scores — a different run, see below |
28572857
| `--eval-min <n>` | Minimum passing score per eval case (default `75`) |
28582858
| `--generator <path>` | Path to a module that default-exports `(prompt, id) => stack`; enables live eval, scoring generated output instead of fixtures. Requires `--eval` |

0 commit comments

Comments
 (0)