Repository navigation
docs(spec): the guardOf docblock and its test title state the has() rule that holds now - #25367
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
…ule that holds now has() refuses an index only as the last step of its argument; an index before it is a presence test. The guard still skips a path with a numeric, `$`-named or keyword segment, because its step-at-a-time chain would end one test on that index. No behaviour change. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxRRuV3TrQJLgFHt1pL6JA
📓 Docs Drift Check
What this run could not see
Coarse fallback — 144 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewServed-tier: Read at 2026-10-23T04:22Z: card #25282 body and both comments (claim 6356807456, os-dev-report 6357243074), PR #25367 body and file list, the net diff ① Derived judgments
② Semver level
③ Boundary flags
The content review passes. The verdict is FAIL on the head's own gate conclusions only: one gate is red and derived gates have not finished. A re-render on this head once #25284 is resolved and the runs conclude green would PASS with no diff change. Implemented-by: VERDICT: FAIL Generated by Claude Code |
Brings the branch up to date with main so CI re-runs now that the duplicate fork PR is closed. The docblock wording landed here is credited to the fork contributor as well. Claude-Session: https://claude.ai/code/session_01NxRRuV3TrQJLgFHt1pL6JA Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: mig-builds <54319294+mig-builds@users.noreply.github.com>
Contract reviewServed-tier: Read at 2026-10-23T07:08Z: card #25282 body (now carrying ruling 6358845679) and all three comments (claim 6356807456, os-dev-report 6357243074, ruling 6358845679), PR #25367 body, file list and both comments (docs-drift 6357242841, the earlier record 6357326028 on Head provenance: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT ·
|
Requested by Tesla · project thread
Fixes #25282
Clause-②: no
Metadata-protocol: none
What changes
Two prose edits in
packages/spec/src/automation/flow-value-slot-template.tsand its test. No behaviour change.guardOfdocblock saidhas()refuses an index anywhere in its argument (has(a[0].b),has(vars["$x"].y)). Since PR fix(formula): has() over an indexed or call receiver evaluates as the CEL spec defines it #25275 that is no longer true:has()refuses an index only as the last step of its argument, and an index before it is a presence test. The docblock now says that, and gives the reason the guard still skips a path with a numeric segment, a$-named head or a keyword segment: the guard tests every step of the path, each of those segments is read by index, so one of the guard's tests would end on that index.has()refuses one at run time" now reads "an index in the path leaves it unguarded — a step-at-a-time guard would end ahas()on it, whichhas()refuses at run time". The assertions are unchanged.The rule, measured
Through
celEngine.evaluatein@objectstack/formulaat this head (a throwaway probe test, deleted after the run), withvars = { rows: [{ name: 'a' }], $x: { y: 1 }, record: { in: 1 } }:has(vars.rows[0].name)ok: true,truehas(vars.rows[0].nope)ok: true,falsehas(vars["$x"].y)ok: true,truehas(vars.rows[0])has() invalid argumenthas(vars["$x"])has() invalid argumenthas(vars.record["in"])has() invalid argumenthas(vars.rows) && has(vars.rows[0]) && has(vars.rows[0].name)(the guard's shape)has() invalid argumentSo the docblock's old examples are now accepted, and the guard the function would build for such a path still faults on its middle step. The behaviour (no guard) stays right; only the stated reason changed.
Changeset
skip-changeset. The file is.ts, not one of thesrc/**/*.zod.tssources@objectstack/specships infiles[], andguardOfis module-private. Measured on the builtdist/before the edit: the old docblock sentence ("takes a field selection over names alone") has 0 hits, while the same file'sABSENT_SENTENCEtext (positive control) is present indist/automation/index.js. The comment does not ship.Tests and gates (head d3abc1c)
pnpm --filter @objectstack/spec build, thenvitest run src/automation/flow-value-slot-template.test.ts(Test Files 1 passed, Tests 172 passed), thenpnpm --filter @objectstack/spec typecheck: lock VERDICT command-exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 79 commands. All were run with exit codes captured before any pipe;--ranreconciles: 79 derived, 78 run, 1 NOT-MEASURED, 0 UNRUN. All 78 run exited 0. Three first exited 3 on a missing prerequisite and were 0 on a rerun:check-plugin-teardown-shape --self-test(after fetching its pinned fixture commit),@objectstack/lint check:doc-formula-expressions(after building formula and lint) andcheck:lean-entry-closure(after building objectql). NOT MEASURED:check:dual-build-cjs-loads, reason: it needs every package'sdist/; left to CI.!in the title, no(narrowing)arm).Acceptance notes
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NxRRuV3TrQJLgFHt1pL6JA
Generated by Claude Code
Credit: mig-builds proposed the same fix in fork PR #25284, closed in favour of this PR per ruling 6358845679.
Co-authored-by: mig-builds 54319294+mig-builds@users.noreply.github.com