Skip to content

studio: the CEL editor's as-you-type check is given no list fields, so it never flags == / != on a multi-value field that the save then refuses #36219

Closed

Description

@objectstack-fleet

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

Filing gate ① · Source: fleet · found by the seat's contract review of PR #36207 (Part of #36167), record 7072103543, finding S2. The PR named #36185 as its carrier, but #36185 has merged without these files, and #36169 is closed.

What happens

After #36207, validateExpression refuses == / != on a list-valued field when its schema hint carries the field types or multiValueFields. Studio's as-you-type CEL check (ui/packages/app-shell/src/views/metadata-admin/CelPredicateField.tsx:303 → celAuthoring.ts:679-683) gets neither: no inspectors/** mount supplies multiValueFields, and this path never passes fieldTypes. The editor flags nothing while the author types, and the save is then refused by the object draft check or the server.

Done when

Each CelPredicateField mount in the metadata-admin inspectors passes the object's list fields (types and multiple), so the editor shows the list-equality refusal while typing. Pin one inspector mount on a multiple: true field, with a scalar control.

reach: Studio form (any CEL predicate field on an object with a list field), by code reading in the contract review; to be measured once by the claimant.
Business reason: authors see the error only on save, not while writing the condition.
Reader: a domain:ui lane (Studio metadata-admin).
Dedupe: CelPredicateField multiValueFields → 0 hits.
Grade: p2. The save already refuses, so nothing is stored wrong; this is the editor's early warning.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:ui
    area:studio
    on Nov 22, 2026
  2. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (Studio metadata-admin CelPredicateField mounts) · pm:queue; rationale: area:studio · Bug · the as-you-type CEL check is given neither field types nor multiValueFields, so it never flags == / != on a multi-value field that the save then refuses. The author learns only on save, and nothing wrong is stored. It carries the UI half of #36207 (Part of #36167), and the named carrier #36185 merged without it → p2 as filed · size S.

  3. added and removed
    area:studio
    on Nov 22, 2026
  4. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jREBdDtYvSLn38xUCg

    Claim: PM loop · area f7-view
    Session: session_01QsR2jREBdDtYvSLn38xUCg
    Account: zhuangjianguo
    Branch: claude/issue-36219-cel-list-fields
    Worktree: objectstack-issue-36219
    Domain: domain:ui
    Seat: repo:objectstack#7
    Area: f7-view
    File surface: ui/packages/app-shell/src/views/metadata-admin/CelPredicateField.tsx, ui/packages/app-shell/src/views/metadata-admin/celAuthoring.ts, the CelPredicateField mounts under ui/packages/app-shell/src/views/metadata-admin/ (inspectors), a new card-named test, a changeset. ⛔ No change to packages/formula (validateExpression is the fixed point) (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: opus (default tier; dispatch-gates --tier: no path-derived mandate on ui/**), effort: medium (S prop threading across the mounts)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack ui/packages/app-shell Studio metadata-admin CelPredicateField mounts (no multiValueFields, no fieldTypes) | the save path: object draft check and server refuse it | Studio authors writing a CEL predicate on an object with a list field: == / != on it is flagged only on save
    Thread-read: 7072446038
    Premise: holds by the contract review's code reading (7072103543, S2); the dev measures each mount on origin/main first.
    Pre-claim lane: repo:objectstack seat 7 area f7-view (Studio CEL editor).
    Pre-claim deps: #36207 merged 2026-11-22 (validateExpression list-equality refusal).
    Prior rulings read: celpredicatefield,multivaluefields,list-equality → 0 hits; none; thread: none (triage only, 7072446038); repo: objectstack-ai/objectstack
    Fold-or-serial: not folded (only Studio card in area).
    Serial constraints cleared: none (no open PR on CelPredicateField.tsx / celAuthoring.ts / metadata-admin inspectors at claim time) — overlap-check before each push

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jREBdDtYvSLn38xUCg
    os-dev-report

    {
      "issue": 36219,
      "status": "done",
      "branch": "claude/issue-36219-cel-list-fields",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36441",
      "session": "session_01QsR2jREBdDtYvSLn38xUCg",
      "premise_still_valid": true,
      "summary": "Premise measured on origin/main 4e55e4eb: CelPredicateField built its lint hint as { objectName, fields, clause, scope, slot, role } with no multiValueFields, and no mount supplied one. celAuthoring.ts already spread hint.multiValueFields into validateExpression, so celAuthoring.ts was left unchanged. The fix is one shared derivation: CelPredicateField takes an optional fieldDefs prop ({name, type, multiple}), reads it through isMultiValueField (@objectstack/spec/data), the same predicate the object draft check uses, and adds multiValueFields to the hint. All 6 inspector mounts pass the definitions: ObjectFieldInspector formula, stored expression, visibleWhen, readonlyWhen and requiredWhen pass the draft's view.entries; ConditionBuilder passes its own fields catalog. This threads a prop rather than loading inside the field, because useObjectFields reads the SAVED object while the designer edits an unsaved draft. The hint carries multiValueFields only, not fieldTypes, which is the same hint the save-side draft check sends; adding fieldTypes would also turn on the type-soundness advisories, a separate behaviour. Of the 10 non-test mounts (the dispatch hypothesis was about 11), the 4 non-inspector mounts are left out and listed with reasons in the PR body: ConditionalFormattingEditor, PermissionMatrixEditor field-when, and the two RLS USING / CHECK mounts in PermissionAdvancedFacets. The RLS mounts are flattened sites where bare names are never judged without faultOutcome run-fails.",
      "tests": "head 349fc44da. New ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.listEquality-36219.test.tsx runs against the real engine and has a module-top import of @objectstack/formula and @objectstack/lint. Case 1: visibleWhen record.stage == 'qa' on a select declared multiple: true gives blocking count 1 and shows the 'record.stage holds a list' refusal. Case 2 (scalar control): record.single == 'qa' gives count 0. Run under the lock with neighbours ObjectFieldInspector.celGate, CelPredicateField.test and clientValidation.listEquality-36167: 'Test Files 4 passed (4) · Tests 41 passed (41)', VERDICT command-exit 0. Ablation, done after committing the fix, with scripts/ablation-replace.mjs: anchor 'fields: fieldNames, multiValueFields, clause' replaced by 'fields: fieldNames, clause', anchor x1 -> x0, blob 442c5c89c717 -> c3bf3117bfe8. Case 1 went red at the blocking-count waitFor (line 74) and the control stayed green: 'Tests 1 failed | 1 passed (2)'. Restore: blob == HEAD 442c5c89c717 and git diff HEAD is empty. There is no dist leg because the test resolves app-shell from src. Type-check: pnpm --filter @object-ui/app-shell run type-check (tsc --noEmit plus tsconfig.test.json) after a turbo build of the @object-ui/app-shell^... closure gave BUILD_EXIT=0, TYPECHECK_EXIT=0, lock VERDICT command-exit 0.",
      "gates": "Local: dispatch-gates --commands derived 38 at 349fc44da and all 38 ran, each with exit 0. The 38 are: the 13 node scripts (adr-0087-registration x2, changeset-no-major, closing-keyword-parity x2, comment-mask-corpus, empty-changeset x2, sdui-manifest x2, snapshot-next self-test, governed-queue-guard self-test, release-rehearsal-clone self-test, release-pending-publish self-test); pnpm --dir ui exec vitest run scripts/ ('Test Files 172 passed | 2 skipped (174) · Tests 5127 passed | 2 skipped', lock VERDICT command-exit 0); spec check:duration-unit-keys; and check:adr-anchors, changeset-gate-self-tests, closed-ceremony-text, cross-package-test-inputs, dispatcher-error-vocabulary, driver-memory-census, engine-double-contract, gitlink-declared, nul-bytes, published-files, query-options-erasure, refd-timer-probe, registry-log-declared, rest-log-spy-declared, skill-identifier-liveness, test-source-alias, tier-file-adoption, type-check-coverage, type-check-debt, undeclared-dep-imports, watch-hint-literal, where-matcher. query-options-erasure and type-check-debt hit a 280s wrapper timeout (124) on the first try and exited 0 on rerun. --ran reconciliation: '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' (exit 0). overlap-check before each push: VERDICT clean exit 0. CI check-runs at 349fc44da when this report was written: success = Test Core, Dogfood Regression Gate, Check Changeset, Governed Surface Queue Guard (12 success and 13 skipped in total). in_progress = Lint UI, Type Check UI, Test UI 1-10/16, Build & E2E UI, Live E2E UI, Lint sub-jobs, Type Check consumer/source gates.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls plus the assignees leg, read-back identical, #36441); post-stamped report comment on #36219. git push is not counted.",
      "line_budget": "135 changed lines (+133/-2) across 5 files, including the test and the changeset; the budget was 250.",
      "files_changed": [
        "ui/packages/app-shell/src/views/metadata-admin/CelPredicateField.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ConditionBuilder.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.listEquality-36219.test.tsx",
        ".changeset/36219-cel-editor-list-fields.md"
      ],
      "deviations": [
        "Clause-② closure: the widened prop type CelPredicateFieldProps.fieldDefs is in @object-ui/app-shell, which is private: true and publishes no .d.ts, so there is no built-closure reading to take. The claim line 'Clause-②: no' is kept.",
        "celAuthoring.ts is unchanged; the PM hypothesis pointed at it, but it already forwarded hint.multiValueFields.",
        "First commit was refused by the pre-push check:commit-card-trailers (model name in the harness co-author trailer). It was amended to the model-free pair before any push, so no published history was rewritten.",
        "The PR body uses the AGENTS.md session-URL footer rather than the harness's robot-emoji footer, following the repository rule.",
        "Merged origin/main (ff6014990) into the branch mid-task to clear a dispatch-gates stale-tree warning. origin/main has since moved further and was not chased."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — ConditionalFormattingEditor.tsx (view conditional formatting, scope record) mounts CelPredicateField without fieldDefs, so record.FIELD == 'a' on a list field is not flagged there. It is outside the card's inspector ruling, and I did not measure that any save path refuses it. It is listed in the PR Acceptance notes and could take the new fieldDefs prop in one line. Dedupe words: ConditionalFormattingEditor fieldDefs, conditional formatting list-equality, cf condition multiValueFields"
      ],
      "owed_review": "L2 contract-tier review is not owed by the path tier (no governed surface). The seat's ordinary ACCEPT review applies, and I have not requested it."
    }
  7. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jREBdDtYvSLn38xUCg

    File surface amended (area f7-view, for L1-e REWORK 7079169862 item 1 on PR #36441): adds ui/packages/app-shell/src/views/metadata-admin/clientValidation.ts (its private multiValueFieldsOf merges with the new helper so the editor and the draft check share one derivation). No other change to the claim.

  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · zhuangjianguo · session_01QsR2jREBdDtYvSLn38xUCg
    os-dev-report

    {
      "issue": 36219,
      "status": "done",
      "branch": "claude/issue-36219-cel-list-fields",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36441",
      "head": "ef819785ca",
      "session": "session_01QsR2jREBdDtYvSLn38xUCg",
      "premise_still_valid": true,
      "summary": "REWORK round 1 (L1-e 7079169862). Item 1: there is now one list-field derivation. clientValidation.ts exports multiValueFieldsOf(defs) and the CelFieldDef type ({name, type, multiple}). The draft check calls it through a private multiValueFieldsOfView(view), which maps view.entries to { name: e.name, type: e.def.type, multiple: e.def.multiple }. CelPredicateField imports the same helper and its duplicate is deleted. The helper sits in clientValidation.ts, not celAuthoring.ts (the preferred target), because celAuthoring.ts deliberately carries no import at load (its own doc and CelPredicateField.i18n-10862-s2.test.tsx state this seam) and the helper needs isMultiValueField from @objectstack/spec/data. There is no import cycle: clientValidation imports celAuthoring, and CelPredicateField imports both. The PR body sentences are corrected. Item 2: the Acceptance-notes line on ConditionalFormattingEditor now ends with 'carrier: #36459', with no closing keyword near it. Nothing else changed.",
      "tests": "head ef819785ca, one locked run (VERDICT command-exit 0): turbo build of @object-ui/app-shell^... BUILD_EXIT=0. The vitest run covered ObjectFieldInspector.listEquality-36219, ObjectFieldInspector.celGate, ObjectFieldInspector.hostBanner-12681 (it mocks clientValidation by spreading importOriginal), CelPredicateField.test and every clientValidation* test file (12 files): 'Test Files 16 passed (16) · Tests 252 passed (252)', TEST_EXIT=0. pnpm --filter @object-ui/app-shell run type-check (tsc --noEmit plus tsconfig.test.json): TYPECHECK_EXIT=0. No new ablation: the change is a refactor with no change to tested behaviour. The round-0 ablation on 349fc44da still stands (list case red, control green, restored to the HEAD blob).",
      "gates": "dispatch-gates --commands at ef819785ca derives the same 38 commands as round 0 (diff of the sorted lists is empty). I reran the families that read the changed .ts files: check:test-source-alias, check:cross-package-test-inputs, check:nul-bytes and check:undeclared-dep-imports, each exit 0. The other 34 were not rerun on this head; their round-0 readings at 349fc44da were all exit 0 (--ran '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN'). overlap-check before the push: VERDICT clean exit 0. CI at ef819785ca when this report was written: 19 success, 15 skipped, 20 in_progress, 0 failed.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 this round — relay issue_patch PATCH /repos/objectstack-ai/objectstack/issues/36441 (PR body, read-back identical, 6890 bytes, last non-empty line is the signed comment); post-stamped os-dev-report comment on #36219. git push is not counted. Round 0 had 2 (pr_create, report comment 7078952553).",
      "line_budget": "152 changed lines (+142/-10) across 6 files, including the test and the changeset; the budget was 250.",
      "files_changed": [
        "ui/packages/app-shell/src/views/metadata-admin/CelPredicateField.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/clientValidation.ts",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ConditionBuilder.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.listEquality-36219.test.tsx",
        ".changeset/36219-cel-editor-list-fields.md"
      ],
      "deviations": [
        "The helper went to clientValidation.ts rather than the preferred celAuthoring.ts, because of celAuthoring's no-import-at-load seam; this is inside the amended file surface.",
        "Clause-② closure: @object-ui/app-shell is private: true, so there is no published .d.ts to measure. The claim line 'Clause-②: no' is kept.",
        "The worktree was recreated from origin/claude/issue-36219-cel-list-fields with no force-push or rebase; the branch only moves forward 349fc44da -> ef819785ca."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #36459 · ConditionalFormattingEditor has no list-equality check while typing; the seat filed this, and the PR Acceptance notes line names it"
      ],
      "owed_review": "Delta ACCEPT by the L1-e seat on head ef819785ca; I have not requested it. No governed surface is touched."
    }
  9. added a commit that references this issue on Nov 23, 2026
    441a0d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions