test(FN-2249): add fast mode execution regression coverage
- Add executor regression tests for fast-mode completion paths, including tool injection, workflow-step bypass, and completion enforcement checks - Expand dashboard API tests to verify executionMode payload behavior for createTask and updateTask requests - Document fast-mode behavior across architecture, task management, and workflow-step docs with explicit gate bypass/enforcement details
This commit is contained in:
@@ -553,15 +553,17 @@ done
|
||||
### Execution detail
|
||||
- **Triage phase**: `TriageProcessor` generates executable spec
|
||||
- **Execution phase**: `TaskExecutor` performs implementation, tool calls, tests/build commands
|
||||
- **Review phase**: optional `reviewStep()` workflow depending on prompt review level
|
||||
- **Review phase**: optional `reviewStep()` workflow depending on prompt review level (bypassed in fast mode)
|
||||
- **Merge phase**: `aiMergeTask()` handles merge strategy and post-merge workflow steps
|
||||
|
||||
> **Fast Mode:** Tasks with `executionMode: "fast"` bypass the `review_step` tool injection and pre-merge workflow steps. Completion blockers (tests, build, typecheck from PROMPT.md) and post-merge workflow steps remain enforced.
|
||||
|
||||
### Step status model
|
||||
Task steps use statuses: `pending`, `in-progress`, `done`, `skipped`.
|
||||
|
||||
### Workflow steps
|
||||
- Defined in project config as `WorkflowStep`
|
||||
- **Pre-merge** steps run in executor (`runWorkflowSteps()`)
|
||||
- **Pre-merge** steps run in executor (`runWorkflowSteps()`) — bypassed in fast mode
|
||||
- **Post-merge** steps run in merger (`runPostMergeWorkflowSteps()`)
|
||||
|
||||
---
|
||||
|
||||
@@ -71,6 +71,62 @@ fn task archive FN-001
|
||||
fn task unarchive FN-001
|
||||
```
|
||||
|
||||
## Task Execution Modes
|
||||
|
||||
Each task has an execution mode that controls how the executor agent approaches the task:
|
||||
|
||||
| Mode | Description |
|
||||
|------|-------------|
|
||||
| `standard` | Full execution with complete review workflow (default) |
|
||||
| `fast` | Expedited execution with minimal overhead for simple tasks |
|
||||
|
||||
### Fast Mode Bypassed Gates
|
||||
|
||||
When `executionMode: "fast"`, the following automated review/validation gates are **bypassed**:
|
||||
|
||||
| Gate | Standard Mode | Fast Mode |
|
||||
|------|---------------|-----------|
|
||||
| `review_step` tool enforcement | Available to executor agent | **Not injected** |
|
||||
| Pre-merge workflow-step execution | Runs configured steps | **Skipped** |
|
||||
| Workflow revision loop | Enabled (feedback → fix → re-review) | **Disabled** |
|
||||
|
||||
### Fast Mode Mandatory Gates
|
||||
|
||||
The following quality gates **remain enforced** in fast mode:
|
||||
|
||||
| Gate | Behavior |
|
||||
|------|----------|
|
||||
| `task_done` requirement | Agent must call `task_done()` to complete |
|
||||
| Completion blocker checks | Tests, build, and typecheck from PROMPT.md still enforced |
|
||||
| Post-merge workflow steps | Run as normal (merger-owned) |
|
||||
|
||||
### Execution Mode Matrix
|
||||
|
||||
| Feature | Standard | Fast |
|
||||
|---------|----------|------|
|
||||
| Executor agent session | Full prompt + tools | Full prompt (minus review_step) |
|
||||
| Pre-merge workflow steps | ✅ Run | ❌ Bypassed |
|
||||
| `review_step` tool | ✅ Available | ❌ Not available |
|
||||
| Post-merge workflow steps | ✅ Run | ✅ Run |
|
||||
| Completion blockers (test/build/typecheck) | ✅ Enforced | ✅ Enforced |
|
||||
| `task_done()` requirement | ✅ Required | ✅ Required |
|
||||
|
||||
### Setting Execution Mode
|
||||
|
||||
Execution mode can be set during task creation or editing:
|
||||
|
||||
- **Via API**: Include `executionMode` field in task create/update payload
|
||||
- **Via dashboard**: Select execution mode in the task creation dialog or task detail modal
|
||||
- **Values**: `"standard"` (default) or `"fast"`
|
||||
|
||||
Example API payload:
|
||||
```json
|
||||
{
|
||||
"description": "Simple fix",
|
||||
"executionMode": "fast"
|
||||
}
|
||||
```
|
||||
|
||||
## Task Detail Modal (Dashboard)
|
||||
|
||||
The task detail modal exposes multiple tabs:
|
||||
|
||||
@@ -24,6 +24,8 @@ Workflow steps run in one of two phases:
|
||||
- **Pre-merge** (default): runs before merge/finalization; failure blocks completion
|
||||
- **Post-merge**: runs after successful merge; failure is logged but non-blocking
|
||||
|
||||
> **Note on Fast Mode:** When a task has `executionMode: "fast"`, pre-merge workflow steps are bypassed entirely during executor completion. Post-merge workflow steps remain active and run normally (post-merge is merger-owned and unaffected by execution mode).
|
||||
|
||||
## Execution Modes
|
||||
|
||||
- **Prompt mode**: starts an AI agent for the step
|
||||
|
||||
Reference in New Issue
Block a user