Skip to content

Commit cb1d7f8

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-ebxrow
2 parents 6ae9d0e + b391feb commit cb1d7f8

46 files changed

Lines changed: 2887 additions & 1152 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.

‎.changeset/29341-connector-credential-literal.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Metadata-protocol: none
1111
A declarative connector entry's four maps — `providerConfig.headers`, `providerConfig.defaultHeaders`, `providerConfig.transport.headers` and `providerConfig.transport.env` — are withheld whole on the metadata read path, but a literal credential in one of them is still stored in metadata. The same `credential-literal` predicate the `flow-credential-literal` advisory asks now judges those four maps and names each credential-shaped entry by its position (never its value), with the `auth.credentialRef` route:
1212

1313
- a header entry: move it to the connector's `auth: { type: 'bearer' | 'api-key' | 'basic', credentialRef }`, which the `rest` provider and an `mcp` http transport send themselves;
14-
- a stdio `transport.env` entry: a stdio MCP server takes no `auth`, so the warning says `auth.credentialRef` reaches the server only over an http transport.
14+
- a stdio `transport.env` entry: move it to the connector's `auth: { type: 'bearer' | 'api-key' | 'basic', credentialRef }` and name the variable in `providerConfig.transport.credentialEnv`; the `mcp` provider hands the resolved credential to the stdio server in that variable itself.
1515

1616
Always a `warning`; nothing is refused and every save lands. The rule runs on all three CLI commands and on the runtime publish gate for `connector` (`PUT /meta/connector/:name`), where it rides the save response's `advisories`. `os explain connector-credential-literal` carries the reasoning.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol)!: a commit revert or package rollback that would restore a row bound to an installed read-only package onto its view, dashboard, report, translation or email template is refused per item, naming the base's `.custom` pair
6+
7+
Clause-②: no (narrowing) — the commit revert (`POST /api/v1/packages/:id/commits/:commitId/revert`) and the package rollback (`POST /api/v1/packages/:id/rollback`) no longer restore a stored version into a row bound to an installed read-only package (`<base>`) itself, on an item of the five overlay types that package ships, where the customization can be written into the base's paired `<base>.custom` instead; they rewrote that row before. The per-item rollback of the same row has refused it since `named-base-overlay-write-closed`.
8+
9+
Metadata-protocol: none
10+
11+
Skills-docs: none needed — `skills/objectstack-platform/SKILL.md` places every customization of an installed base in its paired `.custom`, declaring `overrides`, and says nothing about reverting a commit recorded against the base itself; nothing it says becomes false.
12+
13+
<!-- adr-0087: not-required (already-registered packageless-overlay-write-closed) That entry, unreleased and shipping in the same release, already prescribes this change's TO for every customization of an installed package: write it into the base's paired `<base>.custom` with `PUT /api/v1/meta/<type>/<name>?package=<base>.custom` and the `overrides` declaration (its replacement), because the customization lives there (its reason, ADR-0146 D1, D2, D11). This change closes the commit doors' restore onto a row bound to the read-only base, the third write that still landed such a row after the save, publish and per-item rollback naming the base were closed, onto the same TO. No stored row is rewritten or moved, so `objectstack migrate meta` has nothing new to do. The entry names both meta-door addresses (the write naming no package, and the save, publish or rollback naming the read-only package, a rollback of a row bound to it included) but not yet the commit doors (`POST /api/v1/packages/<base>/commits/<commitId>/revert` and `POST /api/v1/packages/<base>/rollback`); that text widening is a `packages/spec` edit this change does not make, and it rides #29414. -->
14+
15+
**BREAKING** write narrowing at the commit doors (`@objectstack/metadata-protocol`), shipped as `patch` (`Metadata-protocol: none`).
16+
17+
### Migration: FROM → TO
18+
19+
FROM, undoing a commit that the installed package `com.acme.crm` recorded before the write naming it was closed (a customization published into the package itself), where the commit edited the customization:
20+
21+
```http
22+
POST /api/v1/packages/com.acme.crm/commits/cmt_123/revert
23+
```
24+
25+
It now answers `200` with `success: false`, and the item in `failed[]` with `code: NOT_OVERRIDABLE` and the sentence the per-item rollback gives; nothing is written. TO, write the version you want back into the base's paired `.custom`, declaring what it overrides (the pair's declared override is served over the row bound to the base):
26+
27+
```http
28+
PUT /api/v1/meta/view/account_list?package=com.acme.crm.custom
29+
{ "name": "account_list", "label": "My accounts", "overrides": { "package": "com.acme.crm", "basedOn": "1.4.0" } }
30+
```
31+
32+
Or remove the row bound to the base (`DELETE /api/v1/meta/view/account_list?package=com.acme.crm`) to serve the package's own document again.
33+
34+
- **Now refused, per item.** The restore of a commit item into a row bound to the read-only base itself, of a `view`, `dashboard`, `report`, `translation` or `email_template` that the base ships, where the pair can be ensured (the base has a namespace and a SemVer version) and the override write gate admits the declared body into it. The commit's other items still revert, and the revert is still recorded. `POST /api/v1/packages/<base>/rollback` reports each refused item in its `failed[]` (`success: false`) and continues through the remaining commits.
35+
- **Still open.** The revert of an item the commit created: it removes the row bound to the base, which writes nothing and is the one way to clear such a row (as a delete naming the base is). Every revert whose restore lands in a row of the pair, a writable package or no package, and every restore the pair could not take (a base whose pair cannot be ensured, a base with no version, an `email_template` locale the base does not ship).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/connector-mcp': minor
3+
'@objectstack/lint': patch
4+
---
5+
6+
Clause-②: yes (widening)
7+
Metadata-protocol: added
8+
9+
`provider: 'mcp'`: a stdio MCP server can now take its credential from the secrets layer instead of a literal in `transport.env`. Declare the instance's `auth` with a `credentialRef` as for an http server, and name the environment variable the server reads in the new `providerConfig.transport.credentialEnv` key: the host resolves the reference (environment, Setup → Connector credentials, the host's resolver) and the provider hands the resolved secret (the `bearer` token, the `api-key` key, or the `basic` password) to the child in that variable. The value is never stored, logged, served on a metadata read or put in a message; a reference that resolves to nothing degrades the instance naming the reference and the server is not started.
10+
11+
```ts
12+
providerConfig: { transport: { kind: 'stdio', command: 'repo-mcp-server', credentialEnv: 'REPO_MCP_TOKEN' } },
13+
auth: { type: 'bearer', credentialRef: 'REPO_MCP_TOKEN' },
14+
```
15+
16+
Refused at materialization as configuration faults (a failed boot for the host's own entry): a `credentialEnv` that is not an environment-variable name, one on an `http` transport, one with no `bearer` / `api-key` / `basic` `auth`, and one naming a variable `transport.env` also sets. A stdio transport that names no `credentialEnv` is unchanged: it does not apply `auth`.
17+
18+
`@objectstack/lint`: the `connector-credential-literal` advisory's finding for a credential literal in `transport.env` now steers to this route (`auth.credentialRef` with `transport.credentialEnv`) instead of telling the author to move to an http transport.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql)!: a number or a boolean written to a select, radio, multiselect, checkboxes or tags field is stored as the option code string the validator judged, and any object value is refused
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) No metadata key, value or type moves, and no export or type changes: the write door now stores the string the record validator already judged a number or boolean by on an option field, and the option arms refuse every object rather than only a plain one. The narrowed faces are runtime answers to a data write (a second write that the stored value now collides with on a unique option field, and a Date, Map or class instance now refused), not anything an author wrote, so there is nothing for objectstack migrate meta to rewrite and no tombstone. Rows already stored are not rewritten by this change, so no stored-row migration is prescribed either. -->
11+
12+
**BREAKING** for two cases. (1) A `unique` option field. FROM: `{ code: 3 }` and then `{ code: "3" }` (or `true` and then `"true"`) both answered `201` and stored two rows, on driver-memory and on SQLite. TO: both writes store `"3"`, so the second one is refused `409`. The fix for a caller that hits it: the two writes are the same option; send the code once, or update the existing row. In the other direction, SQLite used to refuse `true` after `1` (both were stored as `"1.0"`); both now land as two different strings (`"true"` and `"1"`). (2) An object that is not a plain object. FROM: a `Date`, a `Map`, a `Set` or a class instance written to a single-value `select` / `radio` with no `options` was stored as sent (SQLite as its epoch or JSON text), and as an element of a `multiple: true` select, `multiselect`, `checkboxes` or `tags` array it was stored as its JSON form (a `Date` as its ISO text, a `Map` as `{}`). TO: each is refused `400 VALIDATION_FAILED` with the field's `invalid_type` ("expected one option value, received an object", or "expected an array of option values, received an element that is an object"), the sentence a plain object already got. On a select whose declared `options` do not include it, such an object used to answer `invalid_option` and now answers `invalid_type`, because its shape is wrong before its membership is. The fix: send the option code string itself.
13+
14+
The spec's stored value for an option field is an option code, a string, or an array of them, and the record validator judges a number or a boolean there by its string reading: `3` is checked against the declared options as `"3"`, `true` as `"true"`. The write used to carry the raw scalar to the driver, so the stored value depended on the driver: driver-memory stored and read back the number `3` and the boolean `true`, SQLite stored the TEXT `"3.0"` and `"1.0"`, and a multi-value field stored `[3]` on both. The write door now writes the judged string into the payload, beside the same rewrite on text-family fields: on insert, insertMany, update by id, update by predicate and the `validate()` dry run, and per element on a multi-value option field (a lone `3` there is stored as `["3"]`).
15+
16+
What you will see: an option column now stores and reads back `"3"` and `"true"` where it held `3`, `true`, `"3.0"` or `"1.0"`, and `["3"]` where it held `[3]`. A number or boolean write is answered as before: the same payloads are admitted and refused, and a declared code `"3"` still admits `3`. Hooks, formulas and flows now see the string. A filter that compares an option field to the number `3` (or to a boolean) no longer matches a row written as `3`, because that row is now stored as `"3"`: filter with the string. The filter side is tracked separately. Rows already stored are not rewritten, so an old SQLite `"3.0"` row or a raw `3` in a driver-memory store with `persistence` enabled keeps reading as it is and does not collide with a new `"3"`. Unchanged: strings, `null`, missing keys, plain objects and arrays on a single-value field (refused), option membership, and every field outside the option and text families.
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+
fix(spec): a served object keeps a field label and option labels that diverged from the packaged field, instead of overwriting them with the catalog
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`translateObject` (and so `translateMetadataDocument('object', …)`, which the REST `/meta` reads call) wrote the catalog's field `label` and option labels over every served field. A published object extension's `fieldPatches` label (ADR-0146 D10) was therefore served only by `GET /meta/object/:name/layers`; the read naming no package, the read naming the base and the list read all served the shipped label.
11+
12+
The two slots now follow the rule the field's `description`, `inlineHelpText` and `inlineTitle` and the object's own `label`, `pluralLabel` and `description` already follow (ADR-0029 D9.2a): the catalog applies only while the served value still equals the same field's, or the same option's, in the packaged base. With no packaged base the catalog applies as before. A picklist-bound field's options are the list's and keep the list's translations. A field the packaged base does not declare keeps its own label, as its other slots already did.
13+
14+
Side effect: a tenant overlay's rename of a field label, or of an option label, is now served over the catalog as well, the same way an object rename has been.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/react': patch
3+
'@object-ui/app-shell': patch
4+
'@objectstack/spec': patch
5+
---
6+
7+
fix(console): a record opens the record page scoped to the app it is opened in (`PageSchema.apps`)
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A record page that names apps in `apps` now opens for its object inside those apps: in the Duly app a user record opens Duly's own `sys_user` page, while Setup → Users still opens the platform's `sys_user_detail`. Everywhere else, and wherever no page names `apps`, the object's `isDefault` record page opens exactly as before.
13+
14+
- `usePageAssignment` (`@object-ui/react`) now reads its existing `app` option, which names the owning app by its name (`AppSchema.name`): the record page whose `apps` lists that app opens before the object's default record page. The option's type is unchanged; it was reserved and read by nothing until now. Pass the app's name, never a route segment.
15+
- The console's record view resolves the route's app segment to its app (package id first, then name) and passes the app's name, on the record route and in the record drawer. Where a package ships two apps, its package-id segment opens the first app, so the second app's scoped page opens under that app's name segment.
16+
- The record route's object scope picks the same page, so the route reads the objects of the page it renders.
17+
- `@objectstack/spec`: the `PageSchema.apps` description drops its "planned, not yet rendered" marker, and the key's liveness verdict is now live, citing the console reader.

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,23 +3885,56 @@ jobs:
38853885
# paths relative to ui/, the vitest root, passed as positionals with no
38863886
# `--`, the only spelling ui/scripts/vitest-invocation-guard.mjs admits.
38873887
#
3888-
# objectui's full-battery runs also pass its per-file timings reporter
3889-
# and upload the result for the weekly dataset refresh. Both belong to
3890-
# that refresh workflow, which is in the governance-workflow audit
3891-
# (sub-issue 4 of the epic); until it is ported the committed dataset
3892-
# is what the sequencer reads.
3888+
# THE PER-FILE TIMINGS (objectstack#29517). The whole suite also passes
3889+
# ui/scripts/test-file-timings.mjs, the per-file timings reporter, beside
3890+
# the two reporters it would otherwise displace. It writes this shard's
3891+
# report to $OBJECTUI_TEST_TIMINGS_OUT, and the step after this one
3892+
# uploads it on the full battery's events as `test-file-timings-N`.
3893+
# .github/workflows/ui-test-timings-refresh.yml merges those reports
3894+
# weekly into ui/scripts/test-shard-timings.json, the dataset the shard
3895+
# sequencer splits on. Report-only, by ruling: the reporter never throws
3896+
# into vitest (a failure is one stderr line and no report), and nothing
3897+
# here or there grades a duration. The affected speed passes no reporter:
3898+
# a slice of the suite is not a measurement of it.
3899+
# ui/scripts/__tests__/test-file-timings.test.ts holds this step, the
3900+
# upload and the refresh's `--shards` to the names that script spells.
3901+
# The reporter is spelled from the workspace root, never `./scripts/…`
3902+
# relative to ui/: the root's workflow readers (check-self-test-wired)
3903+
# key a `./scripts/` path to the ROOT `scripts/`, where it is not.
38933904
- name: Run the ui tests (shard ${{ matrix.shard }}/16)
38943905
env:
38953906
MODE: ${{ steps.select.outputs.mode }}
3907+
OBJECTUI_TEST_TIMINGS_OUT: ${{ runner.temp }}/test-file-timings/shard-${{ matrix.shard }}.json
38963908
run: |
38973909
if [ "$MODE" = 'affected' ]; then
38983910
mapfile -t filters < "$RUNNER_TEMP/affected-tests.txt"
38993911
echo "Affected speed: ${#filters[@]} vitest filter(s), shard ${{ matrix.shard }} of 16."
39003912
pnpm --dir ui exec vitest run --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions "${filters[@]}"
39013913
else
3902-
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions
3914+
pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions --reporter="${GITHUB_WORKSPACE}/ui/scripts/test-file-timings.mjs"
39033915
fi
39043916
3917+
# Diagnostics only, so it can never red a shard: `continue-on-error`, and
3918+
# a missing report is a warning, not an error (the refresh's selector
3919+
# then skips this run by name). Uploaded on the full battery's events
3920+
# only, the deny-list of THE TWO SPEEDS above `jobs:`; a pull request that
3921+
# failed open to the whole suite writes a report and uploads nothing.
3922+
# `overwrite: true` so a re-run shard replaces its report, as the
3923+
# shard-attestation uploads do. The refresh reads only the newest
3924+
# completed `push` / `schedule` runs of this workflow on `main`, as many
3925+
# as its selector's own cap examines, so the retention below is
3926+
# deliberately more than that window needs; it is not a measurement of it.
3927+
- name: Publish this shard's per-file test timings
3928+
if: ${{ always() && github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
3929+
continue-on-error: true
3930+
uses: actions/upload-artifact@v7
3931+
with:
3932+
name: test-file-timings-${{ matrix.shard }}
3933+
path: ${{ runner.temp }}/test-file-timings/
3934+
if-no-files-found: warn
3935+
retention-days: ${{ github.event_name == 'schedule' && 7 || 2 }}
3936+
overwrite: true
3937+
39053938
test-ui-gate:
39063939
# Stable required-check name for the sharded Test UI matrix (#26460, ruling
39073940
# A, comment 6435318516), in test-gate's shape and for test-gate's reason

0 commit comments

Comments
 (0)