Overview
Purpose: Run existing test suite to verify no regressions introduced by implementation changes.
Type: Linear Workflow (4 sequential phases)
Single Responsibility: ONLY runs tests and reports results - does NOT create tasks or change statuses.
graph TD
Start([START]) --> Phase1[Phase 1: Discovery
Auto-detect framework
Locate test directories]
Phase1 --> Phase2[Phase 2: Run Tests
Execute test suite
5-minute timeout]
Phase2 --> Phase3[Phase 3: Parse Results
Extract statistics
Identify failed tests]
Phase3 --> Phase4[Phase 4: Report Results
Add Linear comment
Return JSON verdict]
Phase4 --> End([END:
JSON verdict returned])
classDef phase fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef endpoint fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase1,Phase2,Phase3,Phase4 phase
class Start,End endpoint
Phase Descriptions
Phase 1: Discovery
- Auto-detect test framework (pytest/jest/vitest/go test)
- Locate test directories (tests/, test/, __tests__/)
- Count test files
Phase 2: Run Tests
- Construct framework-specific test command
- Execute via Bash tool with 5-minute timeout
- Capture stdout/stderr output
Phase 3: Parse Results
- Parse output based on framework
- Extract: total tests, passed, failed counts
- Identify failed test names with file:line references
- Calculate execution time
Phase 4: Report Results
- Determine verdict (PASS if failed=0, else FAIL)
- Format Linear comment with results
- Add comment to Story in Linear
- Return JSON verdict with all fields
Output Format
{
"verdict": "PASS" | "FAIL",
"framework": "pytest" | "jest" | "vitest" | "go test",
"total_tests": 127,
"passed": 125,
"failed": 2,
"failed_tests": [
"tests/auth/test_login.py::test_expired_token",
"tests/api/test_rate_limit.py::test_burst_limit"
],
"execution_time": "12.5s",
"linear_comment_id": "abc123"
}
Key Characteristics
- Atomic Worker: Single responsibility - runs tests only
- Framework Agnostic: Auto-detects pytest/jest/vitest/go test
- Timeout Protection: 5-minute maximum execution time
- Structured Output: JSON verdict for programmatic consumption
- Linear Integration: Adds formatted comment with results