MVP P0/P1: pending-run execution, auth, and operator workflow - #4
Conversation
Capture the pending-run execution gap, auth fixes, failure notifications, archived-env guards, and operator SPA work needed for v1 MVP acceptance. Co-authored-by: suporterfid <suporterfid@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces the MVP P0/P1 implementation plan and design specifications for TaskConnect, outlining the roadmap for pending run execution, authorization, failure notifications, archived environments, and frontend operator workflows. The feedback suggests decoupling scheduled task execution from manual/test/retry run execution by defining a dedicated executePending() method in SchedulerCycleRunner instead of invoking PendingRunClaimer directly inside executeDue(), ensuring that metrics, logging, and heartbeat counts remain distinct and easier to monitor.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| ### 1. Pending run execution | ||
|
|
||
| Add `PendingRunClaimer` that claims `task_runs` in `run_state=pending` with a pending attempt (manual, test, and manual-retry paths). Invoke it from `SchedulerCycleRunner::executeDue()` after due-task claiming so one cron minute drains both scheduled and pending work. |
There was a problem hiding this comment.
Invoking PendingRunClaimer directly inside SchedulerCycleRunner::executeDue() couples scheduled task execution with manual/test/retry run execution. This can make monitoring, logging, and heartbeat metrics (such as scheduler.execute_due) confusing or inaccurate, as they will conflate scheduled runs with manual/test runs. Consider defining a separate method (such as executePending()) in SchedulerCycleRunner and calling both sequentially from the cron/console command. This keeps the execution statistics, heartbeats, and responsibilities clearly separated.
| Add `PendingRunClaimer` that claims `task_runs` in `run_state=pending` with a pending attempt (manual, test, and manual-retry paths). Invoke it from `SchedulerCycleRunner::executeDue()` after due-task claiming so one cron minute drains both scheduled and pending work. | |
| Add PendingRunClaimer that claims task_runs in run_state=pending with a pending attempt (manual, test, and manual-retry paths). Invoke it via a dedicated method (e.g., executePending()) in SchedulerCycleRunner called sequentially from the cron runner so one cron minute drains both scheduled and pending work while keeping metrics and heartbeats distinct. |
| **Steps:** | ||
| 1. Write failing feature test: `queueManualRun` → `PendingRunClaimer::claim` → `AttemptExecutor` → `run_state=succeeded`. | ||
| 2. Implement claimer (lock pending runs, claim pending attempt, return `ClaimedAttempt`). | ||
| 3. Call claimer from `executeDue()` after due tasks; record heartbeat counts. |
There was a problem hiding this comment.
Instead of calling the claimer inside executeDue(), consider keeping scheduled and pending run execution separate by defining a dedicated method (such as executePending()) in SchedulerCycleRunner. This ensures that heartbeat counts and execution metrics remain distinct and easier to monitor.
| 3. Call claimer from `executeDue()` after due tasks; record heartbeat counts. | |
| 3. Call claimer from a new executePending() method in SchedulerCycleRunner called sequentially after executeDue(); record distinct heartbeat counts. |
Pending runs created by queueManualRun, queueTestRun, and manualRetry never executed because the cycle only claimed due tasks and retry_wait. Add PendingRunClaimer, wire it into executeDue after due-task execution, and notify admins via FailureNotifier when a run becomes dead. Co-authored-by: suporterfid <suporterfid@gmail.com>
Refactor TaskPolicy/TaskRunPolicy onto Authenticatable + tenant access helpers. Cancel/retry require operate (admin/member or tasks:operate), closing the read_only_viewer hole. Allow tasks:read|write|operate on API keys. Co-authored-by: suporterfid <suporterfid@gmail.com>
Guard task/secret/profile/api-key creates (and task activate/resume/run/ test) against archived environments. Extend RetentionCleaner to prune attempt metadata, run summaries, and audit logs; drop duplicate stale attempt interruption. Fix TaskResource schedule_human to use fromConfig. Co-authored-by: suporterfid <suporterfid@gmail.com>
Align frontend types and error parsing with API resources, reload data on tenant/environment change, and fill operator workflow pages (secrets, task lifecycle/wizard schedules, run diagnostics, dashboard heartbeat, platform health for admins, password reset, and locale settings). Co-authored-by: suporterfid <suporterfid@gmail.com>
Expose PATCH /me/preferences and tenant audit-log listing, wire the settings/audit SPA surfaces, and sync locale from /me on login. Co-authored-by: suporterfid <suporterfid@gmail.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
CI failure investigationThe failing GitHub Actions annotation on the job:
Evidence:
Local verification on the PR head (
Action needed: restore GitHub Actions billing / raise the spending limit on the |
Summary
Implements the P0/P1 MVP hardening plan so TaskConnect can meet acceptance criteria in
docs/http-task-scheduler-spec.md§28 for core workflow and operability.P0
PendingRunClaimer)tasks:read|write|operate)StaleClaimRecoveryas the authoritative stale-claim pathP1
PATCH /me/preferences) + settings UIPlan
docs/superpowers/specs/2026-07-21-mvp-p0-p1-design.mddocs/superpowers/plans/2026-07-21-mvp-p0-p1.mdVerification
vue-tsc+ Vite): passedtcunavailable in this environment (host PHPUnit used)Test plan