Repository navigation
test(core/agent): add unit test that AgentRunInput.from_runtime_request copies resolved_integrations - #3737
Conversation
…st copies resolved_integrations
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
Greptile SummaryThis PR adds test coverage for
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "test(core/agent): add unit test that Age..." | Re-trigger Greptile |
|
🎯 Bullseye. @devthedevil opened a PR, kept the vibes clean, and got it merged. Absolute cinema. 🎬 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |

Summary
Adds the missing test coverage called out in #3732:
AgentRunInput.from_runtime_requestalready defensively copiesresolved_integrationsinto a new top-level dict (resolved=dict(request.resolved_integrations or {})), but only thefrom_messagesfactory had a test proving the copy behavior.from_runtime_requestwas untested.Change
tests/core/agent/test_run_io.py: addedtest_from_runtime_request_copies_resolved_integrations, which builds a fake runtime request with aresolved_integrationsdict, callsfrom_runtime_request, then mutates the source dict by adding a new top-level key. It assertsrun_input.resolvedis unaffected, which only holds if the factory stored a copy rather than a reference.No production code changed —
core/agent/run_io.pyalready implements the copy correctly; this PR only closes the test gap.Testing
The new test passes against the current implementation and would fail if the
dict(...)copy infrom_runtime_requestwere replaced with a direct reference assignment.Closes #3732