Skip to content

fix: harden runtime and delivery dispatch - #109

Merged
2233admin merged 2 commits into
mainfrom
hotfix/plugin-marketplace-tab
Sep 2, 2026
Merged

fix: harden runtime and delivery dispatch#109
2233admin merged 2 commits into
mainfrom
hotfix/plugin-marketplace-tab

Conversation

@2233admin

Copy link
Copy Markdown
Owner

Fixes post-merge review findings: recover stale Feishu delivery reservations while blocking fresh concurrent attempts, preserve Codex observe_only vocabulary, reject incomplete runtime streams, propagate WS callback persistence failures, restrict HTTP runtime invocation to installed bundle capabilities and task-safe config, and align Operations Agent UI payloads with runtime-binding.v2. Restores Plugin Hub view navigation and updates stale static assertions.

@2233admin
2233admin merged commit 890f814 into main Sep 2, 2026
4 of 9 checks passed
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: fac25438-b882-4c7b-997c-e9b96409dbbe

📥 Commits

Reviewing files that changed from the base of the PR and between f04a95d and 5406a96.

📒 Files selected for processing (14)
  • backend/agent_runtime_dispatch.py
  • backend/agent_server.py
  • backend/services/feishu_bitable_delivery.py
  • backend/services/operations_agent_runtime_service.py
  • backend/workflow/opencli_hda_tracer.py
  • backend/ws_agent_manager.py
  • frontend/app/(app)/operations-agents/page.tsx
  • frontend/app/(app)/plugins/page.tsx
  • frontend/lib/api/types.ts
  • frontend/scripts/check-control-plane-regressions.mjs
  • tests/unit/test_agent_server.py
  • tests/unit/test_feishu_bitable_delivery.py
  • tests/unit/test_operations_agent_runtime_service.py
  • tests/unit/test_ws_agent_manager.py

📝 Summary

Summary by CodeRabbit

  • New Features

    • Added plugin page tabs for Installed, Capabilities, and Marketplace views.
    • Added runtime capability information during agent registration.
    • Added stricter validation for supported runtimes and runtime configuration.
  • Bug Fixes

    • Improved agent event and callback error handling.
    • Prevented duplicate in-progress Feishu deliveries and enabled safe retries for stale attempts.
    • Correctly distinguishes blocked Feishu deliveries from other failures.
    • Updated operations agent runtime bindings to the latest configuration format.

Walkthrough

The PR tightens runtime validation and event handling, adds leased Feishu delivery reservations, propagates agent callback errors, updates the operations-agent runtime binding to V2, and adds top-level plugin navigation tabs.

Changes

Runtime execution and validation

Layer / File(s) Summary
Runtime availability and invocation validation
backend/agent_server.py, backend/agent_runtime_dispatch.py, tests/unit/test_agent_server.py
Bundle-declared runtimes now control invocation access. Protected process configuration keys are rejected. Registration reports runtime capabilities. Adapter streams require valid terminal events and reject invalid event sequences.
Runtime mode and task error propagation
backend/services/operations_agent_runtime_service.py, backend/ws_agent_manager.py, tests/unit/test_operations_agent_runtime_service.py, tests/unit/test_ws_agent_manager.py
The dispatch path forwards profile.mode directly. Callback exceptions now fail the pending agent task. Tests cover pi, codex, and callback failure behavior.

Feishu delivery reservation

Layer / File(s) Summary
Delivery attempt leasing and collision handling
backend/services/feishu_bitable_delivery.py, backend/workflow/opencli_hda_tracer.py, tests/unit/test_feishu_bitable_delivery.py
Pending attempts use a five-minute lease. Fresh attempts raise delivery_in_progress; stale attempts can be reclaimed. Row-lock and integrity-race paths reuse the attempt row. In-progress failures emit a blocked workflow event.

Operations agent runtime binding

Layer / File(s) Summary
Runtime binding contract and page integration
frontend/lib/api/types.ts, frontend/app/(app)/operations-agents/page.tsx
AgentRuntimeBindingV1 is replaced by V2. The operations agents page reads and saves preferred URLs, preferred runtimes, and the V2 schema version.

Plugin navigation layout

Layer / File(s) Summary
Plugin page tab navigation
frontend/app/(app)/plugins/page.tsx, frontend/scripts/check-control-plane-regressions.mjs
The plugin page adds installed, capabilities, and marketplace tabs. Subtype tabs move to a second row. Regression checks use workspace-aware hook arguments and dynamic routing.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OpenCLIHDA
  participant DeliveryService
  participant Database
  participant FeishuBitable
  OpenCLIHDA->>DeliveryService: request record delivery
  DeliveryService->>Database: lock and inspect DeliveryAttempt
  Database-->>DeliveryService: pending, stale, or succeeded state
  DeliveryService->>FeishuBitable: create record when available
  FeishuBitable-->>DeliveryService: return remote record ID
  DeliveryService->>Database: mark attempt succeeded
  DeliveryService-->>OpenCLIHDA: return result or delivery_in_progress
Loading

Suggested reviewers: 1012839419a-alt

Poem

A rabbit checks the runtime gate,
And locks the row before it’s late.
Fresh deliveries wait in line,
Old leases hop and retry fine.
New tabs bloom where plugins shine.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant