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 645c951
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec): a `map` settings specifier for keyed rows; the data lifecycle retention overrides, row quotas and per-class quota defaults use it, and both settings doors judge them
8
+
9
+
Clause-②: yes (widening) — `SpecifierType` gains a member; the save and env doors also start refusing malformed values for the three keys (a narrowing on values that never took effect, named in the PR's BREAKING note)
10
+
Metadata-protocol: added — a package author can now declare a `map` specifier in a settings manifest (a new accepted value of `SpecifierType`)
11
+
12
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is removed, renamed or re-shaped: `SpecifierType` gains `map` and `Specifier` gains the optional `keyColumn` and `columns`. The three lifecycle keys keep their stored shape, their env variable names and their cascade. What narrows is the set of values the settings doors accept for those three keys: a stored value is runtime state in `sys_setting` / `sys_platform_setting` and an `OS_LIFECYCLE_*` override is a deployment's environment, so there is nothing for a migration to rewrite, and every refused value is one the sweep never applied. -->
13
+
14
+
**New: the `map` specifier** (`@objectstack/spec`, ADR-0007 as amended 2026-11-08). A setting whose value is keyed rows declares `type: 'map'` with a `keyColumn` (its header) and `columns` (`{ name, label, kind }`, `kind` is `duration` or `positive_integer`). One value column stores `Record<key, value>`; several store `Record<key, { [column]: value }>`. The keys a map admits are served at run time by an option source the settings service registers for the key, never listed in the manifest. `json` stays for raw config.
15
+
16
+
**`lifecycle.retention_overrides`, `lifecycle.quotas` and `lifecycle.quota_defaults` are `map` specifiers** (`@objectstack/objectql`). Stored values, `OS_LIFECYCLE_*` names and the env, global, organization cascade are unchanged, and the sweep reads the same shapes. Their keys are served from the running system: the objects that declare a lifecycle class other than `record` for the first two, the lifecycle classes other than `record` for `quota_defaults`.
17
+
18
+
**BREAKING** accept-set narrowing at the settings doors (`@objectstack/service-settings`), for those three keys only.
19
+
20
+
-**Before.**`PUT /api/settings/lifecycle` and `OS_LIFECYCLE_*` accepted any object under them: a misspelt object (`sys_audit_logs`), a quota written as text (`"1e6"`) or zero, a window written as `30 days`, a column misspelt (`max_age`). Each was stored, answered "saved", and the sweep silently applied nothing for it.
21
+
-**Now.** The save door refuses such a value with `400 SETTINGS_VALIDATION` and one field error for the key, which names the entry and the expected form: `invalid_option` for a key the running system does not have, `invalid_shape` for a cell that is not a duration such as `7y` or a whole number above 0, `unknown_field` for a property no column declares, `invalid_type` for a value that is not an object (JSON text included). The env door rejects such an override with one `error` line, and the key resolves from the next layer of the cascade. A value already stored is not judged until a save touches its key.
22
+
-**Who moves.** Nobody whose values took effect. A script or a deployment that wrote one of the refused values was configuring nothing; the refusal now says so. Durations take `h`, `d`, `w` or `y` (`90d`, `7y`), quotas a whole number above 0, and keys are the object names (or classes) the refusal lists.
23
+
24
+
**The remedy.** Send keys the deployment has and cells in their column's form: `{ "quotas": { "sys_audit_log": 1000000 } }`, `{ "retention_overrides": { "sys_job_run": { "maxAge": "90d" } } }`; for an override, `OS_LIFECYCLE_QUOTAS='{"sys_audit_log":1000000}'`.
25
+
26
+
**The console.** Until its `map` control lands (a separate change), Setup → Data Lifecycle draws these three keys as an unsupported specifier type; env overrides and the API are unaffected.
docs(skills): objectstack-automation carries the flow-authoring judgment the hosted build agent learned — option values in conditions and writes, a named hour with its time zone, who an approval-outcome cascade runs as
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
Card 1 of the cloud#3659 ruling A split, the `objectstack-automation` port — the judgment the schema cannot express and the published skill did not yet state. `SKILL.md` § Valid-but-silently-wrong: a `select` is compared and written by its option `value`, never the label the request speaks, in the start `condition` and every `fields` / `filter` entry. `references/examples-flows.md`: a wall-clock hour the request names is written as said with its IANA `timezone` on the start node's `config.schedule`, never converted to UTC by hand (a bare expression runs in UTC and records no zone); the schedule example carries one. `references/state-machines-and-approvals.md`: a flow reacting to the mirrored `approvalStatusField` runs as the person who acted and stays `runAs: 'user'`; only the SLA auto-decision and the dead-run release carry no user, so a flow that must react to those declares `runAs: 'system'` — the hosted corpus's blanket "declare system" is corrected against the approval service on `main`. The same file's three Chinese glosses are gone: the shipped skill text is English-only. Three eval cases pin the teachings (flows-triggers-approvals 17–19).
fix(types): `POST /api/v1/actions` answers a driver error carrying a string code the way `/api/v1/data` does, as a server fault
6
+
7
+
Clause-②: no (a status and code correction on an error answer: a driver fault inside an action body moves from a 400 refusal to the 5xx fault `/data` already answers; no accepted input and no success shape changes)
8
+
Metadata-protocol: none
9
+
10
+
An action body that hit a driver error carrying its own string code (`SQLITE_BUSY`, `ECONNREFUSED`, `57P01`) and no HTTP status was answered by `POST /api/v1/actions/:object/:action` as a client refusal: `400 VALIDATION_ERROR`, the driver's text as the message, and the driver's code in `declaredCode`. `/api/v1/data` answers the same throw as a server fault. The MCP `run_action` and `resume_run` tools answer what `/actions` answers, so they moved with it.
11
+
12
+
| The action threw |`/actions` answered |`/actions` and `/data` now answer |
13
+
| --- | --- | --- |
14
+
|`{ code: 'SQLITE_BUSY', message: 'SQLITE_BUSY: database is locked' }`|`400`, `VALIDATION_ERROR`, the driver text, `declaredCode: 'SQLITE_BUSY'`|`500`, `DATABASE_ERROR`, `Internal data error`|
15
+
|`{ code: 'ECONNREFUSED', message: 'connect ECONNREFUSED 127.0.0.1:5432' }`|`400`, `VALIDATION_ERROR`, the driver text, `declaredCode: 'ECONNREFUSED'`|`500`, `INTERNAL_ERROR`, `Internal server error`|
16
+
17
+
The driver's code and text are logged on the server instead, as a `driver fault` line.
18
+
19
+
-**Which throws move.** A throw that declared no status and whose `code` is not a closed ADR-0112 code, and only when the `/data` door's classifier (`mapDataError`) answers it as a server fault. `actionsDoorAnswerOf` (`@objectstack/types`) asks that classifier for this case; it holds no copy of its reading.
20
+
-**Unchanged.** A closed code with no status (`RECORD_LOCKED`, `PERMISSION_DENIED`) is still the `400` refusal with that code. A bare `Error` is still `400 VALIDATION_ERROR` with its own sentence. A throw that declared its status keeps it, and an unregistered code beside it still rides `declaredCode`. A sandboxed action body's coded refusal (`code: 'CREDIT_LIMIT'` with no status) is still the `400` refusal with `declaredCode`, which is what `/data` answers for it.
21
+
-**Stated cost.** An in-process action handler that throws its own unregistered code with no status, which `/data` also answers as a fault, now gets the fault answer here too and loses the code (the 2026-08-27 ruling on #12509: the discriminator is the status channel). It keeps its code by declaring the status it means.
22
+
23
+
This supersedes the line in the `31271` changeset that says a driver string code answers `400 VALIDATION_ERROR` with `declaredCode` at `/actions` and that the difference from `/data` is not changed.
`objectstack-platform`: § Seed Data now names `ignore` as the seed `mode` default (`SeedMode` defaults to `ignore`, not `upsert`), and § `requires:` says that `--preset minimal` keeps `job` and `queue` when `email`, `approvals` or `auth` is present instead of dropping every always-on token. `objectstack-automation`'s DocuSign eval case no longer forbids a string its own model answer uses, and its model answer now verifies DocuSign Connect's own signature header through `config.signature` instead of polling.
|**columns**|`{ name: string; label: string \| Record<string, string>; description?: string; kind: Enum<'duration' \| 'positive_integer'> }[]`| optional | Value columns (map): one stores a scalar per key, several an object |
126
128
|**confirmOffText**|`string \| Record<string, string>`| optional | Confirm dialog text shown before a toggle's value changes to off (omit = no confirm) |
|**columns**|`{ name: string; label: string \| Record<string, string>; description?: string; kind: Enum<'duration' \| 'positive_integer'> }[]`| optional | Value columns (map): one stores a scalar per key, several an object |
209
213
|**confirmOffText**|`string \| Record<string, string>`| optional | Confirm dialog text shown before a toggle's value changes to off (omit = no confirm) |
**Status**: Accepted — backend implemented; UI pending (objectui) (proposed 2026-05-20 · calibrated 2026-06-12) · **Amended (2026-11-05, #30385)** — D6: a clear (`null`) of an env-pinned key is not refused; it clears the stored value beneath the override and changes nothing in force.
3
+
**Status**: Accepted — backend implemented; UI pending (objectui) (proposed 2026-05-20 · calibrated 2026-06-12) · **Amended (2026-11-05, #30385)** — D6: a clear (`null`) of an env-pinned key is not refused; it clears the stored value beneath the override and changes nothing in force. · **Amended (2026-11-08, #30208)** — §Specifier set gains `map` (keyed rows with typed value columns); `json` stays for raw config and is no longer the home for maps.
4
4
**Deciders**: ObjectStack Protocol Architects
5
5
**Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (Metadata Customization Overlay), [ADR-0006 v4](./0006-project-environment-split.v4.md) (Project/Environment Split — this record was originally built on v3, superseded by v4)
@@ -106,6 +106,8 @@ ObjectStack's protocol-first DNA matches Apple's: a small set of declarative spe
106
106
107
107
A small, **closed** set of specifier types. Borrowed from Apple's PreferenceSpecifiers and trimmed to what enterprise settings actually need. New types require an ADR amendment.
108
108
109
+
*Amended 2026-11-08 (#30208, ruling record 6715997428): `map` added. A setting whose value is a map of rows (an object → a window, an object → a row count) declares that shape as a `map`, so the console draws a table and both doors (the save and the `OS_*` override) judge each key against the running system's domain and each cell against its column's kind, as they judge `options` and `pattern`. Its stored value is the object a `json` key held, unchanged. `json` stays in the set for genuinely raw config; it is no longer the home for maps.*
@@ -120,7 +122,8 @@ A small, **closed** set of specifier types. Borrowed from Apple's PreferenceSpec
120
122
|`multiselect`| checkbox list / tag picker | array ||
121
123
|`slider`| range slider | number |`min`, `max`, `step`|
122
124
|`color`| colour picker | hex string ||
123
-
|`json`| code editor | object | for advanced/raw config |
125
+
|`json`| code editor | object | for advanced/raw config — not for maps (see `map`) |
126
+
|`map`| keyed rows: a key column + typed value columns | object: `Record<key, value>` with one value column, `Record<key, {column: value}>` with several |`keyColumn`, `columns: [{name, label, kind}]`, `kind` ∈ `duration`\|`positive_integer`; the keys a map admits are served by a runtime option source, never listed in the manifest |
0 commit comments