[3/3] core: replay persisted world state - #29837
Conversation
ef893b8 to
8b3962c
Compare
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/core/src/session/mod.rs
Lines 1408 to 1409 in 8b3962c
This resume/fork hydration path changes the agent's first model request after reconstructing a rollout, but the commit only adds session/rollout_reconstruction_tests.rs unit-level coverage; I don't see a core/tests/suite TestCodex resume/fork test that verifies the actual resumed request doesn't duplicate or suppress environment context. The repo guidance requires integration tests for agent-logic changes, so please add one around replaying persisted world state on resume or fork.
AGENTS.md reference: AGENTS.md:L115-L119
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7af2b6f to
f2750c1
Compare
8b3962c to
62bfddb
Compare
f2750c1 to
922aac2
Compare
62bfddb to
cb8dfc1
Compare
8218445 to
7667ec5
Compare
cb8dfc1 to
44c2b60
Compare
Why
Persisting
WorldStatesnapshots and patches is only useful if resume and fork restore that exact comparison baseline. Rebuilding it fromTurnContextItemloses section state and can either repeat or suppress model-visible updates.This is the third PR in the WorldState persistence stack, built on #29835.
What
ContextManagerfrom the reconstructed snapshot on resume and fork.TurnContextItemto WorldState conversion path.Testing
just test -p codex-core world_statejust test -p codex-core rollout_reconstruction_testsjust fix -p codex-corejust test -p codex-core(the changed tests passed; the full run also hit unrelated existing/test-environment failures, primarily a missingtest_stdio_serverbinary)