Skip to content

fix(roadmap): the constants gate reads 6_500 and no new value #5069

Closed

Description

@dan-petty

Problem Description

#5042 (closes #5034) merged before the fix of its review findings. The constants gate of the stage job (src/devops_cli/roadmap/stage/stage_constants.py) still refuses good plans in two forms:

  1. A Python integer literal with a _ digit separator. A correct quote of CONST_AGENTS_MD_MAX_CHARS: Final[int] = 6_500 gives the problem "CONST_AGENTS_MD_MAX_CHARS is 6500 in the staged tree, but the plan says 6." (\d+) takes 6, the lookahead lets _ pass, and the lookbehind drops 500. fix(roadmap): the constants gate reads only a stated value #5034 lists this false refusal (test(cli): Convert ratchets to bans and merge invariant tests #1336), and 13 module constants in src/ use _ separators (for example 65_536 and 262_144). The stage prompt asks the model to cite the staged value of each constant, so the gate refuses the citation that the prompt asks for.
  2. A new value after to. The staged tree is the commit before the change, so "Raise NAME to 40" or "The test patches NAME to 1" always differs from the staged value. The to link of _VALUE_LINK makes the gate refuse a plan that changes a constant. fix(roadmap): the constants gate reads only a stated value #5042 put this refusal into the spec of roadmap-stage/claims and into a test (set-to).

The archived change of #5034 also holds false claims: "the change adds no refusal" (a sentence that held a range and a value claim is now checked), and "the gate was made for the #3200 defect" (neither the old nor the new gate refuses the real #3200 plan, so the gate has no recorded true positive). Its Impact section does not list the value-claim forms that the gate no longer refuses.

Reproduction Steps

  1. On origin/main at cf4733e, call constant_problems(["constants.py:195:CONST_AGENTS_MD_MAX_CHARS: Final[int] = 6_500"], {"CONST_AGENTS_MD_MAX_CHARS": 6500}).
  2. Call constant_problems(["Raise CONST_X to 40."], {"CONST_X": 30}).

Expected vs Actual Behavior

Expected: no problem for either text. Actual: step 1 gives "... the plan says 6." and step 2 gives "CONST_X is 30 in the staged tree, but the plan says 40."

Environment Diagnostics

origin/main at cf4733e (after #5042).

Logs, Traces, or Terminal Output

Review of #5042: findings 1 (blocking), 2 (major), 3 to 5 (minor). Each finding was reproduced on cf4733e with constant_problems.

Source: #5042

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  5. 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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions