Skip to content

feat(ui): restore failover binding coverage - #80

Merged
delete-cloud merged 2 commits into
mainfrom
phase2-http-failover-mainline
Apr 21, 2026
Merged

delete-cloud merged 2 commits into
mainfrom
phase2-http-failover-mainline

Conversation

@delete-cloud

@delete-cloud delete-cloud commented Apr 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reintroduce the typed cloud binding failure boundary so cloud resolution failures are distinguishable from generic NotImplemented errors.
  • Restore failover/runtime regression coverage on the rebased mainline branch, including persisted-tape rebuild behavior and HTTP session creation binding alignment.
  • Keep the branch cleanly rebased on merged origin/main so the PR only contains the remaining B-scope delta.

Verification

  • uv run pytest tests/ui/test_execution_binding.py tests/ui/test_http_server.py tests/ui/test_session_manager_runtime.py -k \"cloud or create_session_stores_local_binding or failover_rebuilds_from_persisted_state_without_resuming_local_runtime\" -v
  • lsp_diagnostics on all four changed files returned no errors

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved error handling for cloud workspace operations with more specific exception types for clearer feedback.
  • Improvements

    • Enhanced session management failover mechanisms with improved state persistence validation and runtime recovery.

delete-cloud and others added 2 commits April 21, 2026 10:52
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Copilot AI review requested due to automatic review settings April 21, 2026 02:57
@coderabbitai

coderabbitai Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 44a5a7cd-5d6d-4a53-b559-b3e9e99419d3

📥 Commits

Reviewing files that changed from the base of the PR and between e0e7a3b and 06e690f.

📒 Files selected for processing (4)
  • coding-agent/src/coding_agent/ui/binding_resolver.py
  • coding-agent/tests/ui/test_execution_binding.py
  • coding-agent/tests/ui/test_http_server.py
  • coding-agent/tests/ui/test_session_manager_runtime.py

📝 Walkthrough

Walkthrough

The PR introduces a new CloudBindingNotImplementedError exception class and updates the binding resolver to raise it specifically for cloud workspace bindings. Tests are expanded to verify local binding behavior, session workspace resolution, and session state failover recovery without resuming archived runtime.

Changes

Cohort / File(s) Summary
Exception & Binding Resolver
coding-agent/src/coding_agent/ui/binding_resolver.py
Added CloudBindingNotImplementedError subclass and updated resolve_workspace_root() and resolve_tool_config() to raise this specific exception instead of generic NotImplementedError for cloud bindings.
Binding Resolution Tests
coding-agent/tests/ui/test_execution_binding.py
Updated tests to import and expect CloudBindingNotImplementedError, renamed test functions to reflect typed-exception behavior, and adjusted pytest.raises() assertions while preserving error message matching.
HTTP Server Tests
coding-agent/tests/ui/test_http_server.py
Added session-creation tests verifying default LocalExecutionBinding and workspace root resolution with/without repo paths; adjusted type casting for broken queue test fixture.
Session Manager Runtime Tests
coding-agent/tests/ui/test_session_manager_runtime.py
Updated type casting for mocked task objects; added comprehensive failover test verifying session state persists across manager restarts and runtime rebuilds from persisted tape without resuming archived state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • #75: Directly introduces CloudBindingNotImplementedError and refactors binding resolver error handling that this PR depends on.

Poem

🐰 A rabbit hops through bindings clear,
With cloudy walls and exceptions near,
Local paths resolve just right,
Sessions persist through failover's night,
Tests bloom bright—all systems tight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(ui): restore failover binding coverage' directly reflects the main change: reintroducing typed cloud binding failures and restoring failover/runtime regression tests for binding coverage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase2-http-failover-mainline

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores clearer cloud execution-binding failure signaling and reintroduces regression coverage around session failover/runtime rebuild behavior, ensuring session creation and persisted state recovery remain consistent on the rebased main branch.

Changes:

  • Introduce a typed CloudBindingNotImplementedError for cloud workspace resolution/tool-config paths.
  • Add/restore tests covering failover rebuild from persisted tape without resuming live local runtime state.
  • Add HTTP API tests asserting /sessions stores a LocalExecutionBinding with the correct resolved workspace root (cwd vs repo_path).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
coding-agent/src/coding_agent/ui/binding_resolver.py Adds typed cloud-binding “not implemented” exception and raises it for cloud bindings.
coding-agent/tests/ui/test_execution_binding.py Updates resolver tests to assert the new typed exception for cloud binding paths.
coding-agent/tests/ui/test_session_manager_runtime.py Restores/extends failover coverage ensuring persisted sessions rebuild runtime from tape without reviving transient runtime state.
coding-agent/tests/ui/test_http_server.py Adds coverage that session creation persists a default/local execution binding aligned to cwd or provided repo_path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@delete-cloud
delete-cloud merged commit 3f991fd into main Apr 21, 2026
5 checks passed
@delete-cloud
delete-cloud deleted the phase2-http-failover-mainline branch May 10, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants