Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): ACP Registry searches reuse a recently fetched index #26248

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/26248/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 122 additions and 5 deletions.

x
0 of 3 viewed, 3 left
2 additions and 1 deletionpackages/client-runtime/src/state/server.tsModified
View file
@@ -1310,7 +1310,8 @@
searchAcpRegistry: createEnvironmentRpcQueryAtomFamily(runtime, {
label: "environment-data:server:acp-registry:search",
tag: WS_METHODS.serverSearchAcpRegistry,
- // Reopening Add provider reuses recent results; submitting the same search refreshes it.
+ // Reopening Add provider reuses recent results. Submitting the same search asks the
+ // server again, which reuses a Registry index fetched in the last five minutes.
staleTimeMs: 5 * 60_000,
configProjection,
95 additions and 1 deletionpackages/provider-acp-registry/src/server/AcpRegistrySupport.test.tsModified
View file
@@ -15,6 +15,7 @@
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
import * as Schema from "effect/Schema";
+import * as TestClock from "effect/testing/TestClock";
import * as HttpClient from "effect/http/HttpClient";
import * as HttpClientResponse from "effect/http/HttpClientResponse";
import * as ChildProcess from "effect/process/ChildProcess";
@@ -821,7 +822,7 @@
});
​
- it.effect("refreshes explicit searches and coalesces concurrent refreshes", () => {
+ it.effect("searches reuse an index fetched in the last five minutes", () => {
const agent = makeAgent({ npx: { package: "@example/acp@1.2.3" } });