Conversation
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Elegant simplification of view construction.
Important: This changes view construction logic which affects what events agents see. Per repo guidelines, flagging for human maintainer review and eval verification before merge. Consider adding the integration-test label.
Summary: The incremental construction approach is cleaner than all-at-once. Dead code removal verified (.condensations and unhandled_condensation_request_exists have zero usage outside tests). Cache removal is necessary for correctness with the new mutable design.
JiwaniZakir
left a comment
There was a problem hiding this comment.
The shift from cached_property to property for manipulation_indices is a necessary consequence of making events mutable, but it means the indices are recomputed on every access. If manipulation_indices is called in any hot path (e.g., repeatedly during a context-building loop), this could become a meaningful performance regression depending on how expensive the computation is — worth profiling or at minimum adding a comment explaining why caching was dropped.
More importantly, append_event doesn't call enforce_properties after mutating self.events. This is fine when going through from_events, but the method is public and the PR title implies incremental construction is a first-class use case. Any caller using append_event directly in an incremental fashion would need to remember to call enforce_properties separately to avoid a malformed view — there's no enforcement or documentation of that contract in append_event's docstring. Consider either calling enforce_properties inside append_event (with the full event sequence passed in), or making the method private (_append_event) to signal it's an internal building block.
Removing the condensations field also drops the ability to inspect which condensations were applied to produce a given view, which was useful for debugging. If that observability was intentional to drop, it may be worth a brief comment in the PR noting the trade-off.
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Elegant refactoring that simplifies view construction. The incremental append_event approach is more intuitive than all-at-once, dead code removal is clean, and test coverage is comprehensive.
Since this modifies condenser/view construction behavior, recommend adding the integration-test label to verify no unintended behavioral changes before merge (per repo guidelines). No blocking issues found.
|
Hi! I started running the integration tests on your PR. You will receive a comment with the results shortly. |
🧪 Integration Tests ResultsOverall Success Rate: 96.7% 📁 Detailed Logs & ArtifactsClick the links below to access detailed agent/LLM logs showing the complete reasoning process for each model. On the GitHub Actions page, scroll down to the 'Artifacts' section to download the logs.
📊 Summary
📋 Detailed Resultslitellm_proxy_gemini_3.1_pro_preview
litellm_proxy_anthropic_claude_sonnet_4_6
Failed Tests:
litellm_proxy_moonshot_kimi_k2_thinking
Skipped Tests:
litellm_proxy_deepseek_deepseek_reasoner
Skipped Tests:
|
It's not called repeatedly, it's called once per condenser. And the PR notes why it was dropped, a comment in code referencing old functionality doesn't really make sense.
This is a deliberate change.
We're removing b/c it was dead code. |
Summary
Viewobjects can be extended by adding new events. View construction simplified to iteratively apply this process.Other changes:
condensationsattribute,unhandled_condensation_request_existsmethod)enforce_propertiesto be a method instead of a static methodmanipulation_indicesto no longer be cached (to avoid complicating other functions with cache invalidation logic)These changes pave the way for more efficient view construction in the conversation state -- by tracking the view explicitly in the state, we can avoid re-computing at every agent step and just focus on updating it with the current events.
This PR is a simpler implementation of the incremental view construction from PR #2141 (now closed).
Checklist
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:19cdf71-pythonRun
All tags pushed for this build
About Multi-Architecture Support
19cdf71-python) is a multi-arch manifest supporting both amd64 and arm6419cdf71-python-amd64) are also available if needed