Repository navigation
Description
What happened
Five test modules set a live mark for the whole module with pytestmark. The mark tells the hermetic floor to let the named programs start, so every test in the module may start them, also the tests that should start nothing. A test that starts one of these programs by mistake then passes, and the floor does not report it.
| Module | live programs |
Tests in the module |
|---|---|---|
tests/test_ci.py:55-58 |
devops, bash, python, ruff | 89 |
tests/test_process.py:26-29 |
true, sh, false, sleep, echo, python, pwd | 24 |
tests/test_subprocess_env_boundary.py:31 |
python | 24 |
tests/test_isolation_tripwire.py:35 |
python | 23 |
tests/test_cli_startup_imports.py:38 |
python | 12 |
For example, the test-suite audit of 2026-10-24 at df8e2ee saw 4 of the 24 tests in tests/test_subprocess_env_boundary.py start python. In tests/test_ci.py it saw 10 test items start devops, bash or python, from 6 of its 89 test functions, and none start ruff.
What should happen
Each live mark sits on the tests that start the program, and names only the programs that each one starts. The floor refuses every program in the other tests of the module. When #2143 and the issues that follow it remove a real program from a test, its mark goes with it.
Evidence
At b170358:
- The five
pytestmarklines in the table. tests/conftest.py:533-541and:1375: the floor reads thelivemarks of each test..data/agent/scratch/audit/full_list.txtof the 2026-10-24 audit, sections 1.python, 1.sh and 1.live-mark.
Acceptance criteria
- None of the five modules sets
liveinpytestmark. - Each test that starts a program carries its own
livemark with only the programs it starts. - A test in these modules that starts a program it does not name fails at the floor. The pull request shows one such failure on a scratch change.
-
uv run devops cipasses.
Follows ADR 0007 as #2143 amends it. Related: #2069 (the second-signal test of devops ci test).
Source: #2143
Proposed design
Problem statement
Five test modules set a live mark at the module level with pytestmark. This grants every test in the module permission to start the named programs. A test that starts a forbidden program by mistake then passes, because the floor sees the module-level mark. The fix moves each live mark to the individual test that starts the program. It names only the programs that test starts.
Acceptance criteria
- Criterion 1: None of the five modules sets live in pytestmark.
Verification: Grep the five test files for pytestmark and confirm no live marker is present in any of them. - Criterion 2: Each test that starts a program carries its own live mark naming only the programs it starts.
Verification: Run the full test suite and confirm the floor allows only the programs named on each test. - Criterion 3: A test that starts a program it does not name fails at the floor.
Verification: Apply a scratch change that makes one test start an unlisted program. Confirm the test fails at the floor. - Criterion 4: uv run devops ci passes.
Verification: Run uv run devops ci and confirm all checks report a passing status.
Key questions
- Does the conftest floor read live marks per test rather than per module?: Yes. The fixture configure_edge_markers calls request.node.iter_markers('live'), which reads markers on the specific test node. [sources: tests/conftest.py:533-541]
- Is docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 a prerequisite for this issue?: Yes. The body states this issue follows ADR 0007 as docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 amends it, and that when docs(testing): adr 0007 and docs/testing.md say that a test of src starts no program, and real processes stay in the process runner's contract suite #2143 removes a program from a test, its mark goes with it. (proposed)
- Is fix(tests): the second-signal test of devops ci test waits for an event, not a time window, so it passes under load #2069 a dependency?: No. The body lists fix(tests): the second-signal test of devops ci test waits for an event, not a time window, so it passes under load #2069 as related, not as a prerequisite. It concerns the second-signal test of devops ci test. (proposed)
Open questions
- Which tests in test_ci.py start which programs? (missing verified source)
- Which tests in test_subprocess_env_boundary.py start which programs? (missing verified source)
- Does any test in test_ci.py start ruff? (missing verified source)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The change affects how tests are marked and executed.The change fixes a correctness issue in test execution and hermeticity.The change ensures accurate test behavior and prevents false positives in test results.It requires updating marks in multiple test modules and verifying the changes.Both items deal with test execution and program starting, but the candidate focuses on live marks placement while #2164 addresses checks in committed files.dan-petty commentedon Oct 27, 2026
Refine cannot set this item to Ready at 0abf552 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.