Repository navigation
test(console): pin the read-only draft to callers who can change neither grant - #3616
Conversation
…her grant The draft reads as a reader's only when the caller has neither Agent update nor Configuration update. Dropping either half survived, and so did hiding a deployer's checklist or dropping Deploy's "cannot change this version draft" suffix: no test covered an editor with one grant's notice or a deployer without update.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds browser assertions for draft notices, preparation checklists, and deployment guidance under separate Agent, Configuration, and deploy grants. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR adds useful, distinct browser coverage for existing permission behavior, with no actionable defect found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Console reads advisory permission answers from the controller’s IAM-backed endpoint and uses them to render draft controls; these tests exercise that path through Chromium and the real Fastify application with fixture storage. flowchart LR
Test[Browser test] --> Browser[Chromium Console]
Browser --> API[Fastify permission endpoint]
API --> IAM[Native IAM Driver]
IAM --> Grants[Fixture role grants]
API --> Draft[Draft notices and checklist]
Draft --> Assertions[Visible behavior assertions]
Technical reviewBest possible solution: Retain the focused browser coverage alongside the existing independent-grant implementation. Do we have a high-confidence way to reproduce the issue? This test-only PR reports mutation survivors rather than a current product failure; source supports the scenarios, while the claimed mutant failures were not independently executed. Is this the best way to solve the issue? Extending two existing browser cases and adding the missing deploy-only combination provides targeted coverage without duplicating application logic or introducing test-only production hooks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 097d75696e99. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 25, 2026, 7:03 AM ET / 11:03 UTC. |
Problem
A mutation sweep of the read-only draft from #3600 (
getAgentCallerPermissionsconfigurationUpdate, and the console'sconfigurationReadOnly/draftReadOnlygating indetail.mtsandcredentials.mts) left four changes that no test caught:draftReadOnlywithout its Agent-update half: an Agent editor without Configuration update gets the reader's draft notice.draftReadOnlywith||in place of&&: a Configuration editor without Agent update gets the reader's draft notice.The rest was killed. That includes the server mutants:
configurationUpdateprobing the Agent's update, Configuration read, the Namespace-wide Configuration, or OR-ing in Agent update.Change
Test only, in
tests/browser/console-agent-detail.test.mjs:Verification
Not pursued: a redraw that only matters when a permission reread lands between the rebuilt tab's draw and the end of the refresh, and a native editor replaced while open, which needs a revocation during editing followed by a save refusal. Neither can be reached without an ordering hook.
Risks
Test only. It adds one browser test (about 3 s). #3611 also edits this file. Its hunks are in other lines, so the two PRs should merge cleanly in either order; whichever lands second should rerun this file.