Repository navigation
Keep credential withdrawal tests bound to the source they requested - #2774
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR binds credential-withdrawal test reads and replays to the Agent and source originally requested. Example: An operator loses access after requesting a credential withdrawal.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the focused test refactor preserves withdrawal targets, explicit principals, and existing assertions, with no actionable defect found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThese PostgreSQL integration tests call OCC withdrawal APIs and run the controller worker against persisted work and audit records, using Compute doubles to simulate gateway outcomes. flowchart TB
A[Test scenario] --> B[Source-bound withdrawal handle]
B --> C[OCC controller]
C --> D[PostgreSQL state and work]
D --> E[Controller worker]
E --> F[Compute double]
E --> G[Persisted outcomes and audit]
Technical reviewBest possible solution: Retain the source-bound helper and explicit per-call principals with the existing integration assertions. Do we have a high-confidence way to reproduce the issue? This PR refactors existing tests rather than repairing a reported product failure; no target code was executed during this read-only review. Is this the best way to solve the issue? The helper is appropriately local, preserves controller-owned revision selection, and keeps expected outcomes independent of request construction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3bdfcb10fe86. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
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 17, 2026, 3:06 PM ET / 19:06 UTC. |
A withdrawal can outlive the person who requested it. These PostgreSQL tests now bind a withdrawal to its agent and credential source once, then name the acting principal at each read or replay. The scenarios still show the work attempts, audit records, and expected outcomes in place. This changes test code only.
All 36 tests in the file passed before and after against disposable PostgreSQL. I also checked that the relevant tests still fail if a withdrawal is attributed to the wrong person or if the test reads the denied source while expecting the allowed one to be revoked.