Skip to content

Commit 6ccf9e1

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-27377-w3-accuracy-s1
2 parents 98d9cc2 + 3fd8033 commit 6ccf9e1

64 files changed

Lines changed: 2420 additions & 128 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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/rest': patch
3+
'@objectstack/plugin-hono-server': patch
4+
'@objectstack/cloud-connection': patch
5+
'@objectstack/types': patch
6+
---
7+
8+
feat(rest,plugin-hono-server,cloud-connection): metadata lists, the uncached item reads, `runtime/config` and `auth/me/localization` answer an `ETag` and `304`; every timed response carries `db`, `meta` and `total`
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
The Console's first reads on every load sent no validator, so each one was a full download every time. Measured against HotCRM on `main`, none of these sent an `ETag`, a `Cache-Control` or a `304`: `GET /runtime/config`, `GET /auth/me/localization`, the type list (`GET /meta`, `GET /meta/types`), every `GET /meta/:type` list, and the item reads the shared item cache never serves (`GET /meta/app/:name`, `/meta/dashboard/:name`, `/meta/doc/:name`, `/meta/book/:name`, and drafts, `?package=` and member-scoped reads). Each of them now answers:
14+
15+
- **`ETag`**: a weak validator (`W/"…"`) that hashes the body actually served, after every per-caller step (read gates, the app filter, the field mask, the translation, the host's environment). Two callers whose permissions change what they see get different validators, and one caller's validator never answers `304` for another caller's body.
16+
- **`Cache-Control: private, no-cache`**: the browser keeps the body and revalidates it on every use, so a publish, a permission change or a language switch shows on the next read. No shared cache stores it. A schema served under an undetermined field visibility keeps `private, no-store` and gets no validator.
17+
- **`304 Not Modified`**, with no body, when `If-None-Match` names the current validator.
18+
19+
`metadata.enableCache: false` still switches the `/meta` validators off, as its description says ("Enable HTTP cache headers").
20+
21+
`Server-Timing` (still opt-in: `OS_SERVER_TIMING=true`, or an admin's `X-OS-Debug-Timing: 1`):
22+
23+
- Every timed response carries `db` and `meta` beside `total`. A request that ran no SQL or read no metadata says so with a zero member (`db;dur=0;desc="0 queries"`), so "nothing spent there" no longer reads like "not measured".
24+
- The `/meta` routes count each metadata read into `meta` (`meta;dur=…;desc="N reads"`).
25+
- `GET /runtime/config` now opens the timing gate for an admin who sends `X-OS-Debug-Timing`. It resolves the caller only when that header is sent; the payload never depends on who asked.
26+
27+
`@objectstack/types` exports the rule the three packages share: `representationEtag(body)`, `ifNoneMatchHits(header, etag)` and `REVALIDATE_PRIVATE_CACHE_CONTROL`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/core': minor
4+
'@objectstack/runtime': minor
5+
'@objectstack/plugin-audit': minor
6+
---
7+
8+
feat(spec,runtime,plugin-audit): an action run through MCP leaves an audit row naming its surface
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: added
12+
13+
The audit trail could not tell an action an agent ran over MCP from one a person clicked. Neither action door wrote a row for the invocation itself: the script branch printed a `[action-audit]` log line, the api, flow and declarative-update branches printed nothing, and the `sys_audit_log` rows for the action's own data writes do not say which door started it.
14+
15+
- **`ExecutionContext.surface`** (`@objectstack/spec`): `'rest' | 'mcp'`, optional. The door an action invocation came through. Set only by the two action doors, from the door's own identity, on the envelope of the invocation they record; never client-supplied, never read by authorization. `@objectstack/core` declares it a non-entry field (identity resolution does not produce it).
16+
- **One `action_invocation` row per invocation** (`@objectstack/plugin-audit`): the `audit` service slot gains `recordActionInvocation`, and `sys_audit_log.action` gains the value `action_invocation`. The row carries the caller (`user_id`, `actor`, `tenant_id`), the action's object and subject record, and in `metadata` the `surface`, `action_name`, `branch` (`script` / `api` / `flow` / `update`), `outcome`, the status and error code of a refusal, the `run_id` of a `resume_run`, and `performed_by` / `on_behalf_of` when an agent performed the call. No new column.
17+
- **Both doors write it on every branch** (`@objectstack/runtime`): REST `POST /actions/:object/:action` (`surface: 'rest'`) and the `/mcp` bridge's `run_action` / `resume_run` (`surface: 'mcp'`), for every call that cleared the door's admission gates, whether the branch then answered or refused. A call refused by an admission gate (not found, `ai.exposed`, the `requiredPermissions` gate, the activation switch, the param contract, the confirmation gate) ran nothing and writes no row. The `api` branch's row is written by the door after the forward answers, so it names the true door although the target re-authenticates the caller.
18+
19+
Nothing about which actions a door may run changes. The existing `[action-audit]` log line stays. To read the rows: filter `sys_audit_log` on `action = 'action_invocation'` and read `metadata.surface`.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the automation guide says a `connector_action` input is judged against the action's `inputSchema` before dispatch
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
This text shipped in PR #28170 (#28041 / #28162), which missed its `@objectstack/skills` changeset; this entry carries it.
11+
12+
- **`objectstack-automation/SKILL.md`**: once evaluated, a `connector_action`'s `connectorConfig.input` is judged against the action's `inputSchema` (`required`, `type`, `properties`, `items`) before dispatch, and a breach fails the step `VALIDATION_ERROR` (`fault`-routable) with nothing sent. `registerFlow` and `os validate` refuse a `{…}` template token at `connectorConfig.input.<key>`.
13+
- **`objectstack-automation/references/integration-recipes.md`**: a record value reaches the payload through a CEL envelope (`{ dialect: 'cel', source: 'record.<field>' }`), and the recipes say that envelope is judged against the `inputSchema`.
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 field-types guide teaches `homeAmount.rateDate` as a `date` or `datetime` field and lists all four `currencyConfig` keys
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **`objectstack-data/rules/field-types.md`**: the `homeAmount` paragraph says `rateDate` names a `date` or `datetime` field (it said `date` only; the spec accepts both). The Numbers table `currency` row lists `currencyConfig` as `currencyMode`, `defaultCurrency`, `currencyField` and `homeAmount` (it named the first two only).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the integration recipes say the connector `auth` union declares `oauth2` and `app-credential`, held degraded until a server runs the grant, and that `signed` signs `aliyun-acs3` and `tencentcloud-tc3` requests
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
This text shipped in PR #28290 (#28226), which carried a changeset for `@objectstack/lint` only and missed its `@objectstack/skills` one; this entry carries it.
11+
12+
- **`objectstack-automation/references/integration-recipes.md`**: an OAuth-protected vendor declares `oauth2` (`authorization_code` / `client_credentials`) or `app-credential` (`feishu` / `dingtalk` / `wecom`), but no server runs the grant yet, so the instance is held degraded and calls no upstream. `signed` on `openapi` / `rest` (scheme `aliyun-acs3-hmac-sha256` or `tencentcloud-tc3-hmac-sha256`, with a `keyId`) signs each request; an RSA-signing vendor (Alipay, WeChat Pay) stays blocked on the request-signing card.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/metadata': patch
3+
'@object-ui/cli': patch
4+
---
5+
6+
fix(deps): `glob` goes to `^14.0.3`, past the GHSA-3g3m-2fjr-6pw4 fix in 14.0.2 (#28292)
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`@objectstack/metadata` and `@object-ui/cli` declare `glob` as a runtime dependency, so a downstream install now resolves the patched 14 line instead of an affected `13.0.6`. The call sites use only `glob` / `globSync` with `cwd`, `ignore`, `nodir` and `absolute`, which 14 keeps unchanged, and the Node engine floor is the same. `@object-ui/cli` also drops `@types/glob`, a deprecated stub: `glob` ships its own types. No API, behaviour or export changes.

‎content/docs/api/metadata-api.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ List all registered metadata types.
2121

2222
**Response**: `{ types: ["object", "view", "plugin", ...] }`
2323

24+
The answer carries a weak `ETag` and `Cache-Control: private, no-cache`; send the
25+
`ETag` back as `If-None-Match` and an unchanged list answers **304** with no body.
26+
2427
### `GET /meta/:type`
2528

2629
List all items of a metadata type.
@@ -40,6 +43,13 @@ filtering to privileged apps, and the usual response shaping.
4043

4144
**Response**: `{ type: "object", items: [{ name: "account", ... }, ...] }`
4245

46+
The list carries a weak `ETag` and `Cache-Control: private, no-cache`, and
47+
`If-None-Match` with the current `ETag` answers **304** with no body. The `ETag`
48+
hashes the list this caller was served, after the audience and RBAC filtering
49+
above, so two callers who see different items hold different tags and one
50+
caller's tag never revalidates another caller's list. Keep the response in the
51+
client only: `private` means no shared cache may store it.
52+
4353
### `GET /meta/:type/:name`
4454

4555
Get a specific metadata item with optional ETag caching.

‎content/docs/permissions/tenant-audit-census.mdx‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ are reported as `undecidable` rather than assumed either way.
132132

133133
The same holds twice over for the context. An options argument spelled as a
134134
literal can be read; one spelled `options`, `{ ...opts }`, or handed through a
135-
forwarding shim cannot, and **51 of the 251 sites are spelled that way**. A
135+
forwarding shim cannot, and **51 of the 252 sites are spelled that way**. A
136136
context resolved from an inline literal or a local `const` can be tested for
137137
`isSystem`; one arriving from a helper call cannot.
138138

@@ -197,10 +197,10 @@ reproduce them. Where it disagrees, it disagrees on the page:
197197

198198
| carried figure | where it survives | this census |
199199
| :--- | :--- | ---: |
200-
| 175 write call sites | quoted in the merged changeset | **251** |
200+
| 175 write call sites | quoted in the merged changeset | **252** |
201201
| 24 carrying no tenant context | quoted in the merged changeset | **2** provable and tenancy-enabled; **29** more whose options argument is unreadable |
202-
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **173 of 251** decidable, **78** undecidable |
203-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 144 decidably elevated, 0 decidably not, 99 undecidable |
202+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **174 of 252** decidable, **78** undecidable |
203+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 145 decidably elevated, 0 decidably not, 99 undecidable |
204204
| 141 and 132, two independent re-derivations | the card that filed this work | — |
205205

206206
**The differences are not reconciled, and deliberately so.** The old census's
@@ -217,11 +217,11 @@ would report a smaller number and would not say so.
217217

218218
The fourth row is the one worth flagging to anyone citing it. **The 135 / 77%
219219
figure has no surviving corroboration anywhere in the tree.** This census reads
220-
144 of 251 (57%) as decidably elevated, with 99 more whose elevation is a
220+
145 of 252 (57%) as decidably elevated, with 99 more whose elevation is a
221221
run-time fact — so the claim is neither confirmed nor refuted, and the honest
222222
answer is that a static reading cannot settle it.
223223

224-
⇒ **Cite `2 / 251`, and say what it is**: the sites whose options argument was
224+
⇒ **Cite `2 / 252`, and say what it is**: the sites whose options argument was
225225
READ and holds no tenant context, against a decidably tenancy-enabled object.
226226
That is the control's provable yield surface. ⛔ Do not cite it as "the sites
227227
without tenant context" — **29 further sites** have an options argument this
@@ -233,28 +233,28 @@ cannot read, and they are neither in nor out.
233233

234234
| what | count |
235235
| :--- | ---: |
236-
| write call sites on the application surface | **251** |
237-
| …whose object name is statically decidable | 173 |
236+
| write call sites on the application surface | **252** |
237+
| …whose object name is statically decidable | 174 |
238238
| …whose object name is chosen at run time | 78 |
239-
| …against an object with tenancy ENABLED | 172 |
239+
| …against an object with tenancy ENABLED | 173 |
240240
| …against an object that declares tenancy off | 1 |
241-
| threading a tenant context | 192 |
241+
| threading a tenant context | 193 |
242242
| PROVABLY carrying none (options read, no context key) | **8** |
243243
| …of those, against a decidably tenancy-enabled object | **2** |
244244
| options argument UNREADABLE — may or may not carry one | 51 |
245245
| …of those, against a decidably tenancy-enabled object | 29 |
246-
| threading a decidably ELEVATED (`isSystem`) context | 144 |
246+
| threading a decidably ELEVATED (`isSystem`) context | 145 |
247247
| threading a context that is decidably NOT elevated | 0 |
248248
| threading a context whose elevation is a run-time fact | 99 |
249249

250250
| how the instrument reached the site | count |
251251
| :--- | ---: |
252-
| receiver carried a readable engine type | 189 |
252+
| receiver carried a readable engine type | 190 |
253253
| receiver erased, placed by the object NAME | 52 |
254254
| receiver erased, placed by an `object: string` PARAMETER | 5 |
255255
| receiver erased, placed by an `UNTYPED_RECEIVERS` row | 5 |
256256

257-
| object name spelled inline | 115 |
257+
| object name spelled inline | 116 |
258258
| object name spelled through a `const` | 58 |
259259
| object name is an `object: string` parameter | 7 |
260260
| object name is some other run-time expression | 71 |
@@ -307,13 +307,13 @@ holds still. They are required to be HERE and to say WHEN they were true;
307307
their values are not compared. The reasoning, and the measurement behind it,
308308
are in `scripts/check-tenant-audit-census.mjs`.
309309

310-
Measured on 2026-10-29 at `07b65dd40`.
310+
Measured on 2026-10-30 at `26e3fb296`.
311311

312312
| corpus scale (not enforced) | count |
313313
| :--- | ---: |
314-
| tracked non-test sources scanned | 801 |
314+
| tracked non-test sources scanned | 813 |
315315
| engine-shaped types recognised | 95 |
316-
| declared objects in the registry | 122 |
317-
| same-named calls subtracted as non-engine | 185 |
316+
| declared objects in the registry | 123 |
317+
| same-named calls subtracted as non-engine | 190 |
318318

319319
{/* END GENERATED: tenant-audit-census */}

0 commit comments

Comments
 (0)