mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test(e2e): fail the codex compaction tests when either turn exits nonzero
A first turn that read the secret and then errored could still pass, because the resumed turn could recall the value from the compacted history. Both compaction tests now require each turn to exit 0
This commit is contained in:
parent
8ce3035901
commit
7775e6526a
2 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ class TestCodexAutoCompaction:
|
|||
cwd=workspace,
|
||||
compact_after_tokens=COMPACT_AFTER_TOKENS,
|
||||
)
|
||||
assert first.exit_code == 0, first
|
||||
assert first.thread_id is not None, first
|
||||
(workspace / "secret.txt").unlink()
|
||||
second: Final = codex.resume(
|
||||
|
|
@ -35,5 +36,6 @@ class TestCodexAutoCompaction:
|
|||
cwd=workspace,
|
||||
compact_after_tokens=COMPACT_AFTER_TOKENS,
|
||||
)
|
||||
assert second.exit_code == 0, second
|
||||
assert any(compaction.remote for compaction in codex.compactions(first.thread_id)), (first, second)
|
||||
assert marker in second.answer, second
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class TestCodexUnderTheRealModelName:
|
|||
cwd=workspace,
|
||||
compact_after_tokens=COMPACT_AFTER_TOKENS,
|
||||
)
|
||||
assert first.exit_code == 0, first
|
||||
assert first.thread_id is not None, first
|
||||
(workspace / "secret.txt").unlink()
|
||||
second: Final = real_name_codex.resume(
|
||||
|
|
@ -51,5 +52,6 @@ class TestCodexUnderTheRealModelName:
|
|||
cwd=workspace,
|
||||
compact_after_tokens=COMPACT_AFTER_TOKENS,
|
||||
)
|
||||
assert second.exit_code == 0, second
|
||||
assert any(compaction.remote for compaction in real_name_codex.compactions(first.thread_id)), (first, second)
|
||||
assert marker in second.answer, second
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue