Skip to content

Owners cannot obtain an authoritative compliance run: human refresh fenced with no ETA, and requeue cannot reach agents with a recent last_checked_at (heartbeat orders by last_checked_at ASC) #7632

Description

@idemidenko

Summary

Since the 2026-09-17 auth sweep (#7452, provenance follow-up #7457) an agent owner has no way to obtain an authoritative compliance run:

  1. POST /api/registry/agents/{url}/refresh returns 503 refresh_authorization_provenance_required for every non-static-admin caller. The code comment says this is deliberate and has no environment switch, but there is no tracking issue and no ETA for restoring human refresh.
  2. The alternative the fence notice points to, "Requeue comply" (/monitoring/requeue), cannot help an agent that is already due: requeueForHeartbeat only sets next_compliance_check_at = NULL, and the heartbeat batch is ordered by last_checked_at ASC NULLS FIRST LIMIT 10. An owner who used "Recheck & retest" while it still worked has a recent last_checked_at and is therefore sorted behind every agent checked earlier.

Net effect for https://sales-agent.elementaltv.io/mcp (org org_01KESCR4BWMJSFEHHG00B78GN4, media-buy 3.1 badge): we ship compliance fixes (e.g. #7406's canonical_format_validate_input, deploying today) and cannot get them graded.

Evidence

Heartbeat is running for other agents but has not reached ours since the sweep (from /compliance/history, 2026-09-21):

agent last heartbeat run last run of any kind
sales-agent.elementaltv.io/mcp 2026-09-14T03:17Z 2026-09-17T08:09Z (owner_test)
adcp.advendio.com/mcp/demo 2026-09-18T00:11Z same
sales-agent.addiscovery.ai/mcp 2026-09-15T07:03Z same

Our check_interval_hours is 6, compliance_opt_out false, lifecycle_stage production; 35 of our last 50 runs were heartbeats, so the agent was in rotation until the week of the sweep.

Selection query (compliance-db.ts getAgentsDueForCheck):

WHEREAND (m.next_compliance_check_at IS NULL OR m.next_compliance_check_at < NOW())
ORDER BY last_checked_at ASC NULLS FIRST, agent_url ASC
LIMIT $1   -- 10 per tick (compliance-heartbeat.ts)

requeueForHeartbeat (compliance-db.ts) writes only next_compliance_check_at = NULL, which does not change the ORDER BY position.

Owner controls today: "Recheck & retest" → 503; "Requeue comply" → 200 but no effect on ordering (and the button itself only renders on a hydrated card, see #7630); per-storyboard /storyboard/{id}/run works but is recorded is_authoritative: false, so it cannot update the aggregate status or badge.

Asks

  1. A tracking issue (or a note here) for restoring human-initiated refresh, with a rough ETA, so owners know whether to wait or route around it.
  2. An interim path to an authoritative run while the fence is up: either an admin-triggered run on request through a documented channel, or a heartbeat priority for explicitly requeued agents.
  3. Make requeue actually move the agent forward: e.g. requeueForHeartbeat also sets a requeued_at that the batch orders by first (ORDER BY requeued_at ASC NULLS LAST, last_checked_at ASC NULLS FIRST), or clears last_checked_at for ordering purposes. Otherwise the fence notice recommends an action that cannot reach the agents it is shown to.

Related: #7578, #7630, #7452, #7457.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-toolInternal tools for AAO staffbugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.compliance-suitepriority:P0Immediate priority: user/revenue/security/reliability bug to work nowseverity:critical

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions