Commit 43aee31
refactor(capture): extract workflow logic with proper separation of concerns
- Add workflow.py with phase-specific result types:
- BrowserCheckResult: browser installation check
- ConnectivityResult: connectivity check
- AuthResult: authentication detection
- CaptureResult: capture operation result
- CaptureWorkflowResult composes phase results with convenience properties
- cli/capture.py now thin CLI layer using workflow functions
- Add comprehensive tests for all workflow types and functions (35 tests)
This design makes each type testable in isolation and clarifies
which fields are valid in which phase.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 3add8fd commit 43aee31
4 files changed
Lines changed: 1230 additions & 56 deletions
File tree
- src/har_capture
- capture
- cli
- tests/test_capture
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
| |||
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
49 | 74 | | |
0 commit comments