Repository navigation
Description
Problem or Motivation
tests/roadmap/test_roadmap_stage_eval_cases.py pins the size of the stage golden set with literals: len(cases) == 42, len(good) == 3, len(EVALUATED_PULLS) == 39, and a literal set of 39 pull numbers. A plan that adds a golden case must edit the set and the three numbers in that test. No prompt asks the planner to do it, and no gate refuses a plan that leaves the test out.
The plan of PR #3436 for #3411 is the case. Its group 3 adds a case for the new What Changes rule, and the first plan named only tests/roadmap/test_roadmap_stage_eval_run.py in the group's changes. An implementer who followed that plan would add the case and leave the count test failing. The review of the plan found the omission.
Proposed Solution & Architectural Design
Derive the counts from the fixtures and keep one statement of the intended set. Compare the set of reviewed pulls in the fixtures with EVALUATED_PULLS and drop the separate hard-coded counts, or compute each count from that set. The test keeps its guard against an accidental removal of a case, and a new case needs one edit.
Add a test in tests/roadmap/test_roadmap_stage_eval_cases.py that loads a temporary set with one more case and asserts that the count check accepts it.
Target Subsystem
tests/roadmap/test_roadmap_stage_eval_cases.py
Existing Tool Considered
No tool. The change edits one pytest module over the fixtures and deletes no product code. The cost is about 300 tokens to build, keep and fix, and 10 minutes.
Source: #3436
Dependencies
Alternatives check of 2026-11-30: not-applicable.
Class: test, no model call.
Tool: none found.
Proposed design
Problem statement
The stage golden set test pins its case counts with literals. A plan that adds a case must edit the set and the numbers, and no prompt or gate catches a plan that omits this edit. The change derives the counts from the fixtures and keeps EVALUATED_PULLS as the one statement of the intended reviewed pulls.
Acceptance criteria
Requirement: Derived counts
The stage golden set test SHALL derive the expected total and good counts from the loaded cases and SHALL compare the reviewed pulls in the fixtures with EVALUATED_PULLS.
Scenario: Counts derive from the fixtures
- WHEN
uv run pytest tests/roadmap/stage/test_roadmap_stage_eval_cases.py -qruns at the repository head - THEN The count test passes and asserts that the reviewed pull set of the fixtures equals
EVALUATED_PULLSand that the total equals the size of that set plus the number of good cases.
Requirement: Reviewed pull guard
The count helper SHALL fail and name the pull when the fixtures omit a pull that EVALUATED_PULLS holds.
Scenario: Missing reviewed case
- WHEN a test copies the fixtures to
tmp_path, removes one case whose pull is inEVALUATED_PULLS, and calls the count helper withEVALUATED_PULLS - THEN The helper raises
AssertionErrorand its message holds the number of the removed pull.
Requirement: Additional case accepted
The count helper SHALL accept a fixture set with one more reviewed case when the intended pull set holds the new pull.
Scenario: One more case
- WHEN a test copies the fixtures to
tmp_path, adds a case with pull 9999, and calls the count helper withEVALUATED_PULLS | {9999} - THEN The helper returns with no assertion error and the test passes, so no literal count needs an edit.
Existing Tool Considered
The alternatives check of 2026-11-30 in the issue body gives the verdict not-applicable (class: test, no model call) and names no tool. No open, maintained tool or library covers this need, because the change edits one pytest module over fixtures and deletes no product code. The written cost to build instead is about 300 tokens to build, keep and fix, and 10 minutes.
Key questions
- Which path holds the stage golden set count test, and where is
EVALUATED_PULLSdefined?: The module istests/roadmap/stage/test_roadmap_stage_eval_cases.py. The path in the body,tests/roadmap/test_roadmap_stage_eval_cases.py, is stale. The module definesEVALUATED_PULLSat line 51 and asserts the total, good and reviewed counts as literals. The body gives 42, 3 and 39, and the triage comment of 2026-11-30 gives 63, 6 and 56, so no count number goes into the plan. [sources: tests/roadmap/stage/test_roadmap_stage_eval_cases.py, tests/roadmap/stage/test_roadmap_stage_eval_cases.py:51] - How should the test keep the intended reviewed pull set while it derives the counts?: Keep
EVALUATED_PULLSas the single statement of the intended reviewed pulls. Compare the reviewed pulls in the fixtures with it. Derive the total aslen(EVALUATED_PULLS) + len(good)and the good count from the loaded cases. Delete the literal total, good and reviewed counts. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_eval_cases.py:51]- Chosen: Keep
EVALUATED_PULLSand derive the counts. It keeps one statement of the intended reviewed set and catches an accidental removal of a reviewed case. - Rejected: Derive all counts from the fixtures alone. The fixtures alone cannot tell an accidental removal of a reviewed case from an intended one.
- Rejected: Keep the literal counts. A new case still needs edits to the set and to three numbers.
- Chosen: Keep
- Should the count check be a module-level helper that the new test calls?: Yes. Extract the reviewed-set comparison and the count derivation into a module-level helper,
check_case_counts(cases, intended). The helper takes the loaded cases and the intended pull set. The count test and the new test call it. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_eval_cases.py]- Chosen: Module-level helper. The new test can call the same check with a temporary set, and one copy of the assertions stays.
- Rejected: Duplicate the assertions in the new test. The two copies can drift apart.
- Rejected: Test the count check only through pytest. It cannot pass a temporary set to the count check.
- Does
load_casesread a plain directory that a test can copy?: Yes.load_casestakes the case directory, and the stage cases live intests/fixtures/roadmap_eval/stage. A test copies that directory totmp_pathand loads the copy. [sources: src/devops_cli/roadmap/stage/stage_eval_cases.py, openspec/specs/roadmap-stage-eval/spec.md:276] - How should the new test add one case without changing the repository fixtures?: Copy the case directory to
tmp_pathwithshutil.copytree. Copy one case whose verdict is not good to a new folder and set its pull to 9999 in itscase.json. Load the set withload_cases(tmp_path / "stage"). Call the helper withEVALUATED_PULLS | {9999}. (best practice) [sources: tests/roadmap/stage/test_roadmap_stage_eval_cases.py, src/devops_cli/roadmap/stage/stage_eval_cases.py, docs/TESTING.md:74]- Chosen: Temporary copied case set under
tmp_path. It exercises the loader on a temporary set, and the repository fixtures stay unchanged. - Rejected: A permanent extra case. It changes the golden set to test the test.
- Rejected: A hand-built list of case objects. It does not exercise the loader on a temporary set.
- Chosen: Temporary copied case set under
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
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.
testprefix of the title gives the type.(roadmap)scope of the title gives the scope.The friction already caused a missed edit in PR #3436 and will recur with every new case, but it is not a correctness or security gap.It removes a multi-edit step that a planner or implementer can skip, preventing a failing test on every case addition.The body estimates about 300 tokens and 10 minutes to edit one pytest module.Both concern the stage golden set and its test file, but #3028 creates the set and scoring command while this candidate changes how the count assertion in the test derives its expected value.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 53cffca (see proposed design in issue body).
[-]test(roadmap): the stage golden set derives its case count from the fixtures[/-][+]test(roadmap): Derive stage golden set case counts from fixtures[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 61 characters, and the limit is 60. The type and the scope stay.
test(roadmap): the stage golden set derives its case count from the fixturestest(roadmap): Derive stage golden set case counts from fixturesdevops-cli-service commentedon Nov 7, 2026
Alternatives check: not-applicable
Class: test. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 8, 2026
Staged: branch
test/3445-derive-stage-golden-set-case-counts, draft pull request #4174. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
The default branch changed these paths that the plan names, after the commit that the planner read. Read the commits before you judge the plan:
tests/roadmap/stage/test_roadmap_stage_eval_cases.py: 6512c9e fix(roadmap): refuse feasibility claims the run did not make (fix(roadmap): refuse feasibility claims the run did not make #4170)src/devops_cli/roadmap/stage/stage_eval_cases.py: 6512c9e fix(roadmap): refuse feasibility claims the run did not make (fix(roadmap): refuse feasibility claims the run did not make #4170)The runs of the planner and the review made 45 model request(s), and used 2833351 input tokens and 95552 output tokens. The tool calls, in order:
read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py"})read_spec({"capability":"roadmap-stage-eval"})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py","start_line":193,"end_line":300})search_code({"text":"EVALUATED_PULLS"})search_code({"text":"test_the_set_holds_the_48_plans_and_five_good_ones"})search_code({"text":"roadmap_eval/stage"})search_code({"text":"len(cases)"})search_code({"text":"== 53"})read_file({"path":"tests/invariants/test_roadmap_eval_fixtures.py"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":1,"end_line":120})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":200,"end_line":330})read_file({"end_line":200,"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":120})list_files({"directory":"tests/fixtures/roadmap_eval/stage"})references({"name":"test_the_set_holds_the_48_plans_and_five_good_ones"})references({"name":"EVALUATED_PULLS"})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py","start_line":40,"end_line":80})list_files({"directory":"tests/roadmap/stage"})list_files({"directory":"tests/fixtures/roadmap_eval/stage"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":200,"end_line":330})search_code({"text":"ci test"})read_file({"path":"tests/fixtures/roadmap_eval/stage/3411-a-what-changes-item-that-names/case.json"})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py","start_line":100,"end_line":220})read_file({"end_line":200,"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":100})read_file({"path":"tests/support/paths.py"})read_spec({})references({"name":"EVALUATED_PULLS"})references({"name":"test_the_set_holds_the_48_plans_and_five_good_ones"})read_spec({"capability":"roadmap-stage-eval"})read_spec({"capability":"roadmap-stage-eval","requirement":"The golden set holds the plans with their defects"})read_spec({"capability":"roadmap-stage-eval","requirement":"The golden set holds a test-only group that delivers its criterion and the same plan without the code"})search_code({"text":"len(cases) >= 10"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_cases.py","start_line":60,"end_line":80})search_code({"text":"check_case_counts"})search_code({"text":"class GroupKind"})search_code({"text":"kind: GroupKind"})search_code({"text":"\"other\""})read_file({"end_line":500,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":420})read_file({"path":"src/devops_cli/roadmap/stage/stage_form.py","start_line":1,"end_line":140})search_code({"text":"def _other_problems"})read_file({"end_line":230,"path":"src/devops_cli/roadmap/stage/stage_form.py","start_line":140})read_file({"end_line":620,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":500})search_code({"text":"skip_specs"})search_code({"text":"helper"})list_files({"directory":"tests/invariants"})read_file({"path":"tests/invariants/test_roadmap_eval_fixtures.py"})git_log({"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py"})search_code({"text":"bff2f14fd"})read_file({"end_line":400,"path":"tests/roadmap/stage/test_roadmap_stage_eval_cases.py","start_line":220})search_code({"text":"48"})read_spec({"capability":"roadmap-stage-eval","requirement":"The replay of the golden set runs once per test module"})search_code({"text":"twin_of"})search_code({"text":"weakened_checks"})search_code({"text":"Weakened"})search_code({"text":"def count"})search_code({"text":"len(good)"})search_code({"text":"EVALUATED"})search_code({"text":"53"})search_code({"text":"five good"})search_code({"text":"test_each_good_plan_passes_every_gate"})search_code({"text":"len(good) == 5"})search_code({"text":"== 5"})read_file({"end_line":140,"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":90})search_code({"text":"len(cases)"})search_code({"text":"len(EVALUATED_PULLS)"})read_file({"path":"openspec/changes/archive/2026-11-08-3343-the-stage-probe-checks-defecttype-membership/.openspec.yaml"})read_file({"path":"openspec/changes/archive/2026-11-08-3343-the-stage-probe-checks-defecttype-membership/proposal.md"})search_code({"text":"CRITERION_DROPPED"})search_code({"text":"criterion_dropped"})read_file({"path":"tests/invariants/test_source_tree.py","start_line":1,"end_line":120})read_issue({"number":3445})search_code({"text":"allowlist"})read_file({"path":"tests/fixtures/roadmap_eval/stage/2491-a-refused-jwt-exchange-of-the/case.json"})read_file({"path":"tests/fixtures/roadmap_eval/stage/good-2491-a-refused-jwt-exchange-of-the/case.json"})read_file({"path":"tests/fixtures/roadmap_eval/stage/3410-the-eval-field-group-is-dropped/case.json"})search_code({"text":"class StageCriterion"})search_code({"text":"criteria_problems"})search_code({"text":"stage_problem_criteria"})read_file({"end_line":200,"path":"src/devops_cli/roadmap/stage/stage_criteria.py","start_line":1})search_code({"text":"allowlisted with a reason"})search_code({"text":"stays in"})search_code({"text":"class Sentence"})search_code({"text":"Sentence ="})read_file({"end_line":380,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":320})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":100,"end_line":110})Tool calls: git_log=1 (empty=0), list_files=4 (empty=0), read_file=29 (empty=0), read_issue=1 (empty=0), read_spec=6 (empty=0), references=4 (empty=0), search_code=39 (empty=5)
The stage job read the open pull requests and their files in 1 GraphQL request(s).
5 remaining items
devops-cli-service commentedon Nov 8, 2026
The runner Job devops-cli-runner-20261108-181935-dd89 ended: succeeded.
Image digest: sha256:ddccbdfaab813837281f4060ada1a28e5e2ea6e0139dbd71e160f2f4c567f623
The last lines of its log:
docs(openspec): plan #3445 Derive stage golden set counts from fixtures
docs(openspec): plan #3445 Derive stage golden set counts from fixtur…
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (2026-11-30): this item changes one test module (the stage golden set counts), not a gate or a job rule. The hold line is removed from its Dependencies so that it can continue. The counts in
tests/roadmap/stage/test_roadmap_stage_eval_cases.pyare still literals (63, 6, 56).devops-cli-service commentedon Nov 30, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.