Skip to content

a flow condition passes record.<date field> + 1 while the same arithmetic over the bare name is refused: the date-arithmetic verdict is not applied to record./previous. reads #34946

Closed

Description

@objectstack-fleet

repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

Filing gate: class a, an out-of-scope finding of the #34662 dev round (PR #34935, report 6955879892), measured by that dev. ⛔ Not a claim. Grading and domain:* are triage's.

Suggested-grade: p2 · the same family and outcome as #34662, #34451, #34363: the flow fails on every run, and authoring says nothing

维护者速读

Measured (by the dev, on PR #34935's head 653f1fb)

validateStackExpressions on a record-triggered flow, object library_loan with due_date: { type: date, required: true }:

start condition findings
due_date + 1 > 5 1 error (date-arithmetic, google.protobuf.Timestamp + int)
record.due_date + 1 > 5 0
previous.due_date + 1 > 5 0

At run time the condition faults on "YYYY-MM-DD" + 1.

Where

packages/formula/src/cel-engine.ts: firstTypeMismatch's record-root pass returns only the text/boolean mismatch (comment "The date verdicts stay the bare name's alone"). PR #34935's date-text pass deliberately stands down on this shape, because it is the date-arithmetic verdict's job, not date-text's.

Done when

record.DATE_FIELD + N and previous.DATE_FIELD + N in a flow condition are refused like the bare name, at os validate and at the publish door. CONTROL: a datetime field.

Notes

Lands after PR #34935 (same files).

Dedupe: "record." date-arithmetic flow condition (0 open).

Blocked-by: #34662

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Dedupe correction (2026-11-17T17:38Z): the query "record." date-arithmetic flow condition returned 3 open hits before this card, not 0: #34662 (the date-text sibling this card follows), #34660 (the wording of value-envelope refusals, a different defect) and #6015 (a seat post). None is a duplicate.

  3. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    First touch (R1200, 17:5xZ): p2 · domain:server → pm:queue.

    Theme: MCP (agents author flows). A condition using record.<date> + 1 passes authoring and then fails on every run. Same family and grade as #34694 and #34662.

  4. added
    domain:server
    pm:queue
    priority:p2
    area:workflow
    on Nov 17, 2026
  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#35205#1 · os-warren · session_01JQwxbYJqoPAoSpWTMpH1yq

    State: pm:queue → pm:blocked (the label disagreed with the body) · 2026-11-19

    The card sat in pm:queue while its body says Blocked-by: #34662 (open, dispatched). The block is real and covers the whole card: the fix extends the record-root pass in packages/formula/src/cel-engine.ts that #34662's PR #34935 is changing (its date-text pass deliberately stands down on this shape). It releases when #34662 closes.

    Blocked-by: #34662

    Order: Warren, 2026-11-19 00:42Z 「ok」 to the partial-block review (execution sheet section I).


    Generated by Claude Code

  6. added
    pm:blocked
    and removed
    pm:queue
    on Nov 19, 2026
  7. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    2026-11-19T10:04Z · Unblocked: pm:blocked → pm:queue. Blocker #34662 closed completed at 03:11Z (PR #34935 landed the record-root pass this fix extends). Grade unchanged.

  8. added
    pm:queue
    and removed
    pm:blocked
    on Nov 19, 2026
  9. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Ruling-ref: maintainer 2026-11-21T22:3xZ, verbatim: 「按建议升」, on triage's third non-topic pass (about 10% of non-topic p2, the maintainer's ask: 「按照10% 的比例重新分析」) under the standard ruled 「同意」 today: this week, or someone loses.

    2026-11-21T22:33Z · p2 → p1 on the maintainer's word: automation silently broken: record.<date> + 1 passes validation and then fails the flow on every run. Lane and state unchanged.

  10. added
    priority:p1
    and removed
    priority:p2
    on Nov 21, 2026
  11. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Claim: PM loop · area a4-B · 2026-11-22T04:14Z · on seat 4's release of this card to area a4-B (order seat4/area-a4-B.md, section "Re-opened · new p1 batch"), sequenced after PR #36207 (merged ad65d82859)
    Session: session_01FEkQ5pb2t8Z8C64PkPyVt1
    Account: os-project-manager
    Branch: claude/area-a4B-34946
    Worktree: objectstack-issue-34946
    Domain: domain:server
    Seat: repo:objectstack#4
    Area: a4-B
    Pre-claim lane: packages/formula/** is domain:server; seat repo:objectstack#4 released this card to a4-B.
    Pre-claim deps: Blocked-by: #34662 is closed (PR #34935 landed); PR #36207, which shared cel-engine.ts, merged; no open PR names this card.
    Prior rulings read: date-arithmetic,record-root,previous,flattened → 1 hit, ADR-0044 D5 (flow engine back-edges; does not rule expression typing); the title terms gave 402 candidates with no ruling on the record-root date verdict; thread: none (7070269877 is the p1 grade); repo: objectstack-ai/objectstack
    File surface: packages/formula/src/cel-engine.ts (firstTypeMismatch's record-root pass, now :1420-1436 at origin/main 28ba01f), packages/formula/src/validate.ts if the verdict's reporting needs it, their tests under packages/formula/src/**, the publish-door / os validate pins where the bare-name date-arith pins live (packages/lint/src/**, packages/services/service-automation/src/** tests), the ADR-0087 migration entry the narrowing owes (packages/spec/src/migrations/entries/**, the one spec path allowed), one .changeset/34946-*.md. Stop on breach.
    Container & model: S, mode:subagent, model: default tier (opus; dispatch-gates --tier: no path-derived mandate), effort: high (seat order)
    Clause-②: no (narrowing: record.<date> + N / previous.<date> + N in a flow condition is newly refused); ! title, BREAKING changeset, ADR-0087 entry, dogfood battery
    Metadata-protocol: none
    Responsibility: formula type-soundness in objectstack (firstTypeMismatch's record-root pass returns only the text/boolean verdict; its comment says "The date-arith verdict stays the bare name's alone"); platform path covering it: none; reach: every flow condition that does date arithmetic on a record. / previous. read (fails at run time on every run).
    Thread-read: 7070269877
    Premise: holds at origin/main 28ba01f by code read (cel-engine.ts :1420-1436: the root pass keeps only textOrBool results); the dev re-measures the card's table before writing.
    Serial constraints cleared: PR #36207 merged; the dev runs overlap-check before the first push. Landing: narrowing ⇒ the seat's Fable contract review and four pieces; this area never --lands it.

  12. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
  13. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1
    os-dev-report

    {
      "issue": 34946,
      "status": "done",
      "branch": "claude/area-a4B-34946",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36333",
      "session": "session_01FEkQ5pb2t8Z8C64PkPyVt1",
      "premise_still_valid": true,
      "head_sha": "44267238ac44395f11919b50cd37d44248534929",
      "pr_number": 36333,
      "files_changed": [
        "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/services/service-automation/src/flow-registration-schema-e2e.test.ts",
        "packages/spec/src/migrations/entries/semantic/18.flow-condition-record-date-arithmetic-refused.ts",
        ".changeset/34946-flow-record-date-arithmetic.md"
      ],
      "summary": "firstTypeMismatch's flattened record-root pass now answers category date-arith when its first operator fault is date/duration arithmetic against a number, naming the field and root via offendingRecordRead; the comment that kept date-arith the bare name's alone is corrected. typeSoundnessIssue gives a root read's date verdict the row's arm (dateArm with bareNamesUnproven false), matching the root read's type-mismatch and date-text verdicts. record.due_date + 1 > 5 and previous.due_date + 1 > 5 in a flow condition are now refused under the bare name's code (date-arithmetic-run-fails on a record-triggered flow) at os validate and at the publish door (INVALID_METADATA 422), and registerFlow logs the same advisory; the datetime control's root reads equal the bare name's verdict. Reach is flow conditions only (flattened scope: lint start/edge/decision, registerFlow, MCP validate_expression flow_condition); record-scoped sites already refused the shape. ADR-0087 semantic entry flow-condition-record-date-arithmetic-refused and a BREAKING patch changeset added.",
      "before_after": {
        "fixture": "validateStackExpressions, record-after-update flow on library_loan with due_date: date and picked_up_at: datetime (both required), start condition; before = origin/main 28ba01fe69, after = 44267238ac",
        "rows": [
          [
            "due_date + 1 > 5",
            "1 error date-arith due_date",
            "1 error (unchanged)"
          ],
          [
            "record.due_date + 1 > 5",
            "0",
            "1 error date-arith, record.due_date named"
          ],
          [
            "previous.due_date + 1 > 5",
            "0",
            "1 error date-arith, previous.due_date named"
          ],
          [
            "picked_up_at + 1 > 5 (CONTROL)",
            "1 error date-arith picked_up_at",
            "1 error (unchanged)"
          ],
          [
            "record.picked_up_at + 1 > 5 (CONTROL)",
            "0",
            "1 error, equal to the bare name's with the reference swapped"
          ],
          [
            "previous.picked_up_at + 1 > 5 (CONTROL)",
            "0",
            "1 error, equal to the bare name's with the reference swapped"
          ],
          [
            "record.due_date ordered against today() (CONTROL)",
            "0",
            "0"
          ],
          [
            "timestamp(record.due_date) compared with now() (CONTROL)",
            "1 error date-text-call",
            "1 error (unchanged, no second finding)"
          ]
        ],
        "publish_door_after": "publishMetaItem over real ObjectQL (scratch copy of the #34662 runtime rig, not committed): bare, record. and previous. date arithmetic on due_date and on picked_up_at each INVALID_METADATA / 422 with one expression-invalid date-arithmetic issue naming the read, row left draft; record.due_date ordered against today() published (active)"
      },
      "tests": "All under os-verify-lock at 44267238ac. formula: build exit 0; pnpm --filter @objectstack/formula test exit 0, Test Files 70 passed (70), Tests 2067 passed (2067); typecheck exit 0. lint: vitest run src/validate-expressions.test.ts exit 0, Tests 529 passed (529). service-automation: vitest run src/flow-registration-schema-e2e.test.ts exit 0, Tests 7 passed (7). spec: vitest run src/migrations exit 0, 5 files, Tests 198 passed (198). cli: vitest run test/migrate-meta-engine-guidance.test.ts exit 0, 3 passed. Ablation 1 (cel-engine.ts root isDateArith branch, never-true guard with marker ABLATED_34946 via scripts/ablation-replace.mjs, anchor 1 to 0, blob 8eb099d83f32 to 4975d5dd3077, formula rebuilt, ablation-dist-preflight exit 0): formula validate.test.ts 3 failed / 236 passed (the three #34946 verdict tests), lint 5 failed / 524 passed (all non-ordering #34946 tests), service-automation 1 failed / 6 passed; restored blob 8eb099d83f32 = HEAD blob, git diff HEAD empty, rebuilt, preflight --absent exit 0, lint 529/529. Ablation 2 (validate.ts root arm, dateArm third argument back to bareNamesUnproven, blob aeedf005910e to b35d7d64bb2a): formula validate.test.ts 1 failed / 146 passed (the arm test); restored blob aeedf005910e = HEAD, git diff HEAD empty, 147/147. #34662 date-text pins green and unchanged under all runs.",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands derived 97 families at 44267238ac; all run, each exit captured before any pipe; 96 exit 0 on first run, pnpm check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET then exit 0 after check:type-check-debt built the tree; --ran reconciliation: 97 derived, 97 run, 0 NOT-MEASURED, 0 UNRUN (derived zero, all 97 carry exit codes). Earlier on the WIP head: check-adr-0087-registration exit 0 (registered flow-condition-record-date-arithmetic-refused, new here), check-changeset-no-major exit 0 (level axis NOT APPLICABLE locally: no pull_request payload), check-empty-changeset exit 0, check:nul-bytes exit 0, check:doc-authoring exit 0. overlap-check VERDICT clean exit 0 before each push and again against origin/main 99fbaa6d18. CI on PR #36333 at report time: Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint (CI/release/engine, PM dispatch-gates, scoped query-options erasure, slot lookup and corpus, tooling self-tests), PR-body guards, Spec property liveness, Type Check (consumer gates, debt ledger, source gates, workspace) in_progress; Lint ESLint, docs and code guards, repo and tooling gates queued; Test Core, Build Core and the UI jobs not yet listed. test:repo not run locally (no repo-project test touched; CI Test Core).",
      "dogfood_battery": "44267238ac · os-verify-lock VERDICT command-exit 0, held 2291s · Test Files 484 passed, 3 skipped (487) · Tests 4107 passed, 68 skipped (4175) · no failure",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft, no assignees/labels, via repository_dispatch, fleet-write run 44993527903, read-back identical 13479 bytes); post-stamped os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/34946/comments). Plus git pushes to claude/area-a4B-34946 (not REST).",
      "open_questions": [
        {
          "question": "Metadata-protocol kind: the claim and dispatch say none (changeset graded patch), while AGENTS.md defines a refused value as narrowed and the two closest precedents in this family (#34935, #36207) declared narrowed with a minor changeset. Keep none?",
          "options": [
            "A keep none / patch as claimed (current PR)",
            "B switch PR body and changeset to Metadata-protocol: narrowed and @objectstack/formula minor"
          ],
          "recommendation": "B, because refusing a condition authors could previously publish is a refused value under AGENTS.md step 3 and matches #34935 / #36207; it is a two-line change the seat can order"
        },
        {
          "question": "Publish-door pin: the refusing door is packages/runtime publishMetaItem (registerFlow only logs), and the claim's file surface names no packages/runtime path, so the door was measured with an uncommitted scratch copy of the #34662 rig instead of a permanent pin. Add a permanent runtime pin?",
          "options": [
            "A leave as measured (lint pins runAuthoringRules, the body the door runs)",
            "B extend the file surface and add a top-level describe to packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts"
          ],
          "recommendation": "B, because the #34662 precedent pinned the door in that file and the extension is test-only"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed (PR Acceptance notes): where bare names are unproven and one source holds both a bare and a root date-arithmetic fault, the bare one is reported at run-may-fail; typeSoundnessIssue's swap-to-root step covers type-mismatch only. Still an error; observation, no reach.",
        "deviations: dispatch said publish door = service-automation flow registration checks; registerFlow is advisory (logs, never throws), so the refusal was measured at the runtime publishMetaItem door; PR body also carries a seat-signature line after the declaration lines because the first two lines were fixed by the dispatch."
      ]
    }
  14. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Claim revision · 2026-11-22T06:27Z · same session, same branch claude/area-a4B-34946, PR #36333 (dev report 7075322491).
    File surface: as claim 7074062141, plus packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts (the publish door that refuses is publishMetaItem in packages/runtime; registerFlow only logs, so the door pin lives beside the #34662 precedent's) and packages/services/service-automation/src/flow-registration-schema-e2e.test.ts (the advisory pin). Declarations follow the #36207 precedent: Metadata-protocol: narrowed, changeset minor on the packages whose published behaviour narrows.

  15. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Handover stop point (area a4-B) · 2026-11-22T06:32Z (maintainer handover rule 2026-11-22 06:31Z: rework stops, the successor continues).

    • PR fix(formula)!: a flow condition's record. / previous. date arithmetic is refused as its bare name is #36333 head: f278fece6f2227841ace298611c7444c63319422 (draft). Previous head 44267238ac was fully verified (formula 2067 passed, dogfood battery 4107 passed / 68 skipped, two ablations red then restored).
    • The patch round pushed in f278fece6f: changeset now Metadata-protocol: narrowed, @objectstack/formula minor and @objectstack/spec minor (the fix(formula)!: validateExpression refuses == / != between a list-valued field and a scalar #36207 precedent); a runtime publish-door pin in packages/runtime/src/domains/meta-flow-condition-record-date-text.test.ts (record. / previous. date arithmetic refused with 422, item stays draft; ordering against today() still publishes).
    • Not verified at f278fece6f: the new runtime describe has never run (locally or in CI at the time of writing); the ablation of the cel-engine branch against that pin was not run; gate families for the changeset and the runtime test were not re-derived. No final-head declaration, no L1, no contract record yet.
    • Owed next: CI green at the head and a run of the runtime pin; final-head declaration; L1-a full read; Fable contract review (narrowing); the maintainer lands through the seat's four pieces. Dev worktree /home/user/objectstack-issue-34946 left clean in the area container.
  16. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

    Landed · 2026-11-22T09:55Z: PR #36333 merged and its Fixes #34946 closed this card as completed.

    Reading Value
    PR #36333 MERGED (merge 97b9d1e63d) at head f278fece6f, by the maintainer; L1-a ACCEPT 7076562103, dogfood battery 7076550688 (4107 passed, 0 failed), contract PASS 7076631700 and closing delta 7076892996 (CONTRACT_REVIEW_TIER, seat repo:objectstack#7)
    Delivered record.<date> + N / previous.<date> + N in a flow condition is refused like the bare name, at os validate and at the publish door. BREAKING, Clause-②: no (narrowing), Metadata-protocol: narrowed, ADR-0087 entry flow-condition-record-date-arithmetic-refused.

    State change: pm:dispatched removed in the same write; the other labels stay. A mixed spelling the review found (bare date ordering before a record. arithmetic, also accepted on main) and nits N1–N3 are carried by #36377 (pm:queue).

  17. removed
    pm:dispatched
    on Nov 22, 2026
  18. added a commit that references this issue on Nov 22, 2026
    97b9d1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:workflowbugdomain:serverfindingpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions