aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
fix(registry): align publish Lambda timeout with record creation polling budget
- Lingua principale
- TypeScript
- Stelle
- 143
- Fork
- 46
- Merge medio
- 3g 10h
- PR unite (30g)
- 24
Descrizione
## Context
Follow-up from the final review of PR #779. This behavior predates the standalone Agent Registry migration.
## Problem
The registry publish Lambda has a 15-second timeout, while `waitPastCreating` can poll up to 30 times with a 2-second interval, for a nominal 60-second polling budget before SDK-call overhead.
A slow `CreateRegistryRecord` transition can therefore terminate the Lambda before the handler reaches its typed incomplete-publish error path, potentially leaving a DRAFT record that blocks a clean retry through the immutability check.
## Desired outcome
Make the execution budget internally consistent by either:
- Increasing the Lambda timeout to cover the full polling budget plus SDK and cleanup overhead, or
- Redesigning record creation waiting so it does not synchronously occupy the publish Lambda for the full transition.
Preserve actionable reporting for partially created records.
## Acceptance criteria
- The configured execution timeout safely exceeds the maximum synchronous polling duration, or synchronous polling is removed.
- Slow creation cannot terminate before the handler reports the partial record identifier and remediation guidance.
- Tests lock the timeout/poll-budget relationship or exercise the redesigned asynchronous path.
- Normal publish, submit, and optional approval behavior remains unchanged.
## References
- PR #779
- `cdk/src/handlers/shared/registry/agent-registry-client.ts`
- Registry publish Lambda definition in the CDK construct/stack
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da cdk/src/handlers/shared/registry/agent-registry-client.ts e dalla definizione della Lambda di pubblicazione del registro nel construct o nello stack CDK. Confronta il budget di 30 polling e 2 secondi di waitPastCreating con il timeout configurato della Lambda, quindi esamina PR #779 per il contesto. Il lavoro è completato quando una creazione lenta non può terminare prima della segnalazione dei record parziali, la relazione è coperta dai test e il comportamento normale di pubblicazione, invio e approvazione rimane invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, typescript
- Ambito
- backend, cloud
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100