feat: add supervisor-helper.sh with SQLite schema and state machine (t128.1)#376
Conversation
Implements t128.1 - Autonomous Supervisor SQLite schema and state machine. - SQLite schema: tasks, batches, batch_tasks, state_log tables - State machine: queued->dispatched->running->evaluating->complete/blocked/failed - Retry cycle: evaluating->retrying->dispatched with configurable max retries - Commands: init, add, batch, transition, status, list, next, reset, cancel, db - Concurrency-aware dispatch via next command with batch limits - State transition validation with audit log - JSON output support for programmatic consumption - Zero ShellCheck violations
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 6 04:13:54 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
|
Caution Review failedThe pull request is closed. WalkthroughA new self-contained Bash-based supervisor script introduces multi-task orchestration with SQLite state persistence, supporting task creation, batching, state machine transitions, concurrency management, and comprehensive status tracking. Documentation and script index updated accordingly. Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI as supervisor-helper.sh
participant SQLite as SQLite DB
participant StateLog as state_log table
User->>CLI: init
CLI->>SQLite: CREATE schema (tasks, batches, etc.)
SQLite-->>CLI: Database ready
User->>CLI: add task (description, model)
CLI->>SQLite: INSERT task (state=queued)
SQLite-->>CLI: task_id
CLI->>StateLog: Log initial state
StateLog-->>CLI: Recorded
User->>CLI: batch --concurrency 3
CLI->>SQLite: INSERT batch
SQLite-->>CLI: batch_id
User->>CLI: transition task_id running
CLI->>SQLite: Validate state transition
SQLite-->>CLI: Transition allowed
CLI->>SQLite: UPDATE task state
CLI->>StateLog: Log state change
StateLog-->>CLI: Recorded
CLI->>SQLite: Check batch completion
SQLite-->>CLI: Status
User->>CLI: status
CLI->>SQLite: SELECT tasks, batches, state history
SQLite-->>CLI: Results
CLI-->>User: Colorized status output
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |



Summary
supervisor-helper.shwith full SQLite-backed task orchestrationWhat's New
supervisor-helper.sh (~700 lines)
SQLite Schema (4 tables):
tasks- Task queue with status, session, worktree, branch, retries, model, PR URLbatches- Named batch groups with configurable concurrency limitsbatch_tasks- Many-to-many relationship with position orderingstate_log- Full audit trail of every state transition with timestampsState Machine (9 states, 18 valid transitions):
Commands (12):
init- Initialize databaseadd <task_id>- Add task (auto-detects description from TODO.md)batch <name>- Create batch with concurrency controltransition <id> <state>- Validated state transitions with audit logstatus [id]- Task, batch, or overall status with color outputlist- Filter by state/batch, JSON output supportnext [batch_id]- Concurrency-aware next-task selectionrunning-count- Active task count for semaphore checksreset- Reset terminal tasks back to queuedcancel- Cancel task or entire batch (cascading)db [sql]- Direct SQLite access for debuggingQuality
local var="$1"pattern throughoutAlso Updated
subagent-index.toon- Registered supervisor-helper.shREADME.md- Updated script count (165 -> 167), added Supervisor to orchestration tableSummary by CodeRabbit