Repository navigation
Test static credential updates when the owning Gateway is unavailable - #4175
Conversation
|
🦞👀 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 extends the static credential update integration test to distinguish an owning Gateway outage from a provider conflict and verify that refusals preserve the complete stored source. Example: PATCH an unbound OpenAI credential source while its admitted provider remains registered but the owning Gateway catalog throws an error.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds focused, useful coverage for an existing API distinction, with no introduced defect found; repository policy and collaborator authorship reserve disposition for maintainers. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherAuthenticated credential-source PATCH requests enter the production Fastify API, pass through OCC authorization and source ownership checks, and consult the owning Gateway catalog before credential material access or persistence changes. flowchart LR
A[Authenticated PATCH request] --> B[Fastify API]
B --> C[OCC update handler]
C --> D[Owning Gateway catalog]
D --> E[503 on catalog outage]
C --> F[Secret access and source update]
Technical reviewBest possible solution: Retain the focused extension to the existing integration test without changing production behavior or introducing another fixture. Do we have a high-confidence way to reproduce the issue? This PR closes a coverage gap rather than fixing a reproduced production failure; source inspection confirms the expected outage path, and no target code was executed. Is this the best way to solve the issue? Extending the existing authenticated HTTP scenario is proportionate: the test exercises the real error mapping and state preservation while injecting only the dependency failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 32f1476071e4. 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 30, 2026, 3:43 AM ET / 07:43 UTC. |
An operator can retry a static credential update after a Gateway outage; a missing or ambiguous provider requires a configuration fix. The API distinguishes those cases, but the existing test would still pass if an outage were reported as a provider conflict.
Extend the existing HTTP update test for a Gateway-owned source. With a healthy catalog, removing or duplicating the admitted provider still returns 409. With that provider present but its Gateway catalog unavailable, the update returns 503. Both refusals leave the stored source unchanged and cause no additional Secret reads or provider requests. A successful update still uses the admitted provider after providers are reordered.
This changes one test and no production code.