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

推荐订阅源

H
Help Net Security
腾讯CDC
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
量子位
F
Fortinet All Blogs
G
Google Developers Blog
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
M
MIT News - Artificial intelligence
博客园 - 【当耐特】

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
feat(context-engine): pass runtime settings into lifecycl...
ragesaq · 2026-06-17 · via Recent Commits to openclaw:main

@@ -327,6 +327,9 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {

327327

const params = createParams(sessionFile, workspaceDir);

328328

params.contextEngine = contextEngine;

329329

params.contextTokenBudget = 321;

330+

params.requestedModelId = "gpt-5.4-codex-primary";

331+

params.fallbackReason = "provider_unavailable";

332+

params.degradedReason = "context_overflow";

330333

params.config = { memory: { citations: "on" } } as EmbeddedRunAttemptParams["config"];

331334332335

const run = runCodexAppServerAttempt(params);

@@ -343,6 +346,17 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {

343346

expect(bootstrapParams.sessionId).toBe("session-1");

344347

expect(bootstrapParams.sessionKey).toBe("agent:main:session-1");

345348

expect(bootstrapParams.sessionFile).toBe(sessionFile);

349+

expect(bootstrapParams.runtimeSettings).toMatchObject({

350+

runtime: { mode: "degraded" },

351+

model: {

352+

requested: "gpt-5.4-codex-primary",

353+

resolved: "gpt-5.4-codex",

354+

},

355+

diagnostics: {

356+

fallbackReason: "provider_unavailable",

357+

degradedReason: "context_overflow",

358+

},

359+

});

346360347361

expect(contextEngine["assemble"]).toHaveBeenCalledTimes(1);

348362

const assembleParams = requireFirstCallArg(contextEngine["assemble"], "assemble") as Parameters<

@@ -353,6 +367,17 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {

353367

expect(assembleParams.tokenBudget).toBe(321);

354368

expect(assembleParams.citationsMode).toBe("on");

355369

expect(assembleParams.model).toBe("gpt-5.4-codex");

370+

expect(assembleParams.runtimeSettings).toMatchObject({

371+

runtime: { mode: "degraded" },

372+

model: {

373+

requested: "gpt-5.4-codex-primary",

374+

resolved: "gpt-5.4-codex",

375+

},

376+

diagnostics: {

377+

fallbackReason: "provider_unavailable",

378+

degradedReason: "context_overflow",

379+

},

380+

});

356381

expect(assembleParams.prompt).toBe("hello");

357382

expect(assembleParams.messages.map((message) => message.role)).toEqual(["assistant"]);

358383

expect(assembleParams.availableTools).toEqual(new Set());

@@ -1639,6 +1664,9 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {

16391664

const params = createParams(sessionFile, workspaceDir);

16401665

params.contextEngine = contextEngine;

16411666

params.contextTokenBudget = 111;

1667+

params.requestedModelId = "gpt-5.4-codex-primary";

1668+

params.fallbackReason = "provider_unavailable";

1669+

params.degradedReason = "context_overflow";

1642167016431671

const run = runCodexAppServerAttempt(params);

16441672

await harness.waitForMethod("turn/start");

@@ -1653,9 +1681,24 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {

16531681

expect(afterTurnCall.sessionKey).toBe("agent:main:session-1");

16541682

expect(afterTurnCall.prePromptMessageCount).toBe(0);

16551683

expect(afterTurnCall.tokenBudget).toBe(111);

1684+

expect(afterTurnCall.runtimeSettings).toMatchObject({

1685+

runtime: { mode: "degraded" },

1686+

model: {

1687+

requested: "gpt-5.4-codex-primary",

1688+

resolved: "gpt-5.4-codex",

1689+

},

1690+

diagnostics: {

1691+

fallbackReason: "provider_unavailable",

1692+

degradedReason: "context_overflow",

1693+

},

1694+

});

16561695

expect(afterTurnCall.messages.some((message) => message.role === "user")).toBe(true);

16571696

expect(afterTurnCall.messages.some((message) => message.role === "assistant")).toBe(true);

16581697

expect(maintain).toHaveBeenCalledTimes(1);

1698+

const maintainCall = requireFirstCallArg(maintain, "maintain") as Parameters<

1699+

NonNullable<ContextEngine["maintain"]>

1700+

>[0];

1701+

expect(maintainCall.runtimeSettings).toBe(afterTurnCall.runtimeSettings);

16591702

});

1660170316611704

it("reloads mirrored history after bootstrap mutates the session transcript", async () => {