Repository navigation
fix(formula)!: a flow condition that orders a bare date against text before date arithmetic on record. / previous. is refused - #37840
Conversation
…t text before date arithmetic on its record. read The bare pass and the record-root pass both met the bare Timestamp-vs-text ordering first and stood it down, and the record-root date-text pass stood down because the roots' own typing met date arithmetic first, a shape it read as answered by firstTypeMismatch. That pass is only reached where firstTypeMismatch answered null, so the stand-down could only ever drop a fault nobody else refused. Drop it (and its now-unused predicate); the mixed spelling takes the all-root spelling's date-text-arithmetic verdict. Claude-Session: https://claude.ai/code/session_01L9qibz2oLCRAYBpwsBBUyG Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibz2oLCRAYBpwsBBUyG Co-authored-by: Claude <noreply@anthropic.com>
…n the Skills-docs line Claude-Session: https://claude.ai/code/session_01L9qibz2oLCRAYBpwsBBUyG Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check5 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 85c63b5b2f987fe28711eb6a7e0926ed8a89f08f && git checkout 85c63b5b2f987fe28711eb6a7e0926ed8a89f08f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1028438748dfbb6a76a981a25310fe39c481fb2c 8ca7780c1a863d26cc9ca028d51be5aeb69514e9 && git checkout -B drift-repro 1028438748dfbb6a76a981a25310fe39c481fb2c && git merge --no-ff 8ca7780c1a863d26cc9ca028d51be5aeb69514e9
node scripts/docs-audit/affected-docs.mjs --json 1028438748dfbb6a76a981a25310fe39c481fb2c |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 8ca7780 · 2026-11-27T06:33Z L1-a (the seat's L1 thread) runs the isolated |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Inputs: card #36377 (body and its 4 comments: two triage notes, the claim 7210742031, the os-dev-report 7211625108; no earlier record or ruling on this card), PR #37840 body, file list (7 files) and net diff against Check-runs on the head when read: none failed. Success: Check Changeset, Check PR Size, Dogfood Regression Gate, Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, PR-body guards, Spec property liveness, Type Check · source gates, Flag docs affected by code changes, Plan Test Core shards, Plan Test UI shards, Auto Label, filter. Skipped by their own conditions: 10 (opt-in harnesses, Build Docs, Queue verdict, Temporal Conformance and the like). STILL PENDING, so not judged here: Test Core 1/10 to 10/10, Build Core, Build UI Deps, Live E2E UI, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Lint · ESLint, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus. The new pins in this diff run in Test Core, so their gate verdict is not in yet; this record judges the design and the declaration, and landing still waits on those runs. The PR is a draft. ① Derived judgments
② Semver levelClause-②: no (narrowing) — present line-initial in the PR body and in the changeset, with The changeset sets ③ Boundary flags
④ Design judgmentDoes the narrowing take a declared capability away, or make the spec's own refusal real? The second. Nothing published on Attempts to break it, all by code read:
No must-fix, no should-fix. Nits (none moves the verdict; a fix belongs on the prose faces only, or in a follow-up card, since any other fix moves the head and this record stops covering it):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The brief L1-a handed its isolated contract-review sub-agent for the record above, filled from
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a, the seat's L1 thread · 2026-11-27T07:07Z 席位核对 — L1 ACCEPT @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU 席位核对 — ACCEPT · head 8ca7780 · card #36377 · area o3-build · 2026-11-27T07:13ZSeat opinion: land as is; the narrowing is the card's own ask (refuse at validate/publish what already fails at run time).
|
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU 维护者速读
Seat opinion: approve; the refused spelling already fails at run time, so no working condition stops working. |
…c and record['FIELD'] index reads take the date-text verdicts (objectstack-ai#38949) Fixes objectstack-ai#35295 Clause-②: no (narrowing) Metadata-protocol: narrowed Skills-docs: none — `skills/objectstack-formula/SKILL.md` already states "The build refuses date arithmetic (`end - start`, `date + n`)" and that a date field is refused in a timestamp-only call, naming no spelling either rule is limited to, so both now hold for the mixed and index spellings as written; no skill teaches the index spelling ## 维护者速读 - 用户能看到什么变化:作者在校验或发布流程时,若流程条件把一个直接写的日期字段与「当前记录.字段」或「改动前记录.字段」相减,或用「记录['字段']」这种下标写法读日期字段,现在会和写法一致时一样被拒,并给出相同的改法;以前这两种写法能通过校验,流程每次运行都失败。 - 为什么做:属于「表达式校验与作者护栏」,是上一张同类修复留下的两个漏网写法,替编写流程的管理员和代写流程的 AI 助手解决「校验通过、上线后每次运行都出错」。 - 出错会怎样:若误判,作者在校验或发布流程时会看到一条拒绝;流程变量、节点输出这类真正认不出类型的写法照旧放行,已保存的流程照常加载注册,只在下次发布时要求改写;本改动可整体撤回。 - 要你做什么:这是收紧已接受写法的破坏性变更,待座位契约审核通过、试跑全套通过后,需要你本人审阅、批准并合并。 ## What changes Ruled C on the card (ruling record 7311348060, on the decision analysis 7306749599): one PR for both items. - **Item (2), mixed operands** — `packages/formula/src/validate.ts`, `recordRootDateTextIssue`. The flattened date-text check typed bare names in one pass (roots left `dyn`) and `record.` / `previous.` reads in another (bare names left `dyn`), so `due_date - record.borrow_date > duration('24h')` faulted neither while both consistent spellings were refused. The root pass now, after the roots-alone typing answers nothing, types the bare names (less the ones a flow variable shadows) and the roots against the field table in ONE pass. Every verdict the roots prove alone keeps its arm byte for byte; a verdict that rests on a bare name takes the bare name's arm, so where a node can rebind it (`bareNamesUnproven`) it is `date-text-arithmetic-run-may-fail`, as the ruling orders. A genuinely unproven operand (flow variable, node output, shadowed name) stays `dyn` and passes (ADR-0032 1c). - **Item (1), index reads** — `packages/formula/src/cel-engine.ts`. A new gate, `RECORD_ROOT_DATE_TEXT_READ_RE`, admits `record[` / `previous[` (single or double quotes) for the record-root DATE-TEXT pass only, so `timestamp(record['borrow_date'])`, `record['due_date'] - record['borrow_date']`, `isoDate(record['picked_up_at'])` and `record['due_date'] + 1 > 5` take the date-text verdicts. `RECORD_ROOT_READ_RE`, the gate of `firstTypeMismatch`'s root pass, stays member-only, so the text/boolean mismatch and date-arithmetic passes see index reads exactly as on the merge base: no verdict an expression had before changes, and no refusal is stood down to a warning (L2 7315274427, M1 / S1). `offendingRecordRead` names an index read by its member spelling (`record.borrow_date`) only for the date-text pass (`indexReads`), as `typedFieldRef` already did for calls; without it `due_date - record['borrow_date']` named a bare `borrow_date` that is not in the source. - `packages/spec/src/migrations/entries/semantic/19.flow-condition-mixed-or-index-spelling-date-text-refused.ts`: the ADR-0087 semantic entry (a structured TODO, no mechanical rewrite), modelled on PR objectstack-ai#37840's entry. - `.changeset/35295-date-text-mixed-spelling.md`: `minor` for `@objectstack/formula` and `@objectstack/spec`, both declaration lines, the Skills-docs line, **BREAKING** banner, FROM → TO table, the `adr-0087: registered` marker. Reach: the flattened scope is used only by flow conditions (lint's start / edge / `decision` conditions, `registerFlow`'s advisory, the MCP `validate_expression` flow-condition site). Record-scoped sites are unchanged. ## Tests `packages/formula/src/validate-date-text-arithmetic.test.ts`, new top-level describe (30 tests): - The 9 mixed forms of the analysis (`record.`, `previous.`, datetime, a span against a number, behind a select guard, no declared outcome, bare names unproven): one error, `ok: false`, the same code, operands, words (read named as written aside) and prescription as each consistent spelling; the run faults with no such overload on a dyn string minus a dyn string, over the engine's real scope. - The arm: run-fails proven, run-may-fail under `bareNamesUnproven`, the all-root spelling keeps run-fails there. - Six index rows (the analysis's 5 faulting index forms plus `previous["borrow_date"]`; 5 of the 6 passed on the merge base, `record['due_date'] - record.borrow_date` was refused there already because its member read opened the gate): the member spelling's code and reference; arithmetic equal byte for byte; for a call the prescribed `date(...)` parse substituted in place checks clean and evaluates `true`. - The narrower reach: `record['due_date'] + 1 > 5` takes `date-text-arithmetic-run-fails` (named `record.due_date`, the run faults); `previous['title'] > 5` takes no type-mismatch finding, as on the merge base. - M1 (L2): `due_date - borrow_date > duration('1h') && record['title'] > 5` and `record['active'] > 5 && isoDate(picked_up_at) == 'x'` stay refused with their date-text code on both arms (no declared outcome: `-run-may-fail`; record-triggered: `-run-fails`), no warning, as on the merge base. - S1 (L2) CONTROL: `record['due_date'] > record['title']`, `due_date > record['title']`, `record['due_date'] > title` and the same ordering written title-first by index check clean on both arms and evaluate, as on the merge base. The analysis's battery did not cover this shape; the first head refused it. - CONTROLS: five index reads the runtime answers (datetime under `timestamp()`, equality, `date(...)`, `daysBetween`, an ordering) stay clean and evaluate `true`; the TEN expressions that run today and B refused (a flow variable or node output holding an instant, `vars.cutoff`, a shadowing variable, four text concatenations) pass with no finding and evaluate `true`. Run harnesses: the analysis found `run` at `validate-date-text-arithmetic.test.ts:568` and `validate.test.ts:1349`, `:1432` binding bare names outside `ctx.extra`, so bare-spelling run pins faulted on `Unknown variable`. All three now bind the engine's scope (`celScope`: bare names, `record`, `previous` under `extra`); every existing run pin stays green on the real fault, and the two older bare-spelling run pins now assert the fault text (`ISO 8601`, `no such overload`), as the index run pin does. <details><summary>Local runs (head 5b8b6af)</summary> Tests under `scripts/pm/os-verify-lock.sh`, exit codes captured before any pipe. - `pnpm --filter @objectstack/formula exec vitest run --maxWorkers=2`: Test Files 72 passed (72), Tests 2211 passed (2211); `pnpm --filter @objectstack/formula run typecheck`: VERDICT command-exit 0 (`tsc --noEmit` and `check:test-typecheck`). - `pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-expressions.test.ts`: Tests 546 passed (546), against a formula `dist/` built from this branch. - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/migrations`: Tests 212 passed (212); `pnpm --filter @objectstack/spec check:generated`: all 14 generated artifacts up to date after `pnpm --filter @objectstack/spec build`. - Re-run at 5b8b6af after the patch: `check-adr-0087-registration`, spec `check:spec-changes` / `check:upgrade-guide`, `check:doc-authoring`, `check:nul-bytes`, `check:issue-citations`, `check-empty-changeset`, `check-changeset-no-major`: exit 0 each. - At 03e1b9d (first head; the patch touches the same six files): `node scripts/pm/dispatch-gates.mjs --commands`: 95 families derived for this diff; `--ran`: "95 derived, 93 run, 2 NOT-MEASURED, 0 UNRUN". NOT-MEASURED: `check:dual-build-cjs-loads` (exit 3, PREREQUISITE NOT MET: needs a full `pnpm build`), `check:type-check-debt` (stopped at the foreground bound while its closure build waited on the shared lock). Both are CI's. `check:slot-lookup` was cut by the same bound on its first pass and re-run alone to exit 0 (scan 203 s, self-test passed in the first pass). `pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts` and `check:doc-formula-expressions` first answered PREREQUISITE (no `dist/`) and passed after building their closures. - `test:repo` not run locally: the diff touches none of its tests; it is CI's (`Test Core`). </details> <details><summary>Ablation (committed first, mutated through scripts/ablation-replace.mjs, restored to the HEAD blob)</summary> The formula suite imports `./validate` from source, so no dist leg. At 5b8b6af, `src/validate-date-text-arithmetic.test.ts src/validate.test.ts` (273 tests): - Shared gate re-widened (`RECORD_ROOT_READ_RE` admits `[` again, marker `ABLATION-35295-REWIDEN`): 3 failed / 270 passed — the date-text-only reach test, the M1 test and the S1 control. Restored, blob equals HEAD, `git diff HEAD` empty. - Date-text gate back to the member spelling (marker `ABLATION-35295-INDEX`): 6 failed / 267 passed. Restored. - One-pass leg (`?? judged(bareCelTypes, …)` replaced by `?? null`, marker `ABLATION-35295-ONEPASS`): 11 failed / 262 passed — all 9 mixed rows, the arm test, `due_date - record['borrow_date']`. Restored. - Index naming off for the date-text pass (marker `ABLATION-35295-NAMING`): 3 failed / 270 passed. Restored. </details> <details><summary>Corpus</summary> - Behavioural, at 5b8b6af: every `validateExpression` call recorded by the analysis over the shipped examples (app-crm, app-showcase, app-multi-package) and the formula and lint suites, re-judged by the base formula source (05da5bd, equal to `origin/main`'s) and this head: 9,157 unique calls, 2,586 at flattened scope with field types, 0 verdict changes. Controls (4 rows): the mixed form and an index call change; an index text mismatch (`record['title'] > 5`) and the `due_date` ordering do not. - Text scan over 29,402 tracked files: index reads of `record` / `previous` with a quoted key, 109 hits outside this PR's test file, none a flow condition doing date arithmetic or a date call (record-scope formulas, equality-only field-existence pins, UI code); mixed bare / root arithmetic, 0 CEL hits outside this PR (positive control: 14 and 6 hits in the new test file). No authored instance in examples, docs or skills. </details> ## Acceptance notes - The ruling's "one pass" is the second leg of `recordRootDateTextIssue`, asked only after the roots-alone typing answers nothing (the analysis's prototype C, measured 0 false refusals). Keeping the roots-alone leg first is what keeps every currently refused verdict, and its arm, byte for byte. - Index reach (seat decision on L2 7315274427): the index spelling takes the date-text verdicts only. The first head widened the shared gate, which also opened the text/boolean mismatch pass to index reads; that stood a date-text refusal down to a warning (M1) and refused an ordering against a text field that evaluates (S1). Both are back to the merge base and pinned; re-widening the shared gate reds those pins. - Under `bareNamesUnproven` the mixed verdict's `run-may-fail` sentence names the read the reference names (`record.borrow_date`), while the unproven operand is the bare name. The sentence is the existing one, as ruled; not reworded here. - Standing behaviour on main, outside this diff and left as it is: a text mismatch warning hiding a date-family error for the member and bare spellings; the member spelling's verdict on an ordering of a date against a text field; `[due_date, record.borrow_date].exists(d, d > '2026-01-01')` refused while it evaluates; `(status == 'open' ? now() : null) - record.picked_up_at > duration('1h')` passing while it faults. The seat files or dedupes them. - Clause-② line: the claim comment carries `Clause-②: no`; the ruling record and the dispatch carry `no (narrowing)`, which this PR and its changeset use. - L2: a narrowing, so a contract-tier review is owed, and the dogfood battery runs on the final head (the seat arms it). ## Verification Read first: (1) `packages/formula/src/validate.ts` `recordRootDateTextIssue` — the arm of the second leg is the risk; (2) `packages/formula/src/cel-engine.ts` `RECORD_ROOT_READ_RE` / `RECORD_ROOT_DATE_TEXT_READ_RE` — which gate opens to the index spelling is the risk; (3) the `RUNS_TODAY` controls in the new describe. Two-minute check: `pnpm --filter @objectstack/formula exec vitest run src/validate-date-text-arithmetic.test.ts` — expect 30 tests under "(objectstack-ai#35295)" passing, among them ten "CONTROL: … runs today and still passes". --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYnrQ7UMtHofKQVjcH2)_ <!-- signed: repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Tesla · project thread
Fixes #36377
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none —
skills/objectstack-formula/SKILL.mdalready states "The build refusesend - start,date + n,today() + 30" and names no site or spelling it is limited to, so it now holds for this flow-condition spelling as writtenrepo:objectstack#3 · os-tesla · session_01L9qibz2oLCRAYBpwsBBUyG
维护者速读
What changes
A flow condition (start, edge,
decisionbranch) binds the run's row twice: its fields flattened to bare names, and the row asrecord(the row before the write asprevious). A condition that first orders a date field's bare name against a text literal and then does arithmetic on a root read was refused by no pass:firstTypeMismatch's bare pass metTimestamp > string(the bare ordering) first, andconfirmAgainstDateTextstood it down (the runtime answers a date text ordered against a text literal).isDateArith, and answered null.validate.ts's bare date-text pass leaves rootsdyn, so it found nothing.recordRootDateTextIssueaskedrecordRootReadsFaultDateArith, which types the roots alone, metrecord.due_date + 1first, and stood down as "answered byfirstTypeMismatch", which had answered null.Reproduced on
origin/mainc826e8a before any edit (validateExpression('predicate', …), flattened scope,faultOutcome: 'run-fails',due_date: date):due_date > "2026-01-01" && record.due_date + 1 > 5date-text-arithmetic-run-fails,DateText + int,record.due_datedue_date > "2026-01-01" && previous.due_date - 7 < 0date-text-arithmetic-run-fails,DateText - int,previous.due_datedue_date > "2026-01-01" && record.picked_up_at + 1 > 5(datetime)date-text-arithmetic-run-fails,record.picked_up_atrecord.due_date > "2026-01-01" && record.due_date + 1 > 5(all-root)date-text-arithmetic-run-fails,record.due_datedue_date > "2026-01-01" && due_date + 1 > 5(all-bare)date-text-arithmetic-run-fails,due_daterecord.due_date + 1 > 5 && due_date > "2026-01-01"(arithmetic first)date-arithmetic-run-fails,record.due_dateThe fix,
packages/formula/src/validate.tsrecordRootDateTextIssue: drop the stand-down. That pass is reached only fromtypeSoundnessIssue's!mismatchbranch, i.e. only wherefirstTypeMismatchanswered null, so "the roots' own typing meets date arithmetic first ⇒ answered byfirstTypeMismatch" could only ever stand down on a fault nobody else refused. Without it, the mixed spelling takes the all-root spelling's verdict, code and words byte for byte (pinned).recordRootReadsFaultDateArith(cel-engine.ts, internal, not exported from the package entry) had no other caller and is removed; both docblocks say why.The verdict family: the dispatch's suggested route was to judge the root pass's date-arith fault independently of the bare ordering, which would answer
date-arithmetic(Timestamp + int). I took the card's second fix direction instead (have the stand-down askfirstTypeMismatch's actual answer, which is null by construction there), because then the mixed spelling gets exactly what its all-bare and all-root spellings get (date-text-arithmetic), which is the card's done-when ("refused … like the other two"). Both families are errors with the same outcome arms and prescribedaysBetween/addDays.One case answers
date-arithmeticand is pinned so: where a flow variable holds the bare name (flowVariables: ['due_date']), the bare ordering is not the field's, the record-root pass meets the root arithmetic first, and it answersdate-arithmetic-run-fails, asrecord.due_date + 1 > 5alone does.packages/spec/src/migrations/entries/semantic/19.flow-condition-bare-ordering-before-record-date-arithmetic-refused.ts: the ADR-0087 semantic entry (a structured TODO, no mechanical rewrite), modelled on fix(formula)!: a flow condition's record. / previous. date arithmetic is refused as its bare name is #36333's18.flow-condition-record-date-arithmetic-refused.ts..changeset/36377-flow-bare-ordering-record-date-arithmetic.md:minorfor@objectstack/formulaand@objectstack/spec, both declaration lines, the Skills-docs line, BREAKING banner, FROM → TO table,adr-0087: registered flow-condition-bare-ordering-before-record-date-arithmetic-refused. Same shape as fix(formula)!: a flow condition's record. / previous. date arithmetic is refused as its bare name is #36333's.Reach: the flattened scope is used only by flow conditions (lint's start / edge /
decisionconditions,registerFlow's advisory, the MCPvalidate_expressionflow_conditionsite). Record-scoped sites are unchanged.Tests
packages/formula/src/validate.test.ts, new top-level describe (fix(formula): a bare date ordering before a record. date arithmetic still slips past the flow-condition refusal (follow-up of #36333) #36377): the mixed spelling forrecord./previous./ a datetime field equals the all-root spelling's verdicts (code, params, message) and faults incelEngine.evaluate; the all-bare spelling's code. Arms:run-may-failwith no declared outcome,run-failskept when bare names are unproven,date-arithmetic-run-failswhen a flow variable shadows the bare name. CONTROL: arithmetic first keepsdate-arithmetic; the bare ordering besiderecord.due_date < today(),daysBetween(…),addDays(previous.due_date, -7) < today()is clean. N3 pinned: the lint: a flow condition's bare-name type verdict ignores names a screen node or an open binder (script, connector_action, wait, subflow, map) binds, so a record-triggered flow can be refusedtype-mismatch-run-failson a name that holds the bound value #30025 swap under unproven bare names handstitle > 5 && record.due_date + 1 > 5the root read'sdate-arithmetic-run-fails(record.due_date).packages/lint/src/validate-expressions.test.ts, new top-level describe: start, edge anddecisionconditions give the mixed spelling the all-root spelling's finding (severity, path, message), forrecord./previous./ datetime. CONTROL: the bare ordering besiderecord.due_date < today()is clean at all three sites.packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts, new top-level describe: the publish door (publishMetaItemon the realObjectQLrig) refuses the mixed spelling forrecord.andprevious.withINVALID_METADATA/ 422, exactly one date-arithmetic issue naming the root read, the same finding as the all-root spelling's (the message before its quoted source), and leaves the itemdraft. CONTROL: the bare ordering besiderecord.due_date < today()publishes and goesactive.Local runs (head 8ca7780)
Exit codes captured before any pipe; tests, builds and typechecks under
scripts/pm/os-verify-lock.sh(the first formula and lint test runs at 2087f66 were not under the lock; the lint file and the formula suite are unchanged since and the runtime file was rerun under it).pnpm --filter @objectstack/formula exec vitest run --maxWorkers=2exit 0, Test Files 72 passed (72), Tests 2155 passed (2155).pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-expressions.test.tsexit 0, Tests 538 passed (538).packages/runtime:vitest run src/domains/meta-flow-condition-record-date-text.test.tsVERDICT command-exit 0, Tests 6 passed (6).pnpm --filter @objectstack/spec exec vitest run src/migrationsTests 202 passed (202);pnpm --filter @objectstack/service-automation exec vitest run src/flow-registration-schema-e2e.test.tsTests 7 passed (7); VERDICT command-exit 0.pnpm --filter @objectstack/formula run typecheck && pnpm --filter @objectstack/lint run typecheckVERDICT command-exit 0.pnpm --filter @objectstack/runtime run typecheck:tsc --noEmitclean;check:test-typechecknames 3 files this diff does not touch (boolean-written-spelling-row-scope.test.ts,meta-object-publish-column-changes.test.ts,organization-ownership-boot-guard.turso-remote.kernel.test.ts, 1 error each); the touched test file is not among them. CI'sTypeScript Type Checkis the verdict.node scripts/pm/dispatch-gates.mjs --commands: 95 families derived for this diff; all 95 run,--ranreconciliation: "95 derived, 95 run, 0 NOT-MEASURED (a DERIVED zero — all 95 recorded an exit code and none of them is 3)". Three first answered exit 3 and were rerun to exit 0:check-plugin-teardown-shape --self-test(shallow clone; the fixture sha fetched),check:type-check-debt(queued behind the dogfood hold; rerun under the lock),check:dual-build-cjs-loads(needs the full build the previous one ran).!title), head 8ca7780:pnpm --filter @objectstack/dogfood testunder the lock, VERDICT command-exit 0, Test Files 490 passed, 3 skipped (493), Tests 4144 passed, 68 skipped (4212), no failure.test:reponot run locally: the diff touches none of its tests; it is CI's (Test Core).Ablation (committed first, mutated through scripts/ablation-replace.mjs, restored to the HEAD blob)
Subject: the removed stand-down in
recordRootDateTextIssue(packages/formula/src/validate.ts). Mutation: after theRECORD_ROOT_READ_REguard, re-insert a stand-down on the roots-only typing's date-arith answer (firstTypeMismatch(source, celFieldTypes, 'flattened', every name shadowed)?.category === 'date-arith', the removed predicate's semantics), markerABLATION-36377; anchor 1 to 0, blob9fb19fcb8bd1to28d00dc285eb. The formula suite imports./validatefrom source, so no dist leg. Red:src/validate.test.ts2 failed / 149 passed, the mixed-spelling verdict test and the arm test; the CONTROL and N3 tests stayed green. Restored: blob9fb19fcb8bd1=HEAD:packages/formula/src/validate.ts,git diff HEADempty, marker count 0.Acceptance notes
offendingRecordReadnames the firsttimestampfield read through a root in field-map order, which can differ from the field in the arithmetic (record.borrow_date < today() && record.due_date + 1 > 5). The bare path'soffendingFieldhas the same best-effort rule; the verdict and code are right either way.due_date + 1 > 5 && record.due_date + 1 > 5) reports the bare verdict atdate-arithmetic-run-may-fail. Still an error.Verification
Read first, by risk:
packages/formula/src/validate.ts,recordRootDateTextIssue: the removed stand-down (the narrowing itself) and its docblock.packages/formula/src/cel-engine.ts: the removedrecordRootReadsFaultDateArithand the corrected record-root comment.packages/spec/src/migrations/entries/semantic/19.flow-condition-bare-ordering-before-record-date-arithmetic-refused.ts(the upgrade-guide text).Two-minute check:
pnpm --filter @objectstack/formula exec vitest run --maxWorkers=2 src/validate.test.ts -t 36377shows 4 passing tests.Generated by Claude Code