Repository navigation
fix(approvals): draw the served snapshot to an approver whose read comes from the approval - #39736
Conversation
…omes from the approval (red on main) Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-Authored-By: Claude <noreply@anthropic.com>
…detail (red on main) Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-Authored-By: Claude <noreply@anthropic.com>
…mes from the approval; name that read first in explain Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-Authored-By: Claude <noreply@anthropic.com>
…eclared keys Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibvMXrDPhCt3pGziYWE Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 18 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e9a8d6569acb1c19b5e966e334da277607bc5aa1 && git checkout e9a8d6569acb1c19b5e966e334da277607bc5aa1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin fb26c1cc7a77b5ab3260f9a29d0c0784cfc099be fef22768d2ceeeebd6e7d6e8ca00da800f2e40af && git checkout -B drift-repro fb26c1cc7a77b5ab3260f9a29d0c0784cfc099be && git merge --no-ff fef22768d2ceeeebd6e7d6e8ca00da800f2e40af
node scripts/docs-audit/affected-docs.mjs --json fb26c1cc7a77b5ab3260f9a29d0c0784cfc099be |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd 席位核对L1-b · 2026-12-04T17:25Z · ACCEPT · head
(1)
(2)
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE Landing · 2026-12-04T17:26Z · head
State: ready + auto-merge through the merge queue. |
Requested by Tesla · project thread
Part of #39709
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Part ofrather than a closing reference: the card's Expected list includes "Decide whether the record page should honour the same approval read". That decision is forked to the decision thread and not built here, so merging this must not close the card.useSubmittedRecord), the declared face ran both rows throughwithoutDeniedFields. For a pending approver whose permission sets do not name the object, the client's field verdicts fail closed for every field, so the snapshot was emptied.noFieldAccesswas computed from the unfiltered payload (it had keys), so the card returned nothing: a blank left pane. Now:readThroughApproval), the snapshot and the current row are drawn as served. The service has already redacted the snapshot per reader by field (resolveReadableSnapshotFieldsin plugin-approvals: the read projection intersected with the queryable fields, so masked fields are dropped too), and the data API serves the current row redacted the same way. The client re-filter added nothing there except the fail-closed artefact.noFieldAccessis now computed from what is left after the filter. It is true when no served field is left, or when the filter withheld a served field and the plan draws nothing. So a pane narrowed to nothing shows the ruling-E notice instead of staying blank. A snapshot of undeclared keys with nothing withheld still draws nothing and claims no gap, as before.payload_labelsare derived from (the target object's field labels per snapshot key). The declared face also keeps the typed cells and the default record page's sections. The served face (plain text,payload_labels) remains the face for a withheld definition.object_crudlayer). For a read granted by a pending approval, the detail used to open with "No resolved permission set grants read on 'X'; …". It now opens with the grant: "read on 'X' is granted via approval request N: the principal may read, as a pending approver, the records the request's pending step waits on them for, and no other, until the step resolves (see readFilter). No resolved permission set grants read on 'X'." The verdict, the read filter and every other branch are unchanged. The dogfood pin on this layer (approval snapshot, no object read) assertstoContain('No resolved permission set grants')and the request id, and both still hold.Not in this PR: the record page (
/OBJECT/record/ID). It fails closed at the same client gate (see Acceptance notes) and is forked to the decision thread.Tests
ApprovalDecisionPanel.noReadableFields-39406.test.tsx(the shared harness for this surface, new top-leveldescribefor this card):pending-approver-read-admission.test.ts: theobject_cruddetail starts withread on 'X' is granted via approval request N:(both thepublic_readand theprivateobject).Red on main, then green (worktree at 3191f8f, then the fix)
Red, tests committed before the fix (e4fcb2e, 6409023):
Green on the fix:
Ablation of the "withheld and draws nothing" arm of
noFieldAccess(scripts/ablation-replace.mjs, anchor hit once, restored to the HEAD blob): exactly the pin "object read, the field permissions withhold every declared field and leave an undeclared key" goes red (1 failed | 13 passed).Acceptance notes
/OBJECT/record/IDhides the fields at two client gates, both readingcheckField(object, field, 'read')from the/auth/me/permissionsanswer, which fails closed for an authenticated reader whose permission sets do not name the object:readableRowinRecordDetailView.tsx(app-shell) runs the page record throughwithoutDeniedFieldsbefore every block reads it, so the H1 falls back to the object label plus the id; and thegatedSchemamemo inDetailView.tsx(plugin-detail) drops every section field whosecheckFieldread verdict is false. The server serves the row (the pending approver's read admission). The question goes to the decision thread.object_cruddetail for a read granted by delegated administration (ADR-0090 D12) also opens with "No resolved permission set grants …" while the verdict grants. Not changed here (out of this card's scope); noted only.typecheckof@object-ui/app-shellwas not measured locally:tsc --noEmitthere needs the built@object-ui/*declarations, and this worktree has none (every error was a module-not-found or follows from one).Type Check UIin CI measures it.Verification
Risk-ranked files to read first:
ui/packages/app-shell/src/views/approval-decision/SubmittedRecord.tsx: theuseSubmittedRecordmemo (readThroughApproval,asServed,noFieldAccess).packages/plugins/plugin-security/src/explain-engine.ts: thependingApprover !== nullarm of theobject_cruddetail.describeinApprovalDecisionPanel.noReadableFields-39406.test.tsx.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/approval-decision/ApprovalDecisionPanel.noReadableFields-39406.test.tsx. Expect 14 passed.