Repository navigation
fix(studio): a renamed validation rule keeps the server verdict's hold on its guard - #31549
Merged
Merged
Conversation
A rule the panel minted renames itself as its message is edited; its guard's kept count stayed under the old name and was pruned, so a guard the server refuses kept autosaving. The count now moves with the name. The held-line copy names expression errors rather than CEL syntax. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSGK8zPYdrSzXgFLDf
…ename The guard editor's report can still be in flight under the old name when the rename lands (its effect ran on the render before it); such a report now resolves to the rule's current name instead of stranding the count. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSGK8zPYdrSzXgFLDf
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSGK8zPYdrSzXgFLDf
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSGK8zPYdrSzXgFLDf
Contributor
Author
|
domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo 席位核对 · ACCEPT · 2026-11-08T14:34Z · head
|
This was referenced Nov 10, 2026
rajeev-kumar-se
pushed a commit
to rajeev-kumar-se/objectstack
that referenced
this pull request
Nov 10, 2026
…ectstack-ai#27482's ruled acceptance (objectstack-ai#32125) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBSmteL5HNtgDd86za1A3WTA)_ Fixes objectstack-ai#32112 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:平台测试清单里「Studio 表达式编辑器」这一项(`studio-authoring.expression-editors`)的验收条款 acceptance[4] 和反例 negative[1],改为按已裁决的口径判定权限集行级安全里「引用公式字段的条件」:第一次保存会发出去,服务器回读后给出拒绝判定,此后旁边的修改被拦住、改条件本身会再保存一次接受新判定,发布时一律被拒(422),永远进不了生效版本。已知缺口 knownGaps[3] 同步记下编辑器卡 objectstack-ai#27482 已关闭,拦截提示语现在是「请先修复表达式错误再保存」。 - **为什么改**:QA 运行 objectstack-ai#32102 按旧写法(「一次 PUT 都不许发」)把这两条判成失败,但产品行为正是 objectstack-ai#27482 的裁决(PR objectstack-ai#31549):服务器只评判已保存的草稿,没有只校验不保存的入口,客户端也不许复制发布规则(objectstack-ai#26858)。这是条款过期,不是产品缺陷。 - **风险与回滚**:只改一个清单 JSON 文件(12 行增、4 行删),不动产品代码。解析错误和无法下推的条件仍要求在第一次保存前就拦住,没有放宽。回滚即 revert。 - **先看**:`docs/qa/platform-checklist/areas/studio-authoring.json` 里 `studio-authoring.expression-editors` 的 `acceptance[4].verify` 和 `negative[1]`。 - **两分钟验证**:`node scripts/check-platform-checklist.mjs`,预期输出 `check-platform-checklist: OK`、退出码 0。 - **需要你做的**:无,席位落地。 ## What changes One item, `studio-authoring.expression-editors` (revision 9 → 10), in `docs/qa/platform-checklist/areas/studio-authoring.json`. The source for the new reading is objectstack-ai#27482's ruled acceptance, PR objectstack-ai#31549, "Acceptance reading (seat ruling on the step-1 report)": "The server judges only a saved draft, and no metadata validate-only door exists, so the first save of a refused guard goes out: it is the save whose re-read brings the verdict. Once the verdict shows, the next save is held … An edit of the guard text itself goes out, to be judged again". - **acceptance[4].verify** - Before: "a parse-faulted predicate and the formula-field predicate are held the same way", where held means "the perm-autosave-held status with no PUT issued". - After: the non-pushdownable and parse-fault probes keep that reading word for word. The verify now says why: the editor judges both in the browser before the first save (`celAuthoring.ts` `lintCelPredicate`, which runs the published RLS rule through `rlsPredicateVerdict` for a using or check clause). The formula-field probe is split out. The editor cannot judge it before the first save, because `rlsPredicateVerdict` lints a one-clause stack that names no object, so the rule's virtual-field branch cannot fire. Only the draft re-read's `_diagnostics` refuses it (`CelPredicateField` `useServerHoldAt`, `draftVerdict.ts` `serverHoldAt`). For that probe it passes when: the first save goes out (one PUT 200) and its re-read shows the verdict; an edit beside the guard is held under "Fix the expression errors before saving." with no PUT; each new text of the guard PUTs once more; and publish answers 422, so the predicate never reaches the live set. The verify also says how the clause's "cannot be persisted", steps[4]'s "issues no PUT" and the evidence's "no save PUT" read for this probe, so those fields need no edit. - **negative[1]** - Before: "a parse-fault formula or RLS predicate that Saves anyway (Save not gated on celErrorCount) is a FAIL — a malformed RLS predicate silently mis-scopes rows and some evaluation paths FAIL OPEN, widening access with no error". - After: that sentence is kept. It adds that both editors (the formula field's editor in `ObjectFieldInspector` and the RLS editor in `PermissionAdvancedFacets`) judge a parse fault before the first save, so one PUT is the FAIL there. For a refused formula-field RLS predicate, the FAIL is an edit beside the judged guard that saves, or a publish that does not answer 422. - **fixtures.knownGaps[3]** - Before: "THE FORMULA-FIELD PROBE FAILS TODAY … The editor half is objectstack-ai#27482, which is open … That first PUT is the residual objectstack-ai#27482 carries. Until objectstack-ai#27482 is ruled, acceptance[2] and acceptance[4] FAIL on this probe as written". - After: "THE FORMULA-FIELD PROBE IS HELD FROM THE SERVER VERDICT, NOT BEFORE THE FIRST SAVE". objectstack-ai#27482 is closed (2026-11-08, by PR objectstack-ai#31549). The first save is the ruled acceptance, not a residual. The held line reads "Fix the expression errors before saving." (zh 「请先修复表达式错误再保存。」), `perm.cel.saveBlocked` in `ui/packages/i18n/src/namespaces/studio/en.ts` and `zh.ts`, worded by PR objectstack-ai#31549 from "Fix the CEL syntax errors before saving.". It also records QA run objectstack-ai#32102's reading (R-2, at ff04ad8) and that the run scored acceptance[2] pass. - **source[]**: two entries are added, `draftVerdict.ts` (`serverHoldAt`) and the studio i18n packs (`perm.cel.saveBlocked`). - **revision** 10, and a **history** row citing objectstack-ai#32102, objectstack-ai#31549 and objectstack-ai#32112. Not edited: acceptance[2], steps[4], acceptance[4].clause and acceptance[4].evidence. No product code changes, no client copy of the publish rule (objectstack-ai#26858), and no validate-only door is assumed. ## Acceptance notes - The code reading is at base `45f0f81f`. `git grep -n "Fix the expression errors before saving"` hits `ui/packages/i18n/src/namespaces/studio/en.ts` (the `perm.cel.saveBlocked` row), two pins (`PermissionMatrixEditor.fieldWhen-25866.test.tsx`, `PermissionMatrixEditor.rlsAddPolicyHold-13113.test.tsx`) and the objectstack-ai#31549 changeset. The zh row is `ui/packages/i18n/src/namespaces/studio/zh.ts`. - The editor that gates before the first save is the one doing the lint. The RLS editor judges parse faults and non-pushdownable filters in the browser. The formula field's editor judges parse faults and holds its save on the error count (`ObjectFieldInspector` `blockingIssues`). Neither editor judges a formula-field RLS predicate in the browser. The item now says this per editor instead of generalising. - No live run was owed. The evidence is the run record objectstack-ai#32102 (R-2, reproduced on 2 loads) and the existing pin `PermissionMatrixEditor.serverVerdictHold-27482.test.tsx`, case (b). ## Verification <details><summary>Gates</summary> At head `1060d299` (base `45f0f81f`). `dispatch-gates --commands`: 16 families; each was run and its exit code recorded before any pipe: - `node scripts/check-adr-links.mjs`: exit 0 - `node scripts/check-adr-links.mjs --self-test`: exit 0 - `node scripts/check-closing-keyword-parity.mjs`: exit 0 - `node scripts/check-closing-keyword-parity.mjs --self-test`: exit 0 - `node scripts/check-comment-mask-corpus.mjs`: exit 0 - `node scripts/ci/plan-test-core-shards.mjs --self-test`: exit 0 - `pnpm --filter @objectstack/lint run check:doc-formula-expressions`: exit 0 - `pnpm check:ci-filter-parity`: exit 0 - `pnpm check:cross-package-test-inputs`: exit 0 - `pnpm check:doc-authoring`: exit 0 - `pnpm check:driver-memory-census`: exit 0 - `pnpm check:gitlink-declared`: exit 0 - `pnpm check:nul-bytes`: exit 0 - `pnpm check:platform-checklist`: exit 0 - `pnpm check:refd-timer-probe`: exit 0 - `pnpm check:watch-hint-literal`: exit 0 `dispatch-gates --ran`: 16 derived, 16 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. `node scripts/check-platform-checklist.mjs`: exit 0 ("check-platform-checklist: OK — 16 areas, 361 items"). `check:doc-formula-expressions` ran after `turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under `os-verify-lock.sh` (VERDICT command-exit 0). No changeset: the diff is `docs/qa/**` only (`skip-changeset`). CI families: the seat reads them from this PR's check-runs. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufziPhFzgoYFZnBkgnuc)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #27482
Clause-②: no
Metadata-protocol: none
维护者速读
main上实测复现)。ObjectValidationsPanel.tsx里的计数归属(约 20 行)和 studio 词条 en/zh 各一行;不动 spec、lint、服务端,不在客户端复制发布规则。首次保存仍会发出(服务器只评判已保存的草稿);改条件文本本身仍会发出以换取新判定。回滚即 revert。ui/packages/app-shell/src/views/studio-design/ObjectValidationsPanel.tsx的renameCel/renamedTo/reportCel与patchRule第一行。cd ui && pnpm exec vitest run packages/app-shell/src/views/studio-design/DataPillar.validationVerdictHold-27644.test.tsx,预期 9 个用例全绿。What changes
ObjectValidationsPanel.tsx: a rule's verdict follows its name. The panel keeps each rule's blocking CEL count by rule name (reportCel(sel.name!, count)) and prunes names no longer in the draft. A rule the panel minted takes its name from its message (patchMessage), and the name input renames too. The guard'sConditionBuilderreports only when its count changes, so a rename left the count under the old name, it was pruned, and the new name never got one: the served verdict stayed on screen while every later edit autosaved. Now:patchRulecallsrenameCel(old, new)whenever a patch carries aname, which moves the kept count to the new name.renameCelalso records the rename inrenamedTo, andreportCelresolves a name through it. A report still in flight under the old name (the editor's effect ran on the render before the rename) lands on the rule's current name instead of being stranded. Without this, the new test's minted-rule case was red in 3 of 4 runs.placeNewRuledrops arenamedToentry for the name it places, so a new rule that reuses a name a rename left reports as itself.perm.cel.saveBlockedcopy (studio namespace,en.tsandzh.ts, the only two packs that carry it): "Fix the CEL syntax errors before saving." → "Fix the expression errors before saving."; zh 「请先修复 CEL 语法错误再保存。」 → 「请先修复表达式错误再保存。」. The line holds server refusals too (rls-predicate-unenforceablemeasured live), not only syntax errors. Read by the permission set editor's held line and Save title and byObjectHooksPanel's held line. The twometadata-adminpins of the old sentence are updated.CelPredicateField,ConditionBuilderordraftVerdict.ts. No client copy of any publish rule (Studio: an expression field that says "Valid CEL" should read the draft's server verdict at its own path (RLS predicate, flow edge condition) #26858), nopackages/lint,packages/specor server change.Acceptance reading (seat ruling on the step-1 report)
The server judges only a saved draft, and no metadata validate-only door exists, so the first save of a refused guard goes out: it is the save whose re-read brings the verdict. Once the verdict shows, the next save is held and the held line is drawn while the guard still shows the judged text, a rename of the rule included. An edit of the guard text itself goes out, to be judged again (#27612's design,
serverHoldAt).Tests
New top-level
describein the shared harnessui/packages/app-shell/src/views/studio-design/DataPillar.validationVerdictHold-27644.test.tsx(realDataPillar, a fake door whose draft read refusesrecord.amount > 100atvalidations.N.condition):record.amount > 100, message "Over the cap". The first save goes out (ruleover_the_capat index 2) and the verdict shows. The message edit renames it toover_the_cap_now: the held line names the rule and no second PUT goes out.Ablations (fix committed first, mutated through
scripts/ablation-replace.mjs, restored blob == HEAD00af991baf66,git diff HEADempty):renameCelcall inpatchRuledeleted): (a) and (b) red, the control and the Studio: the Validations tab holds the autosave on a served CEL verdict at the rule's own path, as the RLS arm does (#27482 layer 2 of 2) #27644 cases green.renamedTowalk inreportCelmade a no-op): (a) red in 1 of 2 runs, as expected for a timing race. Before that half was written, the same case was red in 3 of 4 runs.Acceptance notes
issue-27482/live/). Onmain58f66b93: a rule made through New → "Reject the save when…" saved on every edit under the red verdict (message, label and guard edits, 4 PUTs, no held line). The same guard on a rule with an authored name was held. RLS USING on a formula field was held after the first save, under "Fix the CEL syntax errors before saving.". After this change: the message edit that renames the rule and the label edit are held (1 PUT in all, held line namesqty_too_big_now), the guard edit goes out, and the RLS held line reads "Fix the expression errors before saving.".Verification
Tests at the final head c1768bd (main a3ac7fb merged, no overlap with the touched files)
pnpm --dir ui exec vitest runover 39 files: every test file namingObjectValidationsPanel, the Validations tab,perm.cel.saveBlockedor the permission / hooks held lines, plusstudio-namespace.test.ts,draftVerdict.test.ts,ConditionBuilder.serverHold-27644.test.tsxandPermissionMatrixEditor.serverVerdictHold-27482.test.tsx(the fix(app-shell): a server error at an RLS clause's path holds the permission-set autosave #27612 / fix(app-shell): a validation rule guard the publish refuses holds the Studio autosave (#27644) #28027 / Studio: the Validations tab holds the autosave on a served CEL verdict at the rule's own path, as the RLS arm does (#27482 layer 2 of 2) #27644 / Studio Data pillar panels and ResourceEditPage: a CEL parse-fault hold still ends when the tab or selection changes; port the draft-stamped hold ruled on #27485 #27629 pins): Test Files 39 passed, Tests 275 passed, lock VERDICT command-exit 0.turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18n: 68/68 tasks, exit 0 (before the merge; the merge touched no app-shell or i18n file this diff touches).node scripts/check-i18n-en-drift.mjs(fromui/): exit 0, "Every changed designer-table en value was followed by its zh row."pnpm check:new-line-citations(fromui/): 0 new citations.Derived gate union (dispatch-gates --commands): 36 of 36 exit 0
36 of 36 exit 0 at
c1768bdc;dispatch-gates --ran: 36 derived, 36 run, 0 NOT-MEASURED.node scripts/check-sdui-manifest.mjsexit 0.pnpm --dir ui exec vitest run scripts/: 170 files passed, 2 skipped.pnpm check:test-source-aliasfirst asked for module-top preloads of the lazily loaded@objectstack/formula,@objectstack/lintand@objectstack/spec/identityin the three edited test files; they were added (d2fd8a4c) and it is green. CI families: read from this PR's check-runs by the seat.Generated by Claude Code