Skip to content

feat(augment): agent registry governance registration (Phase 0)#3228

Open
rrbanda wants to merge 4 commits into
redhat-developer:mainfrom
rrbanda:pr/agent-registry-governance-phase0
Open

feat(augment): agent registry governance registration (Phase 0)#3228
rrbanda wants to merge 4 commits into
redhat-developer:mainfrom
rrbanda:pr/agent-registry-governance-phase0

Conversation

@rrbanda
Copy link
Copy Markdown
Contributor

@rrbanda rrbanda commented May 21, 2026

Summary

  • Adds governanceRegistered on unified agent listings so runtime-only agents (Kagenti/orchestration without a chatAgents row) are distinguishable from governed agents.
  • Introduces PUT /agents/:id/register for admins to enroll runtime agents into governance at draft.
  • Enforces valid lifecycle transitions on publish, unpublish, and bulk-publish (no bypass from draft → production).
  • Updates Agent Registry UI: unregistered warning, filter, per-row Register button, and bulk actions that skip unregistered agents.

Test plan

  • yarn test --testPathPattern=agentRoutes.test (44 tests)
  • yarn test augment-backend (1997 passed)
  • yarn test augment frontend (1234 passed)
  • yarn lint augment-backend + augment frontend
  • Manual: Command Center → Agents → Registry — verify unregistered agents show Register; promote only after register
  • Manual: bulk Promote to Production fails for draft/unregistered agents with clear error

Notes

  • Workflow SonataFlow glue (AgentApprovalWorkflowService) and cluster security changes are out of scope for this PR and remain local/uncommitted.
  • One flaky adminRoutes SSRF test (ECONNRESET) observed intermittently in full backend runs; passes on retry and is unrelated to these changes.

…fecycle

Add governanceRegistered on unified agents, register-for-governance API,
and strict publish/unpublish transitions. Registry UI surfaces unregistered
runtime agents with a Register action before lifecycle promotion.
@rrbanda rrbanda requested review from a team and pkliczewski as code owners May 21, 2026 20:45
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 21, 2026

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-augment-backend workspaces/augment/plugins/augment-backend minor v0.1.0
@red-hat-developer-hub/backstage-plugin-augment-common workspaces/augment/plugins/augment-common minor v0.1.0
@red-hat-developer-hub/backstage-plugin-augment workspaces/augment/plugins/augment minor v0.1.0

…nd changeset

- Regenerate report.api.md for augment and augment-common (fixes CI node 22/24)
- Add augment-specific CPD exclusions to .sonarcloud.properties (fixes 5.6% > 3% threshold)
- Add changeset for agent-registry-governance PR
@rrbanda rrbanda requested review from a team as code owners May 24, 2026 22:46
- A1/A5: Add X-Backstage-Request header to fetchJson, fetchJsonSafe,
  chatEndpoints streaming fetch, and fetchHelpers jsonBody
- A2: Add null coalescing for initialNodes/initialEdges in EditorCanvas
- A3: Add null guards for workflow/name/nodes/edges in PublishDialog
- A4: Fix My Agents filter to include governance-registered and BYO agents
- A6: Add delete button on draft agent cards in CompactAgentCard/AgentGrid,
  wire handleDeleteAgent in MarketplacePage
@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

❌ Patch coverage is 46.15385% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.80%. Comparing base (fb32b28) to head (3e8047a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3228      +/-   ##
==========================================
- Coverage   53.82%   53.80%   -0.02%     
==========================================
  Files        2362     2362              
  Lines       84815    84882      +67     
  Branches    23508    23535      +27     
==========================================
+ Hits        45650    45670      +20     
- Misses      37714    37759      +45     
- Partials     1451     1453       +2     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from fb32b28
ai-integrations 70.03% <ø> (ø) Carriedforward from fb32b28
app-defaults 69.60% <ø> (ø) Carriedforward from fb32b28
augment 47.59% <46.15%> (-0.04%) ⬇️
bulk-import 72.86% <ø> (ø) Carriedforward from fb32b28
cost-management 16.49% <ø> (ø) Carriedforward from fb32b28
dcm 32.85% <ø> (ø) Carriedforward from fb32b28
extensions 61.79% <ø> (ø) Carriedforward from fb32b28
global-floating-action-button 74.30% <ø> (ø) Carriedforward from fb32b28
global-header 61.68% <ø> (ø) Carriedforward from fb32b28
homepage 50.99% <ø> (ø) Carriedforward from fb32b28
konflux 91.01% <ø> (ø) Carriedforward from fb32b28
lightspeed 68.33% <ø> (ø) Carriedforward from fb32b28
mcp-integrations 81.59% <ø> (ø) Carriedforward from fb32b28
orchestrator 36.36% <ø> (ø) Carriedforward from fb32b28
quickstart 62.88% <ø> (ø) Carriedforward from fb32b28
sandbox 79.49% <ø> (ø) Carriedforward from fb32b28
scorecard 83.84% <ø> (ø) Carriedforward from fb32b28
theme 64.54% <ø> (ø) Carriedforward from fb32b28
translations 8.49% <ø> (ø) Carriedforward from fb32b28
x2a 78.59% <ø> (ø) Carriedforward from fb32b28

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb32b28...3e8047a. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ality gate

Extract applyLifecycleTransition helper to deduplicate promote, demote,
publish, and unpublish handlers. Removes ~75 lines of repeated config-update,
audit-log, and save logic. Reverts .sonarcloud.properties CPD exclusion hack.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
6.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants