Skip to content

flow value envelopes are validated without field types, so the date-text verdicts (timestamp over a date field) never reach update_record / create_record fields #34451

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

Filing gate: ① measured. Found by the #34363 dev round (PR #34447, "Not reached" bullet in its body). ⛔ Not a claim.

维护者速读

  • 是什么: fix(formula)!: refuse timestamp() over a date-only field, which faults on every row #34447 让公式校验拒绝对日期字段写 timestamp(),但 flow 的值信封(update_record / create_record 的 fields.*、assignment 的值)校验时不带字段类型,所以这条新拒绝够不到 cloud#4717 实际出错的位置。cloud 的 verify_build 探针因此还不能撤。
  • 影响: 写在 flow 值信封里的 isoDate(timestamp(record.<日期字段>) + duration(...)) 照样通过 os validate 和发布,每次运行都失败。
  • 建议(席位路线,非裁决): A,只为 date-text 这一族把触发对象的字段类型传进值信封校验。这是收窄,要配 changeset、ADR-0087 转换说明和 battery。p2,点名后再做。

Where (origin/main)

  • packages/lint: checkDeclaredValue judges a flow value envelope with no fieldTypes.
  • packages/services/service-automation: valueEnvelopeRefusals (the engine's registration door) likewise.
  • Measured on the fix(formula)!: refuse timestamp() over a date-only field, which faults on every row #34447 branch: a record-triggered flow whose update_record writes due_date from isoDate(timestamp(record.borrow_date) + duration('168h')) gets zero findings from validateStackExpressions.

Options

  • A (seat's route): pass the triggering object's field types into value-envelope validation for the date-text verdict family only. About one dev day. Narrowing: changeset, ADR-0087 conversion note, dogfood battery.
  • B: type every value envelope, so every type-mismatch verdict reaches it. Wider narrowing and more fixture churn.
  • C: no change; cloud's verify_build probe (cloud#4723) stays as the guard.

Done when (route A)

  • A flow value envelope carrying timestamp(<date-typed field>), alone or inside + duration(...), is refused by validateStackExpressions and at the engine's registration door, with the fix hint isoDate(addDays(record.<field>, N)). CONTROL: a datetime field in the same envelope stays clean.
  • Cloud's probe can then retire to the shared verdict (the cloud seat's follow-up).

Dedupe words: value envelope field types, checkDeclaredValue fieldTypes, valueEnvelopeRefusals date-text, timestamp date field flow fields.

Activity

  1. added
    priority:p2
    pm:queue
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 (kept) · theme: zh-CN / install (flow reliability) · 2026-11-16T19:46Z

    ⛔ Not a claim.

    #34447 makes the formula gate refuse timestamp() over a date field. A flow's value envelopes (update_record / create_record fields, assignment values) are validated without field types, so that refusal never reaches where objectstack-ai/cloud#4717 actually failed. A flow there still fails on every run with nothing at authoring time. p2, the same grade as #34363.

  3. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQAXHSQEgnYyx9tstb

    Claim: area o2-F (repo:objectstack#2 area lease), route A of this card as named by the seat (03:31Z): the date-text verdict family only
    Session: session_01ADHkmQAXHSQEgnYyx9tstb
    Account: os-steve
    Branch: claude/project-thread-wlvkf3 (restarted from origin/main ffa6db1; its earlier PR #34507 is merged)
    Worktree: /home/user/objectstack-issue-34451
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/lint/src/validate-expressions.ts (checkDeclaredValue and its callers) · packages/services/service-automation/src/flow-registration-checks.ts (the registration door) · packages/services/service-automation/src/dag-traversal.ts / engine.ts only for the valueEnvelopeRefusals signature · packages/formula/src/validate.ts only if the value role needs a date-text-only hint · tests beside them · .changeset/ · the ADR-0087 conversion entry — packages/lint/src/index.ts, authoring-rules.ts, data-model-rules.ts and runtime.ts are NOT in the surface (open PRs #34600, #34513 hold them); a need to touch packages/spec/src/** or any of those is a stop, reported before building
    Container & model: M, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier at ffa6db1: no path-derived mandate), effort: high
    Clause-②: no (narrowing: a flow value envelope that registered and published now refuses at os validate and at registerFlow; owes the contract-review-tier review before the queue, and Tier H via the seat)
    Metadata-protocol: none
    Responsibility: n/a — the gap is #34447's "Not reached" bullet, filed by the seat as measured
    Thread-read: 6927280588
    Premise: holds — on origin/main checkDeclaredValue calls validateExpression('value', …) with no hint and valueEnvelopeRefusals(value) takes no object; the dev re-measures the card's update_record fixture (isoDate(timestamp(record.borrow_date) + duration('168h')) → zero findings) before building and reports premise_still_valid: false if it already refuses
    Serial constraints cleared: 53 open PRs read 2026-11-17T03:33Z; those touching packages/lint/src are #34600 (authoring-rules.ts, data-model-rules.ts, index.ts), #34513 (index.ts, runtime.ts), #34545 (i18n-walk.ts, validate-translation-references.ts) — no shared file with the surface; none touches packages/formula/src or the service-automation files; git merge-tree against #34600 and #34513 is run on the PR head and recorded in the PR body
    Pre-claim lane: domain:server — packages/lint + packages/services/service-automation (flow registration); repo:objectstack#2 area o2-F
    Pre-claim deps: no Blocked-by:; #34447 (the date-text refusal this carries into flow value envelopes) is on main; hot file validate-expressions.ts idle (no open PR touches it)
    Prior rulings read: flow,value,envelopes,validated,field,types,date-text,verdicts,timestamp,date,reach,update_record (+2 more) → 258 hits; ADR-0032 Decision §2–§4, ADR-0054 Decision §3, ADR-0061 D1/D2, ADR-0014 Decision §2, ADR-0035 Decision §3, ADR-0041 Decision §4, ADR-0053 Decision §2 named; none rules on typing value envelopes; route A is the seat's named route, not a new ruling; thread: 6927280588

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  5. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQAXHSQEgnYyx9tstb
    os-dev-report

    {
      "issue": 34451,
      "status": "done",
      "branch": "claude/project-thread-wlvkf3",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34654",
      "head": "81d78bb0f0d9130b6cd7e21edd15984803593030",
      "session": "session_01ADHkmQAXHSQEgnYyx9tstb",
      "premise_still_valid": true,
      "gates": "dispatch-gates --commands at 81d78bb0f0: 74 derived families run, exit captured before any pipe; --ran: 74 derived famil(ies) accounted for, 74 run, 0 NOT-MEASURED. check:dual-build-cjs-loads and check:type-check-debt first exit 3 (unbuilt packages; lock held by the battery), re-run after building: exit 0. check-adr-0087-registration --base origin/main exit 0 (already-registered). Package runs at 81d78bb0f0: lint test 214/214 files, 9097/9097 tests; service-automation test 287/287 files, 4113/4113 tests; lint, formula, service-automation typecheck exit 0; formula test 68/68 files, 1872/1872 tests at 17673d213 (formula untouched by the merge). Dogfood battery at 81d78bb0f0: VERDICT command-exit 0, Test Files 478 passed, 3 skipped (481); Tests 4055 passed, 68 skipped (4123). CI check-runs at PR open: in_progress. Record: /mnt/project-files/objectstack-seat2/34451-gates-ran.txt",
      "ablation": "lint: field types withheld in checkDeclaredValue, Tests 4 failed, 2 passed (CONTROLs green), restored blob == HEAD. service-automation: field types withheld at the registration door, Tests 5 failed, 52 passed, restored blob == HEAD.",
      "line_budget": "n/a: no skills/** path in the diff",
      "deviations": [
        "engine.ts: beyond the valueEnvelopeRefusals signature, three docblocks (FlowObjectSchemaResolver, setObjectSchemaResolver, validateFlowExpressions) amended because the change made their never-thrown sentence false; comment-only",
        "PR body: no signed tail HTML comment written (os-dev.md and standard order item 9 forbid dev-written HTML comments; the seat adds it); the first-line attribution comment was written as the order gave it",
        "worktree kept for the patch rounds the claim names it for; not removed after the PR opened"
      ],
      "files_changed": [
        ".changeset/34451-flow-value-envelope-date-text.md",
        "packages/formula/src/validate.ts",
        "packages/formula/src/validate-date-text-arithmetic.test.ts",
        "packages/lint/src/validate-expressions.ts",
        "packages/lint/src/validate-expressions.test.ts",
        "packages/services/service-automation/src/dag-traversal.ts",
        "packages/services/service-automation/src/engine.ts",
        "packages/services/service-automation/src/flow-registration-checks.ts",
        "packages/services/service-automation/src/builtin/assignment-value-envelope.test.ts"
      ],
      "security_findings": "none",
      "api_writes": 2,
      "mcp_calls": 0
    }
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQAXHSQEgnYyx9tstb

    Claim correction (claim 6937345462, PR #34654): the declaration lines were Clause-②: no (narrowing…) / Metadata-protocol: none, which contradict each other — a refused value is narrowed (AGENTS.md), and the narrowing arm sits under yes, as #34447 declared for the same verdict family. The changeset moves to minor on the three packages and the PR body carries the same lines. The published ExprSchemaHint type also gains one optional key, flowValueEnvelope (name with the seat).
    Clause-②: yes (narrowing)
    Metadata-protocol: narrowed
    Skills-docs: none — no published skill teaches a flow value envelope over a date field; skills/objectstack-formula/SKILL.md states the timestamp() / date-text-call rule without naming a site
    Branch: claude/project-thread-wlvkf3 · PR #34654

  7. removed
    pm:dispatched
    on Nov 17, 2026
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

    domain:serverpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions