Repository navigation
fix(protocol): declare model API-key editing contracts - #148093
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. Reviewed September 14, 2026, 8:05 AM ET / 12:05 UTC (Revision 2). ClawSweeper reviewWhat this changesAdds public request and response schemas, validators, generated Swift types, and regression coverage for existing model API-key editing, and refreshes Workboard’s bundled asset references. Merge readiness✅ Ready for maintainer review The protocol declarations are still missing on current main, so this PR remains useful. No introduced correctness defect was found, and the protected maintainer label excludes automated closure. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway receives model credential edits from clients and delegates persistence to the shared credential writer. Protocol schemas describe those requests and responses for validation and generated clients. flowchart LR
A[Models clients] --> B[Administrator permission check]
B --> C[Protocol request validation]
C --> D[Agent selection and credential writer]
D --> E[Credential storage]
E --> F[Auth refresh]
F --> G[Typed success or saved warning]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +30, Tests +133, Other +44. Total +207 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one canonical protocol definition for the existing credential-editing method while preserving its shared persistence owner and wire compatibility. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main implements the RPC but omits its request and result schemas from the canonical schema source consumed by generation. No generator or runtime tests were executed during this review. Is this the best way to solve the issue? Yes. The patch fills the canonical schema and generated-client gap, replaces duplicate shape checks, and leaves credential persistence with its existing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7eb75ef60712. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
landpr-approve-unrelated-red |
|
landpr-approve-admin-merge |
|
Thanks @obviyus! Proof: Registered Gateway requests persist valid keys and reject invalid input; TypeScript and Swift consumers compile, including saved-with-warning results.
The missing Secops sign-off was waived by the explicit owner-review exception. |
Declare the existing model API-key request and result for Gateway validation and generated clients. Preserve administrator scope, credential persistence, and saved-with-refresh-warning responses. Validated through the registered Gateway with real persistence and rejected-input checks, 151 integration cases, and compiled TypeScript and Swift consumers. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Generated clients cannot describe requests or successful responses for the existing
models.authSetApiKeymethod.User Impact
Clients gain typed key-editing requests and results, including saved-with-refresh-warning responses. Malformed fields receive standard request-validation errors.
Why This Change Was Made
Canonical protocol schemas replace the handler's duplicate shape checks. Key persistence keeps its existing writer. The necessary schema and public exports add 23 lines; the typed handler adds seven. Regenerated workboard asset references account for its bundled protocol registry.
Evidence
The baseline generator omitted both definitions. The 151-case integration and compiled TypeScript/Swift consumers pass for the unchanged protocol patch. The final head also passes type, lint, protocol, and generated-asset checks. Exact tested source identities are retained with the proof.
Hosted CI fails only on the stale Docker fixture name introduced in #148074. The exact test fails identically on the CI base and merge; this PR changes none of its inputs. All other required checks passed.
Compatibility
Unknown request fields, empty agent selection, administrator scope, semantic key checks and refresh warnings remain supported. No method, protocol version or storage change. The stable release predates this method.
Consumers
Existing Models requests remain valid; generated Swift types now describe their wire fields.
Invalidation
Credential save still precedes the existing auth refresh.
Tests
Public validation, real persistence, invalid-input nonmutation, administrator access and saved-warning results.
Refs #144420.