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
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
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 three numbers in the test. No prompt or gate catches a plan that omits this edit. The change derives the counts from the fixtures and keeps one reviewed pull set.
Acceptance criteria
Requirement: Derived counts
The stage golden set test SHALL derive the expected total and good case counts from the loaded fixtures and EVALUATED_PULLS.
Scenario: Counts derive from fixtures
- WHEN the test loads the stage cases and separates reviewed pulls from good cases
- THEN the test compares the reviewed pull set with
EVALUATED_PULLSand computes the total as the size of that set plus the number of good cases, with no literal 42, 3, or 39.
Requirement: Reviewed pull guard
The count check SHALL fail when the fixtures omit a pull in EVALUATED_PULLS.
Scenario: Missing reviewed case
- WHEN a temporary fixture set omits one pull from
EVALUATED_PULLS - THEN the check fails and reports the missing pull number.
Requirement: Additional case accepted
The count check SHALL accept a temporary fixture set with one more case when the intended pull set includes the new pull.
Scenario: One more case
- WHEN the test copies the cases to
tmp_path, adds a case with a new pull, and calls the count check withEVALUATED_PULLSplus that pull - THEN the check passes without an edit to a literal count.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need: the change edits one pytest module over fixtures and deletes no product code. The written cost is about 300 tokens to build, keep and fix, and 10 minutes.
Key questions
- Where does the test pin the stage golden set counts?: The test compares against 42, 3, and 39 at lines 47 and 48 of
tests/roadmap/test_roadmap_stage_eval_cases.py. [sources: tests/roadmap/test_roadmap_stage_eval_cases.py:47, tests/roadmap/test_roadmap_stage_eval_cases.py:48] - How should the test keep the intended reviewed pull set while it derives the counts?: Keep
EVALUATED_PULLSas the single intended reviewed set. Compare it with the reviewed pulls in the fixtures. Derive the total fromlen(EVALUATED_PULLS) + len(good). Derive the good count from the fixtures. Remove the literal 42, 3, and 39. (best practice) [sources: tests/roadmap/test_roadmap_stage_eval_cases.py:29, tests/roadmap/test_roadmap_stage_eval_cases.py:47, tests/roadmap/test_roadmap_stage_eval_cases.py:48, openspec/changes/3411-refuse-a-what-changes-item-that/tasks.md:23]- Chosen: Keep EVALUATED_PULLS and derive counts. It keeps one statement of the intended reviewed set and a new reviewed case needs one edit.
- Rejected: Derive all counts only from the fixtures. It cannot catch an accidental removal of a reviewed case.
- Rejected: Keep the literal counts. A new case still needs edits to the set and three numbers.
- Should the count check be a helper function that the new test can call?: Yes. Extract the reviewed-set comparison and the count derivation into a module-level helper. The helper takes the cases and the intended pull set. The main test and the new test call it. (best practice) [sources: tests/roadmap/test_roadmap_stage_eval_cases.py]
- Chosen: Module-level helper. The new test can call the same check with a temporary set.
- Rejected: Duplicate the assertions in the new test. The two copies can drift apart.
- Rejected: Test only the main test through pytest. It cannot pass a temporary set to the count check.
- How should the new test add one case without changing the repository fixtures?: Copy the cases to
tmp_path. Add a copied case with a new pull. Load the temporary set withload_cases. Call the count helper withEVALUATED_PULLSplus the new pull. (best practice) [sources: tests/roadmap/test_roadmap_stage_eval_cases.py]- Chosen: Temporary copied case set. It tests the count check offline and leaves the repository fixtures unchanged.
- Rejected: Permanent extra case. It changes the golden set to test the test.
- Rejected: Hand-built list of StageCase objects. It does not exercise the loader on a temporary set.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-07: not-applicable.
Class: test, no search.
Tool: none found.
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).
docs(openspec): plan #3445 Derive stage golden set counts from fixtures
devops-cli-service commentedon Nov 8, 2026
Stopped at group 1.
Failure class:
tests_lost.Action taken: none.
Action left:
wait: wait for a person.Reason:
Last message of the agent (a claim that no check verified): Done. Changed
tests/roadmap/stage/test_roadmap_stage_eval_cases.py: - Added the module-level helper that derives the counts: it builds the reviewed pulls as a frozenset and the good cases as a list, asserts no intended pull is missing (message names them), asserts no reviewed pull is outside the intended set (message names them), and assertslen(cases) == len(intended) + len(good). - Replaced the count test body with one call to the helper and renamedtest_the_set_holds_the_49_plans_and_five_good_onestotest_the_set_holds_the_reviewed_plans_and_the_good_ones; deleted the literals (54,5,49at this commit, not the stale53,5,48of the task text) and theassert len(EVALUATED_PULLS) == 49line. - Addedtest_one_more_case_is_accepted_when_the_intended_set_holds_its_pull, which copies the fixture folders totmp_path/stage, adds a reviewed case as9999-a-new-reviewed-casewithpull9999, loads the temporary set withload_cases, and checks it againstEVALUATED_PULLS | {9999}. - Ticked task 1.1 inopenspec/changes/3445-derive-stage-golden-set-case-counts/tasks.md. Deviation from the plan text: the helper is namedassert_case_counts, notcheck_case_counts. Theconstructsrow ofdevops ciruns the ast-grep ruletest-function-has-assertion, which refuses a test whose only call is acheck_*helper (it acceptsassert*, as the existingassert_is_ignoredandassert_audit_workflow_contracthelpers show). With `check_case_countThe job discarded this work. Read it before you retry:
The item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.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.