Skip to content

[SYMPP-45CD] Make draft WorkRequests architect-claimable - #629

Merged
Pimpmuckl merged 1 commit into
mainfrom
fix/draft-work-request-authority
Aug 19, 2026
Merged

[SYMPP-45CD] Make draft WorkRequests architect-claimable#629
Pimpmuckl merged 1 commit into
mainfrom
fix/draft-work-request-authority

Conversation

@Pimpmuckl

@Pimpmuckl Pimpmuckl commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Context

Draft is a valid WorkRequest state, but architect handoff excluded it. This blocked fresh claims and invalidated live sessions.

TL;DR

Allow draft WorkRequests to use the existing architect claim path.

Summary

  • Add draft to the shared architect handoff eligibility list.
  • Replace the nonexistent retry action with claim_local_architect_assignment.
  • Prove draft creation, claim, promotion, and live-session continuity.
  • Preserve repository, branch, phase, capability, lease, and terminal boundaries.
  • Review Suite fast: clean; simplification closure: conforms; no findings.

Alternatives

  • No new status graph or bypass: the existing shared eligibility predicate already owns all affected paths.

Test Plan

  • make -C elixir all
  • make -C elixir ci-full when release/full validation is required
  • Focused WorkRequest architect handoff and MCP tests: 53 passed
  • Focused stale-claim rollback proof: 1 passed

Summary by CodeRabbit

  • New Features

    • Architect handoffs can now be created and claimed for work requests in draft status.
    • Draft work requests can progress to ready_for_slicing after an architect assignment is claimed.
    • Partial handoff failures now provide a retryable local architect claim action.
  • Bug Fixes

    • Improved recovery guidance when path constraints change during handoff validation.
    • Draft work requests remain accessible during handoff transitions.

Summary:
- Treat draft as an eligible architect handoff status.
- Return the supported local architect claim recovery action.
- Cover draft creation, claim, promotion, and session continuity.

Rationale:
- Draft is a valid persisted WorkRequest status, but the shared handoff
  eligibility list excluded it and created an authority catch-22.
- Reusing the shared eligibility predicate fixes every affected path while
  preserving existing scope, lease, capability, and terminal checks.

Tests:
- mix test focused WorkRequest architect handoff and MCP suites (53 passed)
- mix test claim_session_transport_03_test.exs:394 (1 passed)
- make -C elixir all

Co-authored-by: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

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: 6eb9f962-bf7a-484b-a77c-bb794bb75689

📥 Commits

Reviewing files that changed from the base of the PR and between a9fab0b and 01424a2.

📒 Files selected for processing (7)
  • elixir/lib/symphony_elixir/symphony_plus_plus/mcp/server.ex
  • elixir/lib/symphony_elixir/symphony_plus_plus/work_requests/architect_handoff.ex
  • elixir/test/symphony_elixir/symphony_plus_plus/mcp/claim_session_transport_03_test.exs
  • elixir/test/symphony_elixir/symphony_plus_plus/mcp/work_request_tools_01_test.exs
  • elixir/test/symphony_elixir/symphony_plus_plus/mcp/work_request_tools_02_test.exs
  • elixir/test/symphony_elixir/symphony_plus_plus/mcp/work_request_tools_03_test.exs
  • elixir/test/symphony_elixir/symphony_plus_plus/work_request_architect_handoff_test.exs

Included review availability: Your plan provides up to 3 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Draft WorkRequests can pass architect handoff eligibility checks. MCP flows now claim draft architect assignments, promote WorkRequests, preserve scope access, and return local recovery actions for invalid path constraints.

Changes

Draft Architect Handoff

Layer / File(s) Summary
Draft handoff eligibility
elixir/lib/symphony_elixir/symphony_plus_plus/work_requests/architect_handoff.ex, elixir/test/.../work_request_architect_handoff_test.exs
Architect handoff eligibility now accepts draft WorkRequests. Handoff creation preserves the draft status.
Draft WorkRequest lifecycle
elixir/test/.../work_request_tools_01_test.exs, elixir/test/.../work_request_tools_02_test.exs, elixir/test/.../work_request_tools_03_test.exs
Tests cover draft creation, promotion to ready_for_slicing, continued scope access, and successful draft architect assignment claims.
Local recovery claim behavior
elixir/lib/.../mcp/server.ex, elixir/test/.../claim_session_transport_03_test.exs, elixir/test/.../work_request_tools_01_test.exs
Partial recovery responses now identify local_architect_assignment_claim. Invalid path constraints return a retryable local architect assignment without exposing prepare_architect_handoff.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 01424

This PR enables draft WorkRequests to follow the existing architect claim flow and updates the associated claim action, with focused validation reported as passing; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant MCPWorkRequestTools
  participant ArchitectHandoff
  participant WorkRequest
  MCPWorkRequestTools->>ArchitectHandoff: claim draft architect handoff
  ArchitectHandoff-->>MCPWorkRequestTools: return architect grant and work package
  MCPWorkRequestTools->>WorkRequest: promote draft to ready_for_slicing
  WorkRequest-->>MCPWorkRequestTools: return updated status
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required sections and clearly documents the change, alternatives, and completed validation.
Title check ✅ Passed The title clearly and concisely states the primary change: making draft WorkRequests architect-claimable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 fix/draft-work-request-authority

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

@Pimpmuckl
Pimpmuckl merged commit 729a26d into main Aug 19, 2026
24 checks passed
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