Skip to content

lookupFilters { $record }: a path through or to a multi-valued field has no declared answer #34378

Closed

Description

@objectstack-fleet

domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

Priority p2. Follow-up S2 from review#1's contract review of PR #34253 (#34197), record 6914160897 (PASS). The reviewer accepted it as a follow-up.

What happens

lookupFilters values of the form { $record: '<path>' } resolve against the record being edited. The path is a field, or one lookup hop.

  • A hop through a multi-valued relationship (e.g. accounts.cb_market, where accounts is declared multiple: true). The form holds a list. referencedId finds no id and readRecordPath finds no row, so the entry is silently left out. No dev warning fires, because the warning only fires when an id was found.
  • A plain path to a multi-valued field (e.g. tags). readRecordPath returns the list, and the entry is sent with the list as the comparand of a scalar operator. What the server answers for that is not measured.
  • The linter. The $record rule (lint: check a lookupFilters { $record } path against the edited object and its hop #34200, validate-object-field-refs.ts) resolves names and bounds the hop count, but does not read cardinality. Both paths lint clean.
  • The contract. The field.zod.ts describe ("a field of it, or one lookup hop", paired with six scalar operators) does not say what a multi-valued field gives.

This was established by reading, and has been present since #34197's first round.

Expected

  1. The $record lint rule refuses a path whose first segment or leaf is multi-valued, with a message naming the field.
  2. Until then, or together with it: one clause in the lookupFilters docblock and the value describe saying such a path is not resolved. The client leaves the entry out in both shapes; today it sends the list for a plain path.
  3. Pins: a lint case for each shape, and a client case for each shape (entry left out, dev warning said).

The spec describe and the lint rule are a contract surface (spec lane). The client half (ui/packages/fields/src/widgets/lookupRecordReference.ts) is ui.

Blocked-by #34197.

Activity

  1. added
    enhancement
    priority:p2
    domain:spec
    pm:blocked
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

    Unblocked · 2026-11-16T11:52Z — Blocked-by #34197 is closed (PR #34253 merged as 2c296cf). Back to pm:queue for the spec lane.

  3. added
    pm:queue
    and removed
    pm:blocked
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:spec · p2 (kept) · pm:queue · 2026-11-16T11:53Z

    ⛔ Not a claim.

    A lookup filter { $record: <path> } whose path runs through, or ends at, a multi-valued field has no declared answer today. The form holds a list, so the entry is silently dropped and no dev warning fires. An author gets a filter that does nothing without being told: p2 as filed. Its blocker #34197 closed at 11:49 (PR #34253 merged), so the card is in the queue. The spec seat takes the lint and .describe half; the client half goes to domain:ui on its own card.

  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 6 · 2026-11-16T11:57Z
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); a card thread of this account's project is the dev and reports its session id
    Account: os-steve
    Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the dev builds
    Worktree: objectstack-issue-34378
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/lint/src/validate-object-field-refs.ts (the $record member reads cardinality) and its tests, packages/lint/src/rule-explanations.ts, packages/spec/src/data/field.zod.ts (two describe clauses), one ADR-0087 semantic entry, root .changeset/. The client half is split to #34389 (domain:ui)
    Container & model: S/M, mode:thread, model: default tier
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: objectstack: a lookupFilters { $record } path through or to a multi-valued field lints clean and then misfilters or silently drops in the picker | metadata authors | a filter that looks right never applies, or compares a list to a scalar
    Premise: holds at origin/main (seat read: the $record member resolves names and bounds hops but does not read cardinality). Order: /mnt/project-files/spec-seat2/34378-delta.md.
    Priority: p2 (triage 6915710830).

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

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 6 · 2026-11-16T11:58Z (names the branch; supersedes claim 6915754801, same session)
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmP9xmb6H4wxJ2AJQEW is the dev
    Account: os-steve
    Branch: claude/project-thread-l4gpcv (the card thread's designated branch; base origin/main 23a18fd)
    Worktree: objectstack-issue-34378
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/lint/src/validate-object-field-refs.ts (the $record member reads cardinality) and its tests, packages/lint/src/rule-explanations.ts, packages/spec/src/data/field.zod.ts (two describe clauses), one ADR-0087 semantic entry, root .changeset/. The client half is split to #34389 (domain:ui)
    Container & model: S/M, mode:thread, model: default tier
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: objectstack: a lookupFilters { $record } path through or to a multi-valued field lints clean and then misfilters or silently drops in the picker | metadata authors | a filter that looks right never applies, or compares a list to a scalar
    Premise: holds at origin/main (seat read: the $record member resolves names and bounds hops but does not read cardinality). Order: /mnt/project-files/spec-seat2/34378-delta.md.
    Priority: p2 (triage 6915710830).

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Release: seat stand-down · 2026-11-16T21:10Z

    The maintainer ordered seats to finish the work in hand and stand down, with no new cards. This card's dev thread stopped in the platform incident around 2026-11-16T12:15Z, before any commit or PR was made. Branch: claude/project-thread-l4gpcv, with no commits beyond its base. So the claim goes back to pm:queue and the assignee is cleared.
    Resume-from: none (no produce). The order still stands for a successor: /mnt/project-files/spec-seat2/34378-delta.md (project share; the seat's measured reading of origin/main and its rulings). The client half is split to #34389 (domain:ui).

  9. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 16, 2026
  10. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Release correction · amends 6929462604 · 2026-11-16T21:13Z

    "No commits beyond its base" above is wrong. The dev thread pushed three commits before it stopped at 2026-11-16T12:15Z, with no PR and no report.
    Resume-from: claude/project-thread-l4gpcv@3781dec5

    • ff1bf727: feat(lint)!, which refuses a $record path through or to a multi-valued field. It touches validate-object-field-refs.ts (+64/−2) and its test (+75), rule-explanations.ts, the field.zod.ts describes, the semantic entry 18.lookup-filter-record-path-multi-valued-refused.ts, and the changeset.
    • 5b520173: the regenerated content/docs/references/data/field.mdx.
    • 3781dec5: a main merge.

    Unverified by the seat: no gates, ablation or exposure reading was reported. A successor starts by measuring against the delta, then merges main, runs the gates, opens a draft PR, and sends the review to the review seat. The card stays in pm:queue.

  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Claim: PM loop round 1 · 2026-11-16T21:53Z
    Session: session_01ADHkmQ2SN4K183oqAvUajA (seat); a card thread of this account's project is the dev and reports its own session id
    Account: os-steve
    Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the first push
    Worktree: objectstack-issue-34378
    Domain: domain:spec
    Seat: repo:objectstack#2
    File surface: packages/lint/src/validate-object-field-refs.ts and its test, rule-explanations.ts, packages/spec/src/data/field.zod.ts describes, one ADR-0087 semantic entry, the regenerated content/docs/references/data/field.mdx, root .changeset/. No ui/ change (the client half is #34389)
    Container & model: S/M, mode:thread, model: default tier, effort: high
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: objectstack: the lint resolves a lookupFilters $record path without reading cardinality, so a multi-valued path lints clean and the client sends a list | none | metadata authors writing lookupFilters, today
    Thread-read: 6929542857
    Premise: holds at origin/main 3bf9c5c per the predecessor reading; the resumed commits are unverified and the dev measures them first.
    Serial constraints cleared: none — no open PR lists validate-object-field-refs.ts or field.zod.ts (open-PR file scan at seating); lands one at a time with #34391 (shared generated spec outputs).
    Resume-from: claude/project-thread-l4gpcv@3781dec5
    Pre-claim lane: domain:spec (packages/lint, packages/spec); released by spec#2 (6929462604, corrected 6929542857).
    Pre-claim deps: no Blocked-by:; #34389 (ui) waits on it.
    Prior rulings read: check-prior-rulings.mjs --card 34378 → 326 title-term hits; ADR-0071 Decision §1, ADR-0139 D4, ADR-0032 Decision §1, ADR-0058 D7, ADR-0061 D2, ADR-0077 Decision §1, ADR-0090 D6, ADR-0098 Decision §1, ADR-0100 Decision §5, ADR-0100 Decision §7; thread: none. Template PR #34249 (merged).
    Lease: lease:o2-A. Order: /mnt/project-files/objectstack-seat2/34378-delta.md with the seat's standard order beside it (project share).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Claim: PM loop round 1 · branch named · 2026-11-16T21:58Z
    Follow-up to claim 6930532336 (same seat, same claim).
    Thread session: session_01ADHkmR92m7ZN6cUVQTj1VE
    Account: os-steve
    Branch: claude/project-thread-th73j6
    Seat: repo:objectstack#2

  14. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 34378,
      "status": "done",
      "branch": "claude/project-thread-th73j6",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34489",
      "session": "session_01ADHkmR92m7ZN6cUVQTj1VE",
      "premise_still_valid": true,
      "summary": "Resumed claude/project-thread-l4gpcv@3781dec5 (merged onto main; one describe conflict with main's server-refusal sentence, both kept) and re-measured every reading on this branch. object-field-ref-unknown's lookupFilters $record member now refuses a path whose first segment is multi-valued (plain path or hop through it) or whose leaf behind a single-valued hop is multi-valued, by spec isMultiValueField. Two describe clauses, os explain paragraph, ADR-0087 semantic entry lookup-filter-record-path-multi-valued-refused, changeset (lint+spec minor, BREAKING, FROM/TO), regenerated field.mdx. First-party exposure measured zero.",
      "tests": "head 7f731083 after full pnpm build (119 tasks, VERDICT 0): lint typecheck exit 0; lint test 214/214 files, 9091/9091; spec typecheck exit 0; spec vitest src/data src/migrations 178 files, 6556 passed + 1 todo; cli unit explain-rule-id 14/14; mcp test (CI-red package) 66/66 files, 1223/1223. New block 8 cases (6 refusals asserting severity error + rule OBJECT_FIELD_REF_UNKNOWN + path + hint; 1 miss-once; 1 control set: plain single, single lookup, single hop, multiple:false select, injected-column leaf). Ablation via scripts/ablation-replace.mjs, cardinality read guarded by an unset global: Tests 6 failed | 121 passed (127), exactly the six refusals; restored blob fd916767 == HEAD, git diff HEAD empty. Test imports src relatively, no dist leg.",
      "gates": "dispatch-gates --commands at 7f731083: 117 families, all exit 0 (file /mnt/project-files/objectstack-seat2/34378-gates-ran.txt); --ran: 117 derived, 117 run, 0 NOT-MEASURED, 0 UNRUN. check-changeset-no-major --event on the PR body offline: exit 0 (narrowing, narrowed, minor). PR check-runs at 7f731083: Lint & Repo Gates success, TypeScript Type Check success, Build Core success, Governed Surface Queue Guard success, Type Check UI success, Test UI success, Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success (shards skipped, queue-only), Check Changeset success, Lint UI skipped; Test Core FAILURE: shard 3/8 failed on @objectstack/mcp#test, its failure text lies before the 5000-line log window MCP get_job_logs returns, so the failing test is NOT MEASURED; the same package at the same head passes locally 1223/1223.",
      "dogfood_battery": "7f731083 · os-verify-lock VERDICT command-exit 0 (2069s) · Test Files 478 passed | 3 skipped (481) · Tests 4030 passed | 44 skipped (4074) · no failures (first attempt killed by a worker-process restart, re-run in full)",
      "mcp_calls": "7 — issue_read get, issue_read get_comments, pull_request_read get (#34249 template), pull_request_read get_check_runs, get_job_logs x2, (all reads)",
      "api_writes": "2 — relay pr_create (POST repository_dispatch fw-20261116T224355Z-028522 → PR #34489, assignee os-steve, read-back 8665/8665 bytes identical); relay os-dev-report comment on #34378. git push x4 (not REST).",
      "line_budget": "n/a — no skills/** or governed surface touched",
      "deviations": [
        "PR body line 1-2 carry the harness attribution comment + Requested-by line before Fixes #34378 (session-context requirement; os-dev allows the harness line).",
        "Dogfood battery run by the dev on final head per os-dev.md (the delta said the seat schedules it); reading above."
      ],
      "files_changed": [
        ".changeset/34378-lookup-filter-record-path-multi-valued.md",
        "content/docs/references/data/field.mdx",
        "packages/lint/src/rule-explanations.ts",
        "packages/lint/src/validate-object-field-refs.test.ts",
        "packages/lint/src/validate-object-field-refs.ts",
        "packages/spec/src/data/field.zod.ts",
        "packages/spec/src/migrations/entries/semantic/18.lookup-filter-record-path-multi-valued-refused.ts"
      ],
      "open_questions": [
        { "question": "Contract review needed (narrowing; spec describes + lint refusal) at head 7f731083.", "options": ["A seat routes to the online review seat", "B land without"], "recommendation": "A — 需契约复审, head 7f731083; this is a CONTRACT_REVIEW_TIER face" },
        { "question": "Test Core (3/8) red on @objectstack/mcp#test with the failure text outside the readable log window; the package passes locally at the same head. A stale red clears only with a new commit.", "options": ["A seat re-runs the failed job / reads the full log", "B dev pushes a main merge to re-trigger"], "recommendation": "A — no evidence ties mcp to this diff (mcp has no lookupFilters/$record reference)" },
        { "question": "Describe wording: the delta's ruling text says such a path 'is not resolved'; the client still sends the list for a plain path until #34389 lands.", "options": ["A keep as ruled", "B reword to 'has no declared reading'"], "recommendation": "A — it is the ruling's clause; reviewer may weigh it against #34389" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Stamped 2026-11-16T23:19Z.


    Generated by Claude Code

  15. 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:specenhancementpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions