Skip to content

fix(registry): align publish Lambda timeout with record creation polling budget #782

Open

Description

@ayushtr-aws

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

Activity

  1. added
    bugSomething isn't working
    infra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardown
    registryAgent asset registry: capabilities, skills, plugins, MCP servers, blueprints
    on Aug 25, 2026
  2. krokoko commented on Nov 20, 2026

    @krokoko
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginfra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownregistryAgent asset registry: capabilities, skills, plugins, MCP servers, blueprintsv1Version 1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions