docs(spec): defer Change 4 doc hardening per user review
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
|
||||
## 1. Background
|
||||
|
||||
### Test run results (2026-06-05, batched via `scripts/run_tests_batched.py`)
|
||||
|
||||
- **272 test files, 68 batches, 269/272 passing (98.9%).**
|
||||
- 3 failing tests, all in `live_gui` (session-scoped fixture) or `integration` marker category.
|
||||
- 0 failing tests in any other category (unit, headless, mock_app, simulation).
|
||||
### Scope decisions (per user review 2026-06-05)
|
||||
- Change 1 (the `b""` → `""` fix): **in scope, critical path.**
|
||||
- Change 2 (test mock fix): **in scope, critical path.**
|
||||
- Change 3 (regression unit test): **in scope, critical path.**
|
||||
- Change 4 (doc hardening of defer-not-catch sections): **DEFERRED to end of track** — user wants to see how long the critical path takes first. If time permits at the end, do Change 4 as a final commit; otherwise leave it for a follow-up patch.
|
||||
|
||||
### Failures (3)
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
| `test_workspace_profiles_restoration` | `tests/test_workspace_profiles_sim.py:81` | `assert False is True` after `load_workspace_profile` | Category A: same as above |
|
||||
| `test_no_extraneous_pop_when_prior_session_renders` | `tests/test_prior_session_no_pop_imbalance.py:135` | `TypeError: cannot unpack non-iterable NoneType object` at `src/gui_2.py:2333` | Category B: test mock setup for `imscope.window` returns non-iterable, but production code expects `(opened, visible)` tuple |
|
||||
|
||||
### Test run results (2026-06-05, batched via `scripts/run_tests_batched.py`)
|
||||
|
||||
- **272 test files, 68 batches, 269/272 passing (98.9%).**
|
||||
- 3 failing tests, all in `live_gui` (session-scoped fixture) or `integration` marker category.
|
||||
- 0 failing tests in any other category (unit, headless, mock_app, simulation).
|
||||
|
||||
### Root cause analysis (Category A — both profile failures)
|
||||
|
||||
A regression introduced by commit `d7487af4` ("fix(gui_2): defer save_ini_settings on first capture to avoid early-render crash"). That commit added a defer-not-catch guard in `_capture_workspace_profile` (`src/gui_2.py:601-606`):
|
||||
@@ -74,6 +80,7 @@ The test mocks `imscope.window(...)` to return a `MagicMock()` whose `__enter__`
|
||||
2. **Preserve the defer-not-catch safety property** of commit `d7487af4` (avoid C-level crash on early-render C calls).
|
||||
3. **Harden the defer-not-catch documentation** to call out the str/bytes type contract (avoid future regressions of the same kind).
|
||||
4. **Tighten the test-authoring contract** for the prior session test: mock imscope context managers with the correct return shape.
|
||||
5. **OPTIONAL/DEFERRED:** Harden the defer-not-catch pattern doc with a "sentinel must match consumer type contract" note. Per user review (2026-06-05), this is deferred to the end of the track. If time permits, do it; otherwise leave for a follow-up patch.
|
||||
|
||||
## 3. Non-Goals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user