Uh oh!
There was an error while loading. Please reload this page.
docs: name both causes of next: null in the state-introspection prose - #11275
Merged
Conversation
The `/meta/object/:name/state/:field` dispatcher computes the answer as `from === undefined ? null : legalNextStates(schema, field, from)`, so `next: null` has two causes: no `state_machine` rule governs the field, and the caller omitted `?from=`. Both published prose sites named only the first, so a reader who calls without `from` concludes the object declares no state machine. The in-code bullet is left as-is: `legalNextStates` takes a required `currentState`, so for the function `null` really does mean "no FSM". The second cause belongs to the HTTP dispatcher only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RMTpSRF5CjMmQBFfPtPCwJ
hotlong
marked this pull request as ready for review
August 23, 2026 08:37
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#11049
What
next: nullon the state-introspection route has two causes; both published prose sites named only the first. This names both, at each site.The dispatcher computes the answer as:
(
packages/runtime/src/domains/meta.ts:245, and the same line atpackages/rest/src/rest-server.ts:6279.) Sonullmeans either nostate_machinerule governs the fieldorthe caller omitted?from=. A reader who calls withoutfromgotnulland, from the docs, concluded the object declares no state machine. For the skill that misreading is the expensive one: it is the corpus an AI author works from, and the wrong conclusion is "this object has no lifecycle to respect".Oracle: the repo already asserts the correct semantics on the QA side —
docs/qa/platform-checklist/areas/api-backend.json(clause on the dispatcher meta state route): "?from omitted returns next:null (no from ⇒ no transition table), a field with no FSM returns next:null". This PR is prose catching up to a fact the checklist already pins, not an open question.Scope refinement — the in-code bullet was already correct
The issue lists the
state-machine.mdxin-code bullet as part of the defect. Verified againstmain: it is not.legalNextStatesis declaredcurrentStateis required, and the function returnsnullonly when no matchingstate_machinerule exists. Thefrom-omitted cause is created by the HTTP dispatcher short-circuiting before it calls the function — it is not a property of the function. Adding "or when?from=is omitted" to the in-code bullet would have made that line newly wrong. Only the Over HTTP bullet is edited.Governed surface
This PR touches
skills/**(the published skill catalog), so the whole PR is a governed surface: opened as draft, no auto-merge, human merge only. Review requested from @os-zhuang.Skill file size readings
Budget for the skill file was ≤3 net added lines.
skills/objectstack-automation/SKILL.mdwhole file (lines)SKILL.md(lines)skills/objectstack-automation/SKILL.md(tokens)The binding constraint here was not the line budget but
check-skills-token-ratchet— the ceiling for this file is 12543 with only 60 bytes of headroom over the base. A first draft of the skill edit came in 66 bytes over and the ratchet failed it (over by 17tokens); the wording was tightened rather than the ceiling touched. Ceilings are shrink-only and maintainer-only to loosen — none was modified. Final verdict line:Changeset
Docs/skills prose only — no package behavior changes, nothing to publish. Carried by the
skip-changesetlabel per repo convention rather than a changeset file.Gates
Families derived with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackagainst the actual change set (2 paths) — 19 matched families, all run locally pluscheck:nul-bytes. All 20 green, run after the final commit at639babeon a clean tree:cross-package-test-inputs·doc-anchors·doc-authoring·doc-formula-expressions·doc-security-posture·docs-audit-scope·docs-redirects·spec check:empty-state·spec check:liveness·pm-governed-merges·published-readme-links·role-word·skill-compatibility·skill-frame-sync·spec check:strictness-ledger·spec check:variant-docs·check-cross-package-test-inputs.mjs·check-doc-frontmatter.mjs·check-skills-token-ratchet.mjs·check:nul-bytesFiles changed
content/docs/protocol/objectql/state-machine.mdx(+1/-1) — the Over HTTP bullet onlyskills/objectstack-automation/SKILL.md(+2/-1) — the existing Introspection parentheticalGenerated by Claude Code
Generated by Claude Code