Skip to content

fix(stirrup): observe compaction helper calls - #5310

Merged
giuliolovisotto merged 14 commits into
mainfrom
codex/fea-518-stirrup
Nov 4, 2026
Merged

giuliolovisotto merged 14 commits into
mainfrom
codex/fea-518-stirrup

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Stirrup's summarizer makes captured model calls, but Gym does not export the compaction event linking them. Observe the existing summarize_messages call and completion logger, retaining its actual summary, outcome and helper response IDs. Add the configured model scope before validating ContextCompactionObservation on the host.

Every helper attempt during summarization remains referenced, including rejected summaries. The existing usage recorder retains those calls, and the collector excludes them from policy turns.

Earlier validation

python -m pytest -q responses_api_agents/stirrup_agent/tests --disable-warnings: 173 passed. Tests cover successful summarization and failed attempts, preserving helper usage while excluding helper IDs from policy responses.

Rollouts

Stirrup 0.1.12 passes the final shared compaction scenario (16 calls, 15 policy turns, one event) and all eight existing P0 scenarios. Reproduce with python scripts/run_harness_conformance.py --harness stirrup --scenario context_compaction --gate-tier P1 --output results/stirrup-compaction in the Stirrup environment.

Compatibility and benchmark impact

Stirrup still decides when and how to summarize. Production observations now describe that operation and connect it to the captured calls. No benchmark or default compaction settings change.

The stack starts with #5122; #5439 registers the scenario only after the shared support and harness fixes.

All-file uvx pre-commit run --all-files passed; all commits have DCO sign-off. Full repository CI has not been validated. Smoke runs use real pinned harness runtimes and a controlled local model provider; they do not qualify remote sandbox infrastructure or model quality.

Rebase validation — 2026-11-02

Rebased onto main 0c7ac5119c99e0aa0dfeda7be59157c589680ffd, preserving the existing stack order. Fresh Stirrup 0.1.12 compaction passes all five behavioral checks: 16 calls, 15 policy turns, one event, summary reuse and retained helper usage. Its patch differs from the previous head only in import context after the module moves on main. All-file pre-commit passed on both stack tips; commits have DCO sign-off and SSH signatures. These are local pinned-runtime runs with a controlled provider, not remote deployment or full repository CI qualification.

@giuliolovisotto giuliolovisotto added bug Something isn't working area:agent Agent harnesses and Responses API agent behavior needs-review PR is ready for code review and waiting on a reviewer labels Oct 29, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 29, 2026 13:45
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 30, 2026
marta-sd
marta-sd previously approved these changes Nov 2, 2026
@giuliolovisotto
giuliolovisotto removed this pull request from stack #5312 November 2, 2026 10:16
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 2, 2026
@giuliolovisotto
giuliolovisotto removed this pull request from stack #5437 November 2, 2026 10:59
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 2, 2026 10:59
marta-sd
marta-sd previously approved these changes Nov 3, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41802884251

This branch was previously deployed

1 inactive deployment
public — 181bcd70 Deployed Nov 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #9907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants