Skip to content

[P1] Enforce codebase ownership for explicit workflow resume by run ID #2

Description

@brAperia2025

Context: CodeRabbit feedback on upstream PR coleam00#1875 surfaced a likely-valid safety issue in our fork.

Problem:

  • packages/core/src/orchestrator/orchestrator-agent.ts validates workflow name/status/path for workflowOptions.resumeRunId.
  • It does not verify the run belongs to the current codebase/project.

Impact:

  • P1. A run ID from another codebase could be resumed in the wrong project/worktree context.

Acceptance criteria:

  • In the explicit resume-by-ID path, verify run.codebase_id matches the current codebase.id before setting explicitResumableRun.
  • Return a clear platform message when ownership differs.
  • Add tests for matching and mismatched codebase IDs.

Reference:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions