Skip to content

feat(spec): a batch dataset-query request and answer beside the single dataset door, each query answered or refused on its own - #32251

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-zc7wi1
Nov 10, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-zc7wi1

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

Requested by Yibo Wang · project thread

Fixes #32203

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none in this change — content/docs/data-modeling/analytics.mdx ("How it runs", hand-written) documents the single dataset door; the batch sentence is owed when the server mounts the batch door, so it is a follow-up carried by #32200, not written here (the door does not exist yet). No page under skills/** documents the dataset query door (git grep "dataset/query" -- skills: zero hits).
Prior rulings read: dataset,batch,analytics,datasetselection → 26 hits; ADR-0021 D1, ADR-0149 D6, ADR-0021 D2, ADR-0021 D3, ADR-0033 Decision §7, ADR-0034 Decision §4, ADR-0035 Decision §5, ADR-0045 Decision §1, ADR-0045 Decision §4, ADR-0054 Decision §3; thread: none; repo: objectstack-ai/objectstack. None rules on a batch of dataset queries: ADR-0021 D1–D3 fix the dataset as the one analytical source and the selection-by-name shape, which the batch reuses unchanged; the batch hits are record-write batches (ADR-0033/0034/0035/0045).
Carried: #32200 (domain:server, the batch door: mount it, enforce DATASET_QUERY_BATCH_MAX_QUERIES, run each query through the single door's parse and reads, answer through sendOk/sendError, plus the @objectstack/client method) and #32165 (domain:ui, the console half: one batched request per dashboard render, after #32200).

维护者速读

What changes

  • DATASET_QUERY_BATCH_MAX_QUERIES = 50, exported for the server that enforces it and the client that splits by it. Why 50: the batch serves one dashboard render (9 queries on Delivery Operations and 18 on Chart Gallery, QA QA run · all (64/355) · ff04ad81 · 2026-11-10 · 13 PASS / 49 PARTIAL / 1 FAIL / 1 BLOCKED / 291 NOT-RUN #32135), so 50 holds the largest measured dashboard with room to spare, and it is the bound the record-page payload already puts on the lists one request may name (RECORD_PAGE_MAX_RELATED). An unbounded list would be unbounded executor work behind one request and one timeout; a render with more queries sends consecutive batches.
  • DatasetQueryBatchRequestSchema — { queries: [...] }, strict, one to 50 entries. Each entry is one single-door body ({ dataset | datasetName, selection, previewDrafts? }), declared as a JSON object whose members the batch does not parse: the server judges each with the single door's own outer-body check, selection parse, dataset resolution and permission / row-level / field-level reads, as the same caller (analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200: "no second parse; reuse the single door's parse per entry"). A second parse at the batch level would refuse a whole batch for one malformed query and could disagree with the single door.
  • Naming: by position, not by caller id. results[i] answers queries[i]; the caller already holds the order it sent. An id would be a second identity to keep unique, and uniqueness by a member is a rule the published JSON Schema cannot state (uniqueItems judges whole items), so it would add a dropped refinement and one more whole-batch refusal.
  • DatasetQueryBatchEntrySchema — exactly one of { data } (the single door's 200 answer, AnalyticsResultResponseSchema.shape.data taken by reference) or { status, error } (the single door's HTTP status, 400–599, and its refusal in the house error envelope ApiErrorSchema, closed code vocabulary). Both arms strict, so a refused query cannot read as an empty result.
  • DatasetQueryBatchResponseSchema — BaseResponseSchema.extend({ data: { results } }), the sibling pattern. One refused query never fails the others; success is true whenever the batch was accepted. A whole-batch refusal is the error envelope with no data: 400 { success: false, error: { code: 'VALIDATION_FAILED', message } } for an empty or over-long list, a missing queries, an undeclared key beside it, or an entry that is not an object. Refusals that depend on no query (not authenticated, no analytics service) answer the whole request with the single door's status.
  • Types: z.input + Parsed for the request, entry and response, exported the way the siblings are.
  • Generated: api-surface/api.json, export-origins/api.json, declaration-map/api.json, json-schema.manifest/api.json, authorable-surface/api.json (5 new keys, hence Metadata-protocol: added), the reference page content/docs/references/api/analytics.mdx + index, the strictness-ledger counts, and two dropped-refinements.baseline.json rows (measured counts 259→261 / 1046→1048). Those two rows are not a new rule: they are the existing drillScopes.valueType.lazy site of api/AnalyticsResultResponse, inherited because the answer entry reuses that data member.
  • Changeset: @objectstack/spec minor.

Out of scope, untouched: the server door (#32200), the console client (#32165), packages/rest, packages/services/**, and the single door's request and answer.

Tests

packages/spec/src/api/analytics-dataset-batch.test.ts (15 tests): a valid batch parses and keeps order; exactly 50 parses; empty (too_small), 51 (too_big), a non-object entry and a missing queries (invalid_type), and a key beside queries (unrecognized_keys) are refused; a selection the single door refuses does not refuse the batch; an answer mixing a success and a refusal parses in order; an answered entry is the single answer member for member; a refused entry takes the house envelope and an unregistered code is refused; an entry with both arms, neither, or only error is refused; a refused status of 200 is refused and 503 accepted; the single door's fault body relayed as is ({ code: 'ANALYTICS_QUERY_FAILED', error }) is refused as an entry while the mapped refusal parses, as does a 422 carrying a declaredCode (added by the review's should-fix commit 2d073d9a). Key-set pins on DatasetSelectionSchema, AnalyticsResultResponseSchema, its data and its fields[] element, measured at origin/main 3ca6108 before the batch was written.

Ablation (one, through scripts/ablation-replace.mjs, tests read src so no build leg): drop the bound, .min(1).max(DATASET_QUERY_BATCH_MAX_QUERIES) → .min(1): anchor 1→0, blob aaf92bfeffd2→3a661b07025d; analytics-dataset-batch.test.ts 1 failed | 13 passed (refuses one query over the bound); restored, blob == HEAD aaf92bfeffd2, git diff HEAD empty. (analytics.zod.ts blob is the same at the pushed head.)

All readings at head d5c08423bd (merge base origin/main 3ca6108), on a shared box.

Spec suite, typecheck, changeset level axis
  • pnpm --filter @objectstack/spec test (os-verify-lock, VERDICT command-exit 0): Test Files 833 passed | 1 skipped (834); Tests 26568 passed | 1 skipped | 1 todo. Read at c6c65001; the only later change is one assertion in analytics-dataset-batch.test.ts, re-run alone: 14 passed (14). After the review's should-fix commit 2d073d9a the dev reports 15 passed (15); CI on that head is the reading of record.
  • pnpm --filter @objectstack/spec typecheck (os-verify-lock, --max-old-space-size=8192, since check:test-typecheck ran out of heap at 4096): VERDICT command-exit 0, tsc --noEmit, check:scripts-typecheck and check:test-typecheck green.
  • GITHUB_EVENT_NAME=pull_request node scripts/check-changeset-no-major.mjs --base origin/main --event (this body): exit 0, "declares clause-② yes (widening) and metadata-protocol added, and no package … is graded patch". Control with Metadata-protocol: none: exit 1, "moves a metadata-protocol baseline the ratchets record".
Dispatch gates (106 derived, 0 NOT-MEASURED)
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 107 commands; each run, exit code captured before any pipe; record /mnt/project-files/issue-32203/gates-ran.list.
  • All 107 exit 0 at d5c08423bd. A first pass at c6c65001 had check:error-code-casing exit 1 on a lowercase 'answered' literal in the new test (fixed in d5c08423bd) and five exit-3 prerequisite refusals (unbuilt lint/formula/client-react/objectql, stale spec dist, shallow clone), cleared by building and git fetch --unshallow before the second pass.
  • dispatch-gates --ran: "106 derived famil(ies) accounted for — 106 run, 0 NOT-MEASURED".
  • Not run locally, CI-owned: the five type-check lanes, the path-scheduled CI jobs and the roster families the derivation names outside its total.

Acceptance notes

  • Premise corrections against the dispatch readings: (1) the single door answers the bare AnalyticsResult (analytics-routes.ts ends res.json(result); client.analytics.queryDataset reads res.json()), not AnalyticsResultResponseSchema's envelope — so an answered entry carries that schema's data member, not the envelope; (2) the single door's outer body (dataset / datasetName / previewDrafts / selection) has no spec schema — it is judged by DATASET_QUERY_BODY_KEYS in packages/rest/src/analytics-dataset-body-door.ts; DatasetSelectionSchema covers only selection. The batch therefore reuses the single door's judgement per entry instead of declaring a second copy of that body.
  • The single door's "Invalid dataset definition." refusal carries detail (singular), a key ApiErrorSchema does not declare; an entry carrying it parses (the envelope is not strict) and the key is stripped by a parse. Observation only; noted for analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200, which relays that body.

…dataset door

DatasetQueryBatchRequestSchema, DatasetQueryBatchEntrySchema and
DatasetQueryBatchResponseSchema, the DATASET_QUERY_BATCH_MAX_QUERIES bound,
their types, pins, regenerated baselines and reference docs, and a changeset.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhNnuQDu2LvsL54Xmn
… lowercase code literal

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhNnuQDu2LvsL54Xmn
gen:schema (via spec build), gen:api-surface, gen:export-origins,
gen:declaration-map, gen:docs, gen:strictness-ledger; the hand-kept
dropped-refinements header re-counted to its entries (263 / 1050), since
both sides' identical 259->261 edit merged as one.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhNnuQDu2LvsL54Xmn
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 13 documentable anchor(s). ⚠️ 6 changed file(s) yielded no anchor (packages/spec/api-surface/api.json, packages/spec/authorable-surface/api.json, packages/spec/declaration-map/api.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ui/reports.mdx (via queryDataset (sdk, the bare tail of client method analytics.queryDataset, bound to POST /api/v1/analytics/dataset/query))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via queryDataset (sdk, the bare tail of client method analytics.queryDataset, bound to POST /api/v1/analytics/dataset/query))
  • content/docs/releases/v17/17-3.mdx (via analytics.queryDataset (sdk, the route ledger binds it to POST /api/v1/analytics/dataset/query), queryDataset (sdk, the bare tail of client method analytics.queryDataset, bound to POST /api/v1/analytics/dataset/query))
  • content/docs/releases/v17/17-5.mdx (via queryDataset (sdk, the bare tail of client method analytics.queryDataset, bound to POST /api/v1/analytics/dataset/query))
  • content/docs/releases/v17/17-6.mdx (via /api/v1/analytics/dataset/query (route, a path literal in a comment on a changed line))
  • content/docs/releases/v9.mdx (via queryDataset (sdk, the bare tail of client method analytics.queryDataset, bound to POST /api/v1/analytics/dataset/query))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 6 changed file(s) yielded no anchor (packages/spec/api-surface/api.json, packages/spec/authorable-surface/api.json, packages/spec/declaration-map/api.json, …) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: VALIDATION_FAILED (literal, 45 pages)
  • the SDK route bridge reached 65 of 246 client-bound route-ledger rows — the other 181 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 181: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 122 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 171 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json d391babc3c2e741b222439180e4b9e49e6b533ee → packageMentionDocs.

Which tree this was computed on

This run read content/docs from e046c6ab8bc7e2cf5c30a6fb1913e66d29b9b2c8 — the merge of head c043839cf9b3014db959cd51a9f1d9c12888fecc into base d391babc3c2e741b222439180e4b9e49e6b533ee, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e046c6ab8bc7e2cf5c30a6fb1913e66d29b9b2c8 && git checkout e046c6ab8bc7e2cf5c30a6fb1913e66d29b9b2c8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d391babc3c2e741b222439180e4b9e49e6b533ee c043839cf9b3014db959cd51a9f1d9c12888fecc && git checkout -B drift-repro d391babc3c2e741b222439180e4b9e49e6b533ee && git merge --no-ff c043839cf9b3014db959cd51a9f1d9c12888fecc

node scripts/docs-audit/affected-docs.mjs --json d391babc3c2e741b222439180e4b9e49e6b533ee

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs d391babc3c2e741b222439180e4b9e49e6b533ee → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6f52e2fd9d300ca2907f69f44a52ee1a63a3f901
Local-runs: none
Scope: packages/spec/src/api/analytics.zod.ts + packages/spec/dropped-refinements.baseline.json

Read for this record: card #32203 (body and its 4 comments: the claim, amendments 1 and 2, the dev report 6770143037), PR #32251 (body, 12-file list), the net diff origin/main...6f52e2fd, and the check-runs on this head. Code outside the diff was read, not reviewed: packages/rest/src/analytics-routes.ts, analytics-dataset-body-door.ts, analytics-selection-door.ts, error-response.ts, packages/spec/src/api/contract.zod.ts, record-page.zod.ts, scripts/check-changeset-no-major.mjs. The rest of the diff (the test file, generated baselines and reference pages, the strictness count, the changeset) is the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Public surface: 10 new exports, nothing removed or changed. Right. api-surface/api.json gains DATASET_QUERY_BATCH_MAX_QUERIES, three DatasetQueryBatch*Schema consts and their six types. No existing line of analytics.zod.ts moves except the import of ApiErrorSchema.
  • Accept-set of the single door: unchanged. Right. DatasetSelectionSchema and AnalyticsResultResponseSchema are untouched in the diff; the batch takes AnalyticsResultResponseSchema.shape.data by reference and re-describes a clone.
  • New accept-sets. Request: a strict object with queries, an array of 1 to 50 JSON objects. Entry: a union of two strict arms, data or status (integer 400 to 599) plus error. Response: BaseResponseSchema plus a required strict data.results. All three are additions.
  • Metadata-protocol: added is the right reading (seat point 1). packages/spec/authorable-surface/api.json gains 5 keys (DatasetQueryBatchRequest:queries, DatasetQueryBatchResponse:data|error|meta|success). That ledger records the keys of every published object schema in api/, wire bodies included, and check-changeset-no-major.mjs refuses none whenever a shard under packages/spec/authorable-surface/ moves (verdict none-baseline-moved). The card's none was an estimate from the meaning of the word "authorable"; the gate measures the ledger, and the ledger moved. Claim amendment 2 already carries added. DatasetQueryBatchEntry adds no key because a union has no top-level members.
  • Dropped-refinements header 263 / 1050: right (seat point 3, second half). main reads 261 / 1048. The head's entries hold 263 schemas and 1050 sites (counted from the committed file), so the hand-set header equals the body. The two new rows are the one existing site of api/AnalyticsResultResponse (data.drillScopes.valueType.lazy, the lazy FilterConditionSchema), reached through the reused data member, and their paths follow the ledger's own spelling (options[0], element). No new refinement is written by this diff. DatasetQueryBatchRequest rightly has no row.

② Semver level

Clause-②: yes (widening)

@objectstack/spec minor matches what the diff publishes: new exports and three new published JSON Schemas, no existing accept-set narrowed. The changeset and the PR body both carry Clause-②: yes (widening) and Metadata-protocol: added; the Check Changeset run on this head completed success.

③ Boundary flags

  • open_questions: empty in the dev report. Nothing to answer.
  • Premise correction 1 (the single door answers the bare AnalyticsResult, not the envelope): confirmed. analytics-routes.ts ends res.json(result). Carrying shape.data in an answered entry is right.
  • Premise correction 2 (the single door's outer body has no spec schema): confirmed. It is judged by DATASET_QUERY_BODY_KEYS in analytics-dataset-body-door.ts; DatasetSelectionSchema covers selection alone.
  • Out-of-scope note, detail (singular) on the "Invalid dataset definition." 400: confirmed, and it is the smallest of a wider gap. See ④ finding 1, which this record raises to should-fix.
  • Out-of-scope note, the batch sentence owed in content/docs/data-modeling/analytics.mdx: accepted as carried by analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200.
  • Hand-set measured header after the merge: judged right in ①.

④ Design judgment

packages/spec/src/api/analytics.zod.ts, against the card's four asks and the single door it cites.

What holds:

  • Request (seat point 2). The card asks for "an ordered list of the existing single selections". A selection alone does not name its dataset, so an entry has to be the whole single-door body, and that body has no spec schema. Declaring each entry as an opaque JSON object is the design that keeps "one refused item never fails the others" true: a typed entry would make one malformed selection a whole-batch parse failure. Tries to break it: an entry of {} is accepted here and refused per entry by the door (body.selection.measures must be a non-empty array); a null, string or array entry is refused whole, as documented; an empty list and 51 entries are refused whole; a key beside queries is refused (strict), which stops a batch-level previewDrafts from being silently dropped; two identical entries are both answered.
  • Bound. RECORD_PAGE_MAX_RELATED is 50 in record-page.zod.ts, as the jsdoc says. The card left the number to the lane.
  • Naming by position (seat point 3, first half). The card allows "an id or its index". Position needs no uniqueness rule, so there is rightly no duplicate-id refusal and no refinement of this PR's own.
  • Entry. Both arms are strict, so { data, status, error }, {} and { error } alone are all refused. A refused query cannot parse as an empty answer.
  • Permissions. The published describe text on a query says it is "judged exactly as that door judges it, as the same caller", which is what the card asked the describe text to state.

Findings:

  1. should-fix: the entry says error is the single door's refusal body with "the same code, message and details", and the cited door does not answer in that shape. Three of the door's own answers do not parse as ApiErrorSchema, which requires code from the closed vocabulary and message:
    • its undeclared-fault answer is res.status(500).json({ code: 'ANALYTICS_QUERY_FAILED', error: outward }): the text is under error, and there is no message;
    • its declared-4xx arm answers { code: envelopeCode, message } with the thrown code as written, so a code outside the closed vocabulary reaches the wire there, and ApiErrorSchema refuses it;
    • the detail key the dev noted is stripped by a parse.
      The schema is right to use the house envelope, which is what the card asks for. The sentences are wrong: the jsdoc ("refused here with the same code, status and message"), the entry jsdoc, and the published describe on error. A server that follows them and relays the door's body yields an entry its own contract refuses, in the fault case the per-entry design exists for. Fix in this file: say that the batch door maps each single-door refusal into ApiErrorSchema (the 500 text becomes message; a code outside the vocabulary moves to declaredCode, the rule ApiErrorSchema already states), and drop "the same".
  2. should-fix: status beside error is a second place for a fact ApiErrorSchema already carries. ApiErrorSchema.httpStatus exists, and its jsdoc names this exact case: it is "load-bearing where this envelope rides response DATA rather than the response line", on a batch row. As written, { status: 403, error: { httpStatus: 404, ... } } parses, and nothing says which one a client reads. Either state the rule in the jsdoc and describe text (status is the authority; error.httpStatus, if present, equals it), or carry the status on error.httpStatus alone as the record batch does. The first is the smaller change.
  3. nit: data.results has no length bound, while the jsdoc says it has exactly as many entries as the request (1 to 50). An empty results parses. The sibling response schemas are equally loose; leave it or carry it.
  4. nit: DatasetQueryBatchRequest['queries'] is typed as an array of string-keyed records of unknown, so the exported type gives a client author no help with an entry. The @objectstack/client method in analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200 has to type its own parameter. Carry to analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200.
  5. nit: the contract is silent on ?preview=draft. The single door reads the draft flag from the query string as well as the body. Whether the batch URL honours it for every entry is analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200's decision; one sentence here would close it.
  6. nit: a whole-request refusal that depends on no query "answers with the status the single door answers it with", but the body shape is not stated. The single door's 501 and 404 bodies are bare { code, message }, not the house envelope the malformed-batch refusal uses. Carry to analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200.

packages/spec/dropped-refinements.baseline.json agrees with the schema: two inherited rows, header equal to the body. No finding.

Check-runs on 6f52e2fd, as read when this record was written (45 runs; in-progress runs are not counted as green):

  • Completed success (14): Auto Label, Dogfood Regression Gate, Plan Test Core shards, Plan Test UI shards, Check Documentation Links, Lint · scoped · tooling self-tests, Lint · PM dispatch-gates, filter, Governed Surface Queue Guard, Check Changeset, Check PR Size, Flag docs affected by code changes, Spec property liveness, PR-body guards.
  • Completed skipped (9): Temporal Conformance, Dogfood Verify CLI, Dogfood Regression Gate (shard matrix), UI Published Artifacts, Packed-tarball smoke, Borrowed queue verdict, Queue verdict, Schedule gate, 18.x upgrade harness.
  • Still in progress (22): Test Core 1/8 to 8/8 (8 runs), Build Core, Build Docs, Build UI Deps, Live E2E UI, Type Check · workspace, Type Check · debt ledger, Type Check · source gates, Type Check · consumer gates, Lint · ESLint, Lint · CI, release and engine gates, Lint · repo and tooling gates, Lint · docs and code guards, Lint · scoped · query-options erasure, Lint · scoped · slot lookup and corpus.
  • None completed failure.

The gates that decide the generated baselines (the schema build that enforces the dropped-refinements ledger, the spec tests, the type checks) had not reported. This verdict is on the design and the committed tree; it does not stand in for those runs, and the seat reads them before the PR moves.

No must-fix. Findings 1 and 2 are should-fix and each earns a delta review of its fix; both fixes are in analytics.zod.ts text and regenerate the reference page and the published descriptions.

Implemented-by: claude/project-thread-zc7wi1
Reviewed-by: fable contract-review sub-agent of session_01WGufzh7cM8EmUX4T2CBNHX

VERDICT: PASS

…tatus as the authority over error.httpStatus

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhNnuQDu2LvsL54Xmn
@github-actions github-actions Bot added size/l and removed size/m labels Nov 10, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

Delta review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2d073d9ad340f4bc42e134046f8a8d4d6bc7bb27
Base-record: comment 6770516195 on 6f52e2fd…
Local-runs: none
Verdict: PASS

Read for this record: the one commit 6f52e2fd..2d073d9a (3 files, +42 −9), and at this head packages/spec/src/api/contract.zod.ts (ApiErrorSchema), errors.zod.ts (HttpStatusErrorCodeMap, standardErrorCodeForHttpStatus), error-code-ledger.zod.ts, packages/rest/src/analytics-routes.ts (the dataset door's catch), error-response.ts, analytics-dataset-body-door.ts, analytics-selection-door.ts, packages/types/src/thrown-http-error.ts and data-error-classification.ts. Nothing was built or run.

Should-fix 1 (the "same code, message and details" claim): closed

  • "The same" is gone from all three places: the request jsdoc, the entry jsdoc and the published describe on error. No copy of the old sentences is left in the tree at this head, the changeset included.
  • The new text says error is the refusal mapped into ApiErrorSchema, "not the door's response body relayed as it is". Each statement was checked against the tree:
    • declaredCode exists on ApiErrorSchema (optional string). Its jsdoc states the rule the new prose cites: a code outside the vocabulary is demoted there and code carries the member the HTTP status derives, through resolveThrownHttpError in @objectstack/types. The citation "the rule ApiErrorSchema states for every door" is accurate.
    • The undeclared-fault answer is res.status(500).json({ code: 'ANALYTICS_QUERY_FAILED', error: outward, ...markExtra }), so "{ code, error } with no message" is true, and outward is the already-withheld text, so "withheld as the door withholds it" is true.
    • ANALYTICS_QUERY_FAILED and VALIDATION_FAILED are registered in error-code-ledger.zod.ts, so the entries the new test expects to parse can parse.
    • details.fields[] is what the body door and the selection door answer on a validation refusal.
  • A server door can do this mapping from what the single door produces: the status, the code and the text are all in hand at each arm, and the demotion rule is an exported function the door's own helpers already call.
  • No new false claim found. Two gaps in the mapping remain; see findings 1 and 2.

Should-fix 2 (status beside error.httpStatus): closed

  • httpStatus exists on ApiErrorSchema (optional integer). Its jsdoc says the response status is authoritative and the field is "optional and redundant on purpose".
  • The entry jsdoc and the published describe on status now say status is the authority and error.httpStatus, when present, equals it. status stays required. This is the first of the two options the base record offered, and it agrees with the envelope's own rule.
  • Prose only, no refinement: acceptable, not a must-fix. A refinement on the arm cannot be stated in the published JSON Schema, so it would add a dropped-refinements row for a field that is optional and redundant by its own contract. A client that reads status, as the text tells it to, is never misled by a mismatch. { status: 403, error: { httpStatus: 404 } } still parses; that is now a stated producer rule, not an open question.

Other movement

  • Accept-sets: unchanged. The only code lines that moved in analytics.zod.ts are the two .describe() strings; no z. shape, bound or strict() changed.
  • Exports: unchanged. api-surface, export-origins, declaration-map and authorable-surface did not move and did not need to.
  • json-schema.manifest/api.json: did not move and should not have. It lists schema names only, no describe text. The packages/spec/json-schema/ tree that holds descriptions is gitignored.
  • dropped-refinements.baseline.json: did not move, correctly, since no refinement was added.
  • The one committed artifact that carries describe text is content/docs/references/api/analytics.mdx. Its two changed rows equal the two new describe strings character for character. No other file at this head holds the old or the new text.
  • CI: check:docs (which re-renders that page) and check:authorable-surface both run in Type Check · source gates, which was still in progress. A stale reference page would be caught there, not by the check:generated step, which only reconciles the script ledger.
  • Tests: one new case, 15 in the file.

Findings

  1. should-fix (non-blocking; here or carried to analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200): the mapping names one error-keyed answer, and the door has more. A declared server fault and a sandboxed fault answer through declaredServerFaultAnswer / sandboxFaultAnswer, whose body is { error, code?, declaredCode? }: text under error, no message, and no code at all when the producer declared a status only (thrownCodeFields returns {}; { status: 503 } is the documented case). The message bullet reads as if only the undeclared fault lacks message, and the code bullet covers a code that is not a member but not an absent one. The schema still forces both fields, so no wrong entry can parse; what is unstated is which member fills a missing code. One sentence closes it: every 5xx text the door carries under error becomes message, and an answer with no code takes the member the status derives.
  2. nit: userMessage is not in the list the batch door "writes". The door answers it on three arms (markExtra), and ApiErrorSchema declares it as the end-user channel. The three bullets read as the whole mapping, so a door following them drops it. Same for singular detail on "Invalid dataset definition.", which the base record already noted.
  3. nit: the new test's demotion fixture contradicts the rule it illustrates. It pins status: 422 with code: 'VALIDATION_FAILED' beside a declaredCode. HttpStatusErrorCodeMap has no 422, so the status-derived member is VALIDATION_ERROR. The case parses either way; the fixture shows an entry the stated rule never yields. Use VALIDATION_ERROR, or 409 with RESOURCE_CONFLICT.
  4. nit: the PR body still says 14 tests, in the summary and in the two-minute check. The file has 15.
  5. nit: no pin that a mismatched error.httpStatus still parses. The rule is prose only by design; a one-line test would record that the schema does not enforce it.

No must-fix.

Check-runs at this head

Read twice on 2d073d9a; the second read is reported. 37 runs, none failure.

  • Completed success (12): Auto Label, Check Changeset, Check PR Size, Check Documentation Links, Flag docs affected by code changes, Spec property liveness, PR-body guards, Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, filter, Dogfood Regression Gate.
  • Completed skipped (9): Temporal Conformance, UI Published Artifacts, Dogfood Regression Gate (shard matrix), Dogfood Verify CLI, Borrowed queue verdict, Queue verdict, Schedule gate, 18.x upgrade harness, Packed-tarball smoke.
  • Still in progress (16): Build Core, Build Docs, Build UI Deps, Live E2E UI, Plan Test Core shards, Plan Test UI shards, Type Check · workspace, Type Check · source gates, Type Check · consumer gates, Type Check · debt ledger, Lint · ESLint, Lint · repo & tooling gates, Lint · docs & code guards, Lint · CI, release & engine gates, Lint · scoped · slot lookup & corpus, Lint · scoped · query-options erasure.
  • Not yet created: the Test Core shards (their plan job had not finished).

The runs that decide this delta had not reported: Type Check · source gates (reference page against describe text) and the spec tests (the new case). In-progress is not green; the seat reads them before the PR moves.

Reviewed-by: fable delta-review sub-agent of session_01WGufzh7cM8EmUX4T2CBNHX

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

Delta review — merge of main

Head-sha: c043839cf9b3014db959cd51a9f1d9c12888fecc
Base-record: delta review 6770788170 (PASS) on 2d073d9a, contract review 6770516195 on 6f52e2fd
Local-runs: mechanical diff comparison only (no build, no test)
Verdict: PASS — the PR's net diff is byte-identical across the merge

  • c043839c is a merge commit whose parents are 2d073d9a (the reviewed head) and origin/main d391babc. It was made by scripts/pm/os-regen-merge.sh, with no regen commit, rebase or force push. K went from 18 to 0.
  • The net diff against the merge base is the same before and after the merge: git diff $(merge-base) <head> hashes to 7eeec9fa… on both 2d073d9a and c043839c. That is the same 12 files, +490 / −11.
  • Of the 126 files the merge brought from main, none sits under packages/spec, content/docs/references or docs/audits. The dev's check:generated --fix found all 14 artifacts current and wrote nothing. The dropped-refinements header still equals its entries (263 / 1050).
  • Nothing reviewed by the two earlier records moved, so both stand on this head. CI on c043839c is the remaining gate.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

席位核对 — ACCEPT · domain:spec#3 · head c043839cf9

  • Scope: 12 files, +490 / −11, all inside the claim's surface. They are: two new exported schemas and their types in packages/spec/src/api/analytics.zod.ts (DatasetQueryBatchRequestSchema, DatasetQueryBatchEntrySchema, DatasetQueryBatchResponseSchema, DATASET_QUERY_BATCH_MAX_QUERIES); the test file analytics-dataset-batch.test.ts (15 tests); one changeset; and the generated baselines and reference pages that the gates name. The diff has no server door (analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200), no console client (Dashboards issue one analytics query per widget (18 on Chart Gallery), and KPI cards repeat their title and truncate large values #32165), and no change to the single door's shapes, which key-set pins guard.
  • Contract review (CONTRACT_REVIEW_TIER): PASS on 6f52e2fd (6770516195), with two should-fix findings. Both were fixed in 2d073d9a, and the delta review there is a PASS (6770788170). The merge of main into c043839c leaves the PR's net diff byte-identical (6771576535). One non-blocking should-fix (filling the 5xx mapping when there is no code) and the nits went to the consumer card analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200, comment posted there.
  • Seat's three points, decided:
    1. Metadata-protocol: added, which replaces the claim's estimate none, per claim amendment 2. authorable-surface/api.json gains 5 keys, and check-changeset-no-major refuses none when that ledger moves.
    2. Batch entries are opaque objects, each judged by the single door; an answered entry carries AnalyticsResultResponseSchema.shape.data. Accepted.
    3. Entries are named by position, so there is no duplicate-id refusal; the card allows "an id or its index". The two inherited dropped-refinements rows and the hand-set header 263 / 1050 match the file's entries. Accepted.
  • Rest of the diff (the seat's own TIER_DEFAULT read): the test file pins every refusal the request schema states, the mapped-error arm and the single door's key sets. The changeset is @objectstack/spec minor with Clause-②: yes (widening) and Metadata-protocol: added (Check Changeset green). The generated files are regen only (check:generated exit 0 at each head).
  • Docs drift bot: it names content/docs/ui/reports.mdx and five release pages through queryDataset. This PR does not change the single door, and the hand-written batch sentence is owed by analytics: one request answers every dataset query of a dashboard render, so a dashboard stops sending one POST per widget #32200 (the record accepts the carry). The release pages are read-only.
  • Landing: check-governed-merges --pr 32251 reads NOT governed, so this is Tier S. The seat lands it on this head, whose checks are green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX
Landing: at 2026-11-10T16:01Z — ACCEPT 6772276898 on head c043839cf9; pr_ready + automerge_enable ride this stroke.

reading value
check-runs @ c043839cf9 58 success, 10 skipped, 0 failure, 0 pending
merge with origin/main K = 4; git merge-tree clean; mergeable_state clean
reviews on this head contract 6770516195 PASS → delta 6770788170 PASS → merge delta 6771576535 PASS (net diff byte-identical)
check-governed-merges --pr 32251 NOT governed, 12 paths → Tier S

State: ready + auto-merge. On MERGED the seat posts the landing note on #32203 and removes pm:dispatched.

247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
objectstack-ai#35928) (objectstack-ai#36316)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XTRdLmK9YYgMSCJ7NH2PuUY)_

repo:objectstack#7 · zhuangjianguo · session_01QsR2jVTYADzVWfarACx5j3

Fixes objectstack-ai#35928

Clause-②: yes (widening: one new public read, `POST
/api/v1/automation/_record-starts`, and the UI exports that read it)
Metadata-protocol: added
Skills-docs: none — no skill under `skills/**` teaches the console's
stage confirms; `content/docs/automation/flows.mdx` and
`content/docs/frontend/plugins/plugin-grid.mdx` document the read and
the list in this change.
Ruling-ref: 7073655354

## 维护者速读

-
用户在列表单元格或记录页改阶段时,确认框在原来那句话下面列出这次改动会启动的流程名称(按用户语言显示),带审批的流程标「发起审批」;以前只写「可能触发相关自动化」。
- 属于行内编辑专题,按维护者的裁定「能改这条记录的人都看到流程名称」,让用户确认前就知道保存后会发生什么。
- 出错时最多是清单少列或不显示,确认框退回今天那句话,保存本身不受影响;整个改动可以直接撤回。
- 无。

## What changes

**Server (one new read).**

- `@objectstack/spec/api`: `RecordUpdateStartsRequestSchema` (`{ object,
recordId, changes }`, strict), `RecordUpdateStartSchema` (`{ name,
label, startsApproval }`), `RecordUpdateStartsResponseSchema`, and the
contract entry `listRecordUpdateStarts` (`POST
/api/v1/automation/_record-starts`). `_record-starts` joins the
`/automation` domain's reserved position literals (underscore-led, so
the package-namespace install gate is not narrowed).
- `@objectstack/spec/contracts`: `RecordUpdateStartsInput` and the
optional `IAutomationService.listRecordUpdateStarts`.
- `@objectstack/spec/automation`: `recordChangeTriggerHookEvents` /
`recordChangeTriggerFiresOnUpdate`, the record-change token grammar
MOVED out of `@objectstack/trigger-record-change` (whose
`triggerTypeToHookEvents` now delegates to it), so the trigger and the
preview read one rule.
- `@objectstack/service-automation`:
`AutomationEngine.listRecordUpdateStarts` (`record-update-starts.ts`). A
flow is asked only when it is enabled and armed on a `record_change`
trigger for this object whose token binds an update; whether it starts
is `startConditionHolds`, the one start-condition gate every run attempt
passes, over the variables `seedRunVariables` seeds (`record`, its
flattened fields, `previous`). The approval mark is the presence of an
`APPROVAL_NODE_TYPE` node (ADR-0019). A condition that throws is not
listed. Hooks are never listed (ADR-0077 §2).
- `@objectstack/runtime`: the `/automation` domain's `_record-starts`
door, mounted in the dispatcher plugin and recorded in the route ledger.
Order: query parameters refused `400 VALIDATION_ERROR`; body parsed
through the request schema (`400 VALIDATION_FAILED`); `501` when the
engine has no preview; the record read AS THE CALLER through the `/data`
door's own `get` (`callData`), so an unreadable record answers `404
RECORD_NOT_FOUND` exactly like an absent one and the engine is never
asked; a read that answers no record is refused the same `404`; every
`changes` key must be a declared field of the object (else `400
VALIDATION_FAILED` on `changes.KEY`, the engine never asked); then the
engine is handed `previous` = the record read, `record` = that record
with `changes` applied, and the caller's `userId` / `tenantId`.
Anonymous `401`.
- `@objectstack/client`:
`client.automation.listRecordUpdateStarts(request)`.

**UI (two confirms, one reader).**

- `@object-ui/plugin-detail`: `stageChangeStarts.tsx` —
`useRecordUpdateStarts(ask)` (asks the route once per pending move
through the host's `apiFetch`, parses the answer through
`RecordUpdateStartsResponseSchema`, answers `[]` while in flight,
refused, failing, malformed or empty) and `StageChangeStarts` (the list
under the sentence: each flow by its label translated through
`activeFlowsBundle` + the spec's `translateFlow`, the flow runner's
reading; an approval flow marked). Exported for the grid.
- Record page: `recordPathStageChange.tsx` draws it in both
confirmations (the path's `AlertDialog` and the header stage menu's
`RequiredFieldsDialog`, via a new optional `notice` slot in
`@object-ui/fields`).
- List cell: `ObjectGrid`'s state-machine confirm draws it;
`StateChangeConfirm` gains an optional `ask` (the row's record id and
the move).
- `@object-ui/i18n`: `activeFlowsBundle` moves here from
`@object-ui/app-shell`'s module-internal `utils/flowsBundle` (its three
app-shell importers repointed), since the confirms' packages do not
depend on the console; two keys in all eleven packs:
`detail.stageChangeStartsHeading`, `detail.stageChangeStartsApproval`.
- The confirm's sentence is never replaced (not this card: objectstack-ai#35685 S3). A
move that starts nothing, and a failed read, leave the confirm exactly
as today.

Docs: `content/docs/automation/flows.mdx` (§ Which flows a record update
would start), `content/docs/frontend/plugins/plugin-grid.mdx` (the
confirm now names the flows). Changesets:
`35928-record-update-starts-read.md`,
`35928-stage-confirm-names-flows.md`, both carrying the Clause-② and
Metadata-protocol lines.

## Tests

- Engine `record-update-starts.test.ts` (8): condition holds / does not
hold; approval mark CONTROL (an approval flow and a plain flow side by
side); no condition; create / delete / other object / obsolete never
named while `record-before-write` is; an unevaluable condition not
named; an unarmed engine answers nothing; `current_user` evaluated as
the writer named.
- Door `automation-record-update-starts.test.ts` (13): a member is
answered (body parsed through the response schema) and the engine is
handed exactly the record read as the caller; empty list; unreadable
record `404 RECORD_NOT_FOUND` with the engine never asked; unreadable
and absent answer alike; anonymous `401` before any read; malformed body
`400 VALIDATION_FAILED`; query parameter `400 VALIDATION_ERROR`; `501`
without the preview; a GET of the literal is not this door.; a change
key that is not a field `400 VALIDATION_FAILED` on that key (an
undeclared key, a key off the field-name grammar, an inherited member
name), the engine never asked; a change on an object the registry does
not declare refused alike; a read that answers no record `404
RECORD_NOT_FOUND`, never previewed; and the ledger row names
`RecordUpdateStartsRequestSchema` / `RecordUpdateStartsResponseSchema`,
as the clone and publish-drafts suites pin theirs.
- Spec `automation-api.zod.test.ts`: contract count and the new entry's
method/path; request strictness; a leaked `condition` / `nodes` dropped
by the response parse. Each `changes` key is held to the field-name
grammar (refused: a dotted, an upper-case, a digit-initial, a spaced and
an empty key).
- List cell, in its confirm's harness
`ObjectGrid.autosave-35685.test.tsx` (new top-level describe, 3): list
(request body pinned, labels, approval mark under the unchanged
sentence), empty, failure (and Change still saves the move).
- Record page, in each confirm's harness (new top-level describe in
each, 3 + 3): `record-path.stageChange-28199.test.tsx` (the path's
confirmation) and `RecordStageMenu-35891.test.tsx` (the header stage
menu's dialog): list, empty, failure (a refused read, a network error
and a malformed envelope each draw no list).
- `stageChangeStarts-label-35928.test.tsx` (2): a flow named by its
translation where the app's `flows` bundle has one, by its authored
label where not; nothing drawn for no flows.
- Ablation (one-shot under the verify lock, restored by trap, `git diff
HEAD` on both sources empty): removing the `StageChangeStarts` render
from `ObjectGrid.tsx` and from both confirmations in
`recordPathStageChange.tsx` turns exactly the three `list:` pins red
(`Tests 3 failed | 6 passed`); empty and failure pins stay green, as
they should.

## Acceptance notes

- Card acceptance: "Changing a stage that starts a flow shows that flow
by name in both confirms" — pinned in both confirms (list cell, and both
record-page confirmations) and measured live (below); "a stage with
nothing attached shows no list" — the empty pins; "a read failure falls
back to the generic sentence" — the failure pins.
- Residual, stated in the contract docblocks and `flows.mdx`: the
preview binds the caller's user id and tenant only, not their positions,
request params or expand as a live run does, so for a condition reading
those the preview can differ from the save in either direction (it can
miss a flow, or list one a negated test of the writer would stop); the
seat files the follow-up for positions.
- Residual (not widened here): conditions are judged on the record as
the CALLER reads it (field-level security applied), so a condition that
reads a field the caller cannot see is judged on what they see, and one
that throws on a missing field is not listed. The preview can therefore
under-list for a caller with masked fields; it never reveals a masked
value. Documented in `flows.mdx`.
- Residual: the header stage menu's dialog asks with the stage alone;
values typed into that dialog for required fields are not part of the
preview's `changes`.
- Two existing confirm suites (`RecordStageMenu-35891`,
`record-path.stageChange-28199`) now stub `fetch` with a `501` answer in
`beforeEach`, so the new read does not leave for the network under test;
no existing assertion changed. Across the touched UI packages the run
shows 0 `ECONNREFUSED`.
- The approval mark is the ruling's test, "the flow contains an approval
node". Measured live, showcase's `showcase_project_closure` reaches its
sign-off approval through a `subflow` node (the approval node lives in
`showcase_closure_signoff`), so the preview lists it with
`startsApproval: false`. Following subflow references for the mark is a
reading beyond the ruling: filed objectstack-ai#36322.
- Overlap (`overlap-check.mjs` at the head below, exit 1, reported and
not merged around): objectstack-ai#36296 and objectstack-ai#36236 have landed and are merged in.
objectstack-ai#36335 (part of objectstack-ai#35979) moves `activeFlowsBundle` into `@object-ui/i18n`
too and conflicts in `ui/packages/i18n/src/flowsBundle.ts`,
`ui/packages/i18n/src/index.ts` and
`ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx`;
it lands after this PR and drops its copy of the move. Every other open
PR that shares a file merges cleanly.
- Declaration correction: the claim and ruling 7073655354 read
`Metadata-protocol: none`, but the three new `@objectstack/spec/api`
schemas enter the `api` authorable-surface shard (10 keys), which `Check
Changeset` reads as `added` (`none-baseline-moved`). The line is `added`
and `@objectstack/spec` is graded `minor`, as objectstack-ai#32251, objectstack-ai#35789 and objectstack-ai#31883
were for new api request/response schemas. No flow or other metadata key
is added, so the ruling's "no new authorable key" still holds.

## Verification

- Read first: `packages/runtime/src/domains/automation.ts`
`respondToRecordUpdateStarts` (the order of refusals and the
caller-scoped read that admits the engine), then
`packages/services/service-automation/src/record-update-starts.ts`
(which flows are asked and the one gate they pass).
- Live, on a fresh showcase (`pnpm dev -- --fresh`), as a member created
by the admin (`role: user`, not an admin):
- `Website Relaunch` `status: active → completed`: `200
{"flows":[{"name":"showcase_project_closure","label":"Project Closure
with Sign-off (nested pause)","startsApproval":false}]}`
  - same record `→ on_hold` (CONTROL): `200 {"flows":[]}`
- same record `budget 150000 → 250000`: `200
{"flows":[{"name":"showcase_budget_approval","label":"Project Budget
Approval","startsApproval":true}]}`
- an absent record: `404 RECORD_NOT_FOUND`; anonymous: `401
UNAUTHENTICATED`; a body without `changes`: `400 VALIDATION_FAILED`
naming `changes`.
- Zone 2 premise, measured before any code: the same kind of member
reads `GET /api/v1/meta/flow` (200, 33 flows with labels, the admin's
set) and `GET /api/v1/meta/flow/showcase_closure_signoff` (200, its
nodes).
- The console itself was not driven in a browser (its dist is not built
in this container); both confirms are pinned through the real components
above.
- Local, all under `scripts/pm/os-verify-lock.sh` (shared box):
- touched UI packages (`plugin-detail`, `plugin-grid`, `fields`,
`i18n`): `Test Files 1131 passed | 2 skipped` · `Tests 13186 passed | 38
skipped`; after folding the pins into their harness files the three
files plus the label file: `Tests 77 passed (77)`.
- type-check: `tsc --noEmit` (src and test projects) for `i18n`,
`fields`, `plugin-detail`, `plugin-grid`, and src for `app-shell`;
`service-automation`, `runtime`, `client` exit 0.
- server: engine 8/8, door 9/9, `route-ledger.conformance` +
`automation-api-contract-mounts` + `http-dispatcher` green, client
conformance 11, spec `automation-api.zod` + `address-grammar` 87,
`trigger-record-change` 122.
- `dispatch-gates.mjs --commands` (129 families) run and reconciled with
`--ran`: `129 run, 0 NOT-MEASURED`. First pass reds were all this diff's
own owed artefacts, fixed and re-run green: spec `gen:api-surface` /
`gen:docs` / `gen:export-origins` / `gen:declaration-map` /
`gen:strictness-ledger` (api count 533 → 536: the three new schemas),
the route-ledger census sentence (149 → 150), and
`check:test-source-alias` (a spec/automation alias in the trigger
package's vitest config; the door test pays `@objectstack/metadata` at
collection).

- Re-verified after the hand-over (seat 7), main `b3bcfefc` merged in at
`472457d9`, the generated surfaces regenerated at `6bd111ff`
(`gen:schema` → spec build → `gen:api-surface` → `gen:export-origins` →
`gen:declaration-map` → `gen:docs` → `gen:strictness-ledger`;
`check-regen-pending` clear), the changeset correction at `99bfd857`.
Under the verify lock at `6bd111ff`:
- type-check exit 0: `@object-ui/i18n`, `fields`, `plugin-detail` (src
and test; the hand-over's stale-dist red is gone after the closure
build), `plugin-grid`, `app-shell`; `@objectstack/spec`, `runtime` (src
and test layer, after building `@objectstack/driver-turso`),
`service-automation`, `client`, `trigger-record-change`.
- tests: `runtime` Tests 11745 passed | 25 skipped; `service-automation`
4224 passed; `client` 820 passed; `trigger-record-change` 122 passed;
spec `automation-api.zod` + `address-grammar` 87 passed; `plugin-detail`
+ `plugin-grid` + `fields` + `i18n` Test Files 1135 passed | 2 skipped,
Tests 13300 passed | 38 skipped.
- `dispatch-gates.mjs --commands` (129 families): run at `99bfd857` (the
six that started before that commit re-run on it) and reconciled with
`--ran`: `129 derived, 128 run, 1 NOT-MEASURED, 0 UNRUN`. The one
NOT-MEASURED is `check:dual-build-cjs-loads` (exit 3, PREREQUISITE NOT
MET: it needs every package's dist, which this container does not
build); CI runs it in its Lint jobs, green at this head.
- CI at `99bfd857`: every check-run green or skipped by design. Check
Changeset shows two runs: the `synchronize` run (09:07Z, before the body
said `added`) red, the `edited` run (09:08Z) green.
- Contract review rework (L2 at `99bfd857`), at `3ba211dc` and
`d2279e6c` (head):
- the door refuses a change key that is not a declared field of the
object and a read that answers no record; the request schema holds each
change key to the field-name grammar; the ledger row is pinned; the
preview's caller binding is stated in the contract docblocks and
`flows.mdx`; `_record-starts` joins the address module's literal list.
- ablation, one-shot under the verify lock (`ablation-replace.mjs`,
restored by trap, blob == HEAD and `git diff HEAD` empty after each):
the declared-field refusal disabled → `Tests 2 failed | 11 passed` (the
two refusal pins); the no-record refusal disabled → `Tests 1 failed | 12
passed` (its pin).
- local: `runtime` Test Files 637 passed, Tests 11749 passed | 25
skipped; door suite 13/13 at the head; spec `automation-api.zod` +
`address-grammar` 88 passed; type-check exit 0 for `spec`, `runtime`
(src and test layer, at `d2279e6c`), `service-automation`, `client`,
`plugin-detail`.
- `dispatch-gates.mjs --commands` at `3ba211dc`: `129 derived, 129 run,
0 NOT-MEASURED, 0 UNRUN`; the 37 families that read test files re-run at
`d2279e6c` (a one-line test-type fix), all exit 0.
- CI at `d2279e6c`: 70 check-runs, 61 success and 9 skipped by design,
Check Changeset green.
- Delta round (L1-d 7078831268, L2 nit N3 from 7078841748), at
`41487226` (head): the 401 and 501 pins assert `body.error.code`
(`UNAUTHENTICATED`, `NOT_IMPLEMENTED`) beside the status; the spec
changeset names the undeclared-change-key `400 VALIDATION_FAILED` and
the no-record `404` among the door's refusals; the caller-binding limit
reads "can differ from the save in either direction" in the request
schema's docblock, `RecordUpdateStartsInput` and `flows.mdx`. Door suite
13/13; type-check exit 0 for `spec` and `runtime` (src and test layer);
`dispatch-gates.mjs --commands` at `41487226`: `129 derived, 129 run, 0
NOT-MEASURED, 0 UNRUN`; CI at `41487226`: 70 check-runs, 61 success and
9 skipped by design.

https://claude.ai/code/session_01FEkQ5keqTTiV8ptWFNc6ZF
https://claude.ai/code/session_01QsR2jVTYADzVWfarACx5j3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jVTYADzVWfarACx5j3 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant