fix(augment): enforce lifecycle validation on publish/unpublish routes#3207
Closed
rrbanda wants to merge 1 commit into
Closed
fix(augment): enforce lifecycle validation on publish/unpublish routes#3207rrbanda wants to merge 1 commit into
rrbanda wants to merge 1 commit into
Conversation
The publish, unpublish, and bulk-publish endpoints previously allowed jumping from any lifecycle stage directly to production or staging, bypassing the isValidTransition guard. This could lead to agents skipping required review and staging phases. Changes: - PUT /agents/:id/publish now validates staging → production transition - PUT /agents/:id/unpublish now validates production → staging transition - PUT /agents/bulk-publish now validates each agent's transition and reports skipped agents that fail validation - All routes now include from/to stages in audit log entries
9 tasks
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3207 +/- ##
==========================================
- Coverage 53.41% 53.40% -0.01%
==========================================
Files 2373 2373
Lines 84895 84910 +15
Branches 23568 23571 +3
==========================================
Hits 45349 45349
- Misses 39200 39215 +15
Partials 346 346
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
PUT /agents/:id/publishnow enforcesstaging → productiontransition viaisValidTransitionPUT /agents/:id/unpublishnow enforcesproduction → stagingtransitionPUT /agents/bulk-publishvalidates each agent individually and reports skipped agents that fail validationfrom/tostages in audit log entriesPreviously, these shortcuts allowed jumping from any lifecycle stage directly to production, bypassing required review and staging phases.
Part of the Agent Lifecycle Governance Epic.
Test plan