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
feat(spec,client): declare the search and data.clone route response contracts (#11924) (#12203)
* feat(spec,client): declare the search and data.clone route response contracts (#11924)
The maintainer-ruled half of the four undeclared SDK route returns (2026-08-25,
decision-inbox batch 8, option A): search + data.clone are stable,
server-produced shapes — declared in packages/spec exactly as produced, with
conformance coverage on both the producer and the mounted route, honouring
#3877's rule that no route-ledger responseSchema row is filled without
conformance coverage (both rows filled in this same change). The
automation.create / automation.update pair is NOT touched — it returns to the
decision inbox as its own card with a consumer-survey reading first.
- spec: SearchAllResponseSchema / SearchAllHitSchema + CloneDataResponseSchema
in api/protocol.zod.ts (+ z.input type aliases and isomorphism pin lines);
regenerated artifacts: api-surface (6 added / 0 removed), export-origins,
reference docs, strictness-ledger counts; authorable-surface and
json-schema.manifest shards rewritten by gen:schema as expected products.
- rest: both ledger rows filled (responseSchema + coverage-naming notes);
search-clone-route-schema-conformance.test.ts pins the relay half — bodies
parse, answered bare (201 for clone), rows resolve to the very schema
objects the suite parses with.
- metadata-protocol: search-clone-schema-conformance.test.ts pins the producer
half — the real searchAll / cloneData over fixture engines, safeParse plus
key-set subset checks at both levels, both searchAll return statements, both
snippet branches.
- client: search → Promise<SearchAllResponse>; data.clone →
clone<T = any>(...): Promise<CloneDataResult<T>> with the new exported
CloneDataResult mirror interface; SearchAllHit / SearchAllResponse
re-exported; return-type-precision pins extended in both directions. The
#8140 SearchResult near-miss guard's assertions are untouched and green —
only its prose note is updated (the binding it described as deliberately
absent now exists).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
* test(spec): recount the isomorphic-pin self-check for the three #11924 pins (835 -> 838)
The pin file asserts its own pin count and recomputes the two prose
statements from the file; the three new Iso859/860/861 pins moved the
count. Receipt paragraph added per the file's own convention.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
* chore(spec): regenerate artifacts on the post-merge tree (api-surface, export-origins, docs, strictness-ledger via check:generated --fix)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
* test(rest): keep the new conformance suite off the TEST_DEBT ledger (explicit .js extension; index instead of Array.prototype.at)
check:type-check-debt re-measure went 155 -> 157 on @objectstack/rest from
this PR's new test file (TS2835 missing extension, TS2550 .at under the
package lib). Fixed the two new errors; ledger stays at its recorded 155.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
* chore(client): delete the two closed exported-any-returns entries (ObjectStackClient.search, ObjectStackClient.data.clone)
This PR binds real return types to both sites, voiding their DELIBERATE
Promise<any> ledger reasons; the shrink-only ledger is judged exactly, so
the closed-gap entries must go in the same change (check:exported-any-returns
went red on them at CI).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
---------
Co-authored-by: Claude <noreply@anthropic.com>
|[Automation Protocol](/docs/references/automation)| 13 | 68 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
Copy file name to clipboardExpand all lines: packages/client/exported-any-returns.json
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,6 @@
62
62
"ObjectStackClient.auth.accounts.unlink": "#12104 — no return annotation; `return res.json()`, and lib.dom declares `Response.json(): Promise<any>`. Invisible to every grep #8140's census and #11925 used: the method names neither `any` nor `Promise` nor `unwrapResponse`. Bind the contract the route actually answers, minding the envelope.",
63
63
"ObjectStackClient.automation.trigger": "#12104 — no return annotation; `return res.json()`, and lib.dom declares `Response.json(): Promise<any>`. Invisible to every grep #8140's census and #11925 used: the method names neither `any` nor `Promise` nor `unwrapResponse`. Bind the contract the route actually answers, minding the envelope.",
64
64
"ObjectStackClient.automation.create": "#11924 — DELIBERATE `Promise<any>`: `POST /automation` ends `deps.success(body)`, echoing the caller's own unvalidated bytes, and `IAutomationService.registerFlow` returns nothing, so the service contract has no return shape to relay. This needs a DECISION (keep echoing, or answer the registered `FlowParsed`), not an annotation.",
65
-
"ObjectStackClient.automation.update": "#11924 — DELIBERATE `Promise<any>`: `PUT /automation/:name` ends `deps.success(definition)` where `definition = body.definition ?? body`. Same missing contract as `automation.create`, and the two should be answered together since they are one route class.",
66
-
"ObjectStackClient.search": "#11924 — DELIBERATE `Promise<any>`: `GET /api/v1/search` relays `protocol.searchAll(...)` verbatim and that shape is declared only as an inline annotation in `@objectstack/metadata-protocol`, which `packages/client` does not depend on. ⛔ `SearchResult` from `@objectstack/spec/contracts` is the VERIFIED near-miss: it contracts the per-object `ISearchService.search`, whose hits carry `score`/`document`, not this route's `object`/`title`/`snippet`/`record`. Binding it would typecheck and ship a false declaration; `return-type-precision.test.ts` holds a compile-time guard on that mismatch.",
67
-
"ObjectStackClient.data.clone": "#11924 — DELIBERATE `Promise<any>`: `POST /data/:object/:id/clone` answers `{ object, id, sourceId, record }`, stable and server-produced but declared in no spec module. It is the structural sibling of this package's own `CreateDataResult<T>` plus `sourceId`, which is exactly what makes minting that equivalence inside a consumer the wrong move — it would create an undeclared second contract."
65
+
"ObjectStackClient.automation.update": "#11924 — DELIBERATE `Promise<any>`: `PUT /automation/:name` ends `deps.success(definition)` where `definition = body.definition ?? body`. Same missing contract as `automation.create`, and the two should be answered together since they are one route class."
0 commit comments