惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
罗磊的独立博客
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
J
Java Code Geeks
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
美团技术团队
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Guard Codex app-server context budgets · openclaw/opencla...
2026-05-17 · via Recent Commits to openclaw:main

@@ -6003,6 +6003,132 @@ describe("runCodexAppServerAttempt", () => {

60036003

expect(resumeRequestParams?.developerInstructions).toContain(CODEX_GPT5_BEHAVIOR_CONTRACT);

60046004

});

600560056006+

it("starts a fresh Codex thread before resume when the native rollout is over budget", async () => {

6007+

const sessionFile = path.join(tempDir, "session.jsonl");

6008+

const workspaceDir = path.join(tempDir, "workspace");

6009+

const agentDir = path.join(tempDir, "agent");

6010+

await writeExistingBinding(sessionFile, workspaceDir, { dynamicToolsFingerprint: "[]" });

6011+

await fs.writeFile(

6012+

path.join(path.dirname(sessionFile), "sessions.json"),

6013+

JSON.stringify({

6014+

"agent:main:session-1": {

6015+

sessionFile,

6016+

totalTokens: 12_000,

6017+

},

6018+

}),

6019+

);

6020+

const rolloutDir = path.join(agentDir, "codex-home", "sessions");

6021+

await fs.mkdir(rolloutDir, { recursive: true });

6022+

await fs.writeFile(

6023+

path.join(rolloutDir, "rollout-thread-existing.jsonl"),

6024+

`${JSON.stringify({

6025+

payload: {

6026+

type: "token_count",

6027+

info: {

6028+

total_token_usage: {

6029+

total_tokens: 70_000,

6030+

},

6031+

},

6032+

},

6033+

})}\n`,

6034+

);

6035+

const { requests, waitForMethod, completeTurn } = createStartedThreadHarness();

6036+

const params = createParams(sessionFile, workspaceDir);

6037+

params.agentDir = agentDir;

6038+

params.config = {

6039+

agents: {

6040+

defaults: {

6041+

compaction: {

6042+

truncateAfterCompaction: true,

6043+

maxActiveTranscriptBytes: "1mb",

6044+

},

6045+

},

6046+

},

6047+

} as never;

6048+6049+

const run = runCodexAppServerAttempt(params, {

6050+

pluginConfig: { appServer: { mode: "yolo" } },

6051+

});

6052+

await waitForMethod("turn/start");

6053+

await completeTurn({ threadId: "thread-1", turnId: "turn-1" });

6054+

await run;

6055+6056+

expect(requests.map((entry) => entry.method)).toContain("thread/start");

6057+

expect(requests.map((entry) => entry.method)).not.toContain("thread/resume");

6058+

const savedBinding = await readCodexAppServerBinding(sessionFile);

6059+

expect(savedBinding?.threadId).toBe("thread-1");

6060+

});

6061+6062+

it("preserves bound auth when rotating an over-budget native rollout", async () => {

6063+

const sessionFile = path.join(tempDir, "session.jsonl");

6064+

const workspaceDir = path.join(tempDir, "workspace");

6065+

const agentDir = path.join(tempDir, "agent");

6066+

await writeExistingBinding(sessionFile, workspaceDir, {

6067+

authProfileId: "openai-codex:work",

6068+

dynamicToolsFingerprint: "[]",

6069+

});

6070+

await fs.writeFile(

6071+

path.join(path.dirname(sessionFile), "sessions.json"),

6072+

JSON.stringify({

6073+

"agent:main:session-1": {

6074+

sessionFile,

6075+

totalTokens: 12_000,

6076+

},

6077+

}),

6078+

);

6079+

const rolloutDir = path.join(agentDir, "codex-home", "sessions");

6080+

await fs.mkdir(rolloutDir, { recursive: true });

6081+

await fs.writeFile(

6082+

path.join(rolloutDir, "rollout-thread-existing.jsonl"),

6083+

`${JSON.stringify({

6084+

payload: {

6085+

type: "token_count",

6086+

info: {

6087+

total_token_usage: {

6088+

total_tokens: 70_000,

6089+

},

6090+

},

6091+

},

6092+

})}\n`,

6093+

);

6094+

const seenAuthProfileIds: Array<string | undefined> = [];

6095+

const { requests, waitForMethod, completeTurn } = createStartedThreadHarness(undefined, {

6096+

onStart: (authProfileId) => {

6097+

seenAuthProfileIds.push(authProfileId);

6098+

},

6099+

});

6100+

const params = createParams(sessionFile, workspaceDir);

6101+

delete params.authProfileId;

6102+

params.agentDir = agentDir;

6103+

params.config = {

6104+

agents: {

6105+

defaults: {

6106+

compaction: {

6107+

truncateAfterCompaction: true,

6108+

maxActiveTranscriptBytes: "1mb",

6109+

},

6110+

},

6111+

},

6112+

} as never;

6113+6114+

const run = runCodexAppServerAttempt(params, {

6115+

pluginConfig: { appServer: { mode: "yolo" } },

6116+

});

6117+

await vi.waitFor(() => expect(seenAuthProfileIds).toEqual(["openai-codex:work"]), {

6118+

interval: 1,

6119+

});

6120+

await waitForMethod("turn/start");

6121+

await completeTurn({ threadId: "thread-1", turnId: "turn-1" });

6122+

await run;

6123+6124+

expect(requests.map((entry) => entry.method)).toContain("thread/start");

6125+

expect(requests.map((entry) => entry.method)).not.toContain("thread/resume");

6126+

expect(seenAuthProfileIds).toEqual(["openai-codex:work"]);

6127+

const savedBinding = await readCodexAppServerBinding(sessionFile);

6128+

expect(savedBinding?.authProfileId).toBe("openai-codex:work");

6129+

expect(savedBinding?.threadId).toBe("thread-1");

6130+

});

6131+60066132

it("resumes a bound Codex thread when only dynamic tool descriptions change", async () => {

60076133

const sessionFile = path.join(tempDir, "session.jsonl");

60086134

const workspaceDir = path.join(tempDir, "workspace");