Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): extract 1.5 quota reset times so limited threads auto-resume #40244

Closedsaphid(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/40244/headopened View on GitHub

Showing 4 changed files with 154 additions and 0 deletions (loading 3).

x
0 of 4 viewed, 4 left
154 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.tsModified
View file
@@ -3177,6 +3177,160 @@
assert.equal(opened.cancels(), cancels);
}).pipe(Effect.provide(layerSession)),
+​
+ it.effect.each([true, false])(
+ "fails a deferred-finalize quota run with a foreground MCP tool (absolute reset: %s)",
+ (absoluteReset) =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const profileDirectory = yield* fs.makeTempDirectoryScoped();
+ const conversations = path.join(profileDirectory, "antigravity-acp", "conversations");
+ yield* fs.makeDirectory(conversations, { recursive: true });
+ const dbPath = path.join(conversations, "mock-session-1.db");
+ const appendStep = (idx: number, type: number, payload: Uint8Array) => {
+ const database = new NodeSqlite.DatabaseSync(dbPath);
+ try {
+ database.exec(
+ "CREATE TABLE IF NOT EXISTS steps (idx INTEGER PRIMARY KEY, step_type INTEGER, step_payload BLOB)",
+ );
+ database.prepare("INSERT INTO steps VALUES (?, ?, ?)").run(idx, type, payload);
+ } finally {
+ database.close();
+ }
+ };
+ appendStep(0, 14, Buffer.from("chart the throughput"));
+ appendStep(1, 15, Buffer.from("running command"));
+​
+ const opened = yield* openSessionWithRunningCommand(