Skip to content

feat: add run target architecture skeleton - #422

Merged
delete-cloud merged 1 commit into
mainfrom
dogfood/run-target-skeleton
Jun 2, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
dogfood/run-target-skeleton

Conversation

@delete-cloud

@delete-cloud delete-cloud commented Jun 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add ADR-0058 for the local-daemon-first control plane/executor architecture
  • introduce RunTarget, WorkspaceRef, ExecutorRef, IsolationPolicy, and RunConstraints under coding_agent.runs
  • add ExecutionBinding -> RunTarget compatibility adapter with focused coverage

Tests

  • uv run pytest tests/coding_agent/test_run_target.py tests/ui/test_execution_binding.py -v
  • uv run ruff check src/coding_agent/runs tests/coding_agent/test_run_target.py
  • uv run basedpyright src/coding_agent/runs tests/coding_agent/test_run_target.py

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a standardized run targeting system with unified configuration model supporting local daemon, managed pool, external worker, and local attached execution environments.
    • Added configurable isolation policies and execution constraints for runs.
    • Maintained backward compatibility with legacy configuration formats through automatic mapping.
  • Tests

    • Added comprehensive test coverage for run target configuration mapping and validation.
  • Documentation

    • Added architectural decision record documenting the local daemon mode architecture and future expansion paths.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 256a2b46-4b23-463b-99b4-93527a08b073

📥 Commits

Reviewing files that changed from the base of the PR and between 5086310 and 37a676d.

📒 Files selected for processing (4)
  • coding-agent/docs/adr/0058-local-daemon-control-plane-executor-architecture.md
  • coding-agent/src/coding_agent/runs/__init__.py
  • coding-agent/src/coding_agent/runs/target.py
  • coding-agent/tests/coding_agent/test_run_target.py

📝 Walkthrough

Walkthrough

This PR introduces the RunTarget type system and local daemon executor architecture as specified in ADR-0058, establishing a unified placement model that adapts legacy ExecutionBinding variants into a new typed contract with workspace, executor, isolation, and constraint fields.

Changes

RunTarget Type System and ExecutionBinding Adapter

Layer / File(s) Summary
Architecture Decision and Type Foundation
coding-agent/docs/adr/0058-local-daemon-control-plane-executor-architecture.md, coding-agent/src/coding_agent/runs/target.py
ADR-0058 documents local daemon architecture with control plane/executor separation. Type system introduces immutable dataclasses for workspace references (LocalPathWorkspaceRef, CloudWorkspaceRef, ExternalWorkerWorkspaceRef, SnapshotWorkspaceRef), executor references (LocalDaemonExecutorRef, ManagedPoolExecutorRef, ExternalWorkerExecutorRef, LocalAttachedExecutorRef, InlineExecutorRef), IsolationPolicy, RunConstraints, and RunTarget with validation helpers enforcing non-empty strings, metadata copying, and annotation key validation.
ExecutionBinding to RunTarget Adapter
coding-agent/src/coding_agent/runs/target.py
Conversion function run_target_from_execution_binding maps each ExecutionBinding subtype to a RunTarget with corresponding workspace/executor/isolation selections, raising ExecutionBindingRunTargetError for unsupported types.
RunTarget Module Public API
coding-agent/src/coding_agent/runs/__init__.py
Runs package initializer re-exports the full RunTarget type system and adapter function, defining all to establish the public surface.
Test Coverage
coding-agent/tests/coding_agent/test_run_target.py
Pytest suite validates adapter mappings for all ExecutionBinding variants, confirms RunTarget/RunConstraints reject invalid inputs (empty annotations, non-positive steps, negative timeout/cost), and verifies ExternalWorkerWorkspaceRef defensively copies metadata.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A new target takes shape in the dawn,
With workspaces, executors marching on,
Legacy bindings, now typed and refined,
Adapter transforms what once was aligned,
Local daemons orchestrate with care—
Architecture blooming in the air! 🌱

🚥 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 accurately describes the main change: introducing the RunTarget architecture skeleton with new types and compatibility adapter.
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 dogfood/run-target-skeleton

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 and usage tips.

@delete-cloud
delete-cloud deleted the dogfood/run-target-skeleton branch June 2, 2026 09:01
@delete-cloud
delete-cloud restored the dogfood/run-target-skeleton branch June 2, 2026 09:09
@delete-cloud delete-cloud reopened this Jun 2, 2026
@delete-cloud
delete-cloud merged commit 3305085 into main Jun 2, 2026
1 check passed
@delete-cloud
delete-cloud deleted the dogfood/run-target-skeleton branch June 2, 2026 09:11
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