8000 fix(collector): isolate codex warmup from user instructions and tool calls by InfinityPacer · Pull Request #76 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ Antigravity(各实例的 Gemini 与 Claude/GPT 池)和 Codex 的 7 天周窗

- **Antigravity Gemini 池**(`gemini_weekly`):调用 `gemini-3.8-flash-low`,随后执行一次 `agy -p /usage` 把新周期写回状态栏缓存。
- **Antigravity 第三方池**(`3p_weekly`):优先调用 `gpt-oss-120b-medium`(失败时回退 `claude-sonnet-5-5-low`),随后执行 `agy -p /usage` 刷新缓存。
- **Codex**(`seven-day`):在临时目录下调用 `codex exec`(指定 `openai` 通道、`gpt-6-luna`、`low` 推理档位且关闭 MCP),产生的会话记录由下一轮采集器同步自动读取新周期额度。
- **Codex**(`seven-day`):在临时目录下调用 `codex exec --ignore-user-config`(指定 `openai` 通道、`gpt-6-luna`、`low` 推理档位与仅单字回复指令),产生的会话记录由下一轮采集器同步自动读取新周期额度。

默认只预热 7 天周窗口;传入 `--codex-5h`(或 `METERLEAF_WARMUP_CODEX_5H=1`)时一并预热 Codex 的 5 小时窗口,传入 `--include-5h`(或 `METERLEAF_WARMUP_5H=1`)时预热全部来源的 5 小时窗口。每个已成功预热的旧周期在 `tasks/quota-warmup/state.json` 里记录,只触发一次;如果当轮失败,下一轮任务(5 分钟后)会自动重试。

Expand Down
3 changes: 2 additions & 1 deletion scripts/quota-warmup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ async function warmupCodexTarget(
const argv = [
codexBin,
"exec",
"--ignore-user-config",
"--skip-git-repo-check",
"-C",
tempDir,
Expand All @@ -1032,7 +1033,7 @@ async function warmupCodexTarget(
"-c",
'model_reasoning_effort="low"',
"-c",
"mcp_servers={}",
'base_instructions="Reply with one word only and do not call any tools."',
prompt,
];
const res = await runner(argv, {
Expand Down
4 changes: 4 additions & 0 deletions tests/quota-warmup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ describe("quota-warmup task script", () => {
// 3. codex exec,必须指定 openai 通道、gpt-6-luna 与 low effort,且不带 --ephemeral 以便采集器读取新额度
expect(calls[4]!.argv[0]).toBe(sb.codexBin);
expect(calls[4]!.argv).toContain("exec");
expect(calls[4]!.argv).toContain("--ignore-user-config");
expect(calls[4]!.argv).toContain('model_provider="openai"');
expect(calls[4]!.argv).toContain(`model="${CODEX_WARMUP_MODEL}"`);
expect(calls[4]!.argv).toContain(
'base_instructions="Reply with one word only and do not call any tools."',
);
expect(calls[4]!.argv).not.toContain("--ephemeral");

// 检查状态栏 TSV 已被更新为新周期,且保留了 plan 行
Expand Down
Loading
0