Repository navigation
Description
Problem Description
The constants gate of the stage job refuses good plans. constant_problems in src/devops_cli/roadmap/stage/stage_constants.py takes a sentence that names one known constant and holds one candidate number, and it compares that number with the staged value. It does not check that the number is the value of the constant. Two defects cause false refusals:
_CANDIDATE_NUMBERhas no guard after the digits. Inlines 1790-2000, the lookahead(?!-\d)refuses1790, the engine backtracks, and179matches.- Any one number in the sentence counts as the value of the constant: an operand (
DEFAULT_CI_TEST_SERIAL_MAX_FILES + 1), an option value (-n 0), a line number (line 266), or the value of a new constant beside a known one (Add NEW_LIMIT of 3 beside KNOWN_LIMIT).
The gate came with #3308 (2026-11-07). The only real defect that it was made for is a value claim, such as "SUMMARY_MAX_CHARS is 40" in the plan of #3200.
Measured on 2026-11-12:
- The recorded refused reply of fix(ci): a narrowed ci test runs many slow tests serially #4472 (2026-11-11 11:30Z) gives 5 false problems on
origin/main87ae9ee:DEFAULT_CI_TEST_SERIAL_MAX_FILES179 (lines 1790-2000) and 1 (DEFAULT_CI_TEST_SERIAL_MAX_FILES + 1),DEFAULT_CI_TEST_NARROWED_WORKERS0 (-n 0, two sentences) and 50 (DEFAULT_CI_TEST_SERIAL_MAX_TESTS: Final[int] = 50beside it). - The recorded reply of fix(roadmap): halt implement step on consecutive command refusals #4043 (2026-11-11 10:29Z) gives 3 false problems:
CONST_ROADMAP_IMPLEMENT_MAX_REFUSALS3 (a new constant "of 3" beside it), 266 and 267 (at line 266). - Service job errors with a constants problem since 2026-11-08: feat(roadmap): each repair round changes the strategy of a step #3569 (
CONST_ROADMAP_STAGE_MAP_MAX_FILES137092), feat(roadmap): a repair attempt cannot repeat a failed tool call #3570 and fix(roadmap): halt implement step on consecutive command refusals #4043 (CONST_ROADMAP_IMPLEMENT_MAX_REFUSALS10), test(cli): Convert ratchets to bans and merge invariant tests #1336 (CONST_AGENTS_MD_MAX_CHARS6), feat(roadmap): the stage plan states constant claims in a structured field #3388 (PLAN_FIELD_MIN_CHARS11), fix(ci): a narrowed ci test runs many slow tests serially #4472 (as above). None of the numbers is a value that the plan gives to the named constant.
Reproduction Steps
- Call
constant_problems(["read_fileofci.pylines 1790-2000 showedci.py:1830:if len(targets) <= DEFAULT_CI_TEST_SERIAL_MAX_FILES:."], {"DEFAULT_CI_TEST_SERIAL_MAX_FILES": 12}). - Call
constant_problems(["It SHALL run pytest with-n 0up toDEFAULT_CI_TEST_SERIAL_MAX_TESTS, and with-n DEFAULT_CI_TEST_NARROWED_WORKERSabove it."], {"DEFAULT_CI_TEST_NARROWED_WORKERS": 4}).
Expected vs Actual Behavior
Expected: no problem. A number is the value of a constant only when it follows the constant name with =, is or to, as in "SUMMARY_MAX_CHARS is 40" or "SUMMARY_MAX_CHARS: Final[int] = 40". That claim is still refused when it differs from the staged value.
Actual: "DEFAULT_CI_TEST_SERIAL_MAX_FILES is 12 in the staged tree, but the plan says 179." and "DEFAULT_CI_TEST_NARROWED_WORKERS is 4 in the staged tree, but the plan says 0."
Environment Diagnostics
- DevOps CLI:
mainat 87ae9ee (release 0.117.2). - Regex:
_CANDIDATE_NUMBER = re.compile(r"(?<![#:\w/.])(?<!\d-)(\d+)(?![/.]\w|-\d)"). - Requirement: "A plan number beside a constant matches the staged value" in
openspec/specs/roadmap-stage/spec.md. - Related: feat(roadmap): the stage plan states constant claims in a structured field #3388 adds structured constant claims and keeps the prose scan as a fallback, so this defect stays after feat(roadmap): the stage plan states constant claims in a structured field #3388.
Logs, Traces, or Terminal Output
stage: the stage job failed for 3 item(s): #4472 (RoadmapStageError: The change fails its checks, also after a second try: ... DEFAULT_CI_TEST_NARROWED_WORKERS is 4 in the staged tree, but the plan says 0. ...)
stage: the stage job failed for 3 item(s): #1336 (RoadmapStageError: The change fails its checks, also after a second try: CONST_AGENTS_MD_MAX_CHARS is 6500 in the staged tree, but the plan says 6.)
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate. feat(roadmap): the stage plan states constant claims in a structured field #3388 and feat(roadmap): the stage eval records the constants that a plan cites #3390 are related and do not fix the number regex.
Activity
dan-petty commentedon Nov 12, 2026
The gate blocks multiple items from progressing through the stage job.#3308 delivered the constants gate; this candidate fixes a defect in that gate's number-matching logic.fix(roadmap): the constants gate reads only a stated value
docs(openspec): put the 5034 delta in the roadmap-stage/claims capabi…
docs(openspec): archive 5034-the-constants-gate-reads-only-a
fix(roadmap): the constants gate reads 6_500 and no new value (#5080)
devops-cli-service commentedon Nov 12, 2026
Released in v0.119.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.119.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 15:46 UTC