Repository navigation
Conversation
Fixes aws-samples#607. With release pinning on, the block library, the workflows page and the stage editor's pickers read only the mutable library, so a release's own agents can't be found or chosen in a custom stage. - workflows Lambda: GET /aidlc-releases/{releaseId}/blocks[?type=] and .../blocks/{type}/{blockId} read a registered release's digest-verified closure, read-only. Admins may read any registered release, anyone else only a selectable one, with the same 404 for hidden and unknown. - ?libraryRelease= on compiled, execution-preview and validate-grid previews the live workflow as a new pinned intent resolves it. - UI: a Contents view per release in the admin releases tab, the stable release's blocks in the block library and its workflow on the workflows page (read-only), and source-labelled release options in the stage pickers. The composer claims the release check only when both reads used the release. - Three API Gateway resources; no IAM change.
| const checkedAgainstRelease = | ||
| !!libraryRelease && | ||
| compiled?.libraryRelease === libraryRelease.releaseId && | ||
| (preview == null || preview.libraryRelease === libraryRelease.releaseId); |
There was a problem hiding this comment.
[P2] Stable check label remains after both plan previews fail
When a workflow has an active scope and both the release-backed preview and its library fallback fail, the catch sets preview to null. That satisfies this condition, so a successful compiled read still leaves “Checked against … (stable)” visible even though the plan check never completed. Intent creation still validates the plan, but the authoring feedback is misleading. I’d reserve this label for a preview carrying the stable release ID and distinguish an unavailable check from a successful library fallback. A regression case with compiled succeeding and both previews rejecting would cover this.
| const readableReleaseClosure = async (event, releaseId) => { | ||
| const record = await readableReleaseRecord(releaseId, { isAdmin: isPlatformAdmin(event) }); | ||
| const closure = await loadReleaseClosure({ | ||
| s3, | ||
| bucket: artifactsBucket(), | ||
| methodologyRelease: releasePinFromRecord(record), | ||
| ddb, | ||
| tableName: blocksTable(), |
There was a problem hiding this comment.
[P2] Allow admins to inspect unpromoted custom releases
The contents route uses the execution-oriented loadReleaseClosure for every registered release. A newly registered custom fork is non-runnable, so its custom pin triggers release_not_runnable and the admin Contents view returns 409 before promotion.
Suggested fix: Use a digest-verifying inspection path that allows an admin-authorized registered custom closure without relaxing runtime execution checks, and test listing and body reads for an import-only custom release.
Evidence: registerCustomRelease records custom forks as runnable false; releasePinFromRecord preserves custom provenance; loadReleaseClosure rejects a custom record unless runnable is true. A direct probe reconfirmed ReleaseResolverError release_not_runnable. This is distinct from the supplied composer-label discussion because it affects backend inspection of pre-promotion custom releases.
Fixes #607.
Problem
With release pinning on, a release's own blocks are invisible to the authoring UI. The block library, the workflows page and the stage editor's lead, support and reviewer pickers list only the mutable library (SYSTEM plus
default) fromGET /blocks/{type}. A release's closure lives in S3, and nothing in the UI can browse it.So when an admin promotes a release to
stable, typically a custom fork that adds its own agents, nobody can find those agents or choose them in a custom stage. The only workaround is copying each agent intodefault. But those copies then override the release's versions in every pinned intent, which defeats the point of an immutable release.Solution
Backend (workflows Lambda): its role can already read
aidlc-releases/*, so there's no IAM change.GET /aidlc-releases/{releaseId}/blocks[?type=agent,stage]lists a registered release's blocks by type, plus its workflow.GET /blocks/{type}shape, withsource: "release"and thereleaseId.loadReleaseClosure) and never the SYSTEM rows.GET /aidlc-releases/{releaseId}/blocks/{type}/{blockId}returns one block with its body and script.409(release_closure_mismatch/release_object_missing). A missing object that S3 reports asAccessDeniedis handled the same way.Access follows the same rule as
?release=: an admin may read any registered release, anyone else only a selectable one. Unknown and hidden releases get the same404, so the routes can't be used to enumerate the registry.?libraryRelease=<id>oncompiled,execution-previewandvalidate-gridchecks the live workflow the way an intent created now, pinned to that release, would resolve it:defaultlibrary overrides it where ids match;A custom stage that names a release-only agent therefore checks clean, as it will run. This is separate from
?release=, which reads a pinned intent's immutable snapshot and refuses unversioned user stages. The two can't be combined.Frontend:
?release=<id>shows another registered release instead. A library block with the same id is flagged, because it replaces the release's block in pinned intents.?release=is read from the release and is read-only.?libraryRelease=<stable>. The page says "Checked against … (stable)" only when both reads actually used the release. If the release can't be read, it says the check used the library only.Terraform: three API Gateway resources, their CORS modules, and their entries in the redeployment trigger.
Docs: a "Release contents in the authoring UI" section in
docs/concepts/aidlc-release-compatibility.md, and a note indocs/using-the-platform/workflows.md.Testing
Backend:
lambda/workflows/test/aidlc-release-contents.test.js, 23 tests, covering:404gate;AccessDenied;libraryReleaseresolving a release-only agent, library-over-release precedence, SYSTEM placements read from the closure, and refusal when combined withrelease.The workflows and release resolver/registry suites pass, 372 tests.
Frontend: new tests for the releases service (paths, caching, invalidation on a closure upgrade, the stable catalog), picker merging, the contents dialog, the library and editor in release mode (including a stale-type race), picker source labels, the admin Contents button, and the composer's label and fallback. The related suites pass, 228 tests.
Checks:
npm run lintandnpm run format:checkpass at the root and infrontend/, with no findings in changed files.tscpasses.terraform fmt -check,terraform validate -no-testsandterraform test(27 passed) pass.Live: we have run this as an overlay on our deployment, with a custom fork release on
stable.Impact
?release=and the unpinned preview are unchanged.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.