Private
Public Access
feat(directives): scavenge sweep 4/5 (tracks + commands + styleguides + todos): 18 batch-4 directives + concurrent worker batches
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# cheap_fix_first_investigation_phases
|
||||
|
||||
## v1
|
||||
|
||||
**Why this iteration:** Lifted verbatim from `docs/superpowers/plans/2026-06-05-undo-redo-lifecycle-fix.md` (the 3-phase investigation: state-sync first → snapshot inspection second → polling flake-fix third; each phase a separate task with separate commit).
|
||||
**Source:** `docs/superpowers/plans/2026-06-05-undo-redo-lifecycle-fix.md` Tasks 1-3
|
||||
**Lifted:** 2026-07-03 scavenge sweep batch 3/5: docs/superpowers/plans/
|
||||
@@ -0,0 +1,15 @@
|
||||
# Debug test failures in cheapest-fix-first phases; commit each phase separately so revert is surgical
|
||||
|
||||
When a regression-test failure has multiple plausible root causes, do not jump to the deepest hypothesis. Structure the investigation as N atomic phases ordered by cost-of-attempt:
|
||||
|
||||
- **Phase 1 — Cheapest fix:** try the lowest-risk hypothesis (e.g., does the test pass after a state-sync property delegation is added?). Run the failing test in isolation. If pass, document and stop.
|
||||
- **Phase 2 — Mechanism inspection:** only if Phase 1 fails, read the actual storage / serialization layer (e.g., `src/history.py:UISnapshot` fields; capture/restore in `_take_snapshot` / `_apply_snapshot`). Patch the missing field if found.
|
||||
- **Phase 3 — Test-side flake-fix:** only if Phases 1-2 fail, replace `time.sleep(N)` in the test with poll-until-state helpers per the `live_gui_poll_not_sleep` directive. This is a flake-fix, not a fix for the application.
|
||||
|
||||
**Each phase is its own commit**, with a `--allow-empty` no-op for "verified Phase 1 alone fixes it". The commit message must distinguish "applied fix" from "verified-only".
|
||||
|
||||
**Avoid Phase-N+1 if Phase N passed.** Don't pile on defensive snapshot additions when the state-sync property already fixed the test; the snapshot was a red herring.
|
||||
|
||||
**Rationale:** this pattern prevents "I added three things and the test passes" commits that make bisection and rollback harder. It also surfaces which root-cause candidates are wrong (the Phase 2 commit, if made, is evidence that field X is NOT the issue and the snapshot is fine as-is).
|
||||
|
||||
References: `docs/superpowers/plans/2026-06-05-undo-redo-lifecycle-fix.md` (the 3-phase sequential investigation with A/B/C decision gates in Task 1 + Task 2 + Task 3).
|
||||
Reference in New Issue
Block a user