Skip to content

[Tech Debt] Give the documentation gate its own CI step #13

Description

@charles-fineman

Context:
Identified during work on #11
PR: #12

Description:

The documentation gate added in #12 runs as TestRepositoryDocumentation, inside the existing go test -race -count=1 ./... step of both workflows. That is sufficient to fail the build, but it gives no step-level signal: a dead Markdown link and a genuine data race both surface as the same red "Test with race detector" step, so the collapsed checks list cannot distinguish them without opening the log.

Two workflow edits were prepared and reviewed in #12 but could not be pushed — the charles-fineman bot token carries gist, read:org, and repo scopes but not workflow, so GitHub rejects any push touching .github/workflows/:

! [remote rejected] issue-11 -> issue-11 (refusing to allow an OAuth App to
  create or update workflow `.github/workflows/ci.yml` without `workflow` scope)

The two changes, ready to apply to both ci.yml and release.yml:

  1. A named step, placed before Test with race detector so a documentation failure fails under its own name rather than aborting the run inside the race step:
      - name: Check repository documentation
        run: go test -run '^TestRepositoryDocumentation$' -v ./internal/docscheck/
  1. A comment above the Self-check fixture documents step, because that step's exact shape is now load-bearing for a check that lives in a different file entirely — a maintainer converting run: | to run: >, or moving the block into a composite action, would break internal/docscheck with no local hint as to why:
      # The exact shape of this step is load-bearing: internal/docscheck
      # parses it as indented text to assert that AGENTS.md and both
      # workflows run the same commands. Keep the "- name:" key, the
      # "run: |" block, and one command per line.

Rationale:

Deferred from #12 for a credential limitation, not a design disagreement. The gate is fully functional without either change; both are diagnosability improvements. The DevOps review of #12 rated the named step "important, nice-to-have, not blocking" and the comment "minor".

Note that AGENTS.md and CHANGELOG.md in #12 were corrected to describe the gate as running inside the race-detector step, so the prose is accurate as merged. Applying change 1 means updating both to mention the new step, or internal/docscheck will be describing CI incorrectly — exactly the drift class it exists to prevent.

Reference:

  • internal/docscheck/repository_test.goTestRepositoryDocumentation
  • .github/workflows/ci.yml, .github/workflows/release.yml — the Self-check fixture documents step
  • AGENTS.md — "Documentation checks" subsection

Acceptance Criteria:

  • Both workflows run TestRepositoryDocumentation as a distinctly named step before the umbrella test step
  • Both workflows carry the shape-is-load-bearing comment above Self-check fixture documents
  • AGENTS.md and CHANGELOG.md describe the new step accurately
  • go test ./internal/docscheck/ still passes, including the self-check command-list comparison

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions