Skip to content

Value data source: an operator filter with a plain-object comparand ($ne, $notContains, ordering, $nin) still serves rows instead of being refused #35493

Closed

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

From the narrowing contract review of PR #35423 (seat 5, at a5945f2a; ungraded finding, for a card). Parent: #34990.

Defect

PR #35423 makes ValueDataSource (the in-memory provider: 'value' source, ui/packages/core/src/adapters/ValueDataSource.ts) refuse a plain-object comparand with no $ key on the AST arm (['f', '!=', { owner: 'u1' }] and the other comparand-reading operators). The object-dialect twin still answers: an operator map such as { f: { $ne: { owner: 'u1' } } }, $notContains, the ordering operators ($gt / $gte / $lt / $lte) and $nin with such an object compare it by reference or as the text [object Object]. So $ne and $notContains serve every row, and ordering serves some rows. The spec's comparand door (normalizeFieldSpec → judgeLiteralComparand) refuses the same comparand, so this is the value source failing open where the platform refuses.

Done when

matchesDollarOperator gives a plain-object, no-$ comparand under those operators the same named refusal as the AST arm (one builder, as nestedRelationRefusalReason), with pins per operator and a CONTROL (a scalar comparand, a Date, a { $field } reference still answer). It is a narrowing of a published export: Clause-②: no (narrowing) with BREAKING, an ADR-0087 marker, and the dogfood battery.

Grade

p2 · area:data · domain:ui. Wrong rows (every row on $ne / $notContains) on value-provider views, no refusal; the same class as #35447.


Generated by Claude Code

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:data · Bug · Impeded (the object-dialect twin still serves rows for a plain-object comparand the AST arm now refuses) · developers and previews → p2 as set.

  3. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

    Added 2026-11-19T14:33Z from seat 5 delta review 7012075575 on PR #35423: the object dialect also reads { created: X }, with X a class instance carrying own keys (a moment / luxon date, a decimal), as an operator map and refuses each own key with the nested-relation sentence. That is a refusal with the wrong words rather than wrong rows, but it sits in the same matchesDollarOperator / object arm as this card, so it is fixed here: a class instance is data (prototype test, as nestedRelationComparandKey now does on the AST arm).

  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

    Claim: PM loop round 1
    Session: session_01L9qibvVRcFWKrfWeG5jzPb
    Account: os-tesla
    Branch: claude/issue-35493-value-source-operator-map-comparand
    Worktree: objectstack-issue-35493
    Domain: domain:ui
    Seat: repo:objectstack#7
    Area: d7-C
    File surface: ui/packages/core/src/adapters/ValueDataSource.ts, its tests under ui/packages/core/src/adapters/, one .changeset/35493-*.md (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: opus (default tier; dispatch-gates --tier at cf6bb70e: no path-derived mandate), effort: high
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Responsibility: ui/packages/core ValueDataSource in objectstack (platform card carries the fix) | the spec comparand door (normalizeFieldSpec → judgeLiteralComparand) already refuses the comparand; the value source's object dialect does not | developers and previews on provider: 'value' views, reachable today
    Thread-read: 7012153506
    Premise: holds
    Serial constraints cleared: overlap-check probe over this file at origin/main cf6bb70: VERDICT clean, 0 open PR heads share it; predecessor PR #35423 merged (eed422e)
    Pre-claim lane: ui/packages/core/src/adapters/ValueDataSource.ts is ui/** (domain:ui); stays in this lane under area-lease 留道 (fix is clear), seat 7 L1/L2.
    Pre-claim deps: no Blocked-by:; parent #34990 closed, #35423 merged, #35447 closed.
    Prior rulings read: value,data,source,operator,filter,plain-object,comparand,notcontains,ordering,serves,rows,instead (+1 more) → 308 hits; ADR-0155 D1, ADR-0076 D10, ADR-0146 D11, ADR-0061 D2, ADR-0068 D2, ADR-0074 Decision §3, ADR-0079 D10; thread: none; repo: objectstack-ai/objectstack. Surface ruling grep on the file: 14 hit lines, none on matchesDollarOperator's comparand arms; no conflict with the card's route (one shared refusal builder, as the AST arm).
    Owed review: narrowing ⇒ one CONTRACT_REVIEW_TIER review before the queue; L1 by L1-a.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  6. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb
    os-dev-report

    {
      "issue": 35493,
      "status": "done",
      "branch": "claude/issue-35493-value-source-operator-map-comparand",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35604",
      "session": "session_01L9qibvVRcFWKrfWeG5jzPb",
      "premise_still_valid": true,
      "summary": "Premise measured true at b65488a8 (post-#35423): under the $ dialect a plain-object no-$ comparand served every row on $ne/$notContains/$nin (as a list member), some rows on $gt/$gte/$lt/$lte, and no row silently on $eq/$in/$nin/$between/$contains/$startsWith/$endsWith (whole). One builder, nestedRelationComparandRefusal (whole comparand + each list member), now serves both arms: matchesDollarOperator calls it for FILTER_OPERATORS minus the flag operators $null/$exists/$empty, after the list guards and before {$field} resolution, as the AST arm does; the AST arm gains the list-member judgment as a declared bounded in-place fix (['f','nin',[{owner}]] served every row). Class-instance item (comment 7012153506): a class instance as a field's whole condition is data, routed by the shared isPlainObject prototype test to the converter's exotic-comparand refusal (loweringConditionRefusal, renamed from zeroKeyConditionRefusal) instead of a nested-relation refusal per own key; under an operator it still compares through valueOf. All eight compile surfaces are already compliant behind the spec door normalizeFilterComparandTypes (cited by symbol in the PR body). Owed: one CONTRACT_REVIEW_TIER review (narrowing), not knocked.",
      "tests": "head 1bc51be2. pnpm --filter @object-ui/core test: Test Files 243 passed (243), Tests 4552 passed | 27 skipped (4579). pnpm --filter @object-ui/core type-check: exit 0 (tests in tsconfig.test.json program, 3/3 edited test files counted via --listFilesOnly). adapters dir: 15/15 files, 505/505 tests. New pins: dollarFilterVocabulary top-level describe (14 per-operator whole refusals, 3 list-member refusals, 4 object-vs-lowered-AST same-sentence pins, CONTROL scalar/Date/{$field}/class instance under $gt/$gte/$lt/$lte, class-instance whole-condition converter refusal, $empty own sentence, non-operator key own sentence) + 3 AST list-member refusals; source exposes no code/status, so pins assert row set + refusal sentence. Fixture re-spelled: nonStringStoredValue cyclic plain object under $icontains -> cyclic class instance (the builder now refuses the plain one earlier; the text door's comparand description it pins is still reached). Ablations via scripts/ablation-replace.mjs, committed first, src-resolved (relative import, no dist leg), each 'ok mutation landed' + 'ok restored: blob == HEAD (fc344312a060) and git diff HEAD is empty': (1) $ arm refusal off -> 21 failed | 161 passed; (2) AST list-member arg false -> 4 failed | 178 passed; (3) class routing reverted -> 1 failed | 105 passed.",
      "gates": "local: 38 families from dispatch-gates --commands (merge-base b65488a8, head 1bc51be2; the dispatch's 21 plus 17 for the changeset and test files), every one exit 0 captured before any pipe; check:type-check-debt first exit 3 PREREQUISITE NOT MET (its closure build queue-timed-out behind the dogfood hold: NOT MEASURED), re-run under os-verify-lock -> exit 0 '0 raw tsc error(s) total, none above its recorded number'. --ran: '38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)'. Plus @object-ui/core test + type-check exit 0. overlap-check VERDICT clean exit 0 before push and before pr_create. Control-byte self-scan: 0 hits. CI on PR #35604 head 1bc51be2, read after resume: 45 check-runs success, 13 skipped (opt-in/borrowed/queue/schedule), 0 failed or pending; ten of the eleven required contexts read success (Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI incl. 16/16 shards, Build & E2E UI, Live E2E UI, Dogfood Regression Gate; Build Core reads skipped on this head) plus Check Changeset, Check PR Size, PR-body guards, Lint x8 lanes, Type Check x4 lanes. Resume check: origin/main moved b65488a8 -> a3a74f27 with no change under ui/packages/core or the spec filter files (filter.zod.ts, filter-comparand-type.ts, filter-comparand-operators.ts); overlap-check VERDICT clean exit 0, PR mergeable_state clean, so no merge and head unchanged.",
      "dogfood_battery": "1bc51be2 (still the PR head after resume, not re-run) · os-verify-lock: VERDICT command-exit 0 (held 2201s) · Test Files 482 passed | 3 skipped (485) · Tests 4092 passed | 68 skipped (4160) · no failure",
      "mcp_calls": "0 — no MCP GitHub calls",
      "api_writes": "2 relay/REST writes: (1) fleet-write pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> POST /pulls draft + POST /issues/35604/assignees os-tesla; read-back 11591 bytes sent = stored, assignee os-tesla, no labels); (2) post-stamped os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35493/comments. Not REST: 2 git push of the branch (empty-branch probe, then 1bc51be2).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: published ValueDataSource.find (@object-ui/core export) — { f: { $null: { owner: 'u1' } } } answers the IS NULL row [c], $exists likewise reads truthiness, while normalizeFilterComparandTypes answers INVALID_FILTER for the same filter and convertFiltersToAST lowers it to ['f','is_null',true] · evidence: probe on b65488a8 (whole $null -> [c], $exists -> [a,b]); fixing it on the value source alone would split the object form from its lowered form, so it needs a boolean door for $null/$exists across converter + both arms, as $empty has · dedupe words: $null flag boolean, $exists truthiness, value data source flag, filter-converter is_null",
        "carrier: none · noted, not filed — a non-object non-array comparand under $in/$nin/$between ({ f: { $nin: 'x' } }) still answers no row in silence on the value source; list-shape is owned by the engine's list-shape gate, not the comparand door (PR Acceptance notes)"
      ],
      "files_changed": [
        ".changeset/35493-value-source-operator-map-comparand.md (+20/-0)",
        "ui/packages/core/src/adapters/ValueDataSource.ts (+106/-20)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.astFilterVocabulary.test.ts (+17/-0)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.dollarFilterVocabulary.test.ts (+186/-0)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.nonStringStoredValue.test.ts (+8/-3)"
      ],
      "line_budget": "n/a — no skills/** in the diff",
      "deviations": [
        "commit trailer: the harness reminder named a model-bearing Co-Authored-By; AGENTS.md's model-free pair (Claude-Session + Co-authored-by: Claude) was used, amended before the first push of code",
        "PR body footer: AGENTS.md session-URL footer form instead of the harness-suggested lines",
        "compile-surface evidence cited by symbol, not file:line: ui/AGENTS.md #11 bans line addresses in a PR body; conflict with the dispatch's 'file:line as evidence' noted here",
        "bounded in-place fix declared: the AST arm's list-member hole (same class, same file, same builder, same gate family) fixed in this PR, named in the PR body with ablation (2)",
        "test runs used pnpm --dir ui exec vitest run (ui/AGENTS.md's one correct form) rather than pnpm --filter exec vitest",
        "check:type-check-debt needed a second run (first NOT MEASURED, lock queue-timeout behind the dogfood battery)"
      ],
      "owed_review": "one CONTRACT_REVIEW_TIER review (narrowing of a published export), owed, not requested"
    }
  7. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb

    Progress (2026-11-20T04:04Z): draft PR #35604 is open at 1bc51be2; the dev was cut off by a usage limit at 17:08Z while writing its report and resumed at 04:02Z (dogfood battery check, report). Next: L1 by L1-a and the CONTRACT_REVIEW_TIER review owed by the narrowing.

  8. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb
    os-dev-report

    {
      "issue": 35493,
      "status": "done",
      "branch": "claude/issue-35493-value-source-operator-map-comparand",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35604",
      "head": "e543630cc42b92bc83bf1b145d23840699b1ad1f",
      "session": "session_01L9qibvVRcFWKrfWeG5jzPb",
      "premise_still_valid": true,
      "summary": "REWORK round 1 on contract review 7030429102 (PASS, S1+S2 should-fix), new head e543630c over 1bc51be2. S1 route (a): the shared builder, renamed plainObjectComparandRefusal (per value: plainObjectValueRefusal), now also refuses an EMPTY plain object {} as a whole comparand or a list member, on both arms, gated on the same operator sets, in its own sentence: \"filter comparand on field 'F' is an empty object ({}), which is neither a comparison value nor a nested relation constraint\"; a non-empty one keeps the nested-relation sentence. { f: {} } as a field's WHOLE condition is unaffected (still the converter's zero-key refusal, pinned; it stayed green under the ablation). S2 changeset: summary line, BREAKING and TO name the population exactly (non-empty and empty plain objects with no $ key, whole or list member, both dialects); FROM gains $in member (rows its other members matched -> none) and $between endpoint (text range -> none) in both dialects; the false 'row set is the same' sentence for the class-instance whole condition is replaced by the $or movement (the other branch's rows -> none, as the zero-key condition and the server refuse). Nits N1 (DOLLAR_COMPARAND_OPERATORS jsdoc: holds all FILTER_OPERATORS, call site subtracts the flags; no rename), N2 (AST test between comment), N3 ($lt/$lte rows sort before the text), N4 (whole object under a list operator refused server-side by assertListComparandShapes) folded; N5 left. matchesDollarOperator and the AST call-site comments name the refused population. Replacement PR body for the seat to write: /tmp/claude-0/-home-user/cba0d951-fa67-548d-aa06-d20bae640045/scratchpad/issue-35493/body-r2.md (movement table corrected, S1/S2 and nits recorded, round-2 readings); the PR body was not patched by this run.",
      "tests": "head e543630c. pnpm --filter @object-ui/core test: Test Files 243 passed (243), Tests 4577 passed | 27 skipped (4604). pnpm --filter @object-ui/core type-check: exit 0. adapters dir: 15/15 files, 530/530 tests. New round-2 pins: dollarFilterVocabulary 14 per-operator {} whole refusals + 3 {} list-member refusals + { owner: {} } whole-condition keeps converter zero-key refusal + 2 same-sentence pins ($ne {}, $nin [{}]); astFilterVocabulary 5 {} refusals (!=, >, not_contains whole; nin, between member). Ablation 4 (round 2) via scripts/ablation-replace.mjs, committed first, src-resolved: anchor 'if (isPlainObject(value) && Object.keys(value).length === 0) {' -> 'if (false) {', 'ok mutation landed: anchor 1 -> 0, blob f2ad67e8bfc7 -> d69a4eff45f2', 24 failed | 183 passed (14+3 $ {} cases, 5 AST {} cases, 2 {} same-sentence pins; the whole-condition {} pin stayed green), 'ok restored: blob == HEAD (f2ad67e8bfc7) and git diff HEAD is empty'. Round-1 ablations 1-3 on 1bc51be2 stand (21 / 4 / 1 failed). Spec doors measured on built dist: normalizeFilterComparandTypes INVALID_FILTER for {} under $ne/$notContains/$gt and as a $nin member; { f: { $in: {} } } passes it and assertListComparandShapes answers INVALID_FILTER; formula matcher answers false for all.",
      "gates": "local on e543630c: 38 families re-derived with dispatch-gates --commands (5 paths vs merge base b65488a8), all exit 0 captured before any pipe; pnpm --dir ui exec vitest run scripts/ first exit 1 in the fresh worktree (unit-registry-absence-collision.test.ts could not resolve @objectstack/client, not yet built: environment, not the diff), re-run after the check:type-check-debt closure build -> Test Files 171 passed | 2 skipped (173), exit 0. --ran: '38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)'. overlap-check VERDICT clean exit 0 before push and again after the dogfood run (origin/main 598a34d0 then current). Control-byte self-scan not needed (no control characters in the change). CI on PR #35604 head e543630c: 45 success, 13 skipped, 0 failed or pending; required contexts Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate success, Build Core skipped; Check Changeset success.",
      "dogfood_battery": "e543630c · closure build VERDICT command-exit 0 · os-verify-lock: VERDICT command-exit 0 (held 1634s) · Test Files 482 passed | 3 skipped (485) · Tests 4092 passed | 68 skipped (4160) · no failure",
      "mcp_calls": "0 — no MCP GitHub calls",
      "api_writes": "round 2: 1 relay write — post-stamped os-dev-report comment on issues/35493 (POST /repos/objectstack-ai/objectstack/issues/35493/comments via the relay). Not REST: 1 git push (1bc51be2..e543630c). PR body not written (seat writes body-r2.md). Cumulative over the claim: 3 relay writes (pr_create, two report comments).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: published ValueDataSource.find (@object-ui/core export) and, per review 7030429102, every route lowering through convertFiltersToAST — { f: { $null: { owner: 'u1' } } } / $exists read the flag's truthiness while normalizeFilterComparandTypes answers INVALID_FILTER · evidence: probe on b65488a8 (whole $null -> [c], $exists -> [a,b]); needs a boolean door for $null/$exists across converter + both arms, as $empty has · dedupe words: $null flag boolean, $exists truthiness, value data source flag, filter-converter is_null (unchanged from round 1; the review graded it fileable)",
        "carrier: none · noted, not filed — a non-object non-array comparand under $in/$nin/$between ({ f: { $nin: 'x' } }) still answers no row in silence; the review routes it to its residual card (plain object with a non-$field $ key such as a { $now } anchor, a non-plain object under equality/negation/text operators)"
      ],
      "files_changed": [
        ".changeset/35493-value-source-operator-map-comparand.md (+23/-0 vs main)",
        "ui/packages/core/src/adapters/ValueDataSource.ts (+137/-20 vs main)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.astFilterVocabulary.test.ts (+44/-0 vs main)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.dollarFilterVocabulary.test.ts (+220/-0 vs main)",
        "ui/packages/core/src/adapters/__tests__/ValueDataSource.nonStringStoredValue.test.ts (+8/-3 vs main)"
      ],
      "line_budget": "n/a — no skills/** in the diff",
      "deviations": [
        "worktree re-created from origin/claude/issue-35493-value-source-operator-map-comparand at 1bc51be2 (the round-1 worktree had been removed after the report); round base 1bc51be2",
        "builder renamed nestedRelationComparandRefusal -> plainObjectComparandRefusal (module-private) since it now refuses {} too; the shared builder is still the one both arms call",
        "ui scripts vitest family needed a second run (first exit 1 from an unbuilt @objectstack/client in the fresh worktree)",
        "PR body not patched: replacement at /tmp/claude-0/-home-user/cba0d951-fa67-548d-aa06-d20bae640045/scratchpad/issue-35493/body-r2.md for the seat, as instructed",
        "round-1 deviations stand (model-free trailer pair, AGENTS.md footer form, compile surfaces cited by symbol, pnpm --dir ui vitest spelling)"
      ],
      "owed_review": "CONTRACT_REVIEW_TIER record 7030429102 was at 1bc51be2; the head moved to e543630c, so a same-head PASS is owed again before the queue (not requested by this run)"
    }
  9. removed
    pm:dispatched
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions