Skip to content

fix(docs): ignore placeholder arguments in README command examples #7526

Done

Description

@devops-cli-service

Split from #7369.

The docs row (devops docs check) exits 1 on README.md lines 283 and 370 of dan-petty/homelab. It reads <plan id> in a command example as an extra argument. It does not read k8s/README.md. Issue #7369 changes only the gate root. This failure is separate and deferred. Acceptance criteria: the docs row SHALL treat a placeholder in angle brackets as a placeholder, not as an argument. A test runs the docs row on a README with <plan id> and asserts exit 0. The docs row SHALL read each README in the target tree.

Proposed design

Problem statement

The docs check exits 1 on README command examples that use angle-bracket placeholders. It reads <plan id> as an extra argument. It also checks only the root README. The change makes the docs check skip placeholders and read each README in the target tree.

Acceptance criteria

Requirement: docs-check-ignores-angle-bracket-placeholders

The docs row SHALL treat a token in angle brackets as a placeholder and not as an argument.

Scenario: README example with a plan-id placeholder

  • WHEN a test runs the docs row on a temporary README.md that holds a command example with the token <plan id>
  • THEN the docs row exits 0 and reports no extra argument

Requirement: docs-check-reads-each-readme

The docs row SHALL check each README.md file in the target tree.

Scenario: README file in a subdirectory

  • WHEN a test runs the docs row on a temporary tree with a valid README.md and a k8s/README.md that holds an invalid command example
  • THEN the docs row exits 1 and names k8s/README.md

Requirement: docs-check-rejects-a-real-extra-argument

The docs row SHALL still fail on an extra argument that is not a placeholder.

Scenario: README example with a real extra argument

  • WHEN a test runs the docs row on a temporary README.md that holds a command example with an extra argument that has no angle brackets
  • THEN the docs row exits 1 and reports the extra argument

Existing Tool Considered

No alternatives check has run. No open tool fully covers the need. Python shlex covers shell-like tokenization; it lacks placeholder semantics. The change adds a small rule that drops a token matching <...> before argument validation. Cost: about 10k tokens and 1 hour to build, keep and fix.

Key questions

  • How does the docs row recognize a placeholder argument?: The docs row ignores any argument token that matches <[^<>]+>. (best practice) [sources: AGENTS.md, k8s/README.md]
    • Chosen: Regex for any angle-bracket token. It matches the documented placeholder convention and needs no list.
    • Rejected: List of known placeholder names. It misses a new placeholder and needs maintenance.
    • Rejected: Accept every unknown argument. It hides a real extra-argument error.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/docs
    source/agent
    status/new
    value/medium
    effort/low
    on Nov 28, 2026
  2. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 28, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  6. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

    Live since 2026-11-28 20:38 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/docssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions