Repository navigation
Description
Problem
A plan for another repository names uv run devops ci docs as a verification, and the implement job cannot pass it there. devops ci docs runs devops docs check, which generates the documents of devops-cli into the checkout and imports each module of devops-cli.
Evidence
On 2026-11-30 the implement run of dan-petty/homelab#353 on the runner image v0.265.3 stopped at group 1 after 7 attempts and 6 repair rounds, with about 4.6 million input tokens, as ci_infra:
RuntimeError: Failed to import module 'devops_cli.grafana.service_dashboard' for the error catalog: No module named 'grafana_foundation_sdk'. A missing optional dependency now fails the docs stage, by design.
The failure does not depend on the change of the item, so no repair round can pass it.
Expected
The docs check of another repository judges the documents of that repository only, or the plan checks refuse the command for it. A check that cannot run stops the item before the repair rounds.
Proposed design
Problem statement
Plans for a managed repository other than devops-cli can name uv run devops ci docs. That command generates the devops-cli documents and imports the devops-cli modules in the target checkout. It fails on a missing optional dependency or on the target documents. A homelab checkout at main exits 1 with 32 findings even when each optional package is installed. No repair round can pass the command. The change makes the stage gate refuse the command before the implement job starts.
Acceptance criteria
Requirement: Refuse cross-repository docs check
The stage gate SHALL refuse a plan that names devops ci docs for a repository with no path under src/devops_cli/.
Scenario: Plan for homelab names ci docs
- WHEN A stage plan for a repository with no path under
src/devops_cli/namesuv run devops ci docsin its verify commands. - THEN The stage gate returns a finding with code
stage_problem_cross_repo_docs_checkand refuses the plan.
Requirement: Refuse underlying docs check command
The stage gate MUST refuse devops docs check in a plan for a repository with no path under src/devops_cli/.
Scenario: Plan names docs check
- WHEN A stage plan for a repository with no path under
src/devops_cli/namesuv run devops docs check. - THEN The stage gate returns the same
stage_problem_cross_repo_docs_checkfinding and refuses the plan.
Requirement: Accept docs check for devops-cli
The stage gate SHALL accept devops ci docs in a plan for a repository with a path under src/devops_cli/.
Scenario: Plan for devops-cli names ci docs
- WHEN A stage plan for a repository with a path under
src/devops_cli/namesuv run devops ci docs. - THEN The stage gate returns no finding for that command.
Requirement: Name the command and repository
The finding SHALL contain the refused command and the target repository.
Scenario: Finding text names the command
- WHEN The stage gate refuses
uv run devops ci docsfordan-petty/homelab. - THEN The finding message contains
devops ci docsanddan-petty/homelab.
Requirement: Stop before the implement job
A plan that the gate refuses for the cross-repository docs command MUST open no draft pull request.
Scenario: No draft for refused plan
- WHEN The stage gate refuses the plan for the cross-repository docs command.
- THEN The stage job opens no draft pull request for the item and the implement job receives no item.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers a project-specific plan gate for devops-cli commands. The change adds one rule to the existing stage gate and uses its existing git ls-files list. The written cost is about 20k tokens and 2 hours to build, keep and fix the rule.
Key questions
- Where must the rule stop the cross-repository docs command?: The stage gate must refuse the plan before it opens a draft and before the implement job starts. (best practice) [sources: docs/CLUSTER.md:56, docs/CLUSTER.md:57, CONTEXT.md]
- Chosen: Stage gate rule. The stage job checks a plan before it opens a draft, so a refusal stops the item before the implement job and its repair rounds.
- Rejected: Implement job check. The implement job runs after model steps and repair rounds, so the failure costs tokens before the check stops it.
- Rejected: Change
devops docs check. The command generates devops-cli documents by design, and a change to it risks the devops-cli docs.
- How does the stage gate identify a repository that cannot run the devops-cli docs check?: The gate reads the tracked files of the target commit. It treats a repository with no path under
src/devops_cli/as another repository. (best practice) [sources: docs/CLUSTER.md:56]- Chosen: Tracked file list. The stage job already reads the tracked files of the commit for path checks, so the rule adds no new setting or request.
- Rejected: Project profile type. The type of a project does not prove that the devops-cli package is in the target checkout.
- Rejected: Hardcoded repository name. A fork or a renamed repository breaks the rule.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Dec 1, 2026
The implement job cannot pass in another repository, causing service jobs to fail.Both address docs commands running in the wrong repository context, but #3484 fixed docs generate while the candidate addresses docs check importing devops-cli modules.dan-petty commentedon Dec 1, 2026
Two more facts, from 2026-12-01:
devops docs checkin a checkout ofdan-petty/homelabatmain, with each optional package of devops-cli installed, exits 1 with 32 findings (unknown commands, options, setting keys and variables ink8s/README.md). No generated document differs and no import fails. So the command fails on the unchanged default branch, whatever the runner image holds.openspec/changes/of homelab namedevops ci docsintasks.md.dan-petty commentedon Dec 1, 2026
A fact that the design of the fix depends on (read on 2026-12-01 from the comment of
dan-petty/homelab#361of 00:48:16Z and its trace):uv run devops ci docs, with about 31.6 million input tokens, asplan_defectwith the action leftwait.uv run devops.The pull request covers both: it proves an undeclared documents check on the base commit, and a plan request in a turn that leaves a verification command failing ends the rounds.
devops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Dec 1, 2026
Released in v0.268.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.268.1
devops-cli-service commentedon Dec 1, 2026
Live since 2026-12-01 02:48 UTC
fix(roadmap): write the documents check of the target preset