Skip to content

Commit b3d92fe

Browse files
committed
fix(spec): the engine contract header names both optional members, and the consumer changeset declares Metadata-protocol none
The contract review on 7237921 asked for two should-fixes. The IObjectQLEngine header now names getDisabledActions beside judgeFilter as optional by ruling. The four consumer packages add no authorable key of their own, so their patch changeset declares Metadata-protocol: none; the key stays declared `added` on spec's minor changeset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fi9zfJhUTubyJYb6V
1 parent 8216bec commit b3d92fe

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎.changeset/27842-disabled-actions-served.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
fix: `GET /meta/object` serves which packaged actions are switched off beside the item, and a switched-off action is refused with a plain sentence
99

1010
Clause-②: yes (widening)
11-
Metadata-protocol: added
11+
Metadata-protocol: none
1212

1313
- **Served beside the object** (`@objectstack/metadata-protocol`, `@objectstack/rest`). `GET /api/v1/meta/object/:name` serves `disabledActions` beside `item`: the names in `item.actions` that the deployment's activation ledger switches off. `GET /api/v1/meta/object` serves the same answer keyed by object name. The default cached door carries it too, read live on every call and kept out of the ETag, so a read that carries it is answered in full rather than `304 Not Modified`. The key is absent where no ledger answered (no engine, or an engine with no ledger attached), on a draft read, and on every type other than `object`. `item.actions` is unchanged. The protocol reads the engine's `getDisabledActions` through the kernel's service table by name and imports no engine.
1414
- **The fact it serves** (`@objectstack/objectql`). `ObjectQL.getDisabledActions()` returns the names the engine's activation projection switches off, the same projection both dispatch doors consult before they refuse a call, or `undefined` when no ledger is attached. `listDisabledActions()` is unchanged.

‎packages/spec/src/contracts/objectql-engine.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,10 @@ export type EngineFilterJudgement =
230230
* guarded call into a `possibly undefined` error and push code back toward the
231231
* `any` this contract exists to remove.
232232
*
233-
* One member is optional by ruling, not by this default: {@link judgeFilter}
234-
* (#19995 ruling C). Its callers must work with an engine that lacks it, so the
235-
* optional mark states that requirement in the type.
233+
* Two members are optional by ruling, not by this default: {@link judgeFilter}
234+
* (#19995 ruling C) and {@link getDisabledActions} (#27842 ruling letter B,
235+
* the `getFlowRegistration?` shape). Their callers must work with an engine
236+
* that lacks them, so the optional mark states that requirement in the type.
236237
*/
237238
export interface IObjectQLEngine extends IDataEngine {
238239
// ── Schema access ────────────────────────────────────────────────────

0 commit comments

Comments
 (0)