fix(agents): correct auth scheme, stale paths, and phantom COMPLETED status#433
fix(agents): correct auth scheme, stale paths, and phantom COMPLETED status#433
Conversation
…status
- Add AgentAuth to global security array so Stainless includes it as a
supported client auth scheme (was causing the Stainless merge step to fail,
which prevented the documented spec from being published)
- Update three agent endpoint descriptions that still referenced the old
/transactions/{transactionId}/approve path instead of
/actions/{actionId}/approve
- Remove nonexistent COMPLETED terminal state from approvals-and-audit.mdx;
APPROVED is the terminal success state in AgentActionStatus
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript
|
Greptile SummaryThis PR fixes three documentation/spec correctness issues introduced when agent endpoints shipped in #430: the missing
Confidence Score: 3/5Safe to merge after confirming whether FAILED is a valid AgentActionStatus value; if not, it should be removed alongside COMPLETED. A P1 finding exists: FAILED is referenced as a terminal AgentActionStatus in the docs but is absent from the schema enum, the same pattern as the COMPLETED phantom status this PR fixes. The other changes (auth scheme, path corrections) are correct and straightforward. mintlify/global-accounts/agents/approvals-and-audit.mdx — FAILED status on lines 42–43 and 52 needs verification against AgentActionStatus.yaml
|
| Filename | Overview |
|---|---|
| mintlify/global-accounts/agents/approvals-and-audit.mdx | Removes phantom COMPLETED state from step 8, but FAILED is still referenced (lines 42–43, 52) and is absent from AgentActionStatus.yaml enum — possible second phantom status. |
| openapi/openapi.yaml | Adds AgentAuth to global security array; AgentAuth scheme is already defined in securitySchemes — correct fix to unblock Stainless merge. |
| openapi/paths/agents/agents_me_quotes_{quoteId}_execute.yaml | Updates stale approval path from transactions/{transactionId}/approve to actions/{actionId}/approve — correct. |
| openapi/paths/agents/agents_me_transfer-in.yaml | Updates stale approval path from transactions/{transactionId}/approve to actions/{actionId}/approve — correct. |
| openapi/paths/agents/agents_me_transfer-out.yaml | Updates stale approval path from transactions/{transactionId}/approve to actions/{actionId}/approve — correct. |
Sequence Diagram
sequenceDiagram
participant Agent
participant Grid
participant Platform Backend
participant Customer App
Agent->>Grid: POST /agents/me/quotes/{quoteId}/execute (or transfer-in/out)
alt Policy requires approval
Grid-->>Agent: AgentAction {status: PENDING_APPROVAL}
Grid->>Platform Backend: Webhook AGENT_ACTION.PENDING_APPROVAL
Platform Backend->>Customer App: Push notification
Customer App->>Platform Backend: Customer approves/rejects
Platform Backend->>Grid: POST /agents/{agentId}/actions/{actionId}/approve (or /reject)
Grid-->>Platform Backend: AgentAction {status: APPROVED | REJECTED}
else Auto-execution allowed
Grid-->>Agent: AgentAction {status: APPROVED, transaction: {...}}
end
Comments Outside Diff (1)
-
mintlify/global-accounts/agents/approvals-and-audit.mdx, line 52 (link)Possible phantom
FAILEDstatus inAgentActionStatusThis PR removes
COMPLETEDas a phantom status, butFAILEDis also referenced on lines 42–43 (Warning block) and line 52 (statusfield description) — yetAgentActionStatus.yamlonly enumeratesPENDING_APPROVAL,APPROVED, andREJECTED. IfFAILEDis not a realAgentActionStatusvalue, integrators polling for it will wait forever, the same issue that motivated removingCOMPLETED.Prompt To Fix With AI
This is a comment left during a code review. Path: mintlify/global-accounts/agents/approvals-and-audit.mdx Line: 52 Comment: **Possible phantom `FAILED` status in `AgentActionStatus`** This PR removes `COMPLETED` as a phantom status, but `FAILED` is also referenced on lines 42–43 (Warning block) and line 52 (`status` field description) — yet `AgentActionStatus.yaml` only enumerates `PENDING_APPROVAL`, `APPROVED`, and `REJECTED`. If `FAILED` is not a real `AgentActionStatus` value, integrators polling for it will wait forever, the same issue that motivated removing `COMPLETED`. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
mintlify/global-accounts/agents/approvals-and-audit.mdx:52
**Possible phantom `FAILED` status in `AgentActionStatus`**
This PR removes `COMPLETED` as a phantom status, but `FAILED` is also referenced on lines 42–43 (Warning block) and line 52 (`status` field description) — yet `AgentActionStatus.yaml` only enumerates `PENDING_APPROVAL`, `APPROVED`, and `REJECTED`. If `FAILED` is not a real `AgentActionStatus` value, integrators polling for it will wait forever, the same issue that motivated removing `COMPLETED`.
Reviews (1): Last reviewed commit: "fix(agents): correct auth scheme, stale ..." | Re-trigger Greptile
Summary
AgentAuthto the globalsecurityarray inopenapi/openapi.yaml. Per Stainless docs, the top-level security array determines which schemes the SDK client supports — without it, the Stainlessmergestep was failing, which is why the published docs at grid.lightspark.com never reflected the agents endpoints after feat(agents): add Agents (experimental) to Grid API spec #430 merged.POST /agents/{agentId}/transactions/{transactionId}/approvepath. Updated toPOST /agents/{agentId}/actions/{actionId}/approve.approvals-and-audit.mdxstep 8 documented aCOMPLETEDterminal state that does not exist inAgentActionStatus.APPROVEDis the terminal success state. Removed to prevent integrators from polling for a state that never arrives.Test plan
mergecheck passes (unblocks published docs update)