feat: sync codex thread goals
This commit is contained in:
@@ -1646,6 +1646,38 @@ test("codex app-server runner renames a thread without starting a normal turn",
|
||||
assert.doesNotMatch(JSON.stringify(result), /thread-name-secret-should-not-leak/);
|
||||
});
|
||||
|
||||
test("codex app-server runner syncs a thread goal 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-goal-sync",
|
||||
taskType: "conversation_reply",
|
||||
intentCategory: "thread_goal_sync",
|
||||
targetCodexThreadRef: "019d-app-server-thread",
|
||||
targetCodexFolderRef: repoRoot,
|
||||
threadGoalObjective: "完成 App Server 线程目标双向同步。",
|
||||
threadGoalStatus: "active",
|
||||
threadGoalTokenBudget: 120000,
|
||||
executionPrompt: "同步 Codex 线程目标。",
|
||||
});
|
||||
|
||||
assert.equal(result.status, "completed");
|
||||
assert.equal(result.threadId, "019d-app-server-thread");
|
||||
assert.equal(result.turnControl, "goal_sync");
|
||||
assert.equal(result.threadGoal?.objective, "完成 App Server 线程目标双向同步。");
|
||||
assert.equal(result.threadGoal?.status, "active");
|
||||
assert.equal(result.threadGoal?.tokenBudget, 120000);
|
||||
assert.match(result.replyBody, /已同步 Codex 线程目标/);
|
||||
assert.equal(result.turnId, undefined);
|
||||
assert.doesNotMatch(JSON.stringify(result), /thread-goal-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