Repository navigation
fix(lint)!: refuse == / != on a list-valued field reached through a lookup hop - #36673
Conversation
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check5 anchor(s) derived from 3 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 176 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 c2e588a2fe257a2a2ef5cd29b057291c1d61e855 && git checkout c2e588a2fe257a2a2ef5cd29b057291c1d61e855
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 76bff41f451d3fa3d475384d8483905f49f6607f 3945fcf5332f9511b6c1d21cd19b128020cbf431 && git checkout -B drift-repro 76bff41f451d3fa3d475384d8483905f49f6607f && git merge --no-ff 3945fcf5332f9511b6c1d21cd19b128020cbf431
node scripts/docs-audit/affected-docs.mjs --json 76bff41f451d3fa3d475384d8483905f49f6607f |
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As7qKGpBTzxc5S8q3Ko Final green head for L1 · 2026-11-23T19:56Z |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head 2226118 · 2026-11-23T19:58Z |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: Inputs read: card #36237 body and all 8 comments (triage, claim, two amendments, three dev reports, one progress note; no earlier contract record on the thread); PR #36673 body and its 9-file list; the net diff ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing does not take a declared capability away. Nothing on S1 (should-fix) — the registered breaking change does not describe what this PR refuses. N1 (nit) — door parity has no carrier. The Studio draft check and the validator half of N2 (nit) — N3 (nit) — the PR body's "Acceptance notes" and "Readings" still describe lap 1 (a known red on four ledger rows, files outside the surface). The tree and the check-runs say otherwise. Prose face; correct the body. Tried and held: a false refusal through a non-reference field named like a reference ( Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV 维护者速读
席位核对 — REWORK · head 2226118 · card #36237L2 record at this head: comment 7112500193 (PASS, Checklist
REWORK items
Owed after the fix
Out of scope, disposition
|
…d and its doors Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As7qKGpBTzxc5S8q3Ko Final green head for L1 (rework lap) · 2026-11-24T05:24Z |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head a59d4a8 · 2026-11-24T05:25Z |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: Delta review of the record on head Inputs read: the delta diff S1: closed ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing now makes the spec's own refusal real. The published entry states the hop read as part of the refused surface, bounds it to the two sites the engine hydrates, and says which doors refuse it and which do not; the lint enforces exactly that. Nothing a spec on Read against its first consumer: an upgrader who reads the entry learns that No must-fix, no should-fix. N1 (nit) — unchanged, and now documented where it was undocumented: door parity for the Studio draft check and the validator half of N2 (nit) — unchanged: N4 (nit) — the entry's hop sentence does not say that a target outside the loaded stack, or a reference two packages tie on, is not judged. Both are missed catches, never false refusals, and the acceptance command is unaffected. Prose; fix in a later touch of the entry or leave. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV 维护者速读
席位核对 — ACCEPT · head a59d4a8 · card #36237L2 record at this head: comment 7122973429 (PASS, REWORK items
Checklist
Accepted deviations
Out of scope, disposition
|
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Review request — declared narrowing (
|
Resolve two union conflicts with the working-day functions: the @objectstack/formula import list in lint validate-expressions.ts keeps both findHopListEquality and computedCalendarCodeMessage, and the authored-site fixture map keeps both refuseHopListEquality and the computedCalendarCodeMessage row. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As7qKGpBTzxc5S8q3Ko
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head 3945fcf · 2026-11-24T10:12Z |
|
repo:objectstack#7 · os-alice · session_011y7As7qKGpBTzxc5S8q3Ko read 2026-11-24T10:13Z Dogfood battery, PR #36673, head
The resolution is exactly two unions (the remerge diff removes only conflict markers): the Generated by Claude Code |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: Delta review of the record on head Inputs read: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNothing in the merge moves the design judged at No must-fix, no should-fix. N1 (nit) — unchanged: door parity for the Studio draft check and the validator half of N2 (nit) — unchanged: N4 (nit) — unchanged: the entry's hop sentence does not say a target outside the loaded stack, or a reference two packages tie on, is not judged. Prose, for a later touch of the entry. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV 维护者速读
席位核对 — ACCEPT · head 3945fcf · card #36237L2 record at this head: comment 7128522632 (PASS, Checklist
Accepted deviations
Out of scope, disposition
|
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Landing · head
|
…en and addWorkingHours over the organization calendar (objectstack-ai#36796) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBEaJzgBWzjWCNjBjkVoeRto)_ Fixes objectstack-ai#35356 repo:objectstack#3 · os-support-ai · session_01WGufzi4y7vb1rP9MERYbw2 Clause-②: yes (widening) Metadata-protocol: added — a formula field's or a stored field's `expression` may now call `addWorkingDays(...)`, `workingDaysBetween(...)` and `addWorkingHours(...)` Skills-docs: updated here — skills/objectstack-formula/SKILL.md teaches the three functions and eval 8 of skills/objectstack-project/evals/project-process.json exercises them (the card's order names both) ## 维护者速读 - 用户能看到什么变化:管理员和建模人员在公式字段里可以按组织的工作日历算到期日和剩余工作日,节假日、周末和调休上班日都会被正确跳过或计入。 - 为什么做:工作日历系列的第三步,让服务时限和到期提醒不必再由各个应用自己写日历计算。 - 出错会怎样:日历缺失或维护期不够时该公式读为空并在服务端记一行日志,记录照常保存,不会按自然日乱算;要撤回只需回滚本次改动。 - 要你做什么:无。 ## Review round 2 (L1-b 7118804738, contract 7118785761) - **M1.** `Metadata-protocol: added` with `@objectstack/formula` at minor (the three names are a new accepted value of an authored `expression`, as with `rmbUpper`), and the `Skills-docs:` line, in this body and the changeset. - **S1.** `os build` now refuses the three in a field's expression `defaultValue` (the default step has no calendar, so every insert would land blank) and in a seed record's expression values at any depth (the seed loader has none either), with the stored due-time prescription. New module `packages/lint/src/validate-working-day-sites.ts`; a bare-string `defaultValue` is a literal and draws nothing (CONTROL). - **S2.** Already held: `planFormulaProjection` widens a named projection to every stored column, `organization_id` included, and cuts it back after evaluation. Now pinned: the stub driver honours `fields`, and "a projection that leaves organization_id out still counts each row in its own organization" asserts both the per-organization answer and that the driver was asked for `organization_id`. Ablation: skipping `organization_id` in the widening turns it red. Documented in the header of `formula-work-calendars.ts`. - **S3.** A kernel boot test: `ObjectKernel` + `ObjectQLPlugin({ ql: engine })` serves `objectql` as the same engine and its formula counts with the plugin-installed calendar service. Ablation: removing the plugin's `setFormulaWorkCalendarService` call turns it red. - **Open point 1 (option A stands).** The docs page and the skill each say a blank stored due time stays blank until the record's next write; the docs and changeset add that a write while the calendar refuses blanks a previously valid value. - **Nits.** N1 the skill's `timestamp(s)` line and `PRIOR()` note reworded; N3 eval 8 says `{now}` for a filter and `now()` for a CEL condition; N4 the catalog's `sys_work_calendar` row names all three functions; N5 a blank start answers blank before any calendar is read (test added). - **objectstack-ai#36673.** Still open at this head; this branch merges `main` once it lands, per the seat. ## What changes Three formula functions over the organization's working calendar (ADR-0157 D4), with the evaluation contract this card had to settle. - `addWorkingDays(day, n[, code])`: the calendar day `n` working days after `day` (before it, for a negative `n`). `day` itself never counts, and `0` answers `day`. The answer is a calendar day at UTC midnight, as `today()` and a `date` field are. - `workingDaysBetween(start, end[, code])`: the working days after `start` up to and including `end`, negative when `end` is earlier. It is the inverse: `workingDaysBetween(d, addWorkingDays(d, n)) == n`. - `addWorkingHours(start, hours[, code])`: the instant `hours` of working time after `start`, counted as elapsed time in the calendar's time zone (D11, open point 3). A start outside working time begins at the next working period's start. All three count through `work-calendar.ts`, the arithmetic the calendar service and the approval clock already use, so there is one walk and one daylight-saving rule. **Packages.** - `@objectstack/formula`: `working-day.ts` registers the functions as CEL stdlib over `EvalContext.workCalendars` (pure data, the existing binding pattern). `working-day-needs.ts` reads, from an expression's AST, which calendars it names: the default for a two-argument call, and each quoted-literal code. `cel-to-filter.ts` refuses the three as a filter (`CompileError('unsupported')`), prescribing the stored due-time field. They join `CEL_STDLIB_FUNCTIONS`. - `@objectstack/objectql`: `formula-work-calendars.ts` resolves exactly the calendars a formula plan names, per row organization (`organization_id`, else the read's tenant), through `WorkCalendarService.resolve`, so its cache and invalidation are reused. A refusal is handed over as data. Wired into find / findOne, the insert and update responses, the summary-fold dependents and stored expressions (`computeStoredExpressions`). The plugin installs the kernel's calendar service beside the engine (`setFormulaWorkCalendarService`), and each formula path reaches it through its host's `facade`, so `engine.ts` stays at its facade line ceiling (6857) with no new member. - `@objectstack/lint`: refuses the three at every expression site except a formula field's and a stored field's `expression` (`check()`, the declared flow predicate and value slots, a field's expression `defaultValue`, seed values), and refuses a calendar code that is not a quoted literal (`judgeFieldFormula`). - `@object-ui/core`: a form treats a formula that calls one as unservable, because the calendar is loaded for the server's read and never handed to the form. - Docs and skills: the formula docs page gains a Working days section; objectstack-formula documents the three functions inside its existing ceiling; the platform catalog drops the "Working-day formulas" Planned row and names the formulas on `sys_work_calendar`'s row; project-process eval 8 now expects `addWorkingHours(` and a stored due time, and refuses `PLATFORM-CANDIDATE`. **Contract choices (D4: the card's to settle, pinned by tests).** - The calendar code is a quoted literal. The engine loads the calendars an expression names before it evaluates it, so a computed code names a calendar nobody loaded. To choose a calendar per record, branch between literal calls. The lint refuses a computed code with that prescription. - A blank start day or start instant answers blank (a due date with no start has none), before any calendar is read. A blank count, or a blank end of `workingDaysBetween`, refuses. - Hook sandbox: no host function is added. A hook reads the stored due-time field. ## Decision for review **Open point 1: a stored field's `expression` that meets a D8 refusal stores blank, and the write goes through, with one log line naming the object, the field and the refusal.** Why this option and not "the write fails": - It matches D8's read behaviour: a formula field that meets the same refusal reads `null` and logs once. A stored due time and a computed one then answer the same way for the same calendar state. - A failing write would block every record whose span crosses the end of the maintained period, for example every case opened in late December before an administrator enters next year's holidays. That is the non-blocking stance ADR-0157 D9 takes for the approval clock. - The column is not silently wrong: it is blank, never a weekly-pattern or wall-clock guess, and the next write after the calendar is fixed counts. The author-facing cost is said in the docs and the skill: a blank stored due time stays blank until the record's next write, and a write while the calendar refuses blanks a value that was valid before. Pinned by `engine-formula-working-day.test.ts` › "a refused count stores blank and the write goes through, with one line naming the field". The alternative is one branch in `computeStoredExpressions`: rethrow instead of storing blank. ## Tests - `packages/formula/src/working-day.test.ts`: a `cn_mainland` calendar (Asia/Shanghai, 09:00-12:00 and 13:00-18:00, National Day 10-01..07 off, Saturday 10-10 on) against a weekly-only CONTROL calendar. Covers a weekend, the National Day week, the 调休 Saturday, negative and zero counts, date, `today()` and timestamp inputs, blank handling, the inverse property, DST spring-forward and fall-back, every refusal (no default, not maintained, not loaded, code not loaded), the needs analysis, and the pushdown refusal with an `addDays` CONTROL. - `packages/objectql/src/engine-formula-working-day.test.ts`: the real `WorkCalendarService` over a stub driver. A read over the National Day week onto the 调休 Saturday, a weekend on findOne, two organizations each on its own default, the write response, D8 past `maintained_through` and with no default (null, one log line, never a wall-clock count), no service, D6 stored count and stored blank on refusal, the cache serving until `invalidate()`, no calendar read for a projection whose formulas call none, a projection without `organization_id` (S2), and a kernel boot through `ObjectQLPlugin` (S3). - `packages/lint/src/validate-expressions.working-day-35356.test.ts`: accepted at a formula and a stored `expression` (including the branch between literal codes); refused at a validation rule, an action's `visible`, a flow condition, a sharing rule (both the expression lint and the enforceability pass), a field's expression `defaultValue` and a seed value; a computed code refused; `addDays` and bare-string CONTROLs. - `authored-site-expression.test.ts` classifies the new gate passes and the value-site walk; `validate-expressions.test.ts` excuses the new import tail `sites`. - `ui/packages/core/.../formulaRecord-35033.test.ts`: a working-day formula and a formula reading it are unservable; `addDays` CONTROL computes. ## Acceptance notes - Release pairing (D4, same release as the objects): `npm view @objectstack/objectql version` and `@objectstack/formula` read `18.6.0`, which carries no calendar code. The changesets of objectstack-ai#35355 and objectstack-ai#35357 are still pending on `main`, so this PR ships in the same release as them. - Contract-review tier: `packages/spec` carries no function list or schema that changes (its only diff is the catalog generator's row list, `packages/spec/scripts/**`, unpublished). The published list that widens is `@objectstack/formula`'s `CEL_STDLIB_FUNCTIONS` (three names). Measured: not CONTRACT_REVIEW_TIER by the order's spec criterion; the seat decides. - Metadata-protocol `added`: no authorable key or `authorable-surface/**` shard moves, but an authored `expression` accepts three new function names (corrected in round 2 from `none`). - File surface beyond the order's list, each declared: objectql engine facets (`engine-find.ts`, `engine-insert.ts`, `engine-update.ts`, `engine-security-resolvers.ts`, `engine-top-level.ts`, `plugin.ts`) and the new `formula-work-calendars.ts`, because the formula read and write paths are where the calendars are loaded; `engine.ts` and `work-calendar-service.ts` are unchanged. `packages/lint/**` is the measured expression-lint location. `ui/packages/core/**` keeps the form from computing a formula the server's write-path check already calls unservable. - Skills readings (`skills/**`, published): `skills/objectstack-formula/SKILL.md` 491 → 485 lines, 6090 tokens. Its ceiling rises 6008 → 6090 (+82) under the standing ruling 「A:先削重复,余额按实测提高」 (record 6513306068): restatement was deleted first in the same file (changed lines remove 789 priced bytes and add 1130), and the balance the round-2 sentences need is raised to the measured value, as the comment in `scripts/check-skills-token-ratchet.mjs` records. `skills/**` makes this PR governed. ## Verification Two-minute check: `pnpm --filter @objectstack/formula exec vitest run src/working-day.test.ts` shows the National Day and 调休 Saturday cases passing. Read first (by risk): `packages/objectql/src/formula-work-calendars.ts` (which organization a row counts in), `packages/objectql/src/engine-top-level.ts` (`computeStoredExpressions`, the open point 1 branch), `packages/formula/src/working-day.ts` (the public contract). <details><summary>Local gates (dispatch-gates --ran: 122 derived families accounted for, 118 run, 4 NOT-MEASURED)</summary> - Round 2 at 5e11588: formula `working-day.test.ts` 23 passed; objectql `engine-formula-working-day.test.ts` 13 passed; lint `validate-expressions.working-day-35356`, `validate-expressions`, `authored-site-expression` 606 passed; `platform-catalog.test.ts` 20 passed; `tsc --noEmit` formula, objectql, lint green; `check-skills-token-ratchet`, `check-facade-delegation-only`, `check-nul-bytes`, `check-skill-links`, `check-skill-identifier-liveness`, `check-skill-top-level-keys`, `check-skill-frame-sync`, `check-changeset-fixed`, `check-empty-changeset`, `check-changeset-no-major` green. Round 1: - All 139 derived commands run at the final source; green except the following. - NOT MEASURED (exit 3, need a built closure; CI builds it): `check:skill-examples`, `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check-plugin-teardown-shape --self-test` (its positive control is pinned to a commit this shallow clone cannot reach). - `pnpm --dir ui exec vitest run scripts/`: 1 red, `unit-registry-absence-collision` cannot import modules that resolve `@objectstack/client`, which is unbuilt here. Environment, not this diff; CI runs it built. - `check:facade-delegation-only` was red on the first run (`engine.ts` 32 lines over its ceiling); fixed by moving the calendar wiring into `formula-work-calendars.ts`, re-run green. - Typecheck (`tsc --noEmit` and `check:test-typecheck`): `@objectstack/formula`, `@objectstack/objectql`, `@objectstack/lint` green. - Suites: `@objectstack/formula` 2133 passed; `@objectstack/objectql` 14363 passed; `@objectstack/lint` 9475 of 9479 passed, the 4 reds were two ledgers naming the new gate passes, fixed and both files re-run green (592 passed); `ui/packages/core` 4769 passed, 27 skipped. </details> <!-- signed: repo:objectstack#3 · os-support-ai · session_01WGufzi4y7vb1rP9MERYbw2 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #36237
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — the objectstack-formula skill already teaches that a list field compared with a scalar literal is refused, and the has()-guarded
inrewrite; a hop read of a list field takes the same rewrite维护者速读
What changes
The root-field case (
record.labels == 'vip'on a list-valued field) is refused aslist-equalityby the shared validator. One lookup hop away,record.account.labels == 'vip', nothing refused it:ExprSchemaHintcarries the root object's fields only, so the validator never learns thatlabelson the hop target is a list.Route taken: the card's route 2, a lint pass beside
refuseUndeclaredHopField. NoExprSchemaHintmember is added.@objectstack/formula: new exportfindHopListEquality(source, listLeaves). It returns thelist-equalityrefusals (the same code, params, message and rewrite as the root case) for each==/!=between a one-hop readrecord.REF.LEAFand a non-null scalar literal, wherelistLeavesmaps the reference REF to the list-valued fields of its target. The comparison walk the root case used is now shared: it was moved out ofcheckListEqualityintoforEachListEquality, with no change in behaviour.relationship-traversal.tsgains the module-internal readerhopMemberOf, which isrootMemberOfone segment further.@objectstack/lint:refuseHopListEqualitybuilds that map from the objects as served (a reference that is itself multi-valued, or that targets the stored-metadata family, is left out) and runs at the same two sites asrefuseUndeclaredHopField: a validation rule's hydratedcondition/when(nested branches included), and a formulaexpression.@objectstack/spec: the ADR-0087 semantic entrycel-list-equality-refusednow names the one-hop read in itssurface(a validation rule'scondition/whenand a fieldexpression, REF single-valued, LEAF list-valued; not a multi-valued reference, a second hop, aprevioushop, or a hop at any other site) and states its doors inreplacement(os validate,os build, the object save door; not the Studio draft check, not the shared-validator half of the MCPvalidate_expressiontool). Prose only: no schema shape changes, andcheck:generatedreports all 14 artifacts up to date.Reach, measured once (the card asked for this). A hop is served at exactly two sites: a validation rule predicate and a formula expression. Every other CEL site (an action's
visible, a flow condition, a hook condition) binds the stored id atrecord.account, so this shape is not a list comparison there.record.account.labels == 'vip'ACCEPTED the write both for an account labelled['vip','eu']and for one labelled['eu'], so it never fires. The prescribed rewrite REFUSED the VIP account and ACCEPTED the EU one.os validate/os build, and the object save door (runStackExpressionPasseswithruntimeWriteType: 'object', pinned in the new lint test).Tests
packages/formula/src/validate-hop-list-equality-36237.test.ts: a premise check on the evaluator (a hydrated hop list compared with a scalar gives a constant), refusals in both operand orders and in both member spellings, the code and params, a rewrite that evaluates per row and is not itself refused, and controls (a scalar leaf, null tests,in, a root field, an unmapped reference, two hops, a comprehension that bindsrecord, an empty map, a source that does not compile).packages/lint/src/validate-expressions.hop-list-equality-36237.test.ts: refusals on one hop to amultiselectand on one hop to amultiple: trueuserfield, with the slot's key path; the prescribed rewrite passes with zero errors; one hop to a scalar field passes; a conditional rule'swhen, a formula and the object save door are covered; a multi-valued reference and a site that serves no hop are controls.srcdirectly, so no build is needed): deleting the rule-site call turns the two refusal pins and the when/formula pin red (3 failed); pointing the leaves at every target field instead of the list-valued ones turns the two scalar controls red (2 failed). Both mutations were applied and restored byscripts/ablation-replace.mjs: the anchor went 1 to 0, and the restored blob matched HEAD with an emptygit diff HEAD.Readings (local, final head a59d4a8)
!;pnpm --filter @objectstack/dogfood testunder the lock, no shard, no path): VERDICT command-exit 0; Test Files 487 passed, 3 skipped (490); Tests 4121 passed, 68 skipped (4189); no failures.@objectstack/formulatest: Test Files 71 passed (71), Tests 2128 passed (2128). Read at ff7e133; formula source is unchanged since.@objectstack/linttest: Test Files 228 passed (228); Tests 9476 passed, 5 skipped. Read at d26a320, after the two ledger files were added; lint source is unchanged since. The 5 skips depend on a builtdist.@objectstack/specmigrations tests: Test Files 5 passed (5), Tests 200 passed (200).check:generated: all 14 artifacts up to date.@objectstack/formulaand@objectstack/linttypecheck: VERDICT command-exit 0.dispatch-gates --commands): 67 before the spec entry edit, of which 64 exited 0 and 3 are NOT MEASURED (check:dual-build-cjs-loads,check:lean-entry-closure,check-plugin-teardown-shape --self-test; their prerequisite is a whole-tree build or a deeper clone). Re-derived at a59d4a8 there are 92. The 25 new ones (spec families) all exited 0, two of them after a re-run once a concurrent build had restoreddist.check-adr-0087-registration --base origin/main,check-empty-changeset,check:nul-bytes,check-affected-docs,check-drift-comment,check:issue-citations,check:doc-authoring,check:changeset-gate-self-tests.Acceptance notes
findHopListEqualityis a new named export of@objectstack/formula. That package has one entry, and keeping the refusal there avoids a second copy of its code, params, message and rewrite in lint. Nothing existing changes shape.os validate,os buildor an object save accepted before is now refused when it compares a hop-reached list with a scalar. That comparison never fired at runtime (measured above), so the only rules refused are ones that already did nothing. The title and the changeset headline carry!, and the changeset carries the BREAKING line with FROM / TO.validate_expressiontool. Both judge the root case throughExprSchemaHint, which carries the root object's fields only. The card's Done-when ("or the condition's author is told at save") is met at the object save door. The ADR-0087 entry now names the same doors.already-registered cel-list-equality-refused. This PR extends that entry's surface and replacement.examples/andpackages/qaforrecord.X.Y ==|!=plus a literal: 4 candidates. One is a hop to a singleselectat a validation rule (app-showcaseinvoicerecord.account.status), which is accepted. The other three are object-valued fields at an actionvisible, which is not a hop site. None would be refused, and the dogfood battery agrees.Verification
Files to read first, ordered by risk:
packages/formula/src/validate.ts: theforEachListEqualityextraction (the root-case behaviour must be byte-identical) andfindHopListEquality.packages/lint/src/validate-expressions.ts:refuseHopListEqualityand its two call sites..changeset/36237-hop-list-equality.md.Two-minute check:
pnpm --filter @objectstack/lint exec vitest run src/validate-expressions.hop-list-equality-36237.test.ts. Expect 10 passed.Generated by Claude Code