Skip to content

fix(formula)!: a flow condition that orders a bare date against text before date arithmetic on record. / previous. is refused - #37840

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-lzodgq
Nov 27, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-lzodgq

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #36377
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — skills/objectstack-formula/SKILL.md already states "The build refuses end - 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 written

repo:objectstack#3 · os-tesla · session_01L9qibz2oLCRAYBpwsBBUyG

维护者速读

  • 用户能看到什么变化:作者在校验或发布流程时,若流程条件先把日期字段直接和一段日期文字比较、再通过「当前记录」或「修改前记录」对日期加减数字,现在会被拒并提示改用按天计算的函数;以前只有这种混写能通过校验,运行时却每次失败。
  • 为什么做:属于「表达式校验与作者护栏」,是上一张同类修复(流程条件里通过记录读日期再加减数字)留下的漏网写法,替编写流程的管理员和代写流程的 AI 助手解决「校验通过、流程每次运行都出错」。
  • 出错会怎样:若误判,作者在校验或发布流程时会看到一条拒绝;已保存的流程照常加载、照常注册,只在下次发布时要求改写;本改动可整体撤回。
  • 要你做什么:这是收紧已接受写法的破坏性变更,待座位契约审核通过后需要你本人审阅、批准并合并。

What changes

A flow condition (start, edge, decision branch) binds the run's row twice: its fields flattened to bare names, and the row as record (the row before the write as previous). 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:

  1. firstTypeMismatch's bare pass met Timestamp > string (the bare ordering) first, and confirmAgainstDateText stood it down (the runtime answers a date text ordered against a text literal).
  2. Its record-root pass types bare names and roots together, so it met the same ordering first, not isDateArith, and answered null.
  3. validate.ts's bare date-text pass leaves roots dyn, so it found nothing.
  4. recordRootDateTextIssue asked recordRootReadsFaultDateArith, which types the roots alone, met record.due_date + 1 first, and stood down as "answered by firstTypeMismatch", which had answered null.

Reproduced on origin/main c826e8a before any edit (validateExpression('predicate', …), flattened scope, faultOutcome: 'run-fails', due_date: date):

condition before after (this head) run on the row's text
due_date > "2026-01-01" && record.due_date + 1 > 5 0 findings date-text-arithmetic-run-fails, DateText + int, record.due_date faults
due_date > "2026-01-01" && previous.due_date - 7 < 0 0 findings date-text-arithmetic-run-fails, DateText - int, previous.due_date faults
due_date > "2026-01-01" && record.picked_up_at + 1 > 5 (datetime) 0 findings date-text-arithmetic-run-fails, record.picked_up_at faults
record.due_date > "2026-01-01" && record.due_date + 1 > 5 (all-root) date-text-arithmetic-run-fails, record.due_date unchanged faults
due_date > "2026-01-01" && due_date + 1 > 5 (all-bare) date-text-arithmetic-run-fails, due_date unchanged faults
record.due_date + 1 > 5 && due_date > "2026-01-01" (arithmetic first) date-arithmetic-run-fails, record.due_date unchanged faults

The fix, packages/formula/src/validate.ts recordRootDateTextIssue: drop the stand-down. That pass is reached only from typeSoundnessIssue's !mismatch branch, i.e. only where firstTypeMismatch answered null, so "the roots' own typing meets date arithmetic first ⇒ answered by firstTypeMismatch" 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 ask firstTypeMismatch'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 prescribe daysBetween / addDays.

One case answers date-arithmetic and 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 answers date-arithmetic-run-fails, as record.due_date + 1 > 5 alone does.

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

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=2 exit 0, Test Files 72 passed (72), Tests 2155 passed (2155).
  • pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-expressions.test.ts exit 0, Tests 538 passed (538).
  • packages/runtime: vitest run src/domains/meta-flow-condition-record-date-text.test.ts VERDICT command-exit 0, Tests 6 passed (6).
  • pnpm --filter @objectstack/spec exec vitest run src/migrations Tests 202 passed (202); pnpm --filter @objectstack/service-automation exec vitest run src/flow-registration-schema-e2e.test.ts Tests 7 passed (7); VERDICT command-exit 0.
  • pnpm --filter @objectstack/formula run typecheck && pnpm --filter @objectstack/lint run typecheck VERDICT command-exit 0. pnpm --filter @objectstack/runtime run typecheck: tsc --noEmit clean; check:test-typecheck names 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's TypeScript Type Check is the verdict.
  • node scripts/pm/dispatch-gates.mjs --commands: 95 families derived for this diff; all 95 run, --ran reconciliation: "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).
  • Dogfood battery (the ! title), head 8ca7780: pnpm --filter @objectstack/dogfood test under the lock, VERDICT command-exit 0, Test Files 490 passed, 3 skipped (493), Tests 4144 passed, 68 skipped (4212), no failure.
  • test:repo not 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 the RECORD_ROOT_READ_RE guard, 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), marker ABLATION-36377; anchor 1 to 0, blob 9fb19fcb8bd1 to 28d00dc285eb. The formula suite imports ./validate from source, so no dist leg. Red: src/validate.test.ts 2 failed / 149 passed, the mixed-spelling verdict test and the arm test; the CONTROL and N3 tests stayed green. Restored: blob 9fb19fcb8bd1 = HEAD:packages/formula/src/validate.ts, git diff HEAD empty, marker count 0.

Acceptance notes

  • N1 (not fixed, noted): offendingRecordRead names the first timestamp field 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's offendingField has the same best-effort rule; the verdict and code are right either way.
  • N2 (not fixed, noted, behaviour kept as fix(formula)!: a flow condition's record. / previous. date arithmetic is refused as its bare name is #36333 left it): under unproven bare names, a source with both a bare-name and a root-read date-arithmetic fault (due_date + 1 > 5 && record.due_date + 1 > 5) reports the bare verdict at date-arithmetic-run-may-fail. Still an error.
  • N3: pinned (above).
  • The dispatch's suggested route was replaced (see What changes); its mechanism read was confirmed by the repro.

Verification

Read first, by risk:

  1. packages/formula/src/validate.ts, recordRootDateTextIssue: the removed stand-down (the narrowing itself) and its docblock.
  2. packages/formula/src/cel-engine.ts: the removed recordRootReadsFaultDateArith and the corrected record-root comment.
  3. 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 36377 shows 4 passing tests.


Generated by Claude Code

…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>
…n the Skills-docs line

Claude-Session: https://claude.ai/code/session_01L9qibz2oLCRAYBpwsBBUyG
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation labels Nov 27, 2026
@github-actions github-actions Bot added tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

5 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
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 1028438748dfbb6a76a981a25310fe39c481fb2c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 85c63b5b2f987fe28711eb6a7e0926ed8a89f08f — the merge of head 8ca7780c1a863d26cc9ca028d51be5aeb69514e9 into base 1028438748dfbb6a76a981a25310fe39c481fb2c, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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 CONTRACT_REVIEW_TIER review on this head (narrowing face, plus the schema face on the semantic migration entry), in parallel with its L1.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8ca7780c1a863d26cc9ca028d51be5aeb69514e9
Local-runs: none
Scope: packages/formula/src/cel-engine.ts, packages/formula/src/validate.ts, packages/formula/src/validate.test.ts, packages/lint/src/validate-expressions.test.ts, packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts, packages/spec/src/migrations/entries/semantic/19.flow-condition-bare-ordering-before-record-date-arithmetic-refused.ts + read, not reviewed: packages/formula/src/index.ts and packages/formula/package.json (the package entry), packages/spec/src/migrations/entries/semantic/18.flow-condition-record-date-arithmetic-refused.ts, skills/objectstack-formula/SKILL.md, AGENTS.md (changeset rule); the changeset .changeset/36377-flow-bare-ordering-record-date-arithmetic.md read for ②

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 main, and the check-runs on the head. Everything below marked "by code read" was traced in the tree at the head and not executed.

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

  • Accept-set, the declared change: RIGHT. In typeSoundnessIssue the record-root date-text pass is called only inside the !mismatch branch, and 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 refused type-mismatch-run-fails on a name that holds the bound value #30025 swap can only replace a non-null mismatch with another non-null one, so recordRootDateTextIssue runs only where firstTypeMismatch answered null. The removed line stood down "because firstTypeMismatch answered", at the one place it had not. Traced for due_date > "2026-01-01" && record.due_date + 1 > 5: the bare pass meets Timestamp > string, confirmAgainstDateText returns null; the record-root pass in firstTypeMismatch meets the same ordering first, its date-text re-check faults on DateText + int, which is neither text nor boolean, so it returns null too; the bare date-text pass leaves the roots dyn and finds nothing. On main the roots-only typing then met record.due_date + 1 and stood the last pass down: zero findings. At the head that pass answers date-text-arithmetic-run-fails (or -run-may-fail) naming the root read, which is what the all-root spelling already takes on main for the same reason (its own ordering comes first). Same code family, same arm rule (dateArm('flattened', faultOutcome, false)), same words.
  • Accept-set, wider than the declared sentence: RIGHT in behaviour, under-described in words (N1 below). The removed stand-down was not specific to an ordering against a text literal. By code read, every flattened condition where a bare-name shape makes firstTypeMismatch answer null ahead of root date arithmetic is newly refused with the same code: a concatenation first ("Due: " + due_date != "" && record.due_date + 1 > 5, string + Timestamp confirmed away), a bare date ordered against a number first (due_date > 5 && record.due_date + 1 > 5, Timestamp > int is neither date arithmetic nor a text/boolean mismatch, so null). In each, the root arithmetic is real and faults whenever it is evaluated, so none is a false refusal.
  • No false refusal found. The pass types every bare name dyn and the roots as the date text, keeps only date-text-call* / date-text-arithmetic*, and a root member is never shadowed by a flow variable, so a finding needs arithmetic (or a call) on a date field's text through record. / previous., which the evaluator cannot answer. The clean controls are pinned at all three levels (... && record.due_date > today()-style ordering, daysBetween, addDays).
  • The flow-variable case (flowVariables: ['due_date']) answering date-arithmetic-run-fails: RIGHT and unchanged by this diff. With the bare name shadowed there is no bare ordering fault, so firstTypeMismatch's own record-root pass answers, as for record.due_date + 1 > 5 alone.
  • Public surface: RIGHT. recordRootReadsFaultDateArith was exported from cel-engine.ts but packages/formula/src/index.ts never re-exported it and package.json exports only .; its single caller is the removed line. No published symbol moves. No schema, no error code and no message text is added: every code the mixed spelling can now take already exists on main.
  • Run-time behaviour: unchanged (no evaluator hunk). registerFlow stays advisory per the changeset and the entry; not re-verified here beyond the absence of any hunk in that path.
  • Pins: the formula test asserts the mixed spelling's verdict deep-equals the all-root spelling's and that the evaluator faults on it; lint asserts it at start, edge and decision; runtime asserts the publish door (INVALID_METADATA, 422, draft kept) and a publishing control. The ablation the PR body reports (2 red on re-inserting the stand-down) is the dev's account and was not re-run.

② Semver level

Clause-②: no (narrowing) — present line-initial in the PR body and in the changeset, with Metadata-protocol: narrowed. Correct on both counts: no schema or governed path is in the tree, and a value an author could publish is now refused.

The changeset sets @objectstack/formula and @objectstack/spec to minor. That matches the rule (a narrowed kind takes at least minor on each package the diff moves): formula carries the source change, spec gains a migration entry; lint and runtime change only test files and publish nothing new. It carries the BREAKING banner, a FROM → TO table, the adr-0087: registered flow-condition-bare-ordering-before-record-date-arithmetic-refused line, and the entry with that exact id exists in the diff as a structured TODO (no mechanical rewrite is possible, as for entry 18). The title carries !. Check Changeset concluded success. Level and declarations match what the diff publishes.

③ Boundary flags

④ Design judgment

Does the narrowing take a declared capability away, or make the spec's own refusal real? The second. Nothing published on main declares arithmetic against a number on a date field's text as something a flow condition can do: skills/objectstack-formula/SKILL.md states the build refuses date + n with no site or spelling excepted, semantic entry 18 on main already refuses record.FIELD + n / previous.FIELD - n in flow conditions, and the all-bare and all-root spellings of this very condition are refused on main. The mixed spelling passed only through an ordering accident between two passes, and the capability it would need (the evaluator adding a number to a YYYY-MM-DD text) does not exist and is not promised anywhere. So this is not a consumer-side narrowing of a declared capability, and "implement or retire" does not apply.

Attempts to break it, all by code read:

  • A condition newly refused that runs fine: none found (see ①). A guard cannot rescue the arithmetic either, and the guarded forms are refused in the all-root spelling already, so the two stay consistent.
  • A condition of the card's shape still accepted: none found for arithmetic that has the root read as an operand.
  • A neighbouring shape still accepted (outside this card, see N4).
  • Removing the stand-down instead of repairing it: sound. Its premise can never hold at its only call site, so a repaired version would be dead code.
  • Docblocks in validate.ts and cel-engine.ts now describe the order as the code has it.

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):

  • N1 (nit, declaration wording): the entry's surface and the changeset's first sentences name one precedent, a bare date ordered against a text literal. The mechanism is general (① second bullet). The changeset's one-line fix already says "whatever precedes it", which is the true extent; the PR body and changeset prose could say so once. The entry's surface is not a prose face: leave it as an accepted deviation.
  • N2 (nit, prose): "failed on every run" overstates it. && stops at a false left side, so a row whose due_date is not after the literal evaluates to false without reaching the arithmetic; the flow fails on every run where the ordering holds. The same is true of the all-bare and all-root spellings and of the existing run-fails wording, so this is the family's convention, not this PR's error. By CEL semantics, not measured.
  • N3 (nit, card done-when): card nits N1 and N2 are neither pinned nor split off (③). Follow-up card or a named acceptance.
  • N4 (nit, outside the diff, follow-up candidate): the same masking survives where the later arithmetic has no date-field operand. By code read, due_date > "2026-01-01" && today() + 30 > record.due_date (and the bare-only due_date > "2026-01-01" && today() + 30 > today()) is accepted at the head as on main: the bare ordering stands firstTypeMismatch down, and the date-text passes only report a fault with a date text as an operand, which Timestamp + int is not. today() + 30 is refused when written first. Pre-existing, not introduced here, and not the card's shape (no arithmetic on a root read), so it is a candidate card, to be measured first.

Implemented-by: claude/project-thread-lzodgq
Reviewed-by: session_01L9qibwSEecrzDjKjbk24r1

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1

The brief L1-a handed its isolated contract-review sub-agent for the record above, filled from record-recognisers.mjs --brief-template --face narrowing (the scope floor written out as the six non-prose paths), verbatim:

Contract review brief — PR #37840 @ 8ca7780c1a863d26cc9ca028d51be5aeb69514e9 (card #36377)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face narrowing — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #36377: its body and EVERY comment (rulings and earlier records included)
· PR #37840: its body, its file list, and the net diff against main at 8ca7780c1a863d26cc9ca028d51be5aeb69514e9
· the check-runs on 8ca7780c1a863d26cc9ca028d51be5aeb69514e9: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the narrowing is declared of the whole PR, never of a path: the floor is EVERY path of the diff outside the
prose faces, that is: (packages/formula/src/cel-engine.ts, packages/formula/src/validate.ts, packages/formula/src/validate.test.ts, packages/lint/src/validate-expressions.test.ts, packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts, packages/spec/src/migrations/entries/semantic/19.flow-condition-bare-ordering-before-record-date-arithmetic-refused.ts), plus every file those hunks make a claim about, read in the cited code.
Widen it freely, ⛔ never below that floor; the record's Scope: line lists both. No path is the lane seat's remainder.
④ judges the narrowing itself over that floor: lockfiles, generated output, changesets and prose elsewhere in
the PR are not reviewed; the published spec and the cited code are READ to judge it, never reviewed.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/166e2125-4268-552f-a555-2b7c43a99f0f/scratchpad/pr-37840/l2/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — the narrowing itself, read against the published spec on main: does it take a
declared capability away at the consumer, or make the spec's own refusal real? A capability declared
and not delivered is an implementation gap, implemented or retired, ⛔ never narrowed at the consumer.
Read the spec and the cited code in the live tree, and try to break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade, S1 (should-fix) — …, and a clean round as
No must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head and
refuses the record; the delta record names those it closes by id alone, S1: closed.
A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1

L1-a, the seat's L1 thread · 2026-11-27T07:07Z

席位核对 — L1 ACCEPT @ 8ca7780c1a863d26cc9ca028d51be5aeb69514e9

Verdict: ACCEPT. The contract review owed by the narrowing (and the schema face on the migration entry) is record 7211713497: CONTRACT_REVIEW_TIER, verify-review-tier PASS (22 turns at tier), isolated, brief 7211720566. Its verdict is PASS, with no must-fix, no should-fix and four nits. Adopted: its Scope: covers the brief's floor (all six non-prose paths), and its independence pair names the dev's branch and this session.

Read at this head

  • Shape (l1-face.mjs --pr 37840): open, draft, base main, first line Fixes #36377. The card's done-when is S1 measured and confirmed (reach on c826e8a15), the mixed spelling refused at os validate and at the publish door, pinned with an ablation, and nits pinned or split off. N3 is pinned. N1 and N2 are disposed in Acceptance notes, which the seat accepted (see below), so Fixes is right.
  • Declarations: Clause-②: no (narrowing), Metadata-protocol: narrowed, BREAKING, FROM → TO table, ADR-0087 registered with the new semantic entry. minor on @objectstack/formula and @objectstack/spec. Skills-docs: none holds: skills/objectstack-formula/SKILL.md states the date-arithmetic refusal without naming a site.
  • l1-face changeset flag on @objectstack/lint and @objectstack/runtime: a false positive. Their only files are src/*.test.ts, each tsconfig.json excludes **/*.test.ts, and files[] is dist.
  • Rejection pins: the publish door asserts { code: 'INVALID_METADATA', status: 422 } (meta-flow-condition-record-date-text.test.ts). The formula pins compare code, params and message against the all-root spelling, and check that the run faults in celEngine.evaluate. Controls cover arithmetic-first and the prescribed rewrites.
  • Deletion: recordRootReadsFaultDateArith was never re-exported from the package entry (index.ts), so the removal changes no public surface.
  • Dogfood (! + narrowing): the report gives 490 files / 4144 tests green at 8ca7780c, the current head.
  • Floor at this head: Lint & Repo Gates success, TypeScript Type Check success. All checks: 58 success, 11 expected skip, 0 failed, 0 pending.

Changeset sentences read (not delegated)

The title, the BREAKING paragraph and the three bullets, The verdict, Where and Not refused, were each read against the diff. Where's "registerFlow logs it as an advisory and still registers the flow" holds against service-automation engine.ts (registrationChecks({ advisory: true })). The FROM → TO rows and the one-line fix are prescribed rewrites the CONTROL pin asserts clean. All true.

Out-of-scope findings

  • Card nits N1 (offendingRecordRead field-map order) and N2 (unproven bare-and-root pair at run-may-fail): Acceptance notes. They are nits with no effect on the verdict code, and the seat accepted this disposition.
  • Record N4 (due_date > "2026-01-01" && today() + 30 > record.due_date still accepted, by code read): filed review follow-ups of PR #37840 #37848, measure first, Blocked-by this PR.
  • Record N1 (the mechanism is broader than "a bare date against a text literal") and N2 ("every run" wording): dropped. Both are prose nits on the migration entry and changeset; every newly refused shape is a real fault, and the one-line fix already says "whatever precedes it".

Landing to-do: Fixes #36377 closes the card on merge; no manual pm:dispatched removal is owed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

席位核对 — ACCEPT · head 8ca7780 · card #36377 · area o3-build · 2026-11-27T07:13Z

Seat opinion: land as is; the narrowing is the card's own ask (refuse at validate/publish what already fails at run time).

  • L1. L1-a ACCEPT 7212172840 at this head: CI all green (58 success, 11 expected skip); Fixes #36377 closes the card.
  • Contract review. Isolated CONTRACT_REVIEW_TIER record 7211713497 at this head: PASS, no must-fix, no should-fix, four nits. Adopted.
  • Premise. S1 reproduced on origin/main c826e8a by the card thread (the mixed spelling got 0 findings, all-bare and all-root were refused); the fix removes recordRootDateTextIssue's stand-down, so the mixed spelling gets the all-root verdict (date-text-arithmetic). Accepted deviation: the card's second fix direction instead of the order's optional route, flagged in the PR body.
  • Gates. Dev report 7211625108: 95/95 derived gates exit 0 after reruns; dogfood at 8ca7780 490 files / 4144 tests green; one ablation red then restored.
  • Declarations. Clause-②: no (narrowing) (claim amended 7212065714), Metadata-protocol: narrowed, ADR-0087 semantic entry, Skills-docs: none line — true for a change that newly refuses one spelling.
  • Out of scope. Card N1/N2 → Acceptance notes. Record N4 → filed review follow-ups of PR #37840 #37848 (measure first, Blocked-by fix(formula)!: a flow condition that orders a bare date against text before date arithmetic on record. / previous. is refused #37840). Record N1/N2 → dropped — prose only.
  • Governance. check-governed-merges.mjs --pr 37840: NOT governed, 299 changed lines. The declared narrowing takes the terminal four pieces: hand-off to the approvers in the next stroke; ⛔ the seat does not merge before an approval.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

维护者速读

Seat opinion: approve; the refused spelling already fails at run time, so no working condition stops working.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 07:16
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit 561fe12 Nov 27, 2026
75 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-lzodgq branch November 27, 2026 08:34
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(formula): a bare date ordering before a record. date arithmetic still slips past the flow-condition refusal (follow-up of #36333)

3 participants