Repository navigation
Description
Problem
The implement job runs a step of devops-cli in every target repository, so the other repositories cannot deliver. _finish_change (src/devops_cli/roadmap/implement_run.py:850) calls _generate_docs (:844-848). _scoped_rounds (:921) also calls it after each fix. That step runs uv run devops docs generate --sync-readme with no condition, and it fails in a target repository:
OSError: [Errno 30] Read-only file system: '/app/docs'
_get_default_docs_dir (src/devops_cli/commands/docs.py:35-42) finds the docs folder from the package file, not from the working directory. So the installed copy writes outside the worktree. Why the walk ends at /app is not verified. Do not change only the path: a correct path would write the command reference of devops-cli into a target repository.
Evidence in the window 2026-11-03T15:05Z to 2026-11-04T15:05Z:
- dotfiles: 41 Jobs in 0.72 h. Each stops at docs.
- dreamscaper: 12 Jobs in 7.26 h. Issue 4 has 13 stops with 16.0M input tokens. 8 of the 13 are at docs, with 12.0M of those tokens. These Jobs also take the one slot of the coder model.
- Together: 53 Jobs and 0 deliveries.
- The dotfiles issues hold 110 to 129 comments. Rule
digestclears the stop for each new image, and the same stop returns. - dotfiles and dreamscaper sent 4652 of 39248 GitHub requests (11.9%).
- The stop still occurs after the window: dotfiles issue 3 at 2026-11-04T16:07:36Z.
Not in this item: the job pushes the commits that passed after the stop at docs, and GitHub refuses that push on dreamscaper with refusing to allow a GitHub App to create or update workflow. So this change alone does not deliver dreamscaper issue 4. That check needs its own issue. The alternative is the workflows permission for the App, and only the owner decides that. No such stop was found on devops-cli, but this is unverified.
Expected
The job runs the docs step and the archive step only when the default branch of the target repository declares them. An agent cannot change the declaration in its checkout. devops-cli keeps both steps. A stop that a retry cannot repair does not repeat on each new image.
Acceptance criteria
- A test: a target with no declaration on its default branch skips the docs step in
_finish_changeand in_scoped_rounds, and the job ends with a draft pull request. - A test: a target with no declaration skips the archive step.
- A test: an agent edit of the declaration in the checkout changes no step.
- A test: a target that declares the steps, such as devops-cli, runs them.
- The job comment names each step that it skipped.
- A test: a stop on a read-only path does not get class
ci_infraand actionretry, and ruledigestdoes not clear it on a new image. - A dotfiles item reaches a draft pull request in a live run.
Existing tool considered
_hooks_config (src/devops_cli/roadmap/implement_run.py:540-544) and trusted_config (src/devops_cli/roadmap/implement_hooks.py:99) already read a target file from the default branch and return None when it is absent. Use the same form. Do not add a list to service.repos. No new tool.
Related
Related: #1359, #3098, #3226, #3327, #3481, #3485, #3497
Proposed design
Problem statement
The implement job runs the docs step and the archive step in every target repository. A target repository without the devops-cli docs tree stops with a read-only path error. The job repeats the stop on each new image and delivers no pull request. The change gates both steps on a declaration in the target repository's default branch. The change also makes a read-only path stop non-retryable.
Acceptance criteria
Requirement: Missing declaration skips docs
The implement job SHALL skip the docs step in _finish_change and _scoped_rounds when the target default branch does not declare it.
Scenario: Target without docs declaration
- WHEN The target default branch has no docs declaration and the job reaches
_finish_changeor_scoped_rounds. - THEN The job calls no docs command and ends with a draft pull request.
Requirement: Missing declaration skips archive
The implement job SHALL skip the archive step when the target default branch does not declare it.
Scenario: Target without archive declaration
- WHEN The target default branch has no archive declaration and the job reaches
_finish_change. - THEN The job archives no change folder and the job does not fail.
Requirement: Agent edit does not change steps
The implement job MUST read the step declaration from the target default branch and ignore the checkout.
Scenario: Agent edits checkout declaration
- WHEN An agent adds or removes the step declaration in the checkout but the default branch declaration is unchanged.
- THEN The job runs the steps from the default branch declaration only.
Requirement: Declared target runs steps
The implement job SHALL run the docs step and the archive step when the target default branch declares them.
Scenario: Target declares both steps
- WHEN The target default branch declares docs and archive, as devops-cli does.
- THEN The job runs the docs command and archives the change folder.
Requirement: Skipped steps in comment
The implement job SHALL name each skipped step in its job comment.
Scenario: Job skips steps
- WHEN The job skips the docs step or the archive step.
- THEN The job comment lists each skipped step by name.
Requirement: Read-only stop is not retried
A read-only path stop MUST NOT get class ci_infra or action retry, and rule digest MUST NOT clear it.
Scenario: Read-only path error
- WHEN The job stops with
OSErroranderrno.EROFS. - THEN The stop has class
read_only_pathand actionstop, and a new image does not clear it.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers a repository-specific step gate. The change reuses the existing trusted_config helper at src/devops_cli/roadmap/implement_hooks.py:99 and the _hooks_config form at src/devops_cli/roadmap/implement_run.py:540-544. The change adds no new dependency. A separate tool would add no value. The code change and tests cost about 5,000 tokens and 2 hours; no tool build, keep or fix cost applies.
Key questions
- Which file declares the docs and archive steps?: Use the existing
.github/roadmap.tomlon the default branch. Add[implement.steps]withdocs = trueandarchive = truefor devops-cli. A missing file or key means skip. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md, src/devops_cli/roadmap/implement_run.py:540-544, src/devops_cli/roadmap/implement_hooks.py:99]- Chosen: Existing roadmap config on default branch. It follows the trusted config pattern and needs no new service list.
- Rejected: New service.repos list. The issue forbids it, and a service list is not in the target repository.
- Rejected: Read the checkout file. An agent can edit the checkout, so the declaration is not trusted.
- Should the change fix
_get_default_docs_dirinstead of gating the docs step?: No. A correct path would write the devops-cli command reference into a target repository. Gate the docs step and keep the path logic. (best practice) [sources: src/devops_cli/commands/docs.py:35-42, src/devops_cli/roadmap/implement_run.py:844-848]- Chosen: Gate the docs step. It prevents foreign docs writes and follows the issue.
- Rejected: Change the docs path. A target path would write devops-cli docs into the target.
- Rejected: Remove the docs step. devops-cli must keep the step.
- How does the job read the declaration so an agent edit cannot change it?: Read the file from the default branch with
trusted_config. Use the same form as_hooks_config. Do not read the working tree. (best practice) [sources: src/devops_cli/roadmap/implement_hooks.py:99, src/devops_cli/roadmap/implement_run.py:540-544]- Chosen: Read from default branch with
trusted_config. It ignores agent edits in the checkout. - Rejected: Read from the checkout. An agent can change it.
- Rejected: Read from environment. The target repository does not own it.
- Chosen: Read from default branch with
- What does the job do when the declaration is absent?: Skip the docs step and the archive step. Continue to the draft pull request. Name each skipped step in the job comment. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:850-852, src/devops_cli/roadmap/implement_run.py:921, src/devops_cli/roadmap/implement_run.py:620]
- Chosen: Skip and report. It lets the target deliver and makes the skip visible.
- Rejected: Fail the job. It repeats the current stop.
- Rejected: Run with a different path. It writes foreign docs into the target.
- How does the job classify a read-only path stop?: Add a
read_only_pathfailure class forOSErrorwitherrno.EROFS. Give it actionstop. Exclude it from thedigestclear rule. (best practice) [sources: src/devops_cli/roadmap/failure.py, src/devops_cli/roadmap/implement_run.py:844-848]- Chosen: New
read_only_pathclass with actionstop. A retry cannot repair a read-only path. - Rejected: Reuse
ci_infrawith actionretry. The issue forbids it, and it repeats on each image. - Rejected: Reuse
plan_defectwith actionamend. A read-only path is not a plan defect.
- Chosen: New
- Should
_scoped_roundsuse the same gate as_finish_change?: Yes. Both callers use one predicate for the docs step. The archive step uses the same declaration. (best practice) [sources: src/devops_cli/roadmap/implement_run.py:850-852, src/devops_cli/roadmap/implement_run.py:921]- Chosen: One shared gate for both callers. It prevents a second docs write path.
- Rejected: Gate only
_finish_change._scoped_roundswould still fail. - Rejected: Gate only
_scoped_rounds. The finish path would still fail.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 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.53 jobs blocked with zero deliveries and the failure persists outside the observation window.Every target repository without a docs folder is blocked from delivery, and the retry loop wastes tokens and API quota.The pattern to reuse (_hooks_config, trusted_config) exists; the work is wiring the condition and writing six tests plus a live run check.Both concern the implement job flow, but #2665 delivers the full group-run-then-archive pipeline while the candidate fixes the unconditional docs and archive steps that fail in repos lacking a docs folder.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 46cf288 (see proposed design in issue body).
Moved to new items: #3511.
dan-petty commentedon Nov 4, 2026
Correction to "The alternative is the
workflowspermission for the App". The owner read the App settings on 2026-11-04:devops-cli-servicealready has read and write on all repository permissions. The refusal comes from the token request:CONST_GITHUB_APP_TOKEN_PERMISSIONS(src/devops_cli/config/constants.py:1440) leaves outworkflows, and ADR 0015 records that choice. An App settings change does not end this refusal. Only a change to the token request or to the plan can end it, and the owner has not decided yet.devops-cli-service commentedon Nov 4, 2026
Released in v0.56.4: https://github.com/dan-petty/devops-cli/releases/tag/v0.56.4
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 23:12 UTC