Repository navigation
Description
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:
POST /api/registry/agents/{url}/refreshreturns 503refresh_authorization_provenance_requiredfor 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.- The alternative the fence notice points to, "Requeue comply" (
/monitoring/requeue), cannot help an agent that is already due:requeueForHeartbeatonly setsnext_compliance_check_at = NULL, and the heartbeat batch is ordered bylast_checked_at ASC NULLS FIRST LIMIT 10. An owner who used "Recheck & retest" while it still worked has a recentlast_checked_atand 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):
WHERE … AND (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
- 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.
- 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.
- Make requeue actually move the agent forward: e.g.
requeueForHeartbeatalso sets arequeued_atthat the batch orders by first (ORDER BY requeued_at ASC NULLS LAST, last_checked_at ASC NULLS FIRST), or clearslast_checked_atfor ordering purposes. Otherwise the fence notice recommends an action that cannot reach the agents it is shown to.
Activity
bokelley commentedon Sep 21, 2026
Thanks for filing!
Triage
Classification: Bug (bugs 1 & 2 confirmed; bug 3 hypothesis retracted — 2026-09-22)
Bucket(s): compliance-suite, admin-tool
Status: deferred — draft PR #7648 open for bugs 1 & 2
Milestone: P0 Bugs
What the experts said:
requeueForHeartbeat(compliance-db.ts:1557) sets onlynext_compliance_check_at = NULL;getAgentsDueForCheckorders bylast_checked_at ASC NULLS FIRST, so requeued agents with a recent last-check sort to the back. This contradicts the documented intent at lines 1393–1394. Recommendsrequeued_at TIMESTAMPTZ NULLcolumn withORDER BY requeued_at ASC NULLS LAST, last_checked_at ASC NULLS FIRST. The 503 fence (registry-api.ts:643) is intentional (post-fix(auth): authorize web admins by authenticated credential #7452 security posture, tracked in fix(auth): preserve queued refresh credential provenance #7457) but lacks a tracking reference in the response body.POST /api/registry/agents/{url}/refreshwithADMIN_API_KEYsucceeds today with no code changes. This is the immediate interim unblock for ask Remove targeting_template and add pluggable product catalog system #2 while the fence is up. Argues P1 rather than P0 given the admin bypass exists; keeping P0 for consistency with companion issues Dashboard card still stuck on 'not yet checked' after #7594: /compliance takes 22–30 s for an 84-storyboard agent, client aborts at 15 s #7630/Dashboard: verified agent card stuck on 'not yet checked'; Recheck 503 for all owners since #7452; storyboard picker 404s without compliance_target #7578 in the same cluster and milestone.My take: Immediate unblock: request an admin-triggered refresh via a documented channel (no code needed — static admin key path is live). Permanent fix is the
requeued_atcolumn — draft PR #7648 open. Dependency: #7630 must also land so the Requeue button is reachable before the ordering fix helps anyone.Implementation scope (covered by #7648):
registry-api.ts:HUMAN_REFRESH_AVAILABILITY— addtracking_issue: 7457(ordocs_url) so the 503 body carries a reference owners can followALTER TABLE agent_registry_metadata ADD COLUMN requeued_at TIMESTAMPTZ NULL— no backfillcompliance-db.ts:requeueForHeartbeat— also writerequeued_at = NOW()compliance-db.ts:getAgentsDueForCheck—ORDER BY requeued_at ASC NULLS LAST, last_checked_at ASC NULLS FIRST, agent_url ASCrequeued_atinrecordComplianceRun/compliance-heartbeat.tson successful authoritative pickup— retracted 2026-09-22:getAuthInfoByOrgAndUrlORDER BY fixagent_contextshas hadUNIQUE (organization_id, agent_url)since migration 109; migration 525 collapsed URL variants;rows[0]cannot flip between duplicate rows. The 02:30Z–07:57Z bearer change on 2026-09-21 still needs a separate explanation and is not addressed by fix(registry): serve explicit heartbeat requeues first and reference the refresh fence tracking issue #7648.Sibling-repo-fix-needed (adcp-client, surfaced 2026-09-24):
The 2026-09-24 comment reports a successful local run (242 passed / 0 failed with bundle 3.1.24 grafted from
protocol/3.1.24.tgz), but surfaces three blockers for moving hosted grading onto the stable SDK line. These are adcp-client bugs and require separate issues there:@adcp/sdk@13.1.1bundles 3.1.20, not 3.1.24 —compliance/cache/3.1.24is absent; hosted grading must graft the bundle externally or a 13.1.x release must include it. File inadcontextprotocol/adcp-client.compliance_testing.scenariosenum —schemas-data/3.0and3.1.0-beta.7have a closed enum; the3.1set is open, but the probe appears to negotiate against the pre-3.1 schema first, emittingcapabilities-probe-failedand skipping domain bundles unless--compliance-versionis given explicitly. This is the Fix for #6725 (compliance_testing.scenarios closed-enum check) ships only on adcp-client 14.x, but graded compliance cache 3.1.20 ships only on 13.x — no release carries both #7368 symptom surviving on the stable line. File inadcontextprotocol/adcp-client.max(120, 10 × n)scaled-budget rule is needed (or a backport) for full assessments on large agent surfaces. File inadcontextprotocol/adcp-client.The admin-triggered refresh ask (org
org_01KESCR4BWMJSFEHHG00B78GN4) remains pending for a maintainer with the static admin key. Once #7648 lands and the above SDK issues are addressed, hosted grading should be able to produce an authoritative 3.1.24 run without grafting.Triaged by Claude Code. Session: https://claude.ai/code/session_01MVcnutrTNFh6JMxzcnMnV2 · Updated: https://claude.ai/code/session_01Q7v9tG2vLhoLK7kSqhWnw2
idemidenko commentedon Sep 21, 2026
Taking the triage's immediate unblock literally, since no request channel exists yet: could someone with the static admin key run
POST /api/registry/agents/https%3A%2F%2Fsales-agent.elementaltv.io%2Fmcp/refresh(orgorg_01KESCR4BWMJSFEHHG00B78GN4)?The build we want graded is live as of 2026-09-21 ~11:00Z: anonymous
tools/listnow returns 15 tools includingvalidate_input(previously 14), socanonical_format_validate_inputcan be exercised for the first time on the hosted runner. Our last authoritative run is still 2026-09-17T08:09Z.Happy to use whatever channel you designate for this going forward.
idemidenko commentedon Sep 21, 2026
Update, and one more finding for the same cluster.
Owner storyboard runs work again after re-saving the bearer; the saved credential silently changed on the registry side. Timeline from
/monitoring/requestsforhttps://sales-agent.elementaltv.io/mcp(orgorg_01KESCR4BWMJSFEHHG00B78GN4):health_check/discoverycall succeeded through 2026-09-21T02:30:19ZMCP error 0: [AUTH_401] [unknown-bearer-token] Unknown bearer token.auth-statusreportedhas_auth: true, auth_type: bearerthroughout;POST /storyboard/{id}/runreturned 422needs_oauth(the SDK'sauth_requiredpath)Nothing changed on the agent side in that window: no deploy or pod restart until 10:45Z, no writes to the principal store, and the token registered in the dashboard still hashes to the agent's sandbox principal (verified against the agent's own DB; an authenticated call with it succeeds). Re-entering the same bearer through the connect form at ~11:20Z fixed it immediately:
canonical_format_validate_inputthen ran and gradedpassing 16/16(run960c9ecd-4c32-4106-b103-05f1676df3d3,is_authoritative: false).So between 02:30Z and 07:57Z the registry started presenting a different bearer for this agent.
getAuthInfoByOrgAndUrlselectsFROM agent_contexts WHERE organization_id = $1 AND agent_url = $2and takesrows[0]with no ordering; if more than one row exists for that pair, a change in physical row order (e.g. the migration in #7457 or #7622's deploy) would flip which token is sent. Worth checking how manyagent_contextsrows that pair has on production.The admin-triggered authoritative refresh requested above is still the ask: the owner run is non-authoritative and does not update the storyboard status rows, aggregate, or badge.
idemidenko commentedon Sep 22, 2026
Opened #7648 (draft) for the permanent fix from the triage:
requeued_atcolumn,requeueForHeartbeatsets it,getAgentsDueForCheckorders by it first, cleared when an authoritative run is published; plustracking_issue(#7457) on the 503 body,refresh_availability, OpenAPI, and the dashboard notice. New integration case covers the ordering flip and the reset.One correction to bug 3 in the triage:
agent_contextshas hadUNIQUE (organization_id, agent_url)since migration 109, and migration 525 collapsed URL variants, sorows[0]ingetAuthInfoByOrgAndUrlcannot flip between duplicate rows. I left that change out of #7648; the bearer change between 02:30Z and 07:57Z on 2026-09-21 still needs another explanation.The interim ask stands: could someone with the static admin key run
POST /api/registry/agents/https%3A%2F%2Fsales-agent.elementaltv.io%2Fmcp/refresh(orgorg_01KESCR4BWMJSFEHHG00B78GN4)? Last authoritative run is still 2026-09-17T08:09Z.idemidenko commentedon Sep 24, 2026
Regrade request now that 3.1.24 and
@adcp/sdk@13.1.1are published.I ran a local full assessment against prod (
https://sales-agent.elementaltv.io/mcp, build24ebc9a) with@adcp/sdk@13.1.1and bundle 3.1.24. The bundle was grafted fromprotocol/3.1.24.tgz, sha256f9e451ab…25eb4c3.missing_tool(sync_creatives) through the fix(compliance): backport provenance requires_tool gates to 3.1.x #7646 gates instead of failing, as intended by Provenance storyboards: add requires_tool: sync_creatives to the sync_creatives steps so sellers without a creative library are not graded partial on hosted 3.1 #7586.security_baselinepasses with the protocol-awareprobe_taskfrom fix(compliance): backport ungoverned sales baselines #7665.The ask is unchanged: could someone with the admin key run
POST /api/registry/agents/https%3A%2F%2Fsales-agent.elementaltv.io%2Fmcp/refresh(orgorg_01KESCR4BWMJSFEHHG00B78GN4) once hosted grading uses 3.1.24? Our last authoritative run is 2026-09-17T08:09Z, on 3.1.20 with14.0.0-rc.35.Three things I hit that matter for moving hosted grading onto the stable line:
@adcp/sdk@13.1.1does not shipcompliance/cache/3.1.24. It ships 3.1.20. Hosted grading has to graft the bundle, or a 13.1.x release has to include it.compliance_testing.scenariosagainst the closed pre-3.1 enum. It reportsmust be one of: "force_creative_status", …, "simulate_budget_spend"and emits thecapabilities-probe-failederror ("domain and specialism bundles were skipped"). In this run the media-buy bundles still executed because--compliance-versionwas given. The closed enum exists only in the SDK'sschemas-data/3.0and3.1.0-beta.7sets; the3.1set is open. So the probe appears to validate against a pre-3.1 schema before version negotiation. This is the Fix for #6725 (compliance_testing.scenarios closed-enum check) ships only on adcp-client 14.x, but graded compliance cache 3.1.20 ships only on 13.x — no release carries both #7368 symptom surviving on the stable line.max(120, 10 × n)rule) to cover a full assessment.fix(registry): serve explicit heartbeat requeues first and reference …
idemidenko commentedon Sep 25, 2026
Thanks for merging #7648. One follow-up, since the regrade ask above is now on a closed issue:
Our agent (
https://sales-agent.elementaltv.io/mcp) still has no authoritative run after 2026-09-17T08:09Z (owner_test,14.0.0-rc.35, bundle 3.1.20). The requeue fix only changes queue order, so it doesn't start a new run by itself.Could someone with the admin key run
POST /api/registry/agents/https%3A%2F%2Fsales-agent.elementaltv.io%2Fmcp/refresh(orgorg_01KESCR4BWMJSFEHHG00B78GN4), preferably once hosted grading is on 3.1.24? The local 3.1.24 +@adcp/sdk@13.1.1result is in the comment above: 242 passed, 0 failed. If there's a better place to track the hosted move to 3.1.24, I'm happy to open an issue for it.