Skip to content

fix(roadmap): the constants gate reads only a stated value #5034

Closed

Description

@dan-petty

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:

  1. _CANDIDATE_NUMBER has no guard after the digits. In lines 1790-2000, the lookahead (?!-\d) refuses 1790, the engine backtracks, and 179 matches.
  2. 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:

Reproduction Steps

  1. 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}).
  2. Call constant_problems(["It SHALL run pytest with -n 0up toDEFAULT_CI_TEST_SERIAL_MAX_TESTS, and with -n DEFAULT_CI_TEST_NARROWED_WORKERS above 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

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

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p1-high
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  4. added 3 commits that reference this issue on Nov 12, 2026
    c1d4d26
    4c84a87
    3bb128d
  5. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 15:46 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions