Skip to content

fix: QA authorization issues — revoke idempotency, health checks, UI bugs#301

Merged
AbirAbbas merged 2 commits intomainfrom
fix/qa-authorization-issues
Mar 23, 2026
Merged

fix: QA authorization issues — revoke idempotency, health checks, UI bugs#301
AbirAbbas merged 2 commits intomainfrom
fix/qa-authorization-issues

Conversation

@AbirAbbas
Copy link
Contributor

Summary

Fixes four QA-reported issues on the control plane Authorization page and API:

  • Revoke-tags idempotency: Revoking an already-revoked agent now returns 409 Conflict with {"error": "already_revoked"} instead of silently returning 200 success
  • Reasoner/Skill health check: ExecuteReasonerHandler and ExecuteSkillHandler now verify agent health status before forwarding requests, returning 503 Service Unavailable when the agent is unhealthy or offline (matching the pattern in the newer ExecuteHandler)
  • Zero-value timestamps: formatRelativeTime() now returns "—" for invalid or pre-1970 dates instead of displaying "Jan 1, 1" (Go's time.Time zero value)
  • Refresh button: The Authorization page Refresh button now re-fetches both Access Policies and Agent Tags data (previously only refreshed policies)

Test plan

  • Go build passes (go build ./...)
  • TypeScript compiles (tsc --noEmit)
  • All handler and service tests pass
  • Updated existing tests to set HealthStatus/LifecycleStatus on test agents
  • Manual: Revoke agent tags twice — second call should return 409
  • Manual: Call reasoner on offline agent — should return 503
  • Manual: Verify "Jan 1, 1" no longer appears on Authorization page
  • Manual: Click Refresh button on Agent Tags tab — data should update without F5

🤖 Generated with Claude Code

…bugs

- Return 409 Conflict when revoking already-revoked agent tags instead of
  silently succeeding
- Add health status and lifecycle checks to reasoner/skill execution handlers,
  returning 503 when agent node is unhealthy or offline
- Handle zero-value timestamps in formatRelativeTime (display "—" instead of
  "Jan 1, 1")
- Wire Refresh button on Authorization page to also re-fetch Agent Tags tab data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AbirAbbas AbirAbbas requested a review from a team as a code owner March 23, 2026 17:19
Newly registered agents get HealthStatusUnknown (no heartbeat yet).
The previous check required HealthStatusActive, which caused all
functional tests to 503 because agents register and immediately
invoke reasoners before a heartbeat can promote them to active.

Changed the guard to only block HealthStatusInactive agents, which
are definitively unreachable. Unknown and active agents pass through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AbirAbbas AbirAbbas enabled auto-merge March 23, 2026 18:09
@AbirAbbas AbirAbbas disabled auto-merge March 23, 2026 18:13
@AbirAbbas AbirAbbas merged commit 4318c57 into main Mar 23, 2026
17 checks passed
@AbirAbbas AbirAbbas deleted the fix/qa-authorization-issues branch March 23, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant