File item 428 for the tests that skip at run time
CI / tests (pull_request) Has been cancelled

This commit is contained in:
2026-11-18 17:22:43 +01:00
parent 1cb68bbb5c
commit 6468c820a3
+25 -1
View File
@@ -6,12 +6,13 @@
`Bar = 0.1`
`Next ID = 428`
`Next ID = 429`
## Items
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 428 | 0.12.0 | | principle | **Make each test that skips at run time create the state it needs or fail naming what is missing, so no test in the repo skips at run time.** | 3 | 2 | 1 | 4 | 4 | code health by 3, 1.1 by 3 | 4.8 |
| 426 | 0.12.0 | | | **Read each epic issue's scores, its blockers and whether the loop filed it through `EpicStore`, from both backends.** | 2 | 2 | 2 | 4 | 3 | 1 by 5 | 1.9 |
| 427 | 0.12.0 | 426 | | **Re-rank Jira's backlog to match an epic's ranking, moving only the issues the loop filed, so people's issues keep their rank.** | 3 | 2 | 3 | 6 | 3 | 1 by 5 | 1.9 |
| 410 | 0.12.0 | 427 | | **Run `do-epic <EPIC-KEY>`: one tmux session per epic, a window per chunk, up to the epic's cap of running chunks and each repo's `parallel-chunks`, and never in a repo a loop-claude is running chunks in.** | 3 | 2 | 3 | 6 | 6 | 1 by 5 | 0.8 |
@@ -82,6 +83,29 @@
## Details
### 428. Make each test that skips at run time create the state it needs or fail naming what is missing, so no test in the repo skips at run time.
Follows item 400's bullet in `principles/technical-principles.md` → the tests principle: "A test doesn't decide at run time whether to check anything: no conditional skip, early return, or catch around its assertions. A test that needs a state creates it, or fails and names what is missing." Stability review found the repo's own tests break it in 13 places, each a skip decided at run time:
- root-less permission checks, `skipIf(os.geteuid() == 0, ...)`: 3 in `bin/loop_claude/test_black_box.py`, 3 in `bin/loop_claude/test_loop_claude.py`, 1 in `bin/routing_figures/test_routing_figures.py`, 1 in `bin/plan_store/test_stores.py`;
- pytest: `skipUnless(HAS_PYTEST, ...)` on the class `Run` in `bin/run_tests/test_run_tests.py`;
- docker: the `docker info` skipif on 2 tests in `bin/adf_codec/test_adf_codec.py`, and `needs_docker` in `bin/plan/test_touches.py`;
- /proc: `self.skipTest("no /proc/meminfo ...")` in `bin/run_heavy/test_run_heavy.py`.
The choice per case is the implementer's: for example, run the permission tests as a non-root user or drop the permission check in favour of an injected failure, take the docker or /proc state from an injected fake, or let the test fail naming what is missing. Done when a grep for `skipIf`, `skipUnless`, `skipTest` and `mark.skip` in the repo's tests finds none.
Touches:
- `bin/loop_claude/test_black_box.py`: `Cycles.test_exits_1_when_the_transcript_cannot_be_read`, `Interrupt.test_exits_1_when_the_transcript_cannot_be_read_after_the_interrupt`, `Models.test_exits_1_when_the_models_file_cannot_be_written`
- `bin/loop_claude/test_loop_claude.py`: `Cycles.test_stops_on_a_session_folder_it_cannot_read_whole`, `Cycles.test_stops_keeping_the_transcript_when_the_finished_chunks_session_cannot_be_deleted`, `RoutingCheck.test_says_a_figure_it_cannot_write_and_goes_on`
- `bin/routing_figures/test_routing_figures.py`: `Archive.test_fails_when_it_cannot_keep_the_state` (small)
- `bin/plan_store/test_stores.py`: `FilePlan.test_a_file_it_cannot_write_fails_naming_it` (small)
- `bin/run_tests/test_run_tests.py`: `HAS_PYTEST`, `Run` (small)
- `bin/adf_codec/test_adf_codec.py`: `test_round_trip_through_the_real_container`, `test_the_lossless_pair_gives_back_a_jira_description_identical_and_the_portable_pair_does_not`
- `bin/plan/test_touches.py`: `needs_docker`, `PredictedTest.test_a_list_written_in_markdown_and_read_back_from_a_jira_description_reads_as_written`, `PredictedTest.test_a_list_typed_in_jiras_editor_reads_as_its_files_and_parts`
- `bin/run_heavy/test_run_heavy.py`: `RunHeavy.test_a_docker_run_without_limits_gets_three_quarters_of_the_memory_split_across_the_slots` (small)
- `bin/machine_load/memory.py`: `read_memory` (small)
### 426. Read each epic issue's scores, its blockers and whether the loop filed it through `EpicStore`, from both backends.
Today `EpicIssue` holds none of the three, so do-epic cannot score or order an epic's items (item 408) or tell a person's issue from its own (item 427). The Jira backend reads them as `plan_store/jira_epic.py` does: the `plan-item` issue property, its `Filed by` key, and the "is blocked by" links. The contract tests in `contract.py` cover both backends.