Description — what to implement and the why/impact.
Autonomous agents performing financial transactions and state mutations via the SDK need protection against duplicate submissions caused by network retries or client crashes. This issue adds automatic idempotency key generation and header injection for mutating HTTP methods (POST, PUT, PATCH, DELETE) in @astroid/client.
Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).
Mutating requests should automatically include an Idempotency-Key header using UUID v4 generation if one is not explicitly provided by the caller. The client should also allow callers to override or supply custom idempotency keys via request options.
Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.
Examine packages/client/src/ to locate request building logic. Integrate standard crypto.randomUUID() or a lightweight generator compliant with Node 20+ runtime requirements.
Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).
Run pnpm test --filter @astroid/client and verify test coverage for request headers.
Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium
Description — what to implement and the why/impact.
Autonomous agents performing financial transactions and state mutations via the SDK need protection against duplicate submissions caused by network retries or client crashes. This issue adds automatic idempotency key generation and header injection for mutating HTTP methods (POST, PUT, PATCH, DELETE) in
@astroid/client.Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).
Mutating requests should automatically include an
Idempotency-Keyheader using UUID v4 generation if one is not explicitly provided by the caller. The client should also allow callers to override or supply custom idempotency keys via request options.Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".
Idempotency-Keyheader to POST, PUT, PATCH, and DELETE requests.Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.
Examine
packages/client/src/to locate request building logic. Integrate standardcrypto.randomUUID()or a lightweight generator compliant with Node 20+ runtime requirements.Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).
Run
pnpm test --filter @astroid/clientand verify test coverage for request headers.Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.
Wave complexity: Medium