Repository navigation
Description
Problem
A plan can order the removal of an old test, but the step guard refuses each lost test. So such a plan can never pass. roadmap_implement_step.md:36 says Do not remove, rename or replace a test, and lost_tests (implement_test_names.py) counts a moved test as lost. This hurts the implement job, which spends the tokens and discards the work, and the person who must find the cause.
Evidence from the window 2026-11-03T15:05Z to 2026-11-04T15:05Z:
- fix(k8s): key claim table by chart version #2519 stopped at 04:09Z and at 07:16Z on
test_every_chart_an_application_installs_states_its_claims, with 4,516,206 input tokens. Task 1.2(c) of its plan says to delete that test. - The lost-test text matches no rule of
failure.py, so it getsci_infrawith actionretry. A retry cannot help a removal that the plan orders. - fix(ai): remove weight recs from gateway tune #2592 task 2.3 deletes tests. perf(k8s): use tag_digest HEAD for image pins #2610 tasks 3.1 and 3.3 replace tests and delete a contract suite. fix(models): make clean-default model fields required #2636 task 1.4 rewrites and renames a test. None of these 3 stopped on a lost test in the window, but each plan conflicts with the guard.
#2651 (29 tests, 5,323,223 tokens) and #3393 (4 tests, 5,147,858 tokens) lost tests by a model error. Their plans order no such removal. They used 10.5M of the 15.0M input tokens in these 4 stops. Their repair turn belongs to #3053 and not to this issue.
Expected
The step guard allows a removal or a rename that the plan records, and it refuses any other lost test. The record is the weakened_checks list of #3320, with check, stopped and safeguard. This issue adds no second plan form and no second gate. The prompt says the same as the guard. The eval property TESTS_KEPT reads the same record as allow_lost_tests.
The plan of this issue names the safeguard, because AGENTS.md rule 5 lets only the owner lower a threshold. #3320 holds that rule.
The plan of this issue also chooses the class of a lost test that the plan does not record. The failure.py docstring says that the class list is fixed, so a new class changes that table and its test.
Acceptance criteria
- A test: a removal that
weakened_checksnames passes the guard. - A test: a removal that
weakened_checksdoes not name stops the step. - A test: a rename or a move passes when the entry names the old test.
- A test on
roadmap_implement_step.md: the prompt allows a removal that the plan records. - A test: a stop for a lost test that the plan orders does not read
ci_infrawithretry. - A test:
TESTS_KEPTpasses a removal that the record names, through the same list asallow_lost_tests. - Each plan of fix(k8s): key claim table by chart version #2519, fix(ai): remove weight recs from gateway tune #2592, perf(k8s): use tag_digest HEAD for image pins #2610 and fix(models): make clean-default model fields required #2636 that is still under
openspec/changesholds an entry, by a new stage run or by an amendment.git grep -l "Weakened checks" openspec/changeslists each one.
Existing tool considered
Project code covers the need: lost_tests, _tests_failure (implement_step.py:1061), weakened_checks of #3320 and allow_lost_tests (implement_eval_properties.py:203). The standard library ast already reads the test names.
Dependencies
- feat(roadmap): a plan that deletes a guard check records the weakened check #3320: this issue reuses its list and its gate.
Related
Related: #3053, #3098, #2519, #2592, #2610, #2636
Proposed design
Problem statement
A plan can order the removal or rename of an old test, but the step guard refuses every lost test. The implement job then stops and spends tokens on a plan that it cannot complete. The change makes the guard, the prompt and the TESTS_KEPT eval property accept a lost test that the plan records in weakened_checks of #3320. The guard refuses any other lost test and classifies it correctly.
Acceptance criteria
Requirement: Recorded removal passes the guard
The step guard SHALL allow a test removal that the plan's weakened_checks list records.
Scenario: Recorded removal
- WHEN A step loses a test and
weakened_checksholds an entry for that test withcheck,stoppedandsafeguard. - THEN The guard reports no lost-test failure.
Requirement: Unrecorded removal stops the guard
The step guard SHALL refuse a test removal that the plan's weakened_checks list does not record.
Scenario: Unrecorded removal
- WHEN A step loses a test and no
weakened_checksentry names that test. - THEN The guard reports a lost-test failure and the step stops.
Requirement: Recorded rename or move passes the guard
The step guard SHALL allow a rename or a move when the weakened_checks entry names the old test.
Scenario: Recorded rename
- WHEN A test moves or changes its name and
weakened_checksholds the oldpath::name. - THEN The guard reports no lost-test failure.
Requirement: Prompt states the recorded exception
The roadmap_implement_step.md prompt SHALL allow a test removal or rename that the plan records and SHALL refuse any other lost test.
Scenario: Prompt text
- WHEN The implement-step prompt renders for a plan with a
weakened_checksentry. - THEN The prompt text says a recorded removal or rename is allowed and an unrecorded lost test is refused.
Requirement: Lost-test stop is not a CI retry
A stop for a lost test SHALL read the lost_test class with action stop, not ci_infra with action retry.
Scenario: Lost-test failure class
- WHEN A lost test stops a step.
- THEN The failure record reads
lost_testwith actionstop.
Requirement: TESTS_KEPT reads the plan record
The eval property TESTS_KEPT SHALL pass a test removal that weakened_checks records, through the same list as allow_lost_tests.
Scenario: Recorded removal in eval
- WHEN A fixture records a removal in
weakened_checksand buildsallow_lost_testsfrom that record. - THEN
TESTS_KEPTreturns OK.
Requirement: Remaining plans hold the record
Each plan of #2519, #2592, #2610 and #2636 that remains under openspec/changes SHALL hold a Weakened checks entry.
Scenario: Plan migration
- WHEN The command
git grep -l "Weakened checks" openspec/changesruns after the change. - THEN The output lists each of those plans that is still under
openspec/changes.
Requirement: One plan record and one gate
The change SHALL use the weakened_checks list of #3320 and SHALL add no second plan form or gate.
Scenario: Single record
- WHEN A plan records a test removal.
- THEN The guard and the prompt read
weakened_checks; no other record or gate authorizes the removal.
Existing Tool Considered
No alternatives check has run. The need is project-internal: lost_tests, _tests_failure (src/devops_cli/roadmap/implement_step.py:1061), weakened_checks from #3320 and allow_lost_tests (src/devops_cli/roadmap/implement_eval.py:89). The standard library ast already reads the test names. No open external tool covers this guard. The change extends existing project code; it does not build a new tool. The written cost is the guard, prompt and eval tests in this issue.
Key questions
- Which failure class should a lost test get when the plan does not record it?: Add one
lost_testclass with actionstop. Do not keepci_infrawithretry. The new class changes the fixed class table offailure.pyand its test. The repair turn for a model error stays with feat(roadmap): every step repairs before it gives up, in bounded rounds #3053. (best practice) [sources: src/devops_cli/roadmap/failure.py, src/devops_cli/roadmap/implement_step.py:1320]- Chosen: Add
lost_testwith actionstop. The class names the cause and gives an action that can help. A retry cannot restore a test that the plan does not record. - Rejected: Keep
ci_infrawith actionretry. A retry cannot help a lost test. The current class hides the cause. - Rejected: Use an existing model-error class. The issue does not define that class for this cause. A new class keeps the fixed table explicit.
- Chosen: Add
- How do the step guard and the
TESTS_KEPTeval property read the same plan record?: Use one helper that readsweakened_checksand returns thepath::nameentries. The guard andTESTS_KEPTcall the helper.TESTS_KEPTcompares the result withallow_lost_tests, so both read one list. (best practice) [sources: src/devops_cli/roadmap/implement_step.py:1061, src/devops_cli/roadmap/implement_eval.py:78, src/devops_cli/roadmap/implement_eval_properties.py:203]- Chosen: One shared helper. The guard and the eval property cannot drift. The issue adds no second gate.
- Rejected: Separate parsing in the guard and the eval property. Two parsers can disagree on the same plan record.
- How do the plans of fix(k8s): key claim table by chart version #2519, fix(ai): remove weight recs from gateway tune #2592, perf(k8s): use tag_digest HEAD for image pins #2610 and fix(models): make clean-default model fields required #2636 get the
Weakened checksentry?: Amend each plan that remains underopenspec/changesin this pull request. Add the entry to its change folder. Do not run a new stage job for those items. (best practice) [sources: CONTEXT.md, AGENTS.md]- Chosen: Amend each remaining change folder. One pull request delivers this issue. The entry is a small edit to an existing plan.
- Rejected: Run a new stage job for each item. A stage job creates separate work and a second plan. The issue needs no new plan form.
- Does the recorded exception lower a quality threshold that only the owner can allow?: No. The plan names the safeguard, and feat(roadmap): a plan that deletes a guard check records the weakened check #3320 holds the owner rule. The guard allows only a removal that the plan records. It refuses every other lost test. (best practice) [sources: AGENTS.md, src/devops_cli/roadmap/implement_step.py:1061]
- Chosen: Recorded exception with a safeguard. The exception is narrow and named. The guard still refuses an unrecorded lost test.
- Rejected: Allow every lost test. This lowers the test-keeping threshold for every step and hides model errors.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Repeated implement stops wasted over 10.5 million tokens in one window, and four open plans still conflict with the guard.Prevents millions of wasted tokens and unresolvable step failures when a plan legitimately orders a test removal.Modifies the guard logic, the prompt, the TESTS_KEPT property, adds tests, and amends four existing plans.Both use the weakened_checks list from #3320, but #3320 adds the recording of a weakened check while the candidate makes the step guard read that record to allow a plan-ordered test removal.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 336731c (see proposed design in issue body).
dan-petty commentedon Nov 5, 2026
Answer from project standards, under the owner's instruction of 2026-11-05.
Question: which class does a lost test that the plan does not record get?
Answer:
FailureClass.TESTS_LOST, with the actionwaitinACTION_BY_CLASS. This change adds no new class. The step passes this class since #3476, so a stop no longer readsci_infra. The ruledigestofstop_clear.pyclears only a class with the actionretry, so a new runner image no longer starts the same step again. A new image cannot restore a test. This replaces thelost_testclass that the proposed design names:FailureActionhas nostopaction, and the docstring offailure.pysays that the class list is fixed.Question: what safeguard makes a recorded removal safe, given that AGENTS.md rule 5 lets only the owner lower a threshold?
Answer: The guard trusts a recorded removal only after a person merges the plan. AGENTS.md says that only a person merges a pull request, so that merge is the owner allowing the removal under rule 5. The job reads the record from
origin/<default>, in the same way as_hooks_config(#3043). It never reads the checkout, which the agent can edit. An entry that the agent writes waives nothing, and a plan that is only on its staged branch records nothing.Question: must this item wait for #3320?
Answer: No. This item owns the reader:
plan_read.read_changereads the## Weakened checkssection ofproposal.mdintoStageProposal.weakened_checks. The implement job stopped #3320 on 2026-11-05 because no group of its plan reads the section back. #3320 keeps the reply key, the writer and the gate. The branch of this item changes the plan of #3320 to match, and the form of an entry agrees with the fields of that plan:- **<check>**: Stopped: <stopped> Safeguard: <safeguard>.Question: how do the plans of #2519, #2592, #2610 and #2636 get an entry?
Answer: By an amendment in this pull request, as the proposed design says. Each entry names each test that the plan removes or renames as
path::name.The line numbers in this issue now match
origin/mainat05544abc.devops-cli-service commentedon Nov 6, 2026
Released in v0.64.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.64.0
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 02:22 UTC