mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
MegaTask umbrella e2e scenario + batch root-subtask completion fix; comms dead-code deletion (#296)
* chore(panel): delete the five dead comms components The comms audit found communications-view, channel-sidebar, channel-item, message-list, and message-item exported but rendered by no page — the live /communications page and the session detail render their own inline content and import only MessageComposer and MessageTypeBadge, which stay. Verified zero consumers outside the dead cluster before deletion; panel gates green (tsc, lint, 187 tests). * feat(tests): e2e scenario 4 — MegaTask umbrella; fix batch root-subtask completion wall Scenario 4 seeds an umbrella + two dependency-linked root-subtasks: sequencing hold proven (unmet_dependency on RS2's i_will_plan while RS1 lives), RS1 completed through the entire real chain to a master merge, hold lifts, RS2 completes, umbrella closes branchless via ceo-approve and never carries a PR. Product fix it surfaced on first run: _main_pm_complete_guard and escalate_to_ceo refused ANY parented task as 'not a root', but a batch root-subtask is parented (the umbrella) BY DESIGN — both sites now consult is_batch_root_subtask, plain subtasks stay refused. Live root-subtasks previously needed CEO god-mode to close. Regression tests added; built subagent-driven (Sonnet 5) and reviewed. --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -1367,6 +1367,27 @@ async def test_escalate_to_ceo_returns_none_for_subtask(
|
||||
assert out is None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_escalate_to_ceo_allows_batch_root_subtask(
|
||||
task_setup: dict, db_session: AsyncSession
|
||||
) -> None:
|
||||
"""A MegaTask root-subtask IS parented (the umbrella) yet carries its own
|
||||
project/branch/PR and behaves as a root for git/CEO purposes — unlike a
|
||||
plain subtask, it must NOT be refused by the parent-task-only check."""
|
||||
svc = task_setup["svc"]
|
||||
umbrella = await svc.create(_req(task_setup))
|
||||
sub = await svc.create(_req(task_setup, parent_task_id=umbrella.id))
|
||||
sub.status = TaskStatus.AWAITING_PM_REVIEW
|
||||
sub.batch_id = uuid4()
|
||||
sub.pr_number = 7
|
||||
await db_session.flush()
|
||||
escalated = await svc.escalate_to_ceo(
|
||||
sub.id, agent_role="main_pm", notes="root-subtask ready for CEO sign-off"
|
||||
)
|
||||
assert escalated is not None
|
||||
assert escalated.status == TaskStatus.AWAITING_CEO_APPROVAL
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_escalate_to_ceo_returns_none_when_no_pr(
|
||||
task_setup: dict, db_session: AsyncSession
|
||||
|
||||
Reference in New Issue
Block a user