Skip to content

Enables the Docs and doc links gate stages - #231

Merged
johnnyt merged 1 commit into
mainfrom
px-9ejw-docs-gate-stages
Sep 24, 2026
Merged

johnnyt merged 1 commit into
mainfrom
px-9ejw-docs-gate-stages

Conversation

@johnnyt

@johnnyt johnnyt commented Sep 24, 2026

Copy link
Copy Markdown
Member

Refs px-9ejw.

What

mix quality now checks this package's docs before a publish would:

  • .quality.exs enables the two opt-in docs stages, docs: [enabled: :auto] and doc_links: [enabled: :auto], with the reason beside them.
  • mix.exs moves the dev dependency requirement on ex_quality from ~> 0.14 to ~> 0.15 (the release that ships the Doc links stage), its other options unchanged.
  • mix.lock moves ex_quality only, 0.14.0 to 0.15.0, via mix deps.update ex_quality.

This package's own version does not move. No changelog fragment: changelog.d/README.md excludes quality gate changes.

The reason comment, as it stands in .quality.exs:

  # The two docs stages make this gate the pre-publish check for the package's
  # docs. Docs runs `mix docs` and fails on any ExDoc warning. Doc links fails
  # on the link rules ExDoc accepts silently: a README relative link to a file
  # not in the package files, a published relative link to a file that is not
  # an extra, two extras sharing a basename, a silent rewrite to a different
  # extra. Both are opt-in in ex_quality; `:auto` runs them when :ex_doc is
  # installed.

The header comment's list of full-gate stages gains "docs, doc links". The loop profile names its stages explicitly ([:format, :compile, :credo, :test]), so the inner loop does not run either new stage.

Why this gate change is in order

This repository's gate record, docs/adr/0008-the-quality-gate-and-its-non-editable-config.md ("Deliberately retuning the gate is ordinary work, not a violation"), makes enabling a check ordinary work when it is the bead's purpose: proposed as the work, reviewed on its own, carrying area:build, landing on main alone. This PR is exactly that and nothing else. The operator's standing campaign consent authorizes this gate change (its gate-change clause).

Evidence

ex_quality 0.15.0 is on Hex (mix hex.info ex_quality, excerpt):

Recent releases:
  0.15.0 (2026-09-24)
  0.14.0 (2026-08-22)

git diff origin/main --stat:

 .quality.exs | 20 ++++++++++++++++++--
 mix.exs      |  2 +-
 mix.lock     |  2 +-
 3 files changed, 20 insertions(+), 4 deletions(-)

The mix.lock diff (one line out, one line in; no other dependency moves):

-  "ex_quality": {:hex, :ex_quality, "0.14.0", "702ed122c85c1d1f1dca2efab60871884e9ba6aefc492f334da51a8175543cc6", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "ac8553e6b7a6a35ada03ef748530db2c5871d69427d74a634fd37afdeabf7e24"},
+  "ex_quality": {:hex, :ex_quality, "0.15.0", "e5af847cd6f78c8bde25f8cf8e96c8e3e92ed768affe3711dca05065887771b6", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "b1d8943973be502fd5c5210f5f96e88b1262ce813b6d50092315a613573deb08"},

Full mix quality on the committed tree (a fresh worktree, so the dependency compile precedes the gate), quoted whole. Docs and Doc links both ran and passed:

==> earmark_parser
Compiling 2 files (.xrl)
Compiling 1 file (.yrl)
Compiling 3 files (.erl)
Compiling 32 files (.ex)
Generated earmark_parser app

20:06:26.395 [info] Compiling file system watcher for Mac...

20:06:27.190 [info] Done.
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> deep_merge
Compiling 2 files (.ex)
Generated deep_merge app
==> nimble_parsec
Compiling 4 files (.ex)
Generated nimble_parsec app
==> bunt
Compiling 2 files (.ex)
Generated bunt app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> statistex
Compiling 4 files (.ex)
Generated statistex app
==> credo
Compiling 251 files (.ex)
Generated credo app
==> makeup
Compiling 15 files (.ex)
Generated makeup app
==> makeup_elixir
Compiling 6 files (.ex)
Generated makeup_elixir app
==> makeup_erlang
Compiling 4 files (.ex)
Generated makeup_erlang app
==> ex_doc
Compiling 30 files (.ex)
Generated ex_doc app
==> erlex
Compiling 1 file (.xrl)
Compiling 1 file (.yrl)
src/erlex_parser.yrl: Warning: conflicts: 27 shift/reduce, 0 reduce/reduce
Compiling 2 files (.erl)
Compiling 1 file (.ex)
Generated erlex app
==> dialyxir
Compiling 67 files (.ex)
Generated dialyxir app
==> benchee
Compiling 45 files (.ex)
Generated benchee app
==> ex_quality
Compiling 35 files (.ex)
Generated ex_quality app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> predicator
Running quality checks...

✓ Format: No changes needed (289ms)
✓ Compile: dev + test compiled (warnings as errors) (15.8s)

Running analysis stages in parallel...

○ Doctor: skipped (:doctor not installed)
○ Gettext: skipped (:gettext not installed)
○ Sobelow: skipped (:sobelow not installed)
✓ Doc links: 53 links checked (46ms)
✓ Dependencies: No unused dependencies (1.0s)
✓ Credo: No issues (4.7s)
✓ Docs: No warnings (5.0s)
✓ Tests: 2,914 of 2,914 passed, 95.6% coverage (5.7s)
⋯ Dialyzer: building PLT (this is a one-time cost)
✓ Dialyzer: No warnings (PLT built this run) (57.1s)

✓ All quality checks passed!

The commit was made on the tree this run went green on (same git write-tree), so the commit step did not re-run the gate.

Review (in-turn)

Tier: gate. Config only: three files, no lib/ or test/ change, no public surface, 24 lines changed. I re-read the diff against the bead and its acceptance criteria: the requirement reads {:ex_quality, "~> 0.15", only: :dev, runtime: false} with the other options as they were; the lock diff moves ex_quality alone; both stages are enabled: :auto; the gate reports both as run and passing, not skipped. I checked the reason comment against ex_quality 0.15.0's own docs: its stage table says Docs runs mix docs, failing on any ExDoc warning, and that both stages are opt-in; its Doc links moduledoc documents :auto as "on when :ex_doc is installed" for both, and the four link rules in the comment are the ones the bead names. Doc links found nothing on main's docs, so no doc edit was needed and the diff stays within mix.exs, mix.lock and .quality.exs. test/docs_adr_links_test.exs is untouched and still passes in the suite.

mix quality now checks the package's docs before a publish would. The
Docs stage runs mix docs and fails on any ExDoc warning; the Doc links
stage fails on the link rules ExDoc accepts silently: a README relative
link to a file not in the package files, a published relative link to a
file that is not an extra, two extras sharing a basename, a silent
rewrite to a different extra. Both are opt-in in ex_quality and are set
to enabled: :auto in .quality.exs, with that reason beside them.

The doc links stage ships in ex_quality 0.15.0, so the dev dependency
requirement moves from ~> 0.14 to ~> 0.15 with its other options
unchanged, and mix deps.update ex_quality moves only ex_quality in
mix.lock (0.14.0 to 0.15.0). This is a dependency requirement change;
the package's own version does not move.

Both stages run and pass on main's docs, so the gate starts green. The
loop profile's stage list is unchanged and does not run them. No
changelog fragment: changelog.d/README.md excludes quality gate changes.

Refs: px-9ejw
@johnnyt
johnnyt merged commit 8c43fcf into main Sep 24, 2026
1 check passed
@johnnyt
johnnyt deleted the px-9ejw-docs-gate-stages branch September 24, 2026 02:12
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant