Skip to content

[finding][spec] ViewFilterRuleSchema.value 不按算子约束形状 —— 集合算子配标量在发布期通过,直到运行时才拿到 400 #6227

Description

@baozhoutao

来自 PR #6209(#5869)实施期的范围外观察,按 PD #10 记录,未认领、未入队,交分诊定级。查重:全仓 open issue 仅 #5869 自身命中(其修的是运行时半边)。

事实

ViewFilterRuleSchema(packages/spec)对 value 不按算子约束形状:['stage', 'not_in', 'won'](集合算子 + 标量比较值)是 spec 合法的 ViewFilterRule,发布期校验通过。#5869/PR #6209 之后,这类形状在运行时收到带点名信息的 400 INVALID_FILTER(改前是 500)—— 运行时半边已收口。

缺口

「发布通过 → 运行时 400」仍是两段式:作者在发布期得不到反馈,要到查询真正执行才知道写错。对照:FieldOperatorsSchema 在 $ 算子层早已声明形状($in/$nin 为数组、$between 为二元组)—— 缺的是 view-filter 创作面(三元组语法)按第二元(算子)约束第三元(value)的发布期校验。

方向(供 spec 席判断,不预裁)

spec 侧对 ViewFilterRuleSchema 做按算子的 value 形状精化(discriminated union 或 superRefine)。属创作面收紧一类(同族先例:#5931 的裁量边界),影响所有 view 元数据的发布路径,量级与兼容性(存量已发布的越形 view 怎么办)需要 spec 席评估 —— 这正是 #6209 按纪律不做 rider 的原因。

Refs:#5869、PR #6209(「范围之外」段)、#5348/#5346(点名措辞口径)。

Activity

  1. claude commented on Aug 7, 2026

    @claude
    Contributor

    Triage — routing repair only: adding domain:spec. The finding grade is untouched and this card stays held.

    Landing site, read not guessed: ViewFilterRuleSchema is defined at packages/spec/src/ui/view.zod.ts:398 on origin/main. The proposed fix refines value by operator (discriminated union or superRefine).

    Why domain:spec and not domain:spec-surface: the acceptance-face criterion decides it, and this card is the clean positive case — the body's own example ['stage', 'not_in', 'won'] is legal today and would be rejected after. Metadata that passes now would stop passing, which is exactly the reverse red line ("any card that changes accept/reject behaviour is domain:spec, however small"). The body's note that this tightens a published authoring surface, and so needs a compatibility call on already-published out-of-shape views, reinforces the same routing.

    Still held, not graded this round — see this round's wrap-up on #6015.
    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    Findings sweep (maintainer-authorized one-off, 2026-08-07 — registered on #6015): promoted to the queue. Publish-passes-then-runtime-400 is the two-stage failure the loud-at-authoring family (#6245/#6235 precedents) exists to close, and FieldOperatorsSchema already shows the target shape at the $-operator layer. The spec seat evaluates stock compatibility (already-published nonconforming views) as part of the card, not as a pre-condition. finding → pm:queue.


    Generated by Claude Code

  3. self-assigned this
    on Aug 9, 2026
  4. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    CLAIM — PM seat domain:spec (session session_01PiRUoQkTSBBmpyXBY3cVn2), dispatching to an os-dev subagent.

    ⚠️ Serialization constraint: in-flight PR #7042 (merge queue) rewrites view.zod.ts (+354 lines). The dev's first action after fetch is to verify #7042 has merged into origin/main; view.zod.ts edits must not be finalized against a pre-#7042 base. If it has not merged by edit time, wait and lap.

    Dispatch prompt includes the standard clause set: premise-first verification, dependency closure, prefix-direction consumer sweep, rejection pins asserting code+status (ADR-0112), gates enumerated from lint.yml, reverse verification direction-predicted-first.


    Generated by Claude Code

  5. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    PM bookkeeping: pm:dispatched → pm:queue. The dispatched os-dev subagent for this card was stopped externally (session-level cancellation, discovered by the 13:57Z patrol probe) before creating its worktree or pushing any code — zero work product exists, the branch claude/issue-6227-view-filter-value-shapes was never created. The claim above is released; the card returns to the queue intact. Re-dispatch awaits the maintainer's word. Context that remains true for the next dispatch: the #7042 serialization constraint is long cleared (merged 12:04Z), and no in-flight PR currently edits ViewFilterRuleSchema's region of view.zod.ts (#6926's dev works the FormView region — coordinate at landing, not at dev time).


    Generated by Claude Code

  6. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    RE-CLAIM — PM seat (session session_01PiRUoQkTSBBmpyXBY3cVn2), fresh os-dev dispatched under the maintainer's re-acceleration (2026-08-09 chat). Branch claude/issue-6227-view-filter-value-shapes, worktree ../objectstack-issue-6227. All constraints recorded in the 11:57Z claim comment remain binding except the #7042 serialization (long merged); no in-flight PR currently edits the ViewFilterRuleSchema region.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions