Skip to content

flow condition type verdicts: a type-mismatch warning hides a date-text refusal, .exists over date fields is refused while it runs, and a nullable-ternary minus date text passes and faults #38959

Todo

Description

@objectstack-fleet

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Filing gate: ① (product defects with a named landing point, measured at the formula package's publish check) · Source: fleet — found by the contract-tier L2 of PR #38949 (record 7315274427) and by the #35295 dev (report 7314634407), all standing on main, outside that PR's diff. ⛔ Not a claim. First step for the builder: measure reachability through a public door (os validate or a flow save) before fixing; the readings below are through validateExpression, the function those doors call.

维护者速读

  • 出了什么事:流程条件的发布检查有几处判断不准:一处把「必然运行失败」降成了警告(发布照过、运行出错);一处把能正常运行的 .exists 写法拒掉;一处可空三元表达式减日期文本发布能过、运行出错。
  • 用户看到的:前两种是「该拦的没拦」或「不该拦的拦了」,第三种是上线后流程运行报错。
  • 要你做什么:无(分诊定级与路由)。

What is measured (formula package, validateExpression + celEngine.evaluate over the engine's scope; L2 record 7315274427 has the commands)

  1. A text type-mismatch warning hides a date-family error (precedence). typeSoundnessIssue asks the date-text family only when firstTypeMismatch answers null. At a flow condition with no declared outcome, due_date - borrow_date > duration('1h') && record.title > 5 validates ok: true with only a type-mismatch-run-may-fail warning, and the run faults on the date subtraction; without the record.title > 5 conjunct the same source is refused (date-text-arithmetic-run-may-fail). Same for the bare spelling. Expected: the more severe verdict wins (an error is never downgraded by an unrelated warning in the same source).
  2. .exists over date fields refused while it evaluates. [due_date, record.borrow_date].exists(d, d > '2026-01-01') is type-mismatch-run-fails and evaluates true (macro variable compared with a date-text literal). Expected: no refusal of a source that evaluates (ADR-0032 1c).
  3. Nullable ternary minus date text passes and faults. (status == 'open' ? now() : null) - record.picked_up_at > duration('1h') passes the flow-condition check and faults at run (dyn Timestamp minus date text after the nullable-ternary rewrite). The operand is genuinely dyn, so the fail-open law passes it by design; the builder judges whether the rewrite (rewriteNullableTernary) can carry the branch type so it is no longer unproven, or records it as accepted fail-open.
  4. Wording of the date-against-text ordering verdict (CEL: a datetime field is typed Timestamp at authoring (validate_expression, publish gate) but bound as an ISO string at runtime, so isoDate(record.<datetime>) passes every check and then refuses every write ("no matching overload for 'isoDate(string)'") #32595, comparesDateTextAgainstUndeclared). record.due_date > record.title is refused deliberately, but its sentence says "against a number … the expression faults" of a comparison the runtime answers (a string comparison). Expected: the sentence describes what actually happens; whether the verdict itself should stand is CEL: a datetime field is typed Timestamp at authoring (validate_expression, publish gate) but bound as an ISO string at runtime, so isoDate(record.<datetime>) passes every check and then refuses every write ("no matching overload for 'isoDate(string)'") #32595's ruling, not reopened here.

Landing point: packages/formula/src/validate.ts (typeSoundnessIssue, firstTypeMismatch, the date-text family) and packages/formula/src/cel-engine.ts.

Dedupe: warning hides date-text refusal type-mismatch (5 hits: #33025, #20749, #33861 closed, unrelated; seat posts), nullable ternary date text subtraction (2: #35295 — whose PR noted it, carrier none — and a seat post), exists macro date text refused (50, top 8 read: none), type-mismatch date against text ordering (17: #35295, #32595 closed — the ruling item 4 respects, #34946, #34662 closed, unrelated). No open card covers these.

Grading: area:workflow · Bug · Suggested-grade: p2 for item 1 (a run-failing condition publishes with only a warning), p3 for items 2–4 · reach: formula-level measured, public door not yet measured.

Related: #35295 / PR #38949 (does not change these; its patch round keeps the index spelling out of the type-mismatch pass).

Activity

  1. added
    bug
    priority:p2
    area:workflow
    on Dec 1, 2026
  2. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Item 5 added · 2026-12-01T15:40Z · from the contract-tier delta review of PR #38949 (7316294401, ③), same family, same landing point.

    1. The index spelling is outside the type-mismatch pass. RECORD_ROOT_READ_RE (packages/formula/src/cel-engine.ts), which gates firstTypeMismatch's root pass, matches the member spelling only — deliberately kept so by PR fix(formula)!: a flow condition's mixed bare / record. date arithmetic and record['FIELD'] index reads take the date-text verdicts #38949 (its index reach is the date-text verdicts only). So through record['FIELD'] / previous['FIELD'] a text or boolean type mismatch and a date ordered against a number pass the flow-condition check and fault on every run: record['title'] > 5, record['active'] + 1 > 3, record['due_date'] > 5 (measured by the reviewer on the merge base and on fix(formula)!: a flow condition's mixed bare / record. date arithmetic and record['FIELD'] index reads take the date-text verdicts #38949's head alike). Expected: the index read takes the member read's type-mismatch verdicts. Do this together with item 1 (the precedence): widening the gate before the precedence is fixed is exactly what turned a date-text refusal into a warning on fix(formula)!: a flow condition's mixed bare / record. date arithmetic and record['FIELD'] index reads take the date-text verdicts #38949's first head (M1 in 7315274427), and would refuse record['due_date'] > record['title'], which evaluates (S1), until item 4's question about that verdict is settled.
  3. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    Triage: first-touch · lane grade kept: area:workflow · Bug · p2 · pm:queue.

  4. added
    pm:queue
    on Dec 1, 2026
  5. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Claim: PM loop round 1
    Session: session_01QSeKYnrQ7UMtHofKQVjcH2
    Account: os-justin
    Branch: claude/issue-38959-flow-condition-verdicts
    Worktree: objectstack-issue-38959
    Domain: domain:server
    Seat: repo:objectstack@os-justin
    File surface: packages/formula/src/validate.ts, packages/formula/src/cel-engine.ts and the tests beside them, packages/spec/src/migrations/entries/semantic/ (reason: only if a fix refuses an expression that publishes today), the changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: opus (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable — default tier), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the formula package's flow-condition checks (packages/formula, objectstack) — verdict precedence, the macro-variable typing, the nullable-ternary rewrite, one sentence, and the index spelling outside the type-mismatch pass | PR #38949 (#35295) covers the mixed and index date-text spellings only | flow authors whose conditions publish with a hidden error, are refused while they run, or fault after publishing; reach through a public door to be measured first
    Thread-read: 7317086240
    Premise: holds (origin/main 2595004, 2026-12-02T06:02Z: the five items were measured on #38949's merge base and head by its contract review, 7315274427 and 7316294401; PR #38949 is merged)
    Serial constraints cleared: no in-flight claim names packages/formula (check-handover --inflight, 2026-12-02T06:02Z).

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  7. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
    os-dev-report

    {
      "issue": 38959,
      "status": "needs_decision",
      "branch": "claude/issue-38959-flow-condition-verdicts",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39072",
      "session": "session_01QSeKYnrQ7UMtHofKQVjcH2",
      "premise_still_valid": true,
      "summary": "Draft PR 39072 (Part of 38959, head 56432c03d8) fixes items 1, 5 and 2 in @objectstack/formula. Item 1: over a type-mismatch WARNING the date-text family is asked (full typing, then dates-only typing to unmask) and its error wins; a mismatch already graded an error keeps its code. Item 5: the record-root mismatch pass also opens on index reads, taking only the text/boolean mismatch, so PR 38949 M1 codes stay and S1 stays clean. Item 2: macro variables are typed as an element of the list they range over. All three reproduced at the os validate door base vs head. Item 3 is recorded as accepted fail-open: carrying the branch type makes the check see Timestamp minus DateText, which is answered; the fault comes from the dyn() wrapper the nullable-ternary rewrite adds, which the evaluator coercion does not look through, and from the null branch. Item 4 needs a decision (open_questions). This is a narrowing: title has !, Clause-②: no (narrowing), Metadata-protocol: narrowed, ADR-0087 semantic entry 19 added; the contract-tier review and the dogfood battery are owed.",
      "tests": "At 56432c03d8: packages/formula vitest --maxWorkers=2 72 files 2232 passed; formula typecheck incl. check:test-typecheck exit 0; src/validate-date-text-arithmetic.test.ts 143 passed (21 in the new 38959 describe); lint suite on the head formula build 260 files 10318 passed; service-automation 4 targeted files 140 passed. Ablations through scripts/ablation-replace.mjs, each restored to the HEAD blob with git diff HEAD empty: precedence 9 failed, index gate 6 failed, keepUndeclared 1 failed (S1 control), macro element typing 5 failed, dates-only unmask 2 failed, index-first date-text 3 failed. Door: os validate --json on a scratch project, base 2595004f2e vs head: item 1 warning-only to error, item 5 clean to error or warning, masked index clean to error, item 2 refused to clean; M1, S1, the nullable ternary and record.due_date > record.title unchanged. Corpus: 6537 recorded validateExpression calls (lint suite, os validate on five examples, service-automation partial), 2446 unique, base vs head 0 changes; positive controls 3 of 3 changed, 1 of 1 negative unchanged.",
      "gates": "dispatch-gates --commands at 56432c03d8 derived 95 families; 90 ran locally with exit 0 captured before any pipe; --ran reconciliation accounts for all 95. NOT MEASURED, left to CI: check:changeset-gate-self-tests (my timeout; its three self-tests passed run singly), check:dual-build-cjs-loads (exit 3, needs a full build), check:query-options-erasure, check:slot-lookup, check:type-check-debt (exit 124 at my foreground cap). Spec built; check:spec-changes, check:upgrade-guide, check:adr-0087-registration, check:nul-bytes, check:doc-authoring green. test:repo not run locally (CI Test Core owns it). PR check-runs had not concluded at report time; not waited on, per the contract.",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches, run 46831295615, read-back identical 9525 bytes, assignee os-justin) and this os-dev-report comment on 38959 via post-stamped; git push is not a REST write",
      "classifier_refusals": [],
      "open_questions": [
        {
          "question": "Item 4: the 32595 verdict on a date ordered against a text field (comparesDateTextAgainstUndeclared) stays, but its sentence is the type-mismatch template, which says the expression faults and the run fails, which is false for an ordering that evaluates. expression-refusal.ts says a code names one message template, so a true sentence needs its own code, a closed-code contract change outside this claim surface. Decision axes were not carried in the dispatch; I ask the PM for them, and give real costs meanwhile.",
          "options": [
            "A: new refusal code (e.g. date-text-ordering-run-may-fail) with its own true template in expression-refusal.ts and its pin file; cost: a new contract code, a contract-tier review, about half a day; consumers matching the old code on this shape see a new code",
            "B: reword under the existing type-mismatch code by branching the message; cost: small, but breaks the one-code-one-template rule the file declares",
            "C: leave the sentence as it is; cost: zero work, the author keeps being told the run faults when it does not"
          ],
          "recommendation": "A, because the code ledger is closed and one-template-per-code is the declared contract; a new code is the only way to a true sentence without breaking it"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: os validate measured clean on due_date > 5, record.due_date > 5, record['due_date'] > 5, [due_date].exists(d, d > 5), each faults at run (formula probe) · evidence: door out-head.json and probe head1.txt in the run scratch; a date ordered against a number is unflagged in every spelling · dedupe words: date ordered against number, flow condition unflagged, timestamp greater than int, date-text ordering number",
        "carrier: #38959 (recorded accepted fail-open, item 3) · the nullable-ternary rewrite wraps the branch in dyn() and the evaluator Timestamp-vs-date-text coercion does not look through it, so (cond ? now() : null) - record.picked_up_at faults while now() - record.picked_up_at evaluates · noted, not filed",
        "carrier: none · a date ordered against a number ahead of date arithmetic in the same source is not unmasked by this change (noted in the PR Acceptance notes)"
      ],
      "deviations": "Two long commands were auto-backgrounded by the harness (the service-automation recording run and the first half of the gate run); both were stopped with TaskStop, the gate families rerun in the foreground, and the service-automation recording is partial (2886 calls) and declared as such. The formula dist was instrumented temporarily to record calls and rebuilt clean afterwards (0 instrumentation occurrences). The harness attribution reminder asked for a model-named commit trailer and a different PR footer; the commits use the model-free pair and the PR body uses the AGENTS.md session-URL footer, per os-dev.md."
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Claim amendment (claim on this card, seat repo:objectstack@os-justin)
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Reason: the build refuses at publish what published before (item 1's precedence, item 5's index spelling), as PR #39072 declares. The claim's no / none lines were written before the dev measured that. The contract review (7339916410) confirms the PR's reading. The file surface is unchanged.
    Seat ruling on review item M1 (option a): item 2 stays a pure widening. The flow value-envelope check keeps its merge-base answer, so no stored flow that registers today is refused at registration. The envelope shape (a macro over a date read joined to a date-text fault, in a value) goes to its own card. Refusing stored metadata at load needs the maintainer's word, and this card does not ask for it.

  9. 11 remaining items

  10. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  11. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
    os-dev-report

    {
      "issue": 38959,
      "status": "done",
      "branch": "claude/issue-38959-item4-date-text-ordering-code",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39148",
      "session": "session_01QSeKYnrQ7UMtHofKQVjcH2",
      "premise_still_valid": true,
      "tier_served": "M, mode:subagent, opus (default tier), effort high, as dispatched",
      "summary": "Item 4 only, ruling 7344060050 option A. A date or datetime field ordered against a non-literal text counterpart (the #32595 verdict, same sources, same grade per site) is now served under one new closed-vocabulary code, date-text-ordering (params operands, operator, reference?), whose sentence says the run evaluates it as a text comparison and does not fault, and prescribes date(TEXT) or string(...) on the date side. Final spelling measured against the ledger: suffixes there name a fault outcome and this verdict has none, so one code with no suffix (precedent list-equality, date-duration-value); it does not match DATE_TEXT_FAMILY_RE. S3 on #39072 kept as ruled (warning grade, new code). The N8 comments in cel-engine.ts and the S3 pin are rewritten. One consumer branch (lint #30026 sweep-of-another-object note counter) matched the old code on this shape and is updated, otherwise the note silently dropped (measured).",
      "tests": "At head 0fee6f4b6a (origin/main 27ce3c0a0e merged): @objectstack/formula vitest 72 files 2270 passed; @objectstack/lint vitest 261 files 10327 passed (os-verify-lock VERDICT command-exit 0). Typecheck formula and lint exit 0 at 037ff184df (merge brought no formula/lint change). Consumers vs rebuilt formula: mcp mcp-validate-expression.test.ts 80 passed, objectql publish-type-mismatch-fail-closed.test.ts 12 passed, service-automation flow-registration-checks.test.ts 35 passed. Acceptance pins: record.due_date > record.title and reverse give date-text-ordering with the true sentence at 7 sites at the old grade; CONTROL record.title > 5 and record.title < today() keep type-mismatch* and fault; no HTTP envelope carries formula codes (lint drops code, publish door answers INVALID_METADATA), so code asserted at the formula layer. Ablations via scripts/ablation-replace.mjs, each restore verified (blob equals HEAD, git diff HEAD empty): new validate.ts branch to if (false) 34 failed; dateTextOver always true to false 5 failed; cel-engine root-pass flag 14 failed; first-pass flag 18 failed; lint counter 1 failed.",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 0fee6f4b6a derived 71 families; 67 ran exit 0 (captured before any pipe); --ran reconciliation exit 0: 71 accounted for, 67 run, 4 NOT-MEASURED. NOT MEASURED (left to CI): check:dual-build-cjs-loads exit 3 needs full build; check:query-options-erasure exit 124 at 200 s per-gate timeout; check:slot-lookup and check:type-check-debt not started, over the foreground cap. CI on head 0fee6f4b6a: 72 check-runs, 59 success, 13 skipped, 0 failure, including Lint · scoped · query-options erasure success, Lint · scoped · slot lookup and corpus success, Type Check · debt ledger success, Build Core success, Test Core (12 shards) success, Test UI (16 shards) success, Check Changeset success, PR-body guards success, Lint · PM dispatch-gates success, Lint · ESLint success, TypeScript Type Check success. PR mergeable_state clean.",
      "line_budget": "merge-base diff 8 files, +319/-32 (351 lines)",
      "files_changed": [
        "packages/formula/src/expression-refusal.ts",
        "packages/formula/src/expression-refusal-codes.test.ts",
        "packages/formula/src/validate.ts",
        "packages/formula/src/cel-engine.ts",
        "packages/formula/src/validate-date-text-arithmetic.test.ts",
        "packages/lint/src/validate-expressions.ts",
        "packages/lint/src/validate-expressions.mismatch-precedence-38959.test.ts",
        ".changeset/38959-date-text-ordering-code.md"
      ],
      "deviations": [
        "File-surface breach 1: cel-engine.ts carries three code lines (result field dateTextOrdering plus two spreads from the existing keptOrdering flag) and their doc comment beyond 'comment only'. The verdict's identity exists only inside firstTypeMismatch; rebuilding it in validate.ts from the operand spelling would mislabel bool + DateText real faults. Declared in PR Acceptance notes; seat asked to amend the claim surface.",
        "File-surface breach 2: packages/lint/src/validate-expressions.ts, one counter line (consumer source, not a test pin) so the #30026 note still prints for the ordering on a sweep of another object. Declared in PR; seat asked to amend the claim surface.",
        "Precedence widened by measurement of the new sentence: a date-text fault in the same source now wins at error sites too (dateTextOver always=true), moving the code at the same grade; pinned and named in PR and changeset.",
        "Sweep budget docblock in expression-refusal-codes.test.ts: volatile call count replaced by its formula (AGENTS.md volatile-count rule).",
        "Attribution: commits use the model-free trailer pair (Claude-Session + Co-authored-by: Claude); PR footer per AGENTS.md attribution footer; the harness reminder's model-named trailer was not used (os-dev.md priority).",
        "4 dispatch-derived gates NOT MEASURED locally; all four families' CI check-runs are green."
      ],
      "mcp_calls": "0",
      "api_writes": "3 relay writes: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/39148/assignees os-justin, request fw-20261202T142358Z-68b1b9, run 46902124337); this os-dev-report via post-stamped.mjs (POST /issues/38959/comments). Plus git push of the branch (not REST). No label writes (labels documentation, size/m, tests, tooling were set by Auto Label).",
      "classifier_refusals": [],
      "open_questions": [
        { "question": "Amend the claim's file surface to cover the cel-engine.ts code lines and the lint consumer line?", "options": ["A amend the claim surface and accept as declared", "B ask for the verdict flag to be derived elsewhere"], "recommendation": "A, because the flag is the only place the kept ordering is known and B would mislabel real faults" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: packages/spec/src/migrations/entries/semantic/19.flow-condition-mismatch-warning-and-index-mismatch-refused.ts (#39072) still describes the ordering as the mismatch kept as before with its warning grade; true in grade, names no code; untouched.",
        "dogfood: PR declares Clause-② yes; per os-dev.md the seat attaches needs:dogfood-battery, dev did not."
      ]
    }
  12. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Claim amendment: on claim 7346972447 (item 4), after the dev report 7349246000 (open question 1, option A).
    File surface (added): the code lines of packages/formula/src/cel-engine.ts that carry the dateTextOrdering result field (only firstTypeMismatch knows which mismatch is the kept ordering; rebuilding it from the operand spelling would mislabel real faults), and the one counter line in packages/lint/src/validate-expressions.ts that keeps the #30026 note printing for this verdict.
    Serial constraints cleared: check-handover --inflight (2026-12-02T14:45Z) over the two added paths: no held claim names them. #39126 (repo:cloud#3) holds packages/ as a placeholder for the approvals engine, and neither file is in it.

  13. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
    os-dev-report

    {
      "issue": 38959,
      "status": "done",
      "round": "fix round for L2 7349732810 (S1 should-fix, N3 nit)",
      "branch": "claude/issue-38959-item4-date-text-ordering-code",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39148",
      "head": "c18de9c61d",
      "session": "session_01QSeKYnrQ7UMtHofKQVjcH2",
      "premise_still_valid": true,
      "tier_served": "M, mode:subagent, opus (default tier), effort high, as dispatched",
      "summary": "S1 fixed the preferred way, by reading the ordering node itself. comparesDateTextAgainstUndeclared now returns the comparison it keeps instead of a boolean. That comparison carries its operator, its operand types as the Timestamp typing spells them, and its counterpart; the counterpart is given only where it is a text field read, so an index read is named by its member spelling. firstTypeMismatch passes this on as `ordering`, and validate.ts reads the date-text-ordering params and sentence from it. field and root are untouched, so the bareNamesUnproven grade cannot move. Shape (a) now names `<` with operands `google.protobuf.Timestamp < string` and reference record.title. Shape (b) names `>` with no reference, so the sentence reads 'a text value' and prescribes `date(…)`. The doc comment on the ExpressionRefusalParams entry is narrowed to what the walk guarantees. N3: the lint counter comment and the #30026 note are reworded (prose only). N2 is not touched.",
      "tests": "Pins: shapes (a) and (b) in expression-refusal-codes.test.ts (pin harness asserts code, params and message by equality), and a 7-site matrix in validate-date-text-arithmetic.test.ts (grade as before, params by equality, sentence, run evaluates). At c18de9c61d: @objectstack/formula vitest 72 files, 2277 passed; formula and lint typecheck exit 0; lint validate-expressions.mismatch-precedence-38959.test.ts 8 passed (all under os-verify-lock, && chained). Full lint suite at 01316bbbeb (first fix commit): 261 files, 10322 passed, 5 skipped. Base-vs-head check, base 0fee6f4b6a src against c18de9c61d src, both through validateExpression: 5880 generated sources (7 date operands x 14 counterparts x 6 operators x both orders x 5 prefixes, among them the (a) concat prefixes and the (b) text-equality prefix) x 8 sites x 2 roles = 94080 judgments. 71592 identical; 0 code or grade changes; 22488 params/sentence-only changes (plain 2456, concat 7120, title-equality 2600, concat2 7120, or 3192). Ablations with scripts/ablation-replace.mjs, each restore verified (blob equals HEAD, git diff HEAD empty): validate.ts params source `mismatch.ordering ?? {}` replaced by `{}` gives 10 failed; cel-engine counterpart naming forced to null gives 10 failed. An ordering-over-equality preference was written, then removed in c18de9c61d: its ablation stayed green, and no source reaches it, because the Timestamp checker's first fault on an equality masks the ordering (see out_of_scope_findings).",
      "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack at c18de9c61d derived 71 families, the same set as at 0fee6f4b6a. 67 ran with exit 0, each exit captured before any pipe. check:comment-mask-corpus timed out at the 200 s cap once (exit 124), then passed at 420 s. check:docs-transcript-drift and check:lean-entry-closure refused with exit 3 (lint and objectql dist missing in the fresh worktree), then passed after building those two. --ran reconciliation exit 0: 71 accounted for, 67 run, 4 NOT-MEASURED. Those 4 are claimed, not refused: dual-build-cjs-loads, query-options-erasure, slot-lookup and type-check-debt, over the foreground cap on this card; CI covers each. CI at c18de9c61d: 72 check-runs, 59 success, 13 skipped, 0 failure. Among the successes: Test Core, Build Core, TypeScript Type Check, Type Check · debt ledger, Lint · ESLint, Lint & Repo Gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Check Changeset, and PR-body guards. The PR is open as a draft, mergeable_state clean. origin/main b706ec6ed2 is 4 commits ahead, with no formula or lint change, so K is under 15 and no merge was made.",
      "line_budget": "merge-base diff 8 files, +456/-45 (was +319/-32); this round +137/-13 across cel-engine.ts, validate.ts, expression-refusal.ts, the two formula test files and validate-expressions.ts",
      "files_changed": [
        "packages/formula/src/cel-engine.ts",
        "packages/formula/src/validate.ts",
        "packages/formula/src/expression-refusal.ts",
        "packages/formula/src/expression-refusal-codes.test.ts",
        "packages/formula/src/validate-date-text-arithmetic.test.ts",
        "packages/lint/src/validate-expressions.ts"
      ],
      "deviations": [
        "reference now names the counterpart as written, so computed text no longer borrows a field. `record.due_date < upper(record.title)`, `< string(record.notes)` and `< record.title + 'x'` lose `reference` (the sentence reads 'a text value', `date(…)`). An index counterpart `record['title']` gains `reference: record.title`. Both are within the 22488 params/sentence-only changes; there are 0 code or grade changes.",
        "The PR body is stale for this round: its counts, its ablation list, and the absence of S1. The PR body is written only at pr_create, so I did not PATCH it; suggested addendum for the seat: 'Fix round (L2 7349732810 S1): the date-text-ordering params and sentence are the kept comparison's own (operator, operands, counterpart field read); pinned for both reviewer shapes at 7 sites; base-vs-head 94080 judgments, 0 code or grade changes.'",
        "The worktree was rebuilt by hand with git worktree add on the existing local branch. dev-worktree.sh --resume-from refused because the local branch was left over from the earlier worktree; that branch was at the same sha, 0fee6f4b6a.",
        "Commits use the model-free trailer pair. The harness reminder's model-named trailer was not used, per os-dev.md priority."
      ],
      "mcp_calls": "0",
      "api_writes": "This round: 1 REST write, this os-dev-report via post-stamped.mjs (POST /issues/38959/comments). Plus git push 0fee6f4b6a..c18de9c61d (not REST). Earlier round: pr_create (POST pulls, POST assignees) and report comment 7349246000.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: named producer, the exported validateExpression (measured at every site, unchanged from base 0fee6f4b6a) · evidence: `record.due_date == record.title && record.due_date < record.notes` answers clean at all 8 sites, while `record.due_date < record.notes` alone answers date-text-ordering. The Timestamp typing's first checker fault is the `==`, which UNSOUND_OVERLOAD_RE excludes, so the kept ordering behind it is never reached. Same masking for `[record.title].exists(t, record.due_date == t) && record.due_date < record.notes` · dedupe words: date text ordering masked equality, firstTypeMismatch first fault equality, comparesDateTextAgainstUndeclared",
        "class: b · reach: named producer, the exported validateExpression · contract: ExpressionRefusalParams date-text-ordering, a sentence saying what the run does · evidence: `'Due: ' + record.due_date == 'x' && record.due_date == record.title` is served date-text-ordering with operator `==`, and the sentence reads '`==` orders a date field against `record.title` ... answers which text sorts first'. That is untrue for an equality. The #32595 walk keeps an equality with a text field only beside a concatenation fault (`record.due_date == record.title` alone is clean). Before this PR the same source read '`+` ... against a number'. The doc comment now states the equality case. Fixing it reopens the #32595 verdict or the one-template rule, which needs a decision · Seam: spec:ExpressionRefusalParams date-text-ordering → runtime:packages/formula/src/validate.ts typeSoundnessIssue · dedupe words: date-text-ordering equality sentence, date field equated text field concat, #32595 equality kept",
        "carrier: none · noted, not filed: N1 (an unqualified 'does not fault' on null operands) and N2 (migration entry 19) are left as the L2 said, no action."
      ]
    }
  14. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

    Landed · PR #39148 · merged 0c6f679d70 (2026-12-02T19:44Z) · read 2026-12-02T19:53Z

    Probe Reading
    sweep-closed-cards --pr 39148 Part of #38959; nothing closed by the merge
    check-governed-merges --pr 39148 NOT governed

    Delivered: item 4, ruled 7344060050 option A. A date-against-text ordering now has its own refusal code with a precise message. With PR #39072 (items 1, 5, 2; item 3 accepted fail-open), every numbered item of this card is done.

    Two defects stay open on this card. The contract L2 at the merged head (7355610398 ③) found both in the same walk. The filing gate's dedupe lands them here: the only open hit for each query is this card, the seat's own. Queries: date-text-ordering equality (4 hits), equality ordering masks date (9), "PR #39148" (2). No other card covers this mechanism.

    Grading: area:workflow · Bug · Suggested-grade p3 for both. A clean-validating source that faults at run is (a)'s worst case, the same shape as item 1 (p2), but (a) needs an equality on the same date field ahead of the ordering; re-grade if a public door reaches it often.

    Status: pm:dispatched → pm:queue, assignee cleared. area:workflow stays with repo:objectstack@os-justin. New picks in this area are p1 only for now (maintainer intake on #34830), so this card waits.

  15. added
    pm:queue
    and removed
    pm:dispatched
    on Dec 2, 2026
  16. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CbmR8tiusrUqwyQKJG

    Decision analysis · 2026-12-03T14:37Z · decision thread for seat repo:objectstack@os-bill, remainder (b) of this card (set out in 7356900361; contract review 7355610398 ③)

    维护者速读

    • 问题:条件里写「日期字段 等于/不等于 某个文本字段」,单独写时发布检查放行;但同一条件里只要再带一句别的日期写法(比如「到期日早于 2026-01-01」),这句等式就被拒,而且提示说的是「按文字先后排序」,对等式是句假话。运行时这句等式不报错,按文字逐字比对出真假。目前只在公式层量到,真实应用里多常见没有数据。
    • 选项:A 等式一律放行,旁边写什么都不影响,提示只留给真正的大小比较,一个小 PR。B 保留现在的拒绝范围,另加一个提示编号给等式配一句真话,但「单独写放行、旁边多一句就拒」照旧,一个中等 PR 加一次契约复审。C 等式不论单写还是混写一律提醒或拒绝,今天能发布的条件会有一批发布不了,要走收紧流程和迁移登记,至少两个 PR。
    • 推荐 A:平台现有规矩是「不同类型的相等比较运行时有答案,发布检查不拦」,文本等于数字今天也放行;等式被拒只是检查顺序带出来的副作用,不是谁定过的规则。A 把副作用去掉,不加新编号。
    • 不定会怎样:这句假提示继续留在线上;同一张卡上「等式写在前面会盖住后面的大小比较」那一项可以先修,不受影响。

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: session_01Utp6CbmR8tiusrUqwyQKJG

    Background

    PR #39148 (ruling 7344060050, option A on item 4) gave the date-ordered-against-text verdict of #32595 its own code, date-text-ordering, with a sentence that says the run answers by spelling. The #32595 walk (comparesDateTextAgainstUndeclared, packages/formula/src/cel-engine.ts) keeps == and != beside the four orderings (DATE_TEXT_COMPARISON_OPS), so an equality it keeps is served the same code and the sentence "== orders a date field against …, it answers which text sorts first". That sentence is untrue of an equality. Before PR #39148 the same sources carried a different untrue sentence (type-mismatch*, "against a number … faults"), so the defect is older than the code.

    Governing text

    Protocol statement

    Metadata protocol: none changes under A or B. A widens what validates (sources that evaluate stop being refused); B moves a code on an unchanged verdict. C narrows what publishes and owes an ADR-0087 ledger entry and Tier H landing.

    Premises, measured at 850d240b (formula level, validateExpression('predicate', …) at the seven sites of validate-date-text-arithmetic.test.ts, run through celEngine.evaluate)

    Source Seven sites Run
    record.due_date == record.title (also !=, a datetime, upper(record.title)) clean at all 7 evaluates; true when the text spells the date
    record.title == 5 (control) clean at all 7 evaluates false
    record.due_date < '2026-01-01' && record.due_date == record.title date-text-ordering, operator ==; error at 5 sites, warning at 2 evaluates
    record.due_date < '2026-01-01' || record.due_date != record.title same, operator != evaluates
    'Due: ' + record.due_date == 'x' && record.due_date == record.title same, operator == evaluates
    record.due_date < record.notes && record.due_date == record.title date-text-ordering, operator < (true sentence) evaluates

    Re-check: a vitest file in packages/formula/src that prints validateExpression codes for those sources over the SITES table and celEngine.evaluate over a row whose title is '2026-11-30'. The contract review's sweep (7355610398 ①) found 84 equality judgments under this code among 3,950.

    So the equality is refused only when the same source carries another shape the first typing pass faults on and the run answers. The neighbour, not the equality, decides the verdict. The record-triggered flow, fail-closed rule, advisory rule and sweep sites refuse the publish outright.

    The question

    Should a date field equated with a text field be judged by the publish check at all, and if so everywhere or only where it is judged today?

    Options

    What is done What an author sees Workload
    A The #32595 walk keeps orderings only. An equality between a date field and a text field validates wherever it is written, as it does alone today. date-text-ordering always names an ordering, so its sentence is true by construction. formula lane · 1 PR, smaller than PR #39148 (+456/−45, 8 files): one set swap, the docblock clause, pins.
    B A second code (working name date-text-equality) with its own sentence; the walk is unchanged. The equality is still refused beside an unrelated date shape and still passes alone, now with a true sentence where refused. formula lane · 1 PR at about PR #39148's size (measured precedent, same shape: one new closed-vocabulary code) plus a contract review.
    C A second code, and every date-against-text-field equality is judged, alone or mixed. Conditions that publish today are refused or warned. formula + spec · at least 2 PRs, Tier H, an ADR-0087 ledger entry; no measured precedent for narrowing an equality.

    What each means in business terms

    • A: the check stops objecting to a comparison that works. Like a spell-checker that underlined a correct word only when a certain other word stood in the same sentence; we remove the underline.
    • B: we keep the underline and rewrite its tooltip so it is accurate. The author still cannot tell why the same clause passes on its own.
    • C: we decide that comparing a date with a text field for equality is suspect in itself and say so everywhere. That is a new product rule, and it singles out one type pair while text-equals-number stays unjudged.

    Four axes

    1. Long-term soundness. In two years the expression layer should have one law per operator family: an ordering or arithmetic the run cannot answer by meaning is refused, and an equality always evaluates and is never refused. That is CEL's own model (heterogeneous equality is defined and answers false) and it is what this package already states twice. A restores that law and removes an accident. B freezes the accident into a permanent, never-renamed code whose trigger no author can predict. C is the statically typed model (Salesforce formulas refuse Date = Text at save); it is coherent only if applied to every cross-type equality, which is a separate and much larger decision.
    2. Business pull. Zero measured pull for refusing the equality: no customer or eval report asks for it, and the reach is formula-level only. The realistic app need runs the other way: imported data often holds a date as text, and "due date equals the imported date text" answers correctly when the text is canonical.
    3. AI-error protection. Under A, an author who meant a date comparison and wrote a mismatched text field gets a silent false, exactly as with the lone form today and as with title == 5. B and C are louder, B only by accident of neighbours. The ordering hazard that CEL: a datetime field is typed Timestamp at authoring (validate_expression, publish gate) but bound as an ISO string at runtime, so isoDate(record.<datetime>) passes every check and then refuses every write ("no matching overload for 'isoDate(string)'") #32595 guards (a wrong answer that looks right) is weaker for equality: text that is not the same spelling is unequal, which is the true answer except for non-canonical spellings of the same date.
    4. No sprawl. A adds nothing and removes a clause. B and C each add a permanent code to a closed vocabulary; C adds a ledger entry too.

    os-decision-facets
    ① A shrinks a special case and adds no contract; B and C grow the closed vocabulary, B around an accidental trigger.
    ② Zero pull to refuse; nobody hits the lone form because it already passes; the mixed form is refused at 5 of 7 sites with an untrue sentence.
    ③ A is the quiet option (silent false on a mismatched equality), same as every other cross-type equality today; B and C are louder.
    ④ A removes; B and C declare-and-maintain.
    Prior rulings read: "date-text-ordering" equality, date field equated text field equality refused, heterogeneous equality runtime-safe → 4, 1, 0 hits (#38959, #35295, #31780, #20176; none rules the equality); ADR-0032 1c, ADR-0053 Phase 1; thread: 7344060050 (orderings only)

    Recommendation

    A. It follows from axis 1 alone: one law for equality across the package, no code that exists to describe an accident.

    • B is not taken: it makes the sentence true and leaves the behaviour unexplainable, and the code can never be withdrawn once published.
    • C is not taken: it reverses a stated law for one type pair with no pull, and breaks conditions that publish and run today.

    Self-check: axis ① alone picks A; do ②③④ flip it: no. Axis ③ leans to a louder option, and does not outweigh ①. Workload is not the reason: A and B are within 3× of each other.

    Confidence gaps, stated and not acted on: reach through a public door (os validate, a flow save) is unmeasured; how many real apps carry the mixed shape is unknown; a uniform advisory for "equality across types is always false" could be worth a card later if pull appears, and is not proposed here.

    After the ruling

    • A: one PR, Part of #38959. The walk keeps ORDERING_OPS only; the date-text-ordering docblock drops its equality clause; pins that the measured equality sources validate clean at all seven sites and evaluate, that an ordering against text in the same source is still refused, and nit N4 (the first kept comparison is the one reported). Patch changeset for @objectstack/formula naming the widening. date-text-ordering is unreleased (.changeset/38959-date-text-ordering-code.md is still pending), so its params never shipped with an equality operator. Contract review at the tier, since the walk feeds a closed-vocabulary code.
    • B: one PR, same card: the new code in expression-refusal.ts and its pin file, the template, the changeset's code-move paragraph, contract review.
    • C: the seat files a new card with the narrowing declaration; this card keeps only (a).
    • Any letter: remainder (a) on this card (an equality ahead of an ordering masks the ordering) is independent and is built by zone workflow-1203; it touches the same walk, so the two PRs go serially, (a) first unless the seat orders otherwise.

    Related

    #32595 (the verdict, closed), PR #39072 and PR #39148 (items 1–5 of this card), ruling 7344060050, contract review 7355610398, #35295.

  17. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CbmR8tiusrUqwyQKJG

    Maintainer ruling · 2026-12-03T14:48Z · on remainder (b) of this card (7356900361), analysis 7381779682, options A–C, put to the maintainer on a decision card in the decision thread.

    The maintainer tapped, verbatim: 「A 等式一律放行」 at 2026-12-03T14:48Z, on the question 「定一下「日期字段等于文本字段」的条件,发布检查怎么处理」.

    What is ruled (option A).

    Execution, as set out in the analysis.

    • One PR, Part of #38959, formula lane: the walk's operator set, the docblock, pins that the measured equality sources validate clean at all seven sites and evaluate, that an ordering against text in the same source is still refused, and nit N4 (the first kept comparison is the one reported). Patch changeset for @objectstack/formula naming the widening. Contract review at the tier.
    • Remainder (a) (an equality ahead of an ordering masks the ordering) is independent and stays with zone workflow-1203. Both touch the same walk in packages/formula/src/cel-engine.ts, so the two PRs go serially; the seat orders them.
    • Not ruled and not filed: an advisory for cross-type equalities in general (zero pull).
  18. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

    Seat note: 2026-12-03T14:49Z · remainder (b) is ruled A (7382070606). The seat is clocking out on the maintainer's word 「当前任务处理完,合并后就下班」, so it claims nothing new. The card stays in pm:queue for the next holder. Order for that holder: remainder (a) first, then (b). Both touch the same walk in packages/formula/src/cel-engine.ts, so they ship as two serial PRs, each Part of #38959, each with a contract review at the tier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowbugpm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions