feat: sync codex thread metadata
This commit is contained in:
@@ -1678,6 +1678,42 @@ test("codex app-server runner syncs a thread goal without starting a normal turn
|
||||
assert.doesNotMatch(JSON.stringify(result), /thread-goal-secret-should-not-leak/);
|
||||
});
|
||||
|
||||
test("codex app-server runner syncs thread git metadata without starting a normal turn", async () => {
|
||||
const runnerConfig = getCodexAppServerRunnerConfig(process.env, {
|
||||
codexAppServerEnabled: true,
|
||||
codexAppServerCommand: process.execPath,
|
||||
codexAppServerArgs: ["tests/fixtures/codex-app-server-runtime.mjs"],
|
||||
codexAppServerWorkdir: repoRoot,
|
||||
codexAppServerTimeoutMs: 5000,
|
||||
});
|
||||
|
||||
const result = await executeCodexAppServerTask(runnerConfig, {
|
||||
taskId: "task-thread-metadata-sync",
|
||||
taskType: "conversation_reply",
|
||||
intentCategory: "thread_metadata_sync",
|
||||
targetCodexThreadRef: "019d-app-server-thread",
|
||||
targetCodexFolderRef: repoRoot,
|
||||
threadMetadataGitInfo: {
|
||||
sha: "0186ef7",
|
||||
branch: "codex/wechat-native-ui-rollback",
|
||||
originUrl: "https://git.hyzq.site/krisolo/boss.git",
|
||||
},
|
||||
executionPrompt: "同步 Codex 线程 Git 元数据。",
|
||||
});
|
||||
|
||||
assert.equal(result.status, "completed");
|
||||
assert.equal(result.threadId, "019d-app-server-thread");
|
||||
assert.equal(result.turnControl, "metadata_sync");
|
||||
assert.deepEqual(result.threadMetadata?.gitInfo, {
|
||||
sha: "0186ef7",
|
||||
branch: "codex/wechat-native-ui-rollback",
|
||||
originUrl: "https://git.hyzq.site/krisolo/boss.git",
|
||||
});
|
||||
assert.match(result.replyBody, /已同步 Codex 线程 Git 元数据/);
|
||||
assert.equal(result.turnId, undefined);
|
||||
assert.doesNotMatch(JSON.stringify(result), /thread-metadata-secret-should-not-leak/);
|
||||
});
|
||||
|
||||
test("codex app-server runner stays disabled unless feature flag is explicit", () => {
|
||||
const runnerConfig = getCodexAppServerRunnerConfig(process.env, {
|
||||
codexAppServerCommand: process.execPath,
|
||||
|
||||
Reference in New Issue
Block a user