test(codex): prove bounded hook suffix preservation · openclaw/openclaw@9cb3b4e
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
File tree
extensions/codex/src/app-server
| Original file line number | Diff line number | Diff line change |
|---|
@@ -535,7 +535,7 @@ describe("runCodexAppServerAttempt context-engine lifecycle", () => {
|
535 | 535 | await harness.waitForMethod("turn/start"); |
536 | 536 | |
537 | 537 | const inputText = getRequestInputText(harness); |
538 | | -expect(inputText.length).toBeLessThanOrEqual(CODEX_TURN_START_TEXT_INPUT_MAX_CHARS); |
| 538 | +expect(inputText.length).toBe(CODEX_TURN_START_TEXT_INPUT_MAX_CHARS); |
539 | 539 | expect(inputText).toContain("recent anchor"); |
540 | 540 | expect(inputText).toContain("current inbound context survives"); |
541 | 541 | expect(inputText).toContain("current prompt survives"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1059,6 +1059,9 @@ export async function runCodexAppServerAttempt(
|
1059 | 1059 | requestRange: CodexProjectedContextRange; |
1060 | 1060 | } |
1061 | 1061 | | undefined => { |
| 1062 | +// promptInputRange ends before hook appendContext. Measure from the |
| 1063 | +// immutable projected prompt instead of the hook-expanded prompt so that |
| 1064 | +// the suffix remains available for bounded fitting as newer context. |
1062 | 1065 | const promptTextInputOffset = promptInputRange |
1063 | 1066 | ? promptInputRange.end - promptText.length |
1064 | 1067 | : undefined; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。