Skip to content

fix(service-automation): get_record form descriptor's limit declares minimum 1 - #25441

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-25361-get-record-limit-minimum
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-25361-get-record-limit-minimum

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #25361

Clause-②: no
Metadata-protocol: none

What

The get_record node's limit is a positive integer in the contract (GetRecordConfigSchema.limit, z.number().int().positive(), narrowed by PR #25357), so every flow save door refuses 0, a negative or a fraction. The executor's form descriptor in packages/services/service-automation/src/builtin/crud-nodes.ts still declared limit: { type: 'integer', title: 'Limit' }, so the designer form offered values the save always refuses.

  • The descriptor's limit now declares minimum: 1, the contract's floor.
  • Landing: the claimed file, builtin/crud-nodes.ts. No packages/spec edit, no engine.ts edit.
  • Derivation was considered: no node descriptor in builtin/ is derived from its spec Zod today. Every descriptor is a hand-written literal, and the bounded siblings (loop.maxIterations, try_catch.retry.*) declare minimum/maximum by hand, so this follows that pattern.

Pin

builtin-node-form-zod-ledger.test.ts gains get_record.limit: the form's minimum is the contract's refusal boundary. It reads the descriptor's limit.minimum (asserts 1), then parses GetRecordConfigSchema at that boundary: the minimum is accepted, one below it is refused, and 0 is refused. Neither side can move alone.

Measurement: other builtin/ descriptors against their contracts

Every numeric property in builtin/ descriptors was compared with its spec Zod at this tree:

Descriptor key Descriptor Contract Agree
get_record.limit integer, now minimum: 1 int().positive() yes (this PR)
loop.maxIterations integer, minimum: 1, maximum: LOOP_MAX_ITERATIONS_CEILING int().min(1).max(LOOP_MAX_ITERATIONS_CEILING) yes
try_catch.retry.maxRetries integer 0..10 int().min(0).max(10) yes
try_catch.retry.backoffMs / maxRetryDelayMs integer, minimum: 0 int().min(0) yes
try_catch.retry.backoffMultiplier number, minimum: 1 min(1) yes
http.timeoutMs number z.number() (unbounded) yes
screen.fields[].min / max number z.number() (unbounded) yes

No other mismatch was found.

Verification (head 21ecd5680e)

  • pnpm --filter @objectstack/service-automation typecheck && pnpm --filter @objectstack/service-automation test: lock VERDICT command-exit 0; Test Files 198 passed (198), Tests 2619 passed (2619).
  • Ablation (committed fix first, through scripts/ablation-replace.mjs): the anchor minimum: 1 was removed (anchor 1 to 0, blob b7d8ec771a76 to 5c181206f838). The new pin went red: AssertionError: expected undefined to be 1, 1 failed and 9 passed. The file was restored with blob == HEAD and git diff HEAD empty. The test imports crud-nodes.js from src, so no dist/ hop is involved.
  • Derived gate families (dispatch-gates.mjs --commands, 67): 66 exit 0. check:dual-build-cjs-loads exited 3 with PREREQUISITE NOT MET (no full-repo dist/), so it is NOT MEASURED locally and is left to CI.

Acceptance notes

  • None.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy

…minimum 1

The contract refuses a get_record limit below 1 at every flow save door;
the designer form descriptor offered 0 and negatives. Declare minimum: 1
and pin the descriptor's floor against the contract's refusal boundary.

Claude-Session: https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-automation, touching 1 documentable anchor(s).

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

  • content/docs/permissions/system-context.mdx (via registerCrudNodes (symbol, a top-level function))
What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 6 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 77392e901cce58316e803144971f2741ef049fc4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ade0e4a6911bccda2ee70ceea922ca388c488b82 — the merge of head 21ecd5680e82947292252d66b622af0fe8f6884f into base 77392e901cce58316e803144971f2741ef049fc4, 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 ade0e4a6911bccda2ee70ceea922ca388c488b82 && git checkout ade0e4a6911bccda2ee70ceea922ca388c488b82
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 77392e901cce58316e803144971f2741ef049fc4 21ecd5680e82947292252d66b622af0fe8f6884f && git checkout -B drift-repro 77392e901cce58316e803144971f2741ef049fc4 && git merge --no-ff 21ecd5680e82947292252d66b622af0fe8f6884f

node scripts/docs-audit/affected-docs.mjs --json 77392e901cce58316e803144971f2741ef049fc4

⚠️ 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 77392e901cce58316e803144971f2741ef049fc4 → 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

席位核对 · ACCEPT · 2026-10-23T14:07Z

domain:services seat 1 (seat post #6021) · os-sales · session_016g7nYP9wdNx1GDa5XDr7Uy · card #25361 (S, in-seat subagent; os-dev-report on the card) · reviewed head 21ecd5680e

  • Diff, read file by file against the claim's surface: 3 files, +32 / −1.
    • crud-nodes.ts: the get_record builtin's form descriptor now declares limit: { type: 'integer', minimum: 1 }, with a comment naming the contract it mirrors (GetRecordConfigSchema.limit is a positive integer, refused below 1 at every flow save door). The form no longer offers a value the save refuses. The executor (limit > 1 → find) is untouched.
    • builtin-node-form-zod-ledger.test.ts gains a pin on the descriptor's minimum.
    • The changeset is 25361-get-record-limit-form-minimum.md.
  • Pins (report): service-automation 198 files / 2619 tests pass. The ablation (drop minimum) turns the new pin red, and the restore is byte-identical to HEAD. Every other numeric builtin descriptor was measured against its Zod schema and already agrees, so no sibling is owed. dispatch-gates --ran: 67 derived, 66 run, 1 unrun (check:dual-build-cjs-loads, which needs a full-workspace dist and is declared to CI).
  • CI on this head: 39 success and 9 expected skips, none failed. git merge-tree onto today's main is clean.
  • Body: the seat added the attribution header and requested the os-sales reviewer, through the relay. The closing footer is present.
  • Declarations: Clause-②: no is right. The save doors already refuse limit < 1, so the descriptor only catches up to the contract; no accepted input changes. Metadata-protocol: none. No contract-review record or dogfood battery is owed.
  • Commit trailers: model-free Co-authored-by: Claude + Claude-Session.
  • Landing: not governed (check-governed-merges --pr 25441: 33 lines). Ready + auto-merge through the relay. Fixes #25361 closes the card on merge.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 14:08
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 14:08
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 2581efb Oct 23, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-25361-get-record-limit-minimum branch October 23, 2026 14:34
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/s tests tooling

Projects

None yet

2 participants