Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): recover Codex child models after metadata lookup fails #22830

Closedjuliusmarmingewants to merge 8 commits intomain fromfix/issue-15250opened View on GitHub

Showing 6 changed files with 221 additions and 0 deletions (loading 4).

x
0 of 6 viewed, 6 left
3 additions and 0 deletionsapps/server/scripts/evidence/issue-15250/README.mdAdded
View file
@@ -0,0 +1,3 @@
+# #15250 runtime evidence
+​
+Run `node apps/server/scripts/evidence/issue-15250/run.mjs --checkout <server checkout> --out <scratch dir> --port <port>` once per SHA (with `vp i` done in the checkout). It starts a real server against an isolated home in `<scratch dir>`, with Codex replaced by the STUBBED Codex app-server in `stub-codex-app-server.mjs`. Then it prints, for each row, the child `thread/read` and `thread/resume` requests with their timings and the subagent model the projection stores.
218 additions and 0 deletionsapps/server/scripts/evidence/issue-15250/run.mjsAdded
View file
@@ -0,0 +1,218 @@
+#!/usr/bin/env node
+// Runtime evidence driver for #15250 (native Codex child model lookup retries).
+//
+// node run.mjs --checkout <server checkout> --out <dir> [--port 43831] [--rows R1,R2a,...]
+//
+// Starts a real T3 server from <checkout> against an isolated home under <out>, with
+// the codex provider pointed at the STUBBED Codex app-server next to this file. Each
+// row is one thread whose prompt names its fixture; all rows run in parallel. After
+// the retry window it reads the subagent projection read-only, then stops only the
+// server PID it spawned.
+import * as NodeChildProcess from "node:child_process";
+import * as NodeFS from "node:fs";
+import * as NodePath from "node:path";
+import * as NodeSqlite from "node:sqlite";
+import * as NodeURL from "node:url";
+​
+const args = {};
+for (let i = 2; i < process.argv.length; i += 2) {
+ args[process.argv[i].replace(/^--/, "")] = process.argv[i + 1];
+}
+if (!args.checkout || !args.out) {
+ console.error(
+ "usage: node run.mjs --checkout <server checkout> --out <dir> [--port N] [--rows R1,R3]",
+ );