Skip to content

fix(acp-registry): refresh stale registry cache so installed agents update - #40707

Open
bedair81 wants to merge 1 commit into
pingdotgg:mainfrom
bedair81:fix/acp-registry-refresh-stale-index
Open

bedair81 wants to merge 1 commit into
pingdotgg:mainfrom
bedair81:fix/acp-registry-refresh-stale-index

Conversation

@bedair81

Copy link
Copy Markdown

Problem

Once an ACP Registry agent (such as Devin) is installed and its index is cached at ~/.t3/caches/acp-registry/registry.json, T3 Code never refreshes that cached index during normal operation or when clicking Refresh in provider settings:

  • AcpRegistryCatalog.loadRegistry() reads registryRef or registry.json from disk without checking freshness or refreshing it.
  • Both inspect() and resolve() call loadRegistry(). Because an already-installed agent has its previous binary/package version on disk, installBinary() / ensureGlobalPackage() return the old version immediately—so fix(acp-registry): reinstall the current version when a cached build was removed upstream #40261's download_failed fallback never runs.
  • AcpRegistryDriver.invalidateCaches cleared probe and live session caches but did not refresh the ACP Registry index.

As a result, installed ACP Registry agents stayed pinned to their initial version across restarts and Settings refreshes until the user removed and re-added the provider (calling prepare()) or opened the Add Provider → ACP Registry search dialog (search()).

Change

  • Added refreshIndex(options?: { readonly maxAgeMs?: number }) to AcpRegistryCatalog (packages/provider-acp-registry/src/server/AcpRegistrySupport.ts), reusing refreshRegistry() and recentRegistry(maxAgeMs) so concurrent refreshes deduplicate via registrySemaphore and offline failures fall back cleanly to the cached registry.json.
  • Updated AcpRegistryDriver (packages/provider-acp-registry/src/server/driver.ts):
    • enrichProviderCached calls catalog.refreshIndex({ maxAgeMs: PROBE_SUCCESS_TTL_MS }) before a fresh probe for enabled registry instances (keeping cold inspect() on disk with zero startup network wait, while allowing boot enrichment and post-TTL periodic refreshes to pick up new releases).
    • invalidateCaches calls catalog.refreshIndex() for enabled registry instances so Settings → Refresh immediately fetches the latest registry index and installs the updated agent version on the refresh probe.
    • Disabled and local ACP instances make no registry requests.

Scope and approval

Small, focused bug fix for an obvious defect under CONTRIBUTING.md: installed ACP Registry agents never see upstream releases without removing and re-adding the provider. Only AcpRegistryCatalog index refresh, AcpRegistryDriver cache/enrichment hooks, and focused unit/driver tests are changed.

Verification

Failing test first

Added refreshes a cached registry index on enrichment and explicit cache invalidation in packages/provider-acp-registry/src/server/driver.test.ts, seeding a disk-cached 1.0.0 registry.json and installed 1.0.0 binary while the registry serves 2.0.0 then 3.0.0.

On origin/main (3b3f8808f4):

FAIL packages/provider-acp-registry/src/server/driver.test.ts > AcpRegistryDriver > refreshes a cached registry index on enrichment and explicit cache invalidation
AssertionError: expected '1.0.0' to be '2.0.0' // Object.is equality

With the fix, both driver.test.ts (enrichment upgrade 1.0.0 → 2.0.0, explicit invalidateCaches upgrade 2.0.0 → 3.0.0, disabled instance makes 0 registry requests) and the new TestClock case in AcpRegistrySupport.test.ts (cold disk inspect = 0 requests, maxAgeMs reuse/expiry, forced refresh, offline fallback + retry) pass.

Runtime transcript against the live ACP Registry CDN and real Devin CLI

Ran an isolated temp-dir script against AcpRegistrySupport.makeAcpRegistryCatalog + AcpRegistryDriver on Linux aarch64, seeded with a stale 3000.12.57 registry.json and an already-installed tools/devin/3000.12.57/linux-aarch64/bin/devin:

1. Cold inspect (from stale disk cache): ready 3000.12.57
2. After refresh + enrichment: {
  status: 'ready',
  version: '3000.14.30821',
  models: [ 'swe-2-flash-medium', 'swe-1-6-slow' ],
  installedDirs: [ '3000.12.57', '3000.14.30821' ]
}

Cold inspect() returned immediately from the stale disk cache; background enrichment then fetched the live ACP Registry index (3000.14.30821), downloaded and extracted the 3000.14.30821 Devin binary, probed devin acp, and updated the provider snapshot.

Checks

vp run check:changed origin/main:

  • format, lint, knip 1/2, knip 2/2, graphql (apps/server): pass
  • typecheck (10 affected packages): pass
  • test (5 files, 94 tests): pass

Not checked: Windows/macOS native host execution (the binary catalog unit tests run under simulated linux-x64 host services as in existing AcpRegistrySupport.test.ts tests).


Implemented and verified by Gemini 4 Neon via the Antigravity harness in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 22, 2026

This branch has not been deployed

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant