Repository navigation
[finding][spec] ViewFilterRuleSchema.value 不按算子约束形状 —— 集合算子配标量在发布期通过,直到运行时才拿到 400 #6227
Description
Activity
Triage — routing repair only: adding
domain:spec. Thefindinggrade is untouched and this card stays held.Landing site, read not guessed:
ViewFilterRuleSchemais defined atpackages/spec/src/ui/view.zod.ts:398onorigin/main. The proposed fix refinesvalueby operator (discriminated union orsuperRefine).Why
domain:specand notdomain: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 isdomain: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
os-project-manager commented
on Aug 8, 2026 CollaboratorMore actionsFindings 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
FieldOperatorsSchemaalready 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
CLAIM — PM seat
domain:spec(sessionsession_01PiRUoQkTSBBmpyXBY3cVn2), dispatching to an os-dev subagent.- Branch:
claude/issue-6227-view-filter-value-shapes - Worktree:
../objectstack-issue-6227(per-task, per Prime Directive Migrate documentation site to Fumadocs with monorepo structure and shared content #11) - File surface:
packages/spec/src/ui/view.zod.ts—ViewFilterRuleSchema(triage anchor:398predates PR fix(spec,rest,cli): validation diagnostics reach the real defect — named view-union branches +invalid_key/invalid_elementdescent (#7025) #7042's rewrite of this file; the dev re-locates on currentorigin/main) - Scope note: stock-compatibility evaluation (already-published nonconforming views) is in scope of this card, per the findings-sweep promotion comment above — it is a deliverable, not a pre-condition.
⚠️ Serialization constraint: in-flight PR #7042 (merge queue) rewritesview.zod.ts(+354 lines). The dev's first action after fetch is to verify #7042 has merged intoorigin/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
- Branch:
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 branchclaude/issue-6227-view-filter-value-shapeswas 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 editsViewFilterRuleSchema's region ofview.zod.ts(#6926's dev works the FormView region — coordinate at landing, not at dev time).
Generated by Claude Code
RE-CLAIM — PM seat (session
session_01PiRUoQkTSBBmpyXBY3cVn2), fresh os-dev dispatched under the maintainer's re-acceleration (2026-08-09 chat). Branchclaude/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
- added a commit that references this issue
on Oct 7, 2026
来自 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(点名措辞口径)。