Repository navigation
Description
Problem Description
src/devops_cli/roadmap/stage/stage_context_facts.py:18-21 names 4 devops-cli paths: src/devops_cli/roadmap/failure.py, src/devops_cli/roadmap/runner_tools.py, Dockerfile and k8s/devops/cronjob-runner.yaml. The stage reads them from the staged commit of the target repository. When a path does not exist, the code raises RoadmapStageError (:101-105 and :214-226). The trigger regexes match most issue texts (:23-26: retry, review, stop, tier and failure; :28-36: about 40 tool names such as uv and python). So the stage fails for most items in the 6 other repositories.
Reproduction Steps
- Let the Service stage an item of dan-petty/dotfiles or dan-petty/homelab whose text names
uv,pythonorretry. - Read the Service log.
Expected vs Actual Behavior
Expected: the stage gives a verdict for the item.
Actual: the stage raises "Staged source moved or missing: src/devops_cli/roadmap/runner_tools.py".
Logs, Traces, or Terminal Output
Loki over 7 days, {service_name="roadmap-service"} |= "Staged source moved or missing": 2 lines, for dan-petty/dotfiles#1 (2026-11-11 14:37Z), and for dan-petty/homelab#1 and dan-petty/homelab#2 (15:19Z). 3 items in 2 repositories cannot stage.
Proposed Solution & Architectural Design
The runner tools and the failure taxonomy describe the Job image. The Job image is the devops-cli image for every repository.
- Read
RUNNER_TOOLS,NOT_IN_RUNNERandFailureClassfrom the installed modulesdevops_cli.roadmap.runner_toolsanddevops_cli.roadmap.failurefor every target. Remove the ast parse of the staged copy. - Read the Dockerfile packages and the pod security settings from the staged commit only when the commit holds those files (devops-cli). Otherwise, leave out those 2 subsections. Do not raise.
- Add a devops-cli test that asserts that the 2 paths exist, so that a move still fails in CI (AGENTS.md rule 11).
- No profile field is necessary.
Target Subsystem
SDLC, Git & PR Governance (src/devops_cli/roadmap/stage/stage_context_facts.py).
Existing Tool Considered
The fix removes a read and imports the installed modules. No tool is necessary. Cost: about 30 lines and 2 tests, about 80,000 tokens and 1 hour to build, about 2,000 tokens a month to keep.
Acceptance Criteria
- A unit test:
collect_stage_facts_contextfor a text that namesuv, with aread_filethat returns None for every path, returns the runner tools section and does not raise. - A unit test: for the devops-cli files, the section text is byte-equal to the current output.
- After the rollout, the Loki query above over 24 h gives 0 lines.
- fix(security): Source aliases only from ~/.aliases.zsh dotfiles#1, dan-petty/homelab#1 and dan-petty/homelab#2 get a stage verdict that is not this error.
Dependencies
None.
Source: #4627
Proposed design
Problem statement
The stage facts context reads four devops-cli paths from the staged commit of the target repository. The trigger regexes match most issue texts, and the commits of the 6 other repositories hold neither devops-cli module path. The stage then raises RoadmapStageError and gives no verdict. A Dockerfile in another repository describes another image, so it cannot supply the runner facts either. The fix reads the runner tools and the failure taxonomy from the installed modules, which describe the runner image that every repository uses. It reads the Dockerfile and the pod manifest only for a devops-cli commit, and it leaves both subsections out otherwise. The same builder feeds the stage eval, so its tests and the two specs that name the old source change with the fix.
Acceptance criteria
Requirement: Runner facts come from the installed module
The stage facts context SHALL read RUNNER_TOOLS, NOT_IN_RUNNER and FailureClass from the installed devops-cli modules for every target repository.
Scenario: A text names uv and every staged read returns None
- WHEN
collect_stage_facts_contextruns on a text that namesuv, andread_filereturns None for every path - THEN the context holds the runner tools section and raises no
RoadmapStageError
Requirement: The failure taxonomy comes from the installed module
The stage facts context SHALL read FailureClass from the installed devops_cli.roadmap.failure module.
Scenario: A text names retry and every staged read returns None
- WHEN
collect_stage_facts_contextruns on a text that namesretry, andread_filereturns None for every path - THEN the context holds the failure taxonomy section and raises no
RoadmapStageError
Requirement: The image facts need a devops-cli commit
The stage facts context MUST read the Dockerfile packages and the pod security settings only when the staged commit holds src/devops_cli/roadmap/runner_tools.py, and MUST leave both subsections out otherwise.
Scenario: Another repository's commit holds a Dockerfile
- WHEN
collect_stage_facts_contextruns on a text that namesuv,read_filereturns aDockerfiletext, and it returns None forsrc/devops_cli/roadmap/runner_tools.py - THEN the context holds no Dockerfile section and no pod security section, and raises no
RoadmapStageError
Requirement: The devops-cli facts text stays the same
The stage facts context SHALL give the same text for a devops-cli commit as the current code gives.
Scenario: The staged commit is devops-cli's
- WHEN
collect_stage_facts_contextruns on a text that namesuv, andread_filereturns the devops-cliDockerfileandk8s/devops/cronjob-runner.yaml - THEN the context text is byte-equal to the recorded output of the current code
Requirement: A module move fails CI
A test SHALL assert that src/devops_cli/roadmap/failure.py and src/devops_cli/roadmap/runner_tools.py exist.
Scenario: Both module files exist
- WHEN the test reads the two module paths
- THEN both paths exist
Requirement: The stage eval reaches the model for an old commit
The stage eval SHALL reach the model for a case whose commit lacks src/devops_cli/roadmap/failure.py and src/devops_cli/roadmap/runner_tools.py.
Scenario: A golden case commit lacks both module files
- WHEN
run_caseruns on a case whose commit lacks both module files and the checkout of the run holds them - THEN the case makes a model call and does not end
refusedwithStaged source moved or missing
Existing Tool Considered
No alternatives check ran for this item. A check of the open tools finds none that covers the need: the values are the project's own runtime constants. mkdocstrings/griffe, checked in #3406 for a nearby need, covers a docstring or a signature, not a runtime constant. The standard library import of devops_cli.roadmap.runner_tools (tool_names(), NOT_IN_RUNNER) and devops_cli.roadmap.failure (FailureClass, ACTION_BY_CLASS) covers it, and the stage already imports both modules. Cost: about 30 lines added and about 100 lines of ast parsing deleted, 2 new tests and 2 stage-eval tests updated, about 80,000 tokens and 1 hour to build, and about 2,000 tokens a month to keep.
Key questions
- Where do the runner tools and the failure taxonomy come from for every target repository?: From the installed modules
devops_cli.roadmap.runner_toolsanddevops_cli.roadmap.failure:tool_names(),NOT_IN_RUNNER,FailureClassandACTION_BY_CLASS. The stage already imports both modules (stage_change.pyimportsNOT_IN_RUNNER, andstage.pyimportsFailureClass), so this adds no dependency. The runner image is the devops-cli image for every repository, so these facts do not depend on the commit of the target. [sources: src/devops_cli/roadmap/runner_tools.py:93, src/devops_cli/roadmap/runner_tools.py:190, src/devops_cli/roadmap/runner_tools.py:240, src/devops_cli/roadmap/failure.py:56, src/devops_cli/roadmap/failure.py:116, src/devops_cli/roadmap/stage/stage_change.py:66, src/devops_cli/roadmap/stage/stage.py:151, docs/ROADMAP_WORKFLOW.md:307] - Which paths does the stage read from the staged commit now?:
src/devops_cli/roadmap/failure.py,src/devops_cli/roadmap/runner_tools.py,Dockerfileandk8s/devops/cronjob-runner.yaml.build_failure_taxonomy_contextraises when the first is missing, andbuild_runner_capabilities_contextraises when any of the other three is missing. [sources: src/devops_cli/roadmap/stage/stage_context_facts.py:18, src/devops_cli/roadmap/stage/stage_context_facts.py:19, src/devops_cli/roadmap/stage/stage_context_facts.py:101, src/devops_cli/roadmap/stage/stage_context_facts.py:214, src/devops_cli/roadmap/stage/stage_context_facts.py:218, src/devops_cli/roadmap/stage/stage_context_facts.py:226] - Does reading the installed modules give the same text as the ast parse of the devops-cli staged copy?: Yes.
tool_names()returns eachRunnerTool.namein the order ofRUNNER_TOOLS,NOT_IN_RUNNERis the same dict, and theFailureClassmembers andACTION_BY_CLASSkeys and values give the same lowercased names that the ast extractor gives. The section text is byte-equal for a devops-cli commit. [sources: src/devops_cli/roadmap/runner_tools.py:93, src/devops_cli/roadmap/runner_tools.py:190, src/devops_cli/roadmap/runner_tools.py:240, src/devops_cli/roadmap/failure.py:56, src/devops_cli/roadmap/failure.py:116, src/devops_cli/roadmap/stage/stage_context_facts.py:49, src/devops_cli/roadmap/stage/stage_context_facts.py:83, src/devops_cli/roadmap/stage/stage_context_facts.py:109, src/devops_cli/roadmap/stage/stage_context_facts.py:142] - When does the stage read the Dockerfile and the pod manifest?: Only when the staged commit holds
src/devops_cli/roadmap/runner_tools.py, which only the devops-cli repository holds. Read each image file whenread_filereturns it, and leave out its subsection otherwise. Raise no error. (best practice) [sources: src/devops_cli/roadmap/stage/stage_context_facts.py:19, src/devops_cli/roadmap/stage/stage_context_facts.py:214, k8s/devops/cronjob-runner.yaml:34]- Chosen: Gate on the module path. Only devops-cli holds this module. The two image facts then describe the image of the commit under plan.
- Rejected: Gate on the presence of
Dockerfileand the pod manifest. A target repository can hold a Dockerfile for a different image. The stage would give a wrong fact about the runner image. - Rejected: Keep raising
RoadmapStageError. It stops most items in the 6 other repositories. That is the defect of this issue. - Rejected: Add a setting that names the repository kind. The module path already tells the fact, and the runner image is the same for every repository.
- Do the trigger regexes that decide whether to add the facts stay?: Yes, unchanged. The fix changes where the facts come from, not which items get them. (best practice) [sources: src/devops_cli/roadmap/stage/stage_context_facts.py:23, src/devops_cli/roadmap/stage/stage_context_facts.py:28, src/devops_cli/roadmap/stage/stage_context_facts.py:39, src/devops_cli/roadmap/stage/stage_context_facts.py:44]
- Chosen: Keep the regexes. They bound the facts text to the items whose text names a tool or a failure cause. The plan budget goes to those items.
- Rejected: Add the facts to every item. It grows every stage prompt with a section that most items do not need.
- Does the change keep the two path constants?: Keep
RUNNER_TOOLS_PATH, because the code reads it to tell a devops-cli commit. RemoveFAILURE_TAXONOMY_PATH, because nothing reads it. The new test names both module paths, with the literal path forfailure.pyor the module's__file__, and asserts that each file exists. (best practice) [sources: src/devops_cli/roadmap/stage/stage_context_facts.py:18, src/devops_cli/roadmap/stage/stage_context_facts.py:19, AGENTS.md:19, tests/roadmap/stage/test_roadmap_stage_context.py:14]- Chosen: Keep
RUNNER_TOOLS_PATHand removeFAILURE_TAXONOMY_PATH. The marker read gives the first constant a reader. The second constant would have none. - Rejected: Keep both constants. It leaves a production constant that only a test reads.
- Rejected: Remove both constants. The code then needs a literal path to tell a devops-cli commit.
- Chosen: Keep
- What happens to the stage eval and its tests when a case commit lacks the module files?: The eval uses the same builder, so the failure taxonomy and the runner tools no longer come from the case commit: the case reaches the model. Replace the two tests in
test_roadmap_stage_eval_facts_context.pythat expectrefusedandRoadmapStageError, update the docstring ofplan_itemthat says the job raises, and change theroadmap-stage-evalrequirement. Keepfacts_sourcefor the Dockerfile and the pod manifest, whose fallback to the checkout stays. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:1439, src/devops_cli/roadmap/stage/stage.py:2254, src/devops_cli/roadmap/stage/stage_eval_run.py:188, tests/roadmap/stage/test_roadmap_stage_eval_facts_context.py:120, tests/roadmap/stage/test_roadmap_stage_eval_facts_context.py:139, openspec/specs/roadmap-stage-eval/spec.md:334]- Chosen: Update the eval tests, the docstring and the eval spec in this pull request. The eval uses the same builder, so the old tests assert the defect and fail. One pull request keeps the suite green.
- Rejected: Keep the raise for the eval. The builder no longer reads the module files, and a second code path would keep the defect.
- Rejected: Defer the eval update to a new item. The stage eval tests fail in this pull request, so the item cannot merge.
- Which specs carry a delta?:
roadmap-stagechanges its requirementsFailure taxonomy in staging contextandRepository-derived facts; itsRunner capability facts in staging contextrequirement still holds.roadmap-stage-evalchangesThe live run reads the runner facts in the checkout. ADR 0010 requires a spec delta for a change that alters observable behavior. (best practice) [sources: openspec/specs/roadmap-stage/spec.md:3584, openspec/specs/roadmap-stage/spec.md:3591, openspec/specs/roadmap-stage/spec.md:3598, openspec/specs/roadmap-stage-eval/spec.md:334, docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md:7]- Chosen: Update both specs. The two capabilities name the old source and the old raise, so both deltas are needed.
- Rejected: Update only
roadmap-stage. Theroadmap-stage-evalrequirement still says the job raises and the eval reads the module files in the checkout. - Rejected: Skip the spec delta. The stage context text and the eval outcome are observable, so the change carries a delta (ADR 0010).
- Do the two post-rollout checks stay in this item?: No. A new item holds them. They wait on the rollout of the runner image and on 24 h of production traffic, and no offline test can check them. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_refine_reply.md:6, docs/roadmap/refine.md:75, docs/roadmap/refine.md:77, docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md:29]
- Chosen: Defer the production confirmation to a new item. The check waits on a rollout and 24 h of traffic. The project moves a part that nobody can build now to a new issue, and an acceptance criterion needs a scenario that a test can check offline.
- Rejected: Keep the checks as acceptance criteria. No offline test can assert a Loki query over 24 h or the verdict of an item in another repository.
- Rejected: Keep the checks as tasks in this pull request. The pull request merges before the rollout, so its tasks cannot be done in it.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The stage cannot produce a verdict for items in other repositories, blocking the service.It unblocks the stage for all items in the six other repositories.The fix is about 30 lines of code and 2 tests.Both address collect_stage_facts_context reading files from the staging commit, but #4207 fixes the eval refusing devops-cli cases while the candidate fixes the live stage failing for items in other repositories.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 818ac6f (see proposed design in issue body).
Moved to new items: #4663.
devops-cli-service commentedon Nov 11, 2026
Released in v0.112.3: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.3
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 19:36 UTC