Repository navigation
fix(app-shell): a parenthesised metadata form condition is evaluated as a group, so the field form offers percent and currency rows only where the type allows - #38262
Conversation
… group Claude-Session: https://claude.ai/code/session_01L9qibxvV3AxCdD5DiVBy6V Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a ACCEPT at Face. L1 only, no L2 owed. The three files are Claim against surface (claim 7237651782). It matches file for file. Route P is built as ruled.
Evidence (reports 7238017671, 7238248941).
Changeset, read sentence by sentence: every sentence holds, including "A condition it still cannot read (an unbalanced parenthesis, a function call) keeps failing open with its development warning, unchanged". The level is patch, and both declaration lines are line-initial. Checks at this head: 38 success, 13 expected skip, 0 failed, 0 pending. mergeable clean. Relation. Out of scope (Acceptance notes). A malformed predicate ( |
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T11:01Z · zone
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46137947190 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Tesla · project thread
Fixes #38070
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/app-shell/src/views/metadata-admin/predicate.ts: the Studio metadata form evaluator reads(expr)grouping, as CEL does. One branch inevalExpr: when the whole text is one balanced group, it evaluates the inside. The branch sits after the||/&&splits, which already leave a group whole, and before negation, so!(a && b)negates the group. The matching)is found quote-aware, by the same rulesplitTopLeveluses, so a parenthesis inside a string literal is never counted. The header's supported-subset list gains the grouping line, and a new header section says why.size(data.x)) still fails open with the objectstack#6936 warning. The card's ask to make it fail closed was cut in the claim'sPremise corrected(comment 7237651782), quoting objectstack#6936 comment 5230638168 (Option C: an unresolvable path evaluates TRUE, with a development-mode warning) and ADR-0137 D3 ("A faultingvisibleWhenshows the field.").('admin' in current_user.positions)used to raise the objectstack#6936 unresolved-root warning, because the whole text was one operand with the root segment('admin' in current_user. With the group stripped first, the membership sits at depth 0 and raises the more precise objectui#6617 warning instead. The verdict staystrue, and the §9.3 verdict table that pins it is untouched. objectui#6617 is diagnostic-only by its ruling, so this moves no ruled verdict. The header paragraph and thecarriesTopLevelIndocblock that called this spelling undetected are rewritten to match.packages/spec/src/data/field.metadata-form.tsis not edited:percentDisplayandcurrencyConfigkeep their parenthesised CEL, which now evaluates as written.@object-ui/app-shellpatch.Tests
ui/packages/app-shell/src/views/metadata-admin/predicate.test.ts, a new top-leveldescribe(§10) in the shared harness:!(…)over a comparison and over&&,(a || b) && cagainst the ungroupeda || b && c, a nesteda || (b && (c || d)), aninset inside a group, and(/)inside a string literal. Each case is true and false on two drafts, with no warning.(, a group followed by== true, andsize(data.tags) > 0each evaluatetrueand warn once.fieldFormin@objectstack/spec/data: a non-vacuity guard that both still spell a group, thenpercentDisplayandcurrencyConfigon seven drafts (table below), with no warning.percentDisplaybefore → aftercurrencyConfigbefore → after"Before" was measured on
origin/mainbd5407e with a copy of the evaluator. "After" is the §10.3 pin at this head.Acceptance notes
falsesilently, without a throw or a warning.data.type ==,data.type === 'text',data.type > 3anddata.type == 'text')all behave this way, which does not match the header's "fail-open on any parse error". Recorded here only, per the claim.dialect: 'cel', so this does not grow the interim evaluator into a second dialect (the claim's ruling on the route).Verification
pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/predicate.test.ts. Expect 173 passed, 24 of them grouping-dependent (§10 and the §9.7 pin).evalExprandmatchingCloseParen(predicate.ts), then §10.3 inpredicate.test.ts.Local readings at 571bb00
pnpm --dir ui exec vitest runonpredicate.test.ts,SchemaForm.unresolvedPredicate.test.tsx,SchemaForm.optionVisibleWhen.test.tsxandSchemaForm.nestedAnyOfPredicate-9830.test.tsx: Test Files 4 passed, Tests 198 passed.scripts/ablation-replace.mjs: the grouping branch's condition was prefixed withfalse &&(anchor 1 → 0, blob1c645a78f74b→f5ef536be108).predicate.test.tsthen had 24 failed and 149 passed: all of 10.1, all seven 10.3 row cases, and the §9.7 pin. 10.2 and the guard stayed green, as expected. Restore: blob == HEAD (1c645a78f74b),git diff HEADempty.eslinton both source files: 0 errors, 1 warning (the existinglet cur: anyinresolveValue, not this diff).dispatch-gates --commandsderived 38 families, all run with exit codes recorded (--ran: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN). 37 exit 0.pnpm --dir ui exec vitest run scripts/exit 1: 7 failed and 5138 passed, incheck-doc-snippet-types.test.ts(1) andspec-symbol-ledger-plugin-detail-7265.test.ts(6). Both read the built@objectstack/spectype declarations, and this worktree's specdistcomes from anOS_SKIP_DTS=1closure build. Neither test reads a file this diff changes, so treat that red as NOT MEASURED locally. CI'sTest UIruns them on a clean build.pnpm check:changeset-fixed(run beyond the derivation) exit 0.@object-ui/app-shelltype-check: NOT MEASURED locally, because the@object-ui/*and spec closures carry no type declarations in this worktree (2606 errors, none in a changed file). CI'sType Check UIdecides.overlap-check.mjs: VERDICT clean exit 0 against origin/main bd5407e, and 0 open PR heads share a file.Generated by Claude Code