Skip to content

fix(roadmap): refuse a requirement text over 500 chars - #4614

Merged
dan-petty merged 3 commits into
mainfrom
fix/4524-requirement-length-gate
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4524-requirement-length-gate

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage gates and plan-check accepted a spec requirement text over 500 characters. The implement run then stopped at openspec archive, because openspec validate --all --strict refuses it in the merged spec. OpenSpec 1.14.3 checks the length of an ADDED requirement in a change, and not of a MODIFIED one, as in the #3462 plan.

Closes #4524

Change: openspec/changes/archive/2026-11-11-4524-plan-gates-miss-a-spec-requirement/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements

Stage eval replay (uv run devops roadmap eval stage --replay):

Run Cases paths known / caught / missed spec_delta_wrong caught / missed / no gate Judged Exit
Base (origin/main 5f75d25), old set 57 52 / 52 / 0 6 / 0 / 19 81 of 318 (25%) 0
Base gate with the new #3462 case (from the fail-to-pass run) 58 53 / 52 / 1 6 / 1 / 19 - fails
This change 58 53 / 53 / 0 7 / 0 / 19 82 of 319 (26%) 0

Good plans that every gate accepts: 5 of 5, before and after. The gate refuses no good plan.

fail-to-pass (uv run devops ci fail-to-pass --base origin/main): 6 failed on base and 147 passed. Two files fail at collection on base, because REQUIREMENT_MAX_CHARS does not exist there: tests/roadmap/stage/test_roadmap_stage_requirement_length.py and tests/roadmap/test_roadmap_plan_check.py. The tests that fail on base:

  • test_roadmap_stage_eval_gates::test_the_replay_of_each_case_passes[3462-a-modified-requirement-over-the-limit]
  • test_roadmap_stage_eval_gates::test_every_gate_still_refuses_every_known_bad_plan_it_must
  • test_roadmap_stage_eval_gates::test_no_defect_waits_for_a_gate_once_the_gates_of_3012_to_3017_are_built
  • test_roadmap_stage_eval_gates::test_the_counts_of_each_type_are_the_baseline_that_a_change_of_a_gate_beats ((6, 1, 19) on base)
  • test_roadmap_stage_eval_command::test_the_replay_exits_0_and_lists_what_each_gate_caught
  • test_roadmap_stage_eval_command::test_the_replay_as_json_holds_the_totals_of_each_gate

Premise: on the base, check_proposal returns no problem for the stock plan with a MODIFIED requirement text of 543 characters. In OpenSpec 1.14.3 (dist/core/validation/validator.js:270), the change validation checks the length of ADDED requirements only, and its comment says "MODIFIED is left alone".

Local checks: the eval, gate, plan and requirement-length tests pass (341 passed), the plan-check tests pass (32 passed), uv run devops openspec check and uv run devops ci docs pass.

@dan-petty
dan-petty force-pushed the fix/4524-requirement-length-gate branch from 8144cc4 to 70df44e Compare November 11, 2026 12:12
@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 12:53
@dan-petty
dan-petty force-pushed the fix/4524-requirement-length-gate branch from 70df44e to da1573f Compare November 11, 2026 12:54
@dan-petty

Copy link
Copy Markdown
Owner Author

Second round

The first CI run failed one test in shard 4: tests/commands/test_roadmap_eval_screen.py::test_a_fit_from_a_report_makes_no_request held the old size of the golden set ("0 of 57 reviews"). The new case also had to go into tests/fixtures/roadmap_eval/stage/split.json, because test_the_golden_set_holds_one_fixed_split_that_covers_each_case_once requires each case in one half. The split is fixed, so the case goes into half B, the smaller half (29 and 29 now), and no other case moves.

Local runs after the fix: the screen tests (31 passed), and the other test files that load the golden set (363 passed, 1 skipped). The replay after each rebase: 58 cases, 82 of 319 judged (26%), exit 0.

@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 13:00
@dan-petty
dan-petty force-pushed the fix/4524-requirement-length-gate branch from da1573f to 708626e Compare November 11, 2026 13:17
check_proposal refuses each ADDED and MODIFIED requirement whose text is
longer than REQUIREMENT_MAX_CHARS (500), the limit of the strict OpenSpec
validation of a spec. plan-check reports the same problem. The plan of
#3462 is a golden case of the stage replay.
@dan-petty
dan-petty force-pushed the fix/4524-requirement-length-gate branch from 708626e to dbd3d5e Compare November 11, 2026 13:19
@dan-petty
dan-petty merged commit f67c882 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the fix/4524-requirement-length-gate branch November 11, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): plan gates miss a spec requirement over 500 chars

1 participant