Conversation
zyzhou5
changed the base branch from
main
to
amahishi/gym-turn-level-recovery
September 18, 2026 22:59
zyzhou5
force-pushed
the
zezhou/workplace-checkpoint-state
branch
from
September 19, 2026 22:44
3342943 to
05953c7
Compare
macandro96
force-pushed
the
amahishi/gym-turn-level-recovery
branch
from
September 23, 2026 00:36
5b0b444 to
f4fcf8c
Compare
zyzhou5
force-pushed
the
zezhou/workplace-checkpoint-state
branch
from
September 23, 2026 23:35
e44fb49 to
c259973
Compare
zyzhou5
changed the base branch from
amahishi/gym-turn-level-recovery
to
amahishi/gym-prefix-cuts-lineage
September 23, 2026 23:36
macandro96
force-pushed
the
amahishi/gym-prefix-cuts-lineage
branch
from
September 28, 2026 20:58
8a51b31 to
90ff732
Compare
zyzhou5
force-pushed
the
zezhou/workplace-checkpoint-state
branch
from
September 28, 2026 21:31
c259973 to
7de74a8
Compare
macandro96
force-pushed
the
amahishi/gym-prefix-cuts-lineage
branch
from
September 29, 2026 04:40
90ff732 to
76747e0
Compare
Add versioned environment snapshots and rollout-attempt session bindings for the indirect prompt injection resources server. Validate restore batches before activation and retire restored state through the existing checkpoint lifecycle. Signed-off-by: Zeyu Zhou <zezhou@nvidia.com>
Signed-off-by: Zeyu Zhou <zezhou@nvidia.com>
zyzhou5
force-pushed
the
zezhou/workplace-checkpoint-state
branch
from
September 29, 2026 16:50
7de74a8 to
319067b
Compare
Use the fresh session cookie as the resource state key and bind rollout identity to it. Preserve execution isolation when cookies are reused, keep reseeding on the existing binding, and clean up cookie-only verification when checkpointing is disabled. Require execution identity before completing a checkpoint-managed session. Add HTTP regressions for mixed identity and cookie access, reused sessions, reseeding, cleanup, and verification fencing. Validation: 368 tests passed, IPI application coverage 99.52%, and all-files pre-commit passed. Signed-off-by: Zeyu Zhou <zezhou@nvidia.com>
Signed-off-by: Zeyu Zhou <zezhou@nvidia.com>
7 tasks done
ananthsub
added a commit
that referenced
this pull request
Oct 1, 2026
The indirect prompt injection resources server keeps a mutable environment per cookie session, so it now declares checkpoint_mode "exported" and implements the three session hooks: export each live session's environment, restore a batch only after every state validates, and drop a retired session. Verification keeps the default "wait" mode because it deletes the session. Export leaves out a session the server already dropped, such as one whose verification raised, so a later commit does not fail on it. The environment is copied through JSON, which keeps its key order: tool outputs serialize the environment as stored, so a restored session answers byte for byte as the original would. Ported from #3548 onto the v2 checkpoint hooks. The execution identity map, header identity lookups, mutation receipts, revisions, and the verify identity check are not carried: the v2 participant keys sessions by cookie session ID and relies on ordering instead of receipts. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
added a commit
that referenced
this pull request
Oct 1, 2026
The indirect prompt injection resources server keeps a mutable environment per cookie session, so it now declares checkpoint_mode "exported" and implements the three session hooks: export each live session's environment, restore a batch only after every state validates, and drop a retired session. Verification keeps the default "wait" mode because it deletes the session. Export leaves out a session the server already dropped, such as one whose verification raised, so a later commit does not fail on it. The environment is copied through JSON, which keeps its key order: tool outputs serialize the environment as stored, so a restored session answers byte for byte as the original would. Ported from #3548 onto the v2 checkpoint hooks. The execution identity map, header identity lookups, mutation receipts, revisions, and the verify identity check are not carried: the v2 participant keys sessions by cookie session ID and relies on ordering instead of receipts. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
added a commit
that referenced
this pull request
Oct 2, 2026
The indirect prompt injection resources server keeps a mutable environment per cookie session, so it now declares checkpoint_mode "exported" and implements the three session hooks: export each live session's environment, restore a batch only after every state validates, and drop a retired session. Verification keeps the default "wait" mode because it deletes the session. Export leaves out a session the server already dropped, such as one whose verification raised, so a later commit does not fail on it. The environment is copied through JSON, which keeps its key order: tool outputs serialize the environment as stored, so a restored session answers byte for byte as the original would. Ported from #3548 onto the v2 checkpoint hooks. The execution identity map, header identity lookups, mutation receipts, revisions, and the verify identity check are not carried: the v2 participant keys sessions by cookie session ID and relies on ordering instead of receipts. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
added a commit
that referenced
this pull request
Oct 2, 2026
The indirect prompt injection resources server keeps a mutable environment per cookie session, so it now declares checkpoint_mode "exported" and implements the three session hooks: export each live session's environment, restore a batch only after every state validates, and drop a retired session. Verification keeps the default "wait" mode because it deletes the session. Export leaves out a session the server already dropped, such as one whose verification raised, so a later commit does not fail on it. The environment is copied through JSON, which keeps its key order: tool outputs serialize the environment as stored, so a restored session answers byte for byte as the original would. Ported from #3548 onto the v2 checkpoint hooks. The execution identity map, header identity lookups, mutation receipts, revisions, and the verify identity check are not carried: the v2 participant keys sessions by cookie session ID and relies on ordering instead of receipts. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
added a commit
that referenced
this pull request
Oct 2, 2026
The indirect prompt injection resources server keeps a mutable environment per cookie session, so it now declares checkpoint_mode "exported" and implements the three session hooks: export each live session's environment, restore a batch only after every state validates, and drop a retired session. Verification keeps the default "wait" mode because it deletes the session. Export leaves out a session the server already dropped, such as one whose verification raised, so a later commit does not fail on it. The environment is copied through JSON, which keeps its key order: tool outputs serialize the environment as stored, so a restored session answers byte for byte as the original would. Ported from #3548 onto the v2 checkpoint hooks. The execution identity map, header identity lookups, mutation receipts, revisions, and the verify identity check are not carried: the v2 participant keys sessions by cookie session ID and relies on ordering instead of receipts. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Indirect Prompt Injection keeps tool-mutated environment state in memory. Add a resource checkpoint adapter so a replacement rollout attempt can restore that state and continue without reseeding the environment.
Request receipts, revisions, and stale-attempt fencing use the shared checkpoint stack. Based on #3412 (
amahishi/gym-prefix-cuts-lineage, which includes #3349), at90ff732e4cf4ca4e41c840d2ed14867baa2b3524, matching the base used by #3634. This PR adds only IPI support and tests. Related to #3240.Validation
Add 17 focused cases in
resources_servers/indirect_prompt_injection/tests/test_checkpoint.py:Validation after syncing to the current base: 356 tests passed across the tracked IPI suite and shared resource/agent checkpoint tests. The unchanged IPI application module reached 99.50% coverage in the earlier 309-test run. Repository-wide
pre-commit run --all-filesandgit diff --checkpassed. The final diff contains only the IPI adapter and its checkpoint tests.Rollouts
The unchanged production adapter was also exercised in a manual mid-training recovery run on 2026-09-20 with Qwen3-4B-Instruct-2507 (jobs 7306846 and 7307095). A separate job restored the checkpoint saved after training step 1; both jobs completed step 3 with matching selected-rollout state, continuation tool outputs, and rewards. Tested Gym
05953c7and RLdf109a0with local experiment instrumentation and an RL metric-transport fix. This covered one completed-tool boundary; RFC-wrapper integration and token-level interruptions were not exercised.