Skip to content

docs(data-modeling): the unique default cell states the type-conditional default - #15505

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-14940-field-types-unique-default-cell
Sep 4, 2026
Merged

baozhoutao merged 1 commit into
mainfrom
claude/issue-14940-field-types-unique-default-cell

Conversation

@claude

@claude claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #14940

What changed

One cell, one line: the unique row of the Universal Field Properties table in
content/docs/data-modeling/field-types.mdx now states the type-conditional default the
schema has applied since #13894 landed (PR #14904, merged 2026-09-03).

  • Default cell: `false` becomes `false` (`'organization'` on `autonumber`) — the same
    one-token-plus-qualifier voice as the neighbouring default cells.
  • Description cell gains one sentence, worded to match the unique doc block in FieldSchema
    and the autonumber callout on the same page: "Omitted ⇒ false, except on an autonumber
    field, where omitted ⇒ 'organization' — an auto-number is a business identifier, so the
    platform makes it unique per organization by default; write unique: false explicitly to opt out."

git diff --stat for this PR: content/docs/data-modeling/field-types.mdx | 2 +- — 1 insertion, 1 deletion.

The autonumber callout at :485 / :493 is deliberately UNCHANGED

The card's opening paragraphs were written against the pre-#13894 tree and are inverted by the
triage (14940#issuecomment-5542748654). The callout's sentence — "an autonumber guarantees a
unique, ever-increasing business identifier" — is true against the schema as it stands today,
because an omitted unique on an autonumber field now materialises as 'organization'. Editing
or weakening it would delete a true sentence. The only thing the card's own branching left to do is
the table cell, and that is all this PR touches.

Re-measured on current main before writing the cell

The card's probe (FieldSchema.safeParse on a field that omits unique) was re-run against
origin/main at 4f85e4d11, through a freshly built @objectstack/spec
(packages/spec/dist/data/index.mjs, pnpm --filter @objectstack/spec build, exit 0). The cell's
whole content is what this answers:

autonumber (unique omitted)            -> ok=true unique="organization"
autonumber (unique: false explicit)    -> ok=true unique=false
text (unique omitted)                  -> ok=true unique=false
number (unique omitted)                -> ok=true unique=false

The card's own reading (autonumber (unique omitted) -> ok=true unique=false, taken at 450e73b4)
is superseded, as the triage said it would be. The materialising line is
packages/spec/src/data/field.zod.ts:2115 — patch.unique = field.type === 'autonumber' ? 'organization' : false;
— pinned by packages/spec/src/data/field-autonumber-default-unique.test.ts.

Verification

Gate family derived from the change set rather than hand-listed:
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, exit code 0,
which printed:

dispatch-gates: gate list derived from the tree of 'objectstack-ai/objectstack' at commit 4f85e4d11
  --repo 'objectstack-ai/objectstack' checked against this checkout's 'origin' remote — it holds.
dispatch-gates: change set derived from git — 1 path(s) vs merge base 4f85e4d11 of 'origin/main' and HEAD
  · content/docs/data-modeling/field-types.mdx
dispatch-gates --commands: 37 command(s) — 25 pnpm, 12 direct node

All 37 derived commands were run after the final commit, on b822fdbf0
(git rev-parse --short HEAD), each exit code captured by redirect before any pipe
(cmd > log 2>&1; EXIT=$?). 37 of 37 exit 0. Verdict lines the gates printed themselves:

✅ check-doc-anchors: 305 internal #fragment link(s) across 410 source file(s) all resolve to a real heading
✓ check-doc-frontmatter: 2 content root(s) verified, each against its own floor — content/docs 405, content/blog 3
✓ check-docs-single-h1: 405 page(s) under content/docs/ carry no body-level `# ` heading (0 subtree(s) excluded)
✓ doc authoring guard: 394 files clean — no bare metadata literals.
check-nul-bytes: OK (scanned 7502 text file(s) -- 7502 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
✓ docs-accuracy-audit scope is in sync with content/docs/: 190 hand-written doc(s)
✓ affected-docs self-test: 568 cases pass.

pnpm -s check:pm-dispatch-gates is not in the derived family for this change set and was
therefore not run.

Three gates first answered NOT MEASURED rather than green — recorded as such, then remeasured:
check:doc-formula-expressions and check:doc-security-posture exited 3
(PREREQUISITE NOT MET — @objectstack/formula / @objectstack/lint not built) and
check:skill-examples exited 1 on its own prerequisite refusal
(packages/client-react/dist holds no .d.ts declarations). After
pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint --filter=@objectstack/client-react
(34 tasks successful, exit 0) all three exit 0. Both builds ran through the shared verify lock
(scripts/pm/os-verify-lock.sh, VERDICT command-exit 0).

One further gate, pnpm check:docs-audit-scope, reds on a box where a previous gate in this same
run left packages/spec/.examples-build-src/ behind — a known, already-filed local run-order
interaction (#15457), unrelated to this diff and reproduced on a clean checkout of 4f85e4d11
with zero edits, where the same self-test passes. Run on a tree without those gitignored
byproducts it exits 0, as quoted above.

Changeset

None, and this PR takes skip-changeset: it publishes nothing from any released package — the
diff is a single line of content/docs/**, consumed only by the private docs app.

Scope

The scope fence inherited from #14901 is kept: this is the unique default cell only, not a sweep
of the Universal Field Properties table. The generated reference page
content/docs/references/data/field.mdx carries the AUTO-GENERATED banner and was not
hand-edited; its unique row was checked and already carries the post-#13894 wording, so there is
no generator staleness to report.

🤖 Generated with Claude Code

https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk


Generated by Claude Code

…ional default (#14940)

`FieldSchema` has materialised `unique` type-conditionally since #13894 landed
(PR #14904): an omitted `unique` resolves to `'organization'` on an `autonumber`
field and to `false` on every other type; an explicit `unique: false` is the
opt-out. The Universal Field Properties table on `field-types.mdx` still stated
one flat `false`, so an author reading the table got a wrong answer for one
field type.

Re-measured on current `main` through the built `@objectstack/spec` before
writing the cell:

    autonumber (unique omitted)            -> ok=true unique="organization"
    autonumber (unique: false explicit)    -> ok=true unique=false
    text (unique omitted)                  -> ok=true unique=false
    number (unique omitted)                -> ok=true unique=false

The `autonumber` callout at `:485` / `:493` is deliberately UNCHANGED: its
"guarantees a unique, ever-increasing business identifier" is true against the
post-#13894 schema, and the wording of the new cell is kept consistent with it
and with the `unique` doc block in `FieldSchema`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
@github-actions github-actions Bot added size/xs documentation Improvements or additions to documentation labels Sep 4, 2026
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

ACCEPT — PM seat domain:devx @ objectstack (#6023), session session_012zGPuVVX3deAx9LdjK8jCk.

Reviewed against the three-dot diff origin/main...claude/issue-14940-field-types-unique-default-cell (merge base 4f85e4d11, head b822fdbf0): one file, content/docs/data-modeling/field-types.mdx, +1/−1 — the unique row of the Universal Field Properties table only. Default cell now false ('organization' on autonumber), one added sentence in the voice of the FieldSchema doc block naming the explicit unique: false opt-out; the autonumber callout at :485 / :493 is byte-untouched, as the triage (5542748654) required. Probe re-measured on main through a freshly built @objectstack/spec: autonumber omitted → 'organization', explicit false → false, text/number omitted → false. The generated reference page carries the AUTO-GENERATED banner, was not hand-edited, and already reads post-#13894. Derived family 37/37 green (three prerequisite misses re-measured after building the packages they read). Hot-file scan: #15505 is the only open PR on the page. skip-changeset is right. Fixes #14940 closes the card on merge. Flip + arm follow as soon as the MCP channel recovers from its rate limit.


Generated by Claude Code

@baozhoutao
baozhoutao marked this pull request as ready for review September 4, 2026 19:14
@baozhoutao
baozhoutao enabled auto-merge September 4, 2026 19:14
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit ed9d876 Sep 4, 2026
37 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-14940-field-types-unique-default-cell branch September 4, 2026 19:43
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/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] field-types.mdx autonumber callout promises "guarantees a unique ... business identifier", but unique resolves to false on autonumber

1 participant