fix(compliance): force live probe for manual agent refresh#5825
Open
garvitkaushik-123 wants to merge 1 commit into
Open
fix(compliance): force live probe for manual agent refresh#5825garvitkaushik-123 wants to merge 1 commit into
garvitkaushik-123 wants to merge 1 commit into
Conversation
Recheck Status only skipped the 15-minute capability/health/formats cache when the caller had saved owner auth. Agents with no saved credentials kept serving a stale cached snapshot after a redeploy fix, even though a manual refresh should always hit the live endpoint. Thread an explicit forceRefresh flag through discoverCapabilities, checkHealth, getStats and getFormatsForAgent, and set it from refreshSingleAgent (the "Recheck Status" code path) regardless of whether owner auth is present.
Contributor
There was a problem hiding this comment.
The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final gh pr review). A human reviewer should take this PR.
This is an automated message from the Argus AI review workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recommend_storyboards/evaluate_agent_qualityalready probe live (they call into@adcp/sdkdirectly), but the "Recheck Status" button on the Agents page backs ontoPOST /api/registry/agents/{url}/refresh→CrawlerService.refreshSingleAgent, which calls the samediscoverCapabilities/checkHealth/getStats/getFormatsForAgenthelpers used by the periodic crawler.Each of those helpers only skips its 15-minute in-memory cache when the caller passes saved owner
auth. For an agent with no saved credentials (or an admin refreshing someone else's agent), a manual refresh click still read the stale cached snapshot for up to 15 minutes after the agent's own redeploy fix, even though the live endpoint was already returning the correct response.Fix
forceRefreshparameter toCapabilityDiscovery.discoverCapabilities,HealthChecker.checkHealth/getStats, andFormatsService.getFormatsForAgent.refreshSingleAgent(the function backing "Recheck Status") now passesforceRefresh: trueon every call, independent of whether owner auth is available.Scoped to this repo's own caching layer only; no changes to
@adcp/sdkor Addie's MCP tools (their conversational probe path already worked, per the reporter's own testing).Fixes #5777.
Test plan
npx tsc --noEmit -p server/tsconfig.jsonnpx vitest run server/tests/unit/formats.test.ts server/tests/unit/health-fallback.test.ts server/tests/unit/reprobe-unknown-agents.test.ts server/tests/unit/capability-discovery-auth-classification.test.ts(54 passed)forceRefreshbypass