You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(registry): align publish Lambda timeout with record creation polling budget #782
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.
Triage: what this issue asks for is on main; a small leftover is noted at the end.
Resolved by #1052 (commit bf52b90). The publish function now has 28 seconds (REGISTRY_PUBLISH_TIMEOUT_SECONDS in cdk/src/constructs/registry-api.ts, one below API Gateway's 29) and the wait for a new record to leave CREATING is 10 polls of 2 seconds (RECORD_CREATE_MAX_POLLS in cdk/src/handlers/shared/registry/agent-registry-client.ts), so a record that stays in CREATING ends after about 20 seconds in the 502 REGISTRY_PUBLISH_INCOMPLETE, which carries the record id and says to approve or delete the record before retrying. Two tests pin the two sides: cdk/test/constructs/registry-api.test.ts (28 s for publish, 15 s for the three read functions) and cdk/test/handlers/shared/agent-registry-client.test.ts (a record that never leaves CREATING ends in RegistryPublishIncompleteError within 25 s). The create, submit and optional approve sequence is unchanged. Left over, and not tracked in an issue: no test covers the handler branch that turns that error into the 502 (cdk/src/handlers/registry-publish.ts, lines 110 to 118).
Posted from an automated sweep of the open issues. Each pull request, commit and file named above was checked against main at 3dbfada1. The issue is left open for a maintainer to close.
Activity
krokoko commentedon Nov 20, 2026
Triage: what this issue asks for is on
main; a small leftover is noted at the end.Resolved by #1052 (commit bf52b90). The publish function now has 28 seconds (
REGISTRY_PUBLISH_TIMEOUT_SECONDSincdk/src/constructs/registry-api.ts, one below API Gateway's 29) and the wait for a new record to leave CREATING is 10 polls of 2 seconds (RECORD_CREATE_MAX_POLLSincdk/src/handlers/shared/registry/agent-registry-client.ts), so a record that stays in CREATING ends after about 20 seconds in the 502REGISTRY_PUBLISH_INCOMPLETE, which carries the record id and says to approve or delete the record before retrying. Two tests pin the two sides:cdk/test/constructs/registry-api.test.ts(28 s for publish, 15 s for the three read functions) andcdk/test/handlers/shared/agent-registry-client.test.ts(a record that never leaves CREATING ends inRegistryPublishIncompleteErrorwithin 25 s). The create, submit and optional approve sequence is unchanged. Left over, and not tracked in an issue: no test covers the handler branch that turns that error into the 502 (cdk/src/handlers/registry-publish.ts, lines 110 to 118).Posted from an automated sweep of the open issues. Each pull request, commit and file named above was checked against
mainat3dbfada1. The issue is left open for a maintainer to close.