Commit edf56aa
committed
fix: avoid redundant inspector workflow refresh
Inspector workflow entry should initialize workflows only when the list is empty. The previous guard still refreshed unconditionally, so the check was dead code and repeated entries could rebuild already-loaded workflows.
Constraint: Issue #209 asks for the empty-workflow guard to short-circuit subsequent refreshes
Rejected: Refresh on every Inspector entry | preserves the dead-code guard and keeps unnecessary re-fetch behavior
Confidence: high
Scope-risk: narrow
Directive: Keep Inspector workflow initialization lazy unless a future change needs explicit reload behavior
Tested: env -u GOROOT go test ./internal/app -run TestInspectorEnsureWorkflows -count=1
Tested: env -u GOROOT make test
Tested: env -u GOROOT make build
Tested: env -u GOROOT go vet ./...
Tested: git diff --check
Related: #2091 parent 0b33442 commit edf56aa
2 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | | - | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
8 | 43 | | |
9 | 44 | | |
10 | 45 | | |
| |||
0 commit comments