feat(augment): Phase 4 - enterprise-grade cascading delete and lifecycle enforcement#3225
Conversation
0654ef6 to
4fd11a1
Compare
|
This pull request adds a new top-level directory under |
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
|
4fd11a1 to
92a525c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3225 +/- ##
==========================================
+ Coverage 53.80% 53.82% +0.01%
==========================================
Files 2362 2362
Lines 84772 84815 +43
Branches 23497 23511 +14
==========================================
+ Hits 45612 45650 +38
- Misses 37638 38822 +1184
+ Partials 1522 343 -1179
*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:
|
92a525c to
902c791
Compare
902c791 to
9bbc6bb
Compare
Phase 3 of lifecycle hardening: adds 30-second polling to ReviewQueue and OpsOverview for real-time admin visibility. Key fix: only sets loading=true on the initial load, not on subsequent polls. This eliminates the skeleton flash that occurred every 30 seconds in the previous implementation (PR G). ReviewQueue: - 30s polling interval for review queue agents - initialLoadDone ref prevents loading flash on polls OpsOverview: - 30s polling interval for agent and tool data - Same loading flash fix via initialLoadDone ref
…ement
Phase 4 of lifecycle hardening: source-aware cascading delete and
lifecycle graph enforcement for publish routes.
Cascading DELETE /agents/:agentId:
- Detects agent source via unified agent list (kagenti/orchestration/workflow)
- For orchestration agents: removes from 'agents' admin config key AND
chatAgents lifecycle entry in a single operation
- For Kagenti agents: removes chatAgents entry, notes that K8s cleanup
requires the dedicated admin endpoint
- Returns detailed cleanupResults per store for transparency
- Ownership enforcement: non-admins restricted to own draft agents
Lifecycle enforcement on publish routes:
- PUT /agents/:agentId/publish: detects when admin bypasses lifecycle
stages (e.g. draft -> production), logs audit warning with
lifecycleBypassed flag, still allows the operation
- PUT /agents/bulk-publish: same bypass detection per agent, logs
warning with count of bypassed agents
OrchAgentDetailView:
- Updated handleDelete to use the cascading DELETE /agents/:agentId
endpoint instead of directly mutating admin config
- Removed unused useAdminConfig('agents') hook
9bbc6bb to
7469ed0
Compare
|



Summary
Phase 4 of the Deep-Dive Lifecycle Hardening plan. Implements enterprise-grade cascading delete and lifecycle graph enforcement. Depends on Phase 3 (PR #3224).
Cascading DELETE /agents/:agentId
The delete endpoint now detects the agent's source and cleans up all relevant stores:
agentsadmin config key +chatAgentslifecycle entrychatAgentslifecycle entry. Notes K8s cleanup requires dedicated admin endpointchatAgentslifecycle entryReturns detailed
cleanupResultsper store for full transparency. Ownership enforcement: non-admins restricted to their own draft agents.Lifecycle enforcement on publish routes
PUT /agents/:agentId/publish: detects when admin bypasses lifecycle stages (e.g., draft -> production directly), logs audit warning withlifecycleBypassedflagPUT /agents/bulk-publish: same detection per agent, logs count of bypassed agentsBoth routes still allow the operation (admin override) but provide full audit trail.
OrchAgentDetailView update
handleDeletenow calls the cascadingDELETE /agents/:agentIdAPI instead of directly mutating the admin config, ensuring consistent cleanup across all storesuseAdminConfig('agents')hookTest plan
lifecycleBypassed: true