Skip to content

docs(data-modeling): document build-time expression validation guardrails (#1928)#3201

Merged
os-zhuang merged 1 commit into
mainfrom
claude/docs-formula-flow-guardrails
Jul 18, 2026
Merged

docs(data-modeling): document build-time expression validation guardrails (#1928)#3201
os-zhuang merged 1 commit into
mainfrom
claude/docs-formula-flow-guardrails

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

The formula/flow guardrail series (#1928, now closed) added build-time expression checks that were never documented. The docs-drift bot flagged the formula/validation guides on both #3178 and #3190 for exactly this reason. This adds the missing docs.

Changes

  • formulas.mdx — new Build-time validation section:
    • Qualify field references (bare amountrecord.amount; a bare ref silently evaluates to null) — error
    • Field must exist (typo'd record.<field> → did-you-mean) — error
    • Unknown function — error
    • Type soundness — a text/boolean field with an arithmetic/ordering operator against a number — warning
    • Callout: integer-literal arithmetic works (record.amount / 100, no 100.0 workaround needed — the engine handles double × int); equality against any type is safe.
    • How flow/automation conditions differ (fields bound bare; did-you-mean typo warnings; same type-soundness check; also enforced at registerFlow).
  • validation.mdx — a short companion note + cross-link to the new section.

Accuracy

Every claim is verified against the shipped behavior in @objectstack/formula / @objectstack/lint, including the correct severities (tier-1/2 fail the build; tier-3/4 are advisory, fatal only under --strict). Deliberately does not claim an agent validate_expression tool exists (it doesn't) — only objectstack build + registerFlow.

  • node scripts/check-doc-authoring.mjs → ✓ 200 files clean.
  • Internal anchor #build-time-validation and cross-links verified.

Docs-only; no code change.

Refs: #1928 (closed), #3178, #3190.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hnji7EEYR2mGt6pY53a8Bm


Generated by Claude Code

…ails

The formula/flow guardrail series (#1928) added build-time checks that were
never documented. Add a "Build-time validation" section to the formulas guide
covering: qualify field references (bare-ref → null), field existence, unknown
functions, and the text/boolean-in-arithmetic type-soundness warning — with
their severities (error vs advisory warning), the note that integer-literal
arithmetic (amount / 100) works at runtime, and how flow conditions differ
(bare fields, did-you-mean typo warnings). Add a companion note + cross-link to
the validation guide.

Docs-only; verified against the shipped behavior in @objectstack/formula and
@objectstack/lint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hnji7EEYR2mGt6pY53a8Bm
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 18, 2026 9:08am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/s labels Jul 18, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 18, 2026 09:16
@os-zhuang
os-zhuang merged commit b480011 into main Jul 18, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/docs-formula-flow-guardrails branch July 18, 2026 09:16
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants