convex/runsActions.ts¶
Purpose¶
Internal action to sync a single run to the durable Postgres store via signed webhook.
Public Surface¶
internalSyncToPg({ runId }): fetches run, signs body withRUNFORGE_SYNC_SIGN, POSTs toRUNFORGE_SYNC_URL, marks run synced on 200 OK.
Behavior & Invariants¶
- No‑op if run not found or env missing.
- HMAC SHA‑256 signature in
X-RF-Signatureheader.
Dependencies¶
- Depends on:
api.runs.getById,internal.runs.markSynced. - Used by:
runs.ingestRun,runs.ingestRunsvia scheduler.
Error Handling¶
- Ignores network errors; does not retry explicitly.
Configuration & Flags¶
RUNFORGE_SYNC_URL,RUNFORGE_SYNC_SIGNmust be set.
TODO / Technical Debt¶
- Add retry/backoff and DLQ for failures.