diff --git a/.codex/flows/peezy-codex-flows-fork/exec/release-fork.ts b/.codex/flows/peezy-codex-flows-fork/exec/release-fork.ts index 07ff33d..ee078c7 100644 --- a/.codex/flows/peezy-codex-flows-fork/exec/release-fork.ts +++ b/.codex/flows/peezy-codex-flows-fork/exec/release-fork.ts @@ -250,55 +250,58 @@ async function applyForkOverlay(input: { const testPath = path.join(input.worktreeDir, "packages/codex-client/test/stdio-transport.test.ts"); let testText = await readFile(testPath, "utf8"); - testText = testText.replace( - [ - "expect(resolveCodexStdioCommand({}, {})).toEqual({", - "\t\tcommand: \"codex\",", - "\t\targs: [\"app-server\", \"--listen\", \"stdio://\", \"--enable\", \"apps\", \"--enable\", \"hooks\"],", - "\t});", - ].join("\n\t"), - [ - "expect(resolveCodexStdioCommand({}, {})).toEqual({", - "\t\tcommand: \"bunx\",", - "\t\targs: [", - "\t\t\tDEFAULT_CODEX_NPM_PACKAGE,", - "\t\t\t\"app-server\",", - "\t\t\t\"--listen\",", - "\t\t\t\"stdio://\",", - "\t\t\t\"--enable\",", - "\t\t\t\"apps\",", - "\t\t\t\"--enable\",", - "\t\t\t\"hooks\",", - "\t\t],", - "\t});", - ].join("\n\t"), + testText = replaceRequired( + testText, + `expect(resolveCodexStdioCommand({}, {})).toEqual({ +\t\tcommand: "codex", +\t\targs: ["app-server", "--listen", "stdio://", "--enable", "apps", "--enable", "hooks"], +\t});`, + `expect(resolveCodexStdioCommand({}, {})).toEqual({ +\t\tcommand: "bunx", +\t\targs: [ +\t\t\tDEFAULT_CODEX_NPM_PACKAGE, +\t\t\t"app-server", +\t\t\t"--listen", +\t\t\t"stdio://", +\t\t\t"--enable", +\t\t\t"apps", +\t\t\t"--enable", +\t\t\t"hooks", +\t\t], +\t});`, + "default stdio command expectation", ); - testText = testText.replace( - [ - "expect(resolveCodexStdioCommand({}, { CODEX_FLOWS_ENABLE_CODE_MODE: \"1\" })).toEqual({", - "\t\tcommand: \"codex\",", - "\t\targs: [\"app-server\", \"--listen\", \"stdio://\", \"--enable\", \"apps\", \"--enable\", \"hooks\"],", - "\t});", - ].join("\n\t"), - [ - "expect(resolveCodexStdioCommand({}, { CODEX_FLOWS_ENABLE_CODE_MODE: \"1\" })).toEqual({", - "\t\tcommand: \"bunx\",", - "\t\targs: [", - "\t\t\tDEFAULT_CODEX_NPM_PACKAGE,", - "\t\t\t\"app-server\",", - "\t\t\t\"--listen\",", - "\t\t\t\"stdio://\",", - "\t\t\t\"--enable\",", - "\t\t\t\"apps\",", - "\t\t\t\"--enable\",", - "\t\t\t\"hooks\",", - "\t\t],", - "\t});", - ].join("\n\t"), + testText = replaceRequired( + testText, + `expect(resolveCodexStdioCommand({}, { CODEX_FLOWS_ENABLE_CODE_MODE: "1" })).toEqual({ +\t\tcommand: "codex", +\t\targs: ["app-server", "--listen", "stdio://", "--enable", "apps", "--enable", "hooks"], +\t});`, + `expect(resolveCodexStdioCommand({}, { CODEX_FLOWS_ENABLE_CODE_MODE: "1" })).toEqual({ +\t\tcommand: "bunx", +\t\targs: [ +\t\t\tDEFAULT_CODEX_NPM_PACKAGE, +\t\t\t"app-server", +\t\t\t"--listen", +\t\t\t"stdio://", +\t\t\t"--enable", +\t\t\t"apps", +\t\t\t"--enable", +\t\t\t"hooks", +\t\t], +\t});`, + "feature flag stdio command expectation", ); await writeFile(testPath, testText, "utf8"); } +function replaceRequired(text: string, needle: string, replacement: string, label: string): string { + if (!text.includes(needle)) { + throw new Error(`Could not apply fork overlay for ${label}; upstream text changed.`); + } + return text.replace(needle, replacement); +} + function forkPackageVersion(baseVersion: string, codexVersion: string): string { const prefix = sanitizePrerelease(stringConfig("fork_version_prefix", "peezy")); const codex = sanitizePrerelease(codexVersion); diff --git a/.codex/pack-lock.json b/.codex/pack-lock.json index 6722dc1..d0a382a 100644 --- a/.codex/pack-lock.json +++ b/.codex/pack-lock.json @@ -7,12 +7,12 @@ "source": { "input": "../codex-flows", "type": "local", - "commit": "58c91cfa12706213a072c6c67ae3910b6b95f120" + "commit": "d509daac3ac1682dd608a80c1fa7366661abf1d8" }, "sourcePath": "flows/openai-codex-bindings", "destinationPath": ".codex/flows/openai-codex-bindings", "contentHash": "sha256:6bfd8118be031c145813dcacbf47f6939b2460aeeb0d8959075e6018297d0403", - "installedAt": "2026-05-18T19:29:51.103Z" + "installedAt": "2026-05-18T19:37:00.080Z" }, { "name": "peezy-codex-flows-fork", @@ -20,12 +20,12 @@ "source": { "input": "../codex-flows", "type": "local", - "commit": "58c91cfa12706213a072c6c67ae3910b6b95f120" + "commit": "d509daac3ac1682dd608a80c1fa7366661abf1d8" }, "sourcePath": "flows/peezy-codex-flows-fork", "destinationPath": ".codex/flows/peezy-codex-flows-fork", - "contentHash": "sha256:149c21269fe4de463f9bdf8e8086f8aae9601c8f319d62c08749c8f65db4a465", - "installedAt": "2026-05-18T19:29:51.103Z" + "contentHash": "sha256:6702957e389eeb36d07fe20f3e25a8823d20d57602b5b6d8afb43e0a46aa6755", + "installedAt": "2026-05-18T19:37:00.080Z" }, { "name": "peezy-codex-fork", @@ -33,12 +33,12 @@ "source": { "input": "../codex-flows", "type": "local", - "commit": "58c91cfa12706213a072c6c67ae3910b6b95f120" + "commit": "d509daac3ac1682dd608a80c1fa7366661abf1d8" }, "sourcePath": "flows/peezy-codex-fork", "destinationPath": ".codex/flows/peezy-codex-fork", "contentHash": "sha256:613f0733ebea22b191ed6e706ad09e05a2dc97aad16cdbe14db01065a1b06582", - "installedAt": "2026-05-18T19:29:51.103Z" + "installedAt": "2026-05-18T19:37:00.080Z" } ] } diff --git a/.gitignore b/.gitignore index 662c655..55a4112 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ coverage .env /.codex/workspace/local/ /.codex/workspace/actions/ +/.codex/pack-backups/ data/ apps/*/data/ docs/out/