Repository navigation
Description
Problem or Motivation
The premise probe of the stage job checks a path or an identifier that an issue cites. It does not check a class field that the issue says is absent.
Issue #3344 says PullStatus in src/devops_cli/github/client.py defines no labels. Commit 499a5462 (#3399) added labels, so the premise is false now. The stage job still staged PR #3350, and its Feasibility said the field is absent. A plan can therefore spend a full stage run on a gap that a merged commit has already closed.
Proposed Solution & Architectural Design
- Add a probe question for a dotted reference
Class.fieldin the issue body: read the class at the staged commit and ask whether it defines the field. - Reuse the model reader that feat(roadmap): Refuse a plan that reads an absent model field #3344 adds, or the
astreader ofsrc/devops_cli/roadmap/stage_probe.pywhen feat(roadmap): Refuse a plan that reads an absent model field #3344 is not merged. - When the field exists and the issue says it is absent, return the item to New with the evidence, or tell the planner to restate the plan around the current field.
- Add an offline test in
tests/roadmap/test_roadmap_stage_probe.pywith a class that holds the named field and a body that says it is absent.
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
No open, maintained tool reads a Pydantic class field at a git commit. The change extends the existing premise probe and uses its git calls and the standard library ast; it adds no dependency. Cost: about 4,000 output tokens to build and test, about 1,000 tokens for each later fix, and about 2 hours elapsed.
Proposed design
Problem statement
The stage premise probe checks each path and identifier that an issue cites. It reads a dotted reference such as PullStatus.labels as a path, and no file holds that path. The plan can then state that a field is absent after a commit added it. The stage job spends a full plan run on a premise that is already false.
Acceptance criteria
Requirement: Field reference probe
The premise probe SHALL read a cited Class.field reference as a class field when the staging commit defines the class.
Scenario: A class that defines the cited field
- WHEN The issue body cites
PullStatus.labelsandPullStatusat the staging commit defineslabels - THEN The probe text says that
PullStatusdefineslabelsat its file and line, and the reference is not in the probe's missing list.
Requirement: Field absent from the class
The probe SHALL state that the class defines no field of the cited name when the class at the staging commit has no such member.
Scenario: A class without the cited field
- WHEN The issue body cites
PullStatus.unknown_fieldandPullStatusat the staging commit defines nounknown_field - THEN The probe text says that
PullStatusdefines nounknown_field, and the reference is in the probe's missing list.
Requirement: False absence returns the item
The stage job SHALL return the item to New with the probe evidence when the body states that a cited field is absent and the staging commit defines it.
Scenario: The body says a field is absent while the class defines it
- WHEN The body says that
PullStatusdefines nolabelsandPullStatusat the staging commit defineslabels - THEN The stage job returns the item to New, and its comment quotes the probe line that names the file and line of
labels.
Requirement: A field reference is no path
The probe MUST NOT report a cited Class.field reference as a path when the staging commit defines the class.
Scenario: The cited dotted reference names a class
- WHEN The issue body cites
PullStatus.labelsand the staging commit defines the classPullStatus - THEN The probe text holds no line that says the path
PullStatus.labelsis no file of the staging commit.
Requirement: Bounded read-only field probe
The field probe MUST count each git command against the probe budget and MUST leave the checkout unchanged.
Scenario: A probe of cited fields
- WHEN The probe reads a cited class field at the staging commit
- THEN The probe reports its command count against
CONST_ROADMAP_STAGE_PROBE_MAX_COMMANDS, andgit status --porcelainof the checkout stays empty.
Existing Tool Considered
No alternatives check has run. No open, maintained tool reads a Pydantic class field at a git commit. The change extends the existing premise probe with the standard library ast and adds no dependency. Cost: about 4,000 output tokens to build and test, about 1,000 output tokens for each later fix, and about 2 hours elapsed.
Key questions
- Does the stage premise probe check a class field today?: No.
probe_premiseprobes cited paths and identifiers only. It readsPullStatus.labelsas a path, so it writes that the path is no file of the staging commit. [sources: src/devops_cli/roadmap/stage_probe.py, openspec/changes/3344-the-stage-probe-checks-client-model/proposal.md] - Does
PullStatusdefinelabelsat the refined commit?: Yes.PullStatusholdslabels: tuple[str, ...] = ()with a validator that turns the GitHub label objects into names. [sources: src/devops_cli/github/client.py] - How does the probe read a class field at the staging commit?: Read the file text with
git cat-fileat the staging commit, parse it with the standard libraryast, and check the class body for an assignment, an annotated assignment or a method of the cited name. (best practice) [sources: src/devops_cli/roadmap/stage_probe.py, src/devops_cli/core/test_selection.py]- Chosen: Standard library
ast. The parser gives the class body and its members. It runs offline, it adds no dependency, and the project already reads Python source withast. - Rejected:
git grepfor the field name. A text match finds the name in other classes, comments and strings. It cannot name the class that holds the field. - Rejected: Reuse the model reader of feat(roadmap): Refuse a plan that reads an absent model field #3344. That reader waits on feat(roadmap): Refuse a plan that reads an absent model field #3344, and the probe must answer at the staging commit with no dependency on an unmerged change.
- Chosen: Standard library
- How does the probe tell a dotted reference from a file path?: The probe reads a token as a field reference when it holds one dot and
git grepfinds the class of its left part at the staging commit. Another token stays a path. (best practice) [sources: src/devops_cli/roadmap/stage_probe.py]- Chosen: Confirm the class at the staging commit. The class definition decides.
README.mdandDockerfile.amd64find no class, so they stay paths. - Rejected: A left part that starts with a capital letter. It reads
README.mdas a field reference and costs a command on every documentation path. - Rejected: Probe the token as a path first. It keeps the false no-file line that this issue fixes.
- Chosen: Confirm the class at the staging commit. The class definition decides.
- What does the stage job do when the cited field exists and the body says it is absent?: Return the item to New with the probe line as the evidence. A plan run on a premise that is already false is the defect this issue fixes. (best practice) [sources: openspec/changes/3344-the-stage-probe-checks-client-model/design.md, src/devops_cli/roadmap/stage_probe.py]
- Chosen: Return the item to New. The project returns an item on a false premise already. The probe line names the file and the line of the field.
- Rejected: Tell the planner to restate the plan. It spends a full plan run on a false premise, which is the cost this issue removes.
- How does the probe know that the body states the field is absent?: The probe reads the body line that holds the reference and matches a fixed tuple of absence phrases, such as
defines no,does not define,has no,lacksandis absent. (best practice) [sources: src/devops_cli/roadmap/stage_probe.py]- Chosen: A fixed tuple of absence phrases on the line. It is deterministic and offline, and a test can set the exact wording.
- Rejected: A model call. It adds a model call and a nondeterministic answer to a probe that is bounded and read-only.
- Rejected: No detection, report the field state only. The return never triggers, and the planner repeats the defect.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-06: partly.
Tool: mkdocstrings/griffe (https://github.com/mkdocstrings/griffe), ISC, last activity 2026-10-23, maintained.
Activity
devops-cli-service commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
(roadmap)scope of the title gives the scope.It prevents wasted stage runs on already-closed gaps but does not block delivery.It stops the stage job from spending a full run on a gap a merged commit already closed.It adds a new probe type, reuses the existing AST reader, and adds an offline test.Both check whether a class field exists at the staged commit, but #3344 flags absence for a plan reader while the candidate flags presence for an issue claim.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at ecfc9b8 (see proposed design in issue body).
[-]fix(roadmap): the stage job returns an item whose cited model field now exists[/-][+]fix(roadmap): Return the item when a cited class field now exists[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 64 characters, and the limit is 60. The type and the scope stay.
fix(roadmap): the stage job returns an item whose cited model field now existsfix(roadmap): Return the item when a cited class field now existsdevops-cli-service commentedon Nov 6, 2026
Alternatives check: partly
Tool: mkdocstrings/griffe (https://github.com/mkdocstrings/griffe)
Covers:
Lacks:
gitcall to fetch the source of the staged commit.defines noorlacks.CONST_ROADMAP_STAGE_PROBE_MAX_COMMANDS.astthe project already uses and no new dependency.Searches run:
Sources:
Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 9, 2026
Released in v0.98.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.98.0
devops-cli-service commentedon Nov 9, 2026
Live since 2026-11-09 03:15 UTC