You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5e6d804
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): more of objectstack-automation's self-contained examples are type-checked by `check:skill-examples`
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Six more fenced TypeScript blocks in `skills/objectstack-automation/` carry the opt-in check marker, so 9 of its 19 are now compiled against the spec. In `SKILL.md` the `notify` node is typed `FlowNode` (`@objectstack/spec/automation`). In `references/examples-flows.md` the time-relative sweep is wrapped in `defineFlow`. In `references/state-machines-and-approvals.md` the `state_machine` rule is typed `StateMachineValidation` (`@objectstack/spec/data`) and the discount approval flow is wrapped in `defineFlow` with `cel` imported. In `references/integration-recipes.md` recipes 4 and 5 import `defineFlow` / `defineConnector` from `@objectstack/spec`. No example was wrong. Of the ten left unmarked, the trigger start node in `SKILL.md` and recipes 1 to 3 in `references/integration-recipes.md` compile with a wrapper but do not fit their file's token ceiling; the rest are fragments, or, for two `SKILL.md` blocks, fences indented inside a list item, which the check does not read. The marks are paid inside each file by removing restatements whose rule lives on elsewhere in the skill; every cross-reference stays, and no rule's teaching changes.
docs(skills): objectstack-automation says how a `subflow` / `map` child flow name resolves, and when it is refused
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The `subflow` and `map` rows of `skills/objectstack-automation/SKILL.md` now teach the engine's bare-name rule for `config.flowName` (ADR-0150 D3): a package's flow reaches its own package's flow, else the one holder in its declared `dependencies` closure plus `sys` packages; a package-less flow reaches the environment's flow, else the one package holder. Anything else passes `os validate` and fails the node at run time with the resolver's sentence naming every candidate and no error code: `outside-closure` (only an undeclared package or an environment-authored flow holds the name), `ambiguous-in-closure` / `ambiguous-in-environment` (two packages hold it; only a clash older than install's one-holder refusal, and such a name is never armed). A `map` fails at its first item. The automation evals gain a case that declares the dependency on the child flow's package.
11
+
12
+
Paid for by nine restatements cut from the same file, each keeping its other home:
13
+
14
+
1. The `screen` row's "never hand-roll a button label or step counter into `fields`": the same cell's "Next / Submit and Step N of M are not authored".
15
+
2. The `script` example's "function returns values → outputVariable → update_record persists" comment: the prose sentence above it.
16
+
3. The "CEL values or literals" comment on `script``inputs`: Valid-but-silently-wrong #1, which lists `script``inputs.*` as a value slot.
17
+
4. "Do not remove `readonly` instead": objectstack-data's `readonly` bullet ("not by removing `readonly`").
6. "never a reason to write code" in Integrations: the same paragraph's "Never a plugin" and "the app still writing none".
20
+
7. References' "Read the source for exact field shapes; never rely on memory": `references/_index.md` ("Read them directly from `node_modules`").
21
+
8. "hooks get `ctx.api`": the hook `runAs` paragraph ("that hook's `ctx.api` data operations").
22
+
9. When to Use's "(auto-launched, screen, scheduled)" and "record-change": the Flow Types table and the frontmatter description.
23
+
24
+
The remaining 41 tokens move the file's ceiling 6527 -> 6568 under the standing ruling 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B), pinned at the measurement.
feat(plugin-audit): an API key or OAuth access token admitting a request leaves a `credential_use` row in `sys_audit_log`, once per credential per use window
7
+
8
+
Clause-②: yes (widening)
9
+
Metadata-protocol: none
10
+
11
+
Credential use left no ledger row naming the credential: the only trace was the credential's own last-use stamp. An audit export or SIEM stream had nothing to read for "which key or token acted as whom, and when".
12
+
13
+
-**`sys_audit_log.action` gains `credential_use`** (`@objectstack/plugin-audit`). One row per credential per use window, written when the credential's own throttled use stamp lands: `sys_api_key.last_used_at` (the shared key-admission seam, at most once per key per hour, so every door that admits a key counts: REST, the runtime dispatcher and its `/mcp` face, the stdio MCP transport, the storage doors) and `sys_oauth_consent.last_used_at` (an OAuth access token's use on the `/mcp` door, at most once per consent per clock hour). No new timer: a second use inside the window writes no row.
14
+
-**The row** names the credential's owner (`user_id`, `actor`), the credential row (`object_name` / `record_id`), the organization it is bound to (`tenant_id`, or none), and in `metadata` the `credential_kind` (`api_key` / `oauth_access_token`), the `credential_id`, the window start (`used_at`) and, for a token, the `client_id`. It never carries a key, a token, a key hash or a key prefix.
15
+
-**A `skip_consent` OAuth client** (`@objectstack/plugin-auth`) has no consent row to stamp. Its use is handed to the new `audit` slot member `recordCredentialUse` from the same stamp point and under the same throttle (at most once per client, user and organization per clock hour in each process); the row names the client's `sys_oauth_application` row.
16
+
-**Not yet on the row:** the source address and the user agent (`ip_address` / `user_agent` are null). Neither stamp point holds them; they follow in a separate change.
17
+
18
+
Nothing about which credentials are admitted changes. To read the rows: filter `sys_audit_log` on `action = 'credential_use'`.
An in-environment marketplace install can name the package version to install. `POST /api/v1/cloud-connection/install` now accepts `version` and forwards it to the control plane's install action, which installs that version or refuses it as it does today. Leaving `version` out still installs the latest version, and the request sent to the control plane is unchanged.
9
+
10
+
A `version` that is not a SemVer 2.0.0 string (for example `latest`, `1.2` or `^1.2.3`) is refused with `400 INVALID_REQUEST` before anything is sent.
fix(lint, service-automation): `os validate` warns when a mapping's `connectorSource.connector` is not a declared rest or openapi connector, and a failed connector pull logs one `warn` line
7
+
8
+
Clause-②: no
9
+
Metadata-protocol: none
10
+
11
+
A mapping whose `connectorSource.connector` named a datasource, a connector of another provider, or nothing at all validated with no finding, and every scheduled pull then failed into the job run's `error` with nothing in the process log. `os validate`, `os lint` and `os build` now report `mapping-connector-source-unknown` (a warning; it says when the name is a datasource), and `@objectstack/lint` exports `validateMappingConnectorSources`, `MAPPING_CONNECTOR_SOURCE_UNKNOWN`, `CONNECTOR_SOURCE_PROVIDERS` and the `MappingConnectorSourceFinding` type. The connector pull (`pullConnectorSource`) logs `[Automation] connector pull of mapping "NAME" failed (REASON): …` at `warn` on every failed pull and rethrows the failure unchanged; the job run's `error` is written as before.
docs(skills): objectstack-data `security.md` teaches how a package's position resolves the permission sets it names
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
`skills/objectstack-data/rules/security.md`, section "Positions grant only what they name", now states the rule the security catalog enforces since ADR-0150 E3: a package's position reads each `permissionSets` name as its own package's set, else the one holder in its declared `dependencies` closure plus `sys`. Otherwise the name is refused. Two refusals are taught, each with an example: `outside-closure` (only a package the position's package does not depend on holds the set, or only the environment does, such as a set authored in Setup) and `ambiguous-in-closure` (two holders it reaches; a second package shipping a set name is already refused at install). A refused name still loads; the boot's catalog reference report logs it with every candidate, and the position grants nothing through that name while its other sets still grant. Stored grants, environment-authored positions, administrator overlays of a package position and the `everyone`/`guest` anchors still resolve across the whole environment. `evals/hooks-security-seeds-datasources.json` gains case 19, which requires the position's `permissionSets` entry plus a manifest `dependencies` entry on the set's package and refuses redeclaring the set in the position's package.
11
+
12
+
The file sat 16 bytes under its token ceiling. One restatement is cut in the same file: the `secret` paragraph's "**Fail-closed:** with no crypto provider, writes throw rather than persist cleartext." (86 B), which survives as "fail-closed (ADR-0100)" in the `secret` row of `rules/field-types.md`. The remainder raises the ceiling under standing ruling 6513306068, letter B: 「A:先削重复,余额按实测提高」. The file goes from 15056 to 15834 bytes, and the ceiling from 3768 to 3959 tokens, pinned at the measurement.
fix(cloud-connection): a catalog list query the public marketplace snapshot cannot evaluate is answered by the cloud
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
With `OS_MARKETPLACE_PUBLIC_BASE_URL` set, the marketplace proxy answers `GET /api/v1/marketplace/packages` from the public snapshot and filters and pages it itself. It evaluates `q`, `limit`, `offset`, `maturity` and the `businessFunctions`, `industries` and `solutionTypes` facets, and it used to ignore every other key: a `?languages=zh-CN` read answered the whole catalog with 200 (or, with `limit`/`offset`, a page filtered by everything except the languages), and the cloud's facet counts were dropped from the re-serialized page. Nothing told that answer apart from a filtered one.
11
+
12
+
A list request that carries any key the snapshot does not evaluate now takes the cloud path, which receives the query string verbatim: the same answer, counts included, as a runtime without the snapshot configured. Requests made only of the keys above are still answered from the snapshot. Nothing to do on upgrade; a `languages` read on such a runtime now needs the cloud to be reachable, and answers the existing `502 MARKETPLACE_PROXY_FAILED` when it is not.
fix(service-job): a scheduled fire renews its cluster lease while it runs, so a long job no longer starts on a second node
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
A scheduled fire takes the cluster lock `job:NAME` with a 60-second lease (`leaseMs`) and used to never renew it. On a deployment with several nodes, a run that outlasted the lease freed the key while still running, and another node's next tick took it and started the same job, so a large sync or report ran on two nodes at once.
11
+
12
+
`CronJobAdapter` now renews the handle it acquired every `leaseMs / 3` (20 s by default) while the handler runs, through the lock handle's own `renew()`, and stops renewing in the same `finally` that releases the lock. Nothing new is persisted: a node that dies stops renewing and the key frees itself on its lease as before. A run shorter than a third of the lease is never renewed, and `once` jobs behave as before.
13
+
14
+
If a renewal fails, the run is not cancelled. The adapter logs one `warn` per failure naming the job and the error. While the handle still reports it holds the lock, the next heartbeat tries again; once the lease is lost, renewal stops for that run, and another node's next tick may take the key and start the job there too. The in-process latch from the previous fix still keeps this node from overlapping itself.
Copy file name to clipboardExpand all lines: content/docs/permissions/tenant-audit-census.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ are reported as `undecidable` rather than assumed either way.
132
132
133
133
The same holds twice over for the context. An options argument spelled as a
134
134
literal can be read; one spelled `options`, `{ ...opts }`, or handed through a
135
-
forwarding shim cannot, and **57 of the 276 sites are spelled that way**. A
135
+
forwarding shim cannot, and **57 of the 277 sites are spelled that way**. A
136
136
context resolved from an inline literal or a local `const` can be tested for
137
137
`isSystem`; one arriving from a helper call cannot.
138
138
@@ -197,10 +197,10 @@ reproduce them. Where it disagrees, it disagrees on the page:
197
197
198
198
| carried figure | where it survives | this census |
199
199
| :--- | :--- | ---: |
200
-
| 175 write call sites | quoted in the merged changeset |**276**|
200
+
| 175 write call sites | quoted in the merged changeset |**277**|
201
201
| 24 carrying no tenant context | quoted in the merged changeset |**3** provable and tenancy-enabled; **30** more whose options argument is unreadable |
202
-
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card |**196 of 276** decidable, **80** undecidable |
203
-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration**|**not reproduced**: 153 decidably elevated, 0 decidably not, 113 undecidable |
202
+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card |**197 of 277** decidable, **80** undecidable |
203
+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration**|**not reproduced**: 154 decidably elevated, 0 decidably not, 113 undecidable |
204
204
| 141 and 132, two independent re-derivations | the card that filed this work | — |
205
205
206
206
**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.
217
217
218
218
The fourth row is the one worth flagging to anyone citing it. **The 135 / 77%
219
219
figure has no surviving corroboration anywhere in the tree.** This census reads
220
-
153 of 276 (55%) as decidably elevated, with 113 more whose elevation is a
220
+
154 of 277 (56%) as decidably elevated, with 113 more whose elevation is a
221
221
run-time fact — so the claim is neither confirmed nor refuted, and the honest
222
222
answer is that a static reading cannot settle it.
223
223
224
-
⇒ **Cite `3 / 276`, and say what it is**: the sites whose options argument was
224
+
⇒ **Cite `3 / 277`, and say what it is**: the sites whose options argument was
225
225
READ and holds no tenant context, against a decidably tenancy-enabled object.
226
226
That is the control's provable yield surface. ⛔ Do not cite it as "the sites
227
227
without tenant context" — **30 further sites** have an options argument this
@@ -233,28 +233,28 @@ cannot read, and they are neither in nor out.
233
233
234
234
| what | count |
235
235
| :--- | ---: |
236
-
| write call sites on the application surface |**276**|
237
-
| …whose object name is statically decidable |196|
236
+
| write call sites on the application surface |**277**|
237
+
| …whose object name is statically decidable |197|
238
238
| …whose object name is chosen at run time | 80 |
239
-
| …against an object with tenancy ENABLED |190|
239
+
| …against an object with tenancy ENABLED |191|
240
240
| …against an object that declares tenancy off | 6 |
241
-
| threading a tenant context |209|
241
+
| threading a tenant context |210|
242
242
| PROVABLY carrying none (options read, no context key) |**10**|
243
243
| …of those, against a decidably tenancy-enabled object |**3**|
244
244
| options argument UNREADABLE — may or may not carry one | 57 |
245
245
| …of those, against a decidably tenancy-enabled object | 30 |
246
-
| threading a decidably ELEVATED (`isSystem`) context |153|
246
+
| threading a decidably ELEVATED (`isSystem`) context |154|
247
247
| threading a context that is decidably NOT elevated | 0 |
248
248
| threading a context whose elevation is a run-time fact | 113 |
249
249
250
250
| how the instrument reached the site | count |
251
251
| :--- | ---: |
252
-
| receiver carried a readable engine type |214|
252
+
| receiver carried a readable engine type |215|
253
253
| receiver erased, placed by the object NAME | 52 |
254
254
| receiver erased, placed by an `object: string` PARAMETER | 5 |
255
255
| receiver erased, placed by an `UNTYPED_RECEIVERS` row | 5 |
256
256
257
-
| object name spelled inline |124|
257
+
| object name spelled inline |125|
258
258
| object name spelled through a `const`| 72 |
259
259
| object name is an `object: string` parameter | 7 |
260
260
| object name is some other run-time expression | 73 |
@@ -307,13 +307,13 @@ holds still. They are required to be HERE and to say WHEN they were true;
307
307
their values are not compared. The reasoning, and the measurement behind it,
0 commit comments