aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
enhancement(registry): tighten adapter types, comments, and lifecycle coverage
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 46
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 20
Description
## Context
Consolidated non-blocking clarity and coverage follow-ups from the final review of PR #779.
## Comment and documentation corrections
- Distinguish MCP `_meta` storage from SKILL `x-abca-runtime` frontmatter in the adapter header.
- Correct the claim that duplicate YAML keys are parser errors under `js-yaml` with `{ json: true }`; the emitter prevents key injection by quoting/escaping caller-controlled values.
- Include SKILL in the `resolve` path commentary.
- Clarify that `waitPastCreating` waits only until the record leaves `CREATING`, not until a terminal lifecycle state.
- Clarify that `autoApprove` gates only the final approval call; create and submit always occur.
## Type cleanup
- Evaluate a discriminated representation linking registry `kind` to its payload variant instead of a broad `kind: string` shape.
- Simplify `DeleteAttempt` to the states its consumers need, or document why all current states are valuable.
Keep any public `RegistryClient` port change separately reviewable and compatible with the architecture boundary.
## Coverage gap
Add a delete-lifecycle test proving `isComplete` rethrows a non-retryable, non-404 `GetRegistry` failure rather than treating it as absent or retryable.
## References
- PR #779
- `cdk/src/handlers/shared/registry/agent-registry-client.ts`
- `cdk/src/handlers/registry-provisioning/index.ts`
Contributor guide
Research direction
Read cdk/src/handlers/shared/registry/agent-registry-client.ts and cdk/src/handlers/registry-provisioning/index.ts, using PR #779 as context. Trace the delete lifecycle and the RegistryClient boundary before evaluating the type changes. Done means the comments are accurate, the adapter types reflect their consumers, and coverage proves non-retryable non-404 GetRegistry failures are rethrown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100