Repository navigation
fix(pi): retain compaction helper references and usage - #5436
giuliolovisotto wants to merge 4 commits into
Conversation
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found.
I reviewed all four changed files and traced the observer and sandbox launch, usage aggregation, recovered-error finality, and collector helper exclusion. I found no qualifying defects in the changed paths or their directly affected contracts.
This was static review; I didn't execute tests or independently verify the reported runs. Pi's private implementation isn't included in the snapshot, so I assessed that integration using the adapter and its existing pinned-CLI regression tests.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
9f1f483 to
54e3606
Compare
54e3606 to
9d83f0e
Compare
42884bb to
1a1f17c
Compare
1a1f17c to
55249fe
Compare
55249fe to
dee61f6
Compare
dee61f6 to
3d40e96
Compare
3d40e96 to
ccc2acb
Compare
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
Pi's compaction summaries do not emit ordinary
message_endevents. Gym therefore omitted their usage and helper references, and the collector counted the retained helper as a policy turn.Observe the pinned Pi 0.80.2 session's existing compaction boundaries and stream results. Publish each helper's native response ID and usage, associate it with the compaction operation, and retain it under the invocation. Helper text stays out of the task answer. Completed helper evidence survives failed or interrupted compaction; triggering, summarization and retry remain Pi's own behavior.
Compaction helper capture is provided through agent sessions. Local CLI capture is a separate follow-up.
This is the second PR in the separate Pi follow-up stack, based on #5435; no separate GitHub issue is needed. Preserve the recovered-error finality behavior from #4739. The observer uses Pi's private
AgentSession._emitboundary because extension hooks do not provide a compaction failure/end boundary; runtime upgrades must revalidate that integration. Unsupported observer internals do not prevent Pi from starting; missing helper references are reported as evidence gaps.Validation on 2026-11-06, with the assembled Pi stack rebased onto main
b4dc559825a951171c0218623f1c44243ceb7843:pre-commit run --all-files: passed.Rollout evidence uses the real pinned runtime and shell execution with a controlled local provider. Completed compactions with missing helper references report an evidence gap. Regression tests cover cached-token contributions from helper calls, including zero and missing cache data. Existing session configuration and scoring policy are unchanged.