tests.test_docs module

tests.test_docs.docs_update()[source]

The docs/docs_update.py module, or a skip when tomlrt is missing.

The script edits pyproject.toml with tomlrt, which most distributions do not package. The skip keeps the hermetic layer free of it.

tests.test_docs.test_unique_local_group_ids()[source]

Check our platform groups have unique identifiers.

tests.test_docs.test_local_groups_no_overlap()[source]

Check our platform groups are mutually exclusive.

tests.test_docs.test_all_platforms_covered_by_local_groups(manager)[source]

Check all platforms supported by managers are covered by a local group.

tests.test_docs.test_project_metadata()[source]
tests.test_docs.test_docs_deploy_where_infrastructure_says()[source]

Check the docs workflow deploys where the infrastructure record says.

docs/infrastructure.md names [tool.repomatic] site.deploy as the switch selecting the Cloudflare Pages jobs of the shared docs workflow. A key unset or repointed keeps publishing to the GitHub Pages site the domain no longer serves from, silently: both hosts answer, only one is read. The record and the key were split for two days once; this holds them together.

tests.test_docs.test_docs_site_url_matches_pyproject()[source]

The canonical docs origin is declared once, in pyproject.toml.

docs/conf.py reads it from there for html_baseurl, but runtime code cannot: pyproject.toml is not shipped in the wheel, so DOCS_SITE_URL repeats the literal. A drift would point the readme’s manager links at a different origin than the canonical tags, which is exactly the split-indexing the custom domain exists to avoid.

tests.test_docs.test_redirects_file_is_well_formed()[source]

docs/_redirects sends every retired URL to a page that still exists.

Two of these invariants are the Cloudflare Pages engine’s own. A rule only counts as static while it appears before the first rule holding a * or a :placeholder; from there on every line spends the 100-rule dynamic budget, and the parser discards the rest of the file at the 101st rather than reporting anything. The third is this project’s: a redirect landing on a page that no longer exists just trades a 404 for a slower one, and a rule whose source is a page the site still publishes hides that page entirely.

A sphinx-design :link: is emitted verbatim, so a local one is rooted.

Sphinx rewrites the paths it owns, per page: the :img-top: of the same card becomes the ../_images/… a directory-deep dirhtml page needs. A :link: gets none of that, so a relative assets/… resolved against the page’s own URL and reached for /bar-plugin/assets/…, which the site does not publish. Same failure, and same fix, as manpages_url in conf.py: the site is only ever served from the domain root, which is what makes the leading slash safe. Nothing else catches it, linkcheck visiting external URLs alone.

tests.test_docs.CLICK_RUN_BLOCK = re.compile('^(?P<fence>`{3,}|~{3,})\\{click:run\\}[^\\n]*\\n(?P<body>.*?)^(?P=fence)[ \\t]*$', re.MULTILINE|re.DOTALL)

A {click:run} fence of a docs page, its body in the body group.

tests.test_docs.test_click_run_blocks_assert_their_exit_code()[source]

Every {click:run} block asserts the exit code of the run it shows.

invoke() returns a failed run without raising, so the build only fails on a block that raises. A renamed option exits with code 2 instead: without the assertion, the build stays green and the page publishes the usage error.

tests.test_docs.test_changelog()[source]

Check every changelog bullet opens with a known [scope] tag.

The tags are sorted, deduplicated and drawn from the pool manager IDs, the platform IDs and the mpm, bar-plugin and gnome-shell scopes. The vocabulary is not cosmetic: scope_changelog() indexes it to build the release history of each manager and frontend page, and its docstring holds the rules to choose a tag.

tests.test_docs.test_labels()[source]
tests.test_docs.test_new_package_manager_issue_template()[source]

Check all platforms groups are referenced in the issue template.

Repo-maintenance guard: the reference set is regenerated from the installed extra_platforms release, whose platform groups a downstream packager cannot be expected to match, so conftest skips it outside a git checkout. It also reads .github/, absent from a wheel install.

tests.test_docs.test_extra_labels_in_pyproject()[source]

Check the generated label block is consistent with LABELS.

That block is [tool.repomatic.labels.extra] in pyproject.toml.

Repo-maintenance guard: the platform labels are regenerated from the installed extra_platforms release, whose platform groups a downstream packager cannot be expected to match, so conftest skips it outside a git checkout.

tests.test_docs.test_label_rules_reference_known_labels()[source]

Every file- and content-rule targets a label that exists.

The label must be in the generated [tool.repomatic.labels.extra] block.

A rule naming an unknown label silently applies a label the repository does not have: the stale dnf-based rules left behind when the labels.py group was renamed rpm-based, or per-manager rules (zypper, pacstall) outliving the manager’s absorption into an ecosystem group.

tests.test_docs.test_label_rules_in_pyproject()[source]

Check the generated labeller rule blocks match a fresh generation.

The [tool.repomatic.labels.*] blocks of pyproject.toml are generated from the pool, in the schema repomatic reads.

Drift means a manager was added without running docs/docs_update.py (repomatic’s update-docs job self-heals this on the next push).

The shape is asserted first, and separately from the content, because the two fail for unrelated reasons. repomatic 7.11.0 replaced the array-of-tables form with a label-to-patterns table and ignores the old one with a warning, which dropped all 130 of these rules without failing anything: the generator and the file still agreed with each other, in a schema the consumer had abandoned. mpm does not depend on repomatic, so the shape is all this suite can check on its own.

tests.test_docs.test_manager_file_rule_claims_only_its_own_tests(label)[source]

A manager label’s file rule claims only the test modules of its members.

A substring glob like tests/*go* also claims tests/test_logo.py, and a one-letter manager ID would claim most of the suite: a change to an unrelated test then labels the pull request with that manager.

tests.test_docs.test_pyproject_updates_are_pyproject_fmt_fixpoint(docs_update, monkeypatch, tmp_path)[source]

The pyproject.toml writers must emit pyproject-fmt-canonical style.

Any deviation makes the update-docs and format-pyproject autofix jobs endlessly rewrite each other’s output. The committed file is canonicalized first, so the assertion only judges the writers’ own output, whatever formatting state the working tree is in.

tests.test_docs.test_string_array_wraps_where_pyproject_fmt_wraps(docs_update, glyph, columns, tmp_path)[source]

_string_array must reach pyproject-fmt’s own inline-or-exploded verdict.

The fixpoint test above only measures the arrays the pool happens to generate today, so it stays green while the rule is wrong and no line sits near the limit: a budget counting the array alone, ignoring its key, passed for years until one label reached the boundary. This drives the boundary directly, for every glyph a label opens on.

Width, not length: pyproject-fmt 2.29 began counting a wide glyph as two columns, so a key carrying one loses a column of budget that character arithmetic cannot see.

The array stays deliberately short and the key carries the padding, which is the only shape that separates the two rules: an array long enough to breach a budget of its own is exploded either way, and agreement there proves nothing. Every label this project generates is exactly that shape, a two-path array under a key half the line wide.

tests.test_docs.test_benchmark_toml_well_formed()[source]

Check docs/benchmark.toml encodes only known flags and homepages.

The flags come from the known competitor set, and the homepage URLs belong to non-pool managers.

A duplicate manager-id row anywhere in the file (in any table) is a tomllib.TOMLDecodeError at load time, below, rather than a silently overwritten value: no separate assertion is needed to hold that invariant.

tests.test_docs.test_benchmark_homepages_cover_non_pool_managers()[source]

Every non-pool manager of benchmark.toml has a homepages entry.

The table then links the identifier.

Pool-implemented managers are excluded: their URL is sourced from the class’s homepage_url attribute, and a redundant entry in the TOML would create two sources of truth.

A tool declined for a dead upstream is exempt, its site being possibly gone too. A Wikipedia article never stands in for the missing home page: it has a slot of its own, so a home page found later is added rather than swapped in.

tests.test_docs.test_manager_homepage_url(manager)[source]

Every pool manager links its upstream, by home page or by repository.

A malformed URL breaks the rendered card, and a Wikipedia article has a slot of its own.

tests.test_docs.check_wikipedia_url(url)[source]

Check a URL names an English Wikipedia article the way its address bar does.

MediaWiki answers a title spelled any other way with a permanent redirect, which the link checker then reports: a space instead of an underscore, or a lowercase first letter where the software capitalizes it.

Return type:

None

tests.test_docs.test_manager_wikipedia_url(manager)[source]

Check a manager’s Wikipedia article is an English one, and its own.

The metaclass resets the attribute on every class not declaring it, so a subclass never shows its parent’s article: paru extends pacman in code, but is a project of its own.

tests.test_docs.test_benchmark_table_renders()[source]

Check the Package manager support table generator still works.

It must produce a well-formed table from the current pool and TOML.

The table is rendered live at Sphinx build time by the {python:render} block in docs/benchmark.md, and test_mirror_blocks_in_sync compares its checked-in copy: this test only guards the generator against crashes and structural regressions, like a broken TOML entry.

tests.test_docs.test_manager_upstreams_cover_the_pool(docs_update)[source]

Check every wrapped manager is either measured upstream, or excused.

The metrics subjects and the excuse map partition the pool, so a manager added without a decision on its upstream fails here instead of quietly rendering empty cells. Both are also checked against the pool from the other side: an ID left behind by a renamed or dropped manager would otherwise sample forever.

tests.test_docs.test_metrics_subjects_in_pyproject(docs_update)[source]

Check the manager entries of the metrics subjects follow repository_url.

Drift means a manager’s repository changed without running docs/docs_update.py, and the weekly sample would go on reading the old one.

Repo-maintenance guard: it rewrites pyproject.toml from the pool and compares, and uv_build normalizes that file into the sdist, dropping the one-line-per-subject shape the comparison reads. So the check is void outside a git checkout, where conftest skips it.

A mirror stands in only for a repository the sampler cannot read, and must itself be readable, or it replaces a subject for nothing.

tests.test_docs.test_metrics_charts_are_committed()[source]

Check every configured chart is committed as a rendered SVG.

The charts are drawn by the sampler’s weekly run, and the docs build reads the committed files to stay hermetic: a missing one means a page embeds nothing where a chart belongs.

tests.test_docs.test_metrics_predecessor_is_sampled()[source]

Check every declared forerunner has readings of its own in the store.

The renderer draws it beside its successor, dashed and never joined: a forerunner the sampler never read would draw nothing, silently.

tests.test_docs.test_metrics_series_start_at_creation()[source]

Check every charted repository starts its curve on its creation day.

The relative chart measures each curve from its first point, so that point must fall on the day the repository was created. Otherwise a curve starts at its first reading instead, and the chart no longer compares the projects by age.

Two shapes satisfy it. The usual one is a created row: the sampler writes it at zero stars, and it precedes every measurement. The other is a repository whose historical backfill already covers its creation day. A real reading of that day outranks the assumed zero and replaces it, since the store holds one row per day. So a series with no created row must open on a backfilled reading. Opening on a forward sample instead means the anchor was never written, and the curve starts on whichever day mpm first read the repository.

tests.test_docs.test_metrics_store_well_formed()[source]

Check the committed metrics store keeps the shape its readers expect.

Guards a file a scheduled job rewrites unattended: a repository that left the subjects, a duplicated reading, or an unknown provenance would all surface here rather than in a rendered table or misdrawn chart nobody re-reads.

tests.test_docs.test_metrics_subjects_match_benchmark()[source]

Check the charted subjects are exactly mpm plus every competitor.

The charts and the benchmark’s own columns must never drift apart: a competitor added to the comparison without a repository to sample would silently go unplotted.

tests.test_docs.test_binaries_download_table_renders()[source]

Check the latest-release binaries table generator still works.

It must produce a well-formed table from the binaries catalog.

The table is rendered live at Sphinx build time by the {python:render} block in docs/install.md, so there is no checked-in copy to compare against: this test only guards the generator against crashes and drift in the docs/assets/binaries.csv cell markup it parses.

tests.test_docs.test_fan_out_covers_every_subcommand()[source]

Check the fan-out catalog names every subcommand the CLI registers.

COMMAND_FAN_OUT is the only place a reader learns whether a command parallelizes, and it cannot be derived: the mode is an argument at each CLI call site. Holding it equal to the CLI’s own command list is what stops a new subcommand from silently missing off docs/concurrency.md, and forces whoever adds one to answer the question rather than leave it open.

tests.test_docs.test_concurrency_table_renders()[source]

Check the concurrency table generator produces a well-formed table.

Rendered live at Sphinx build time by the {python:render} block in docs/concurrency.md, so there is no checked-in copy to compare against. Every rendered row must carry a glyph the page’s own legend defines, and the no-fan-out entries must stay out.

tests.test_docs.test_lock_family_backends_are_distinct()[source]

Check no lock family is named after a manager, or after another family.

Mermaid identifies a sankey node by its label, so a family sharing a label with one of its own members would collapse the diagram’s two levels into a single self-linked node. Four backends (conda, pacman, pkg, scoop) lend their name to a manager, which is exactly how that happens.

tests.test_docs.test_lock_families_render()[source]

Check both concurrency-page generators cover every lock family.

The sankey and the table are two readings of the same constant, so a family added to SHARED_LOCK_FAMILIES must surface in both without further edits.

tests.test_docs.test_augmentations_table_renders()[source]

Check the augmentations table generator still produces a valid table.

The table is generated from the current pool.

The table is rendered live at Sphinx build time by the {python:render} block in docs/augmentations.md, so there is no checked-in copy to compare against: this test only guards the generator against crashes and structural regressions.

tests.test_docs.test_upgrade_report_legend(outcome)[source]

The legend of the upgrade report names every outcome with its glyph.

tests.test_docs.test_ansi_logo_tracks_the_brand_palette()[source]

Check the terminal mark names the very colors the artwork is drawn in.

meta_package_manager.logo repeats them as literals, the SVG sources living in docs/ and never reaching the wheel. That repetition is how the terminal mark came to shade its faces with a purple the artwork had already dropped, so the sources are what the constants are checked against: the brand SVGs must use these three values, and nothing else.

tests.test_docs.test_manager_logo_assets()[source]

Check every vendored brand mark is normalized, safe and accounted for.

The SVGs are inlined verbatim into the built pages, so this is what keeps a hand edit (or a compromised upstream) from smuggling a script or a remote reference into the documentation. docs/logos_update.py produces this shape; the directory holds nothing else.

tests.test_docs.test_manager_logos_resolve()[source]

Check the logo slug of every manager points at a vendored mark.

The test also checks the credits: each vendored mark lists exactly the managers that declare it.

tests.test_docs.test_manager_logo_renders(manager)[source]

Check the brand mark of each manager renders as inlinable raw HTML.

tests.test_docs.test_manager_card_renders(manager)[source]

Check each manager’s infobox carries its facts, and its mark when it has one.

tests.test_docs.test_manager_label_badge_color()[source]

Check the stylesheet paints the label badge the color GitHub gives it.

A stylesheet cannot read labels.py, so the hex is written twice: here is where the copy is caught drifting from MANAGER_LABEL_COLOR.

Check the stylesheet keeps each card link whole, icon and label together.

The card marks its links with a class the stylesheet alone gives meaning to, so the two are held together here: a renamed class would leave every link free to wrap between its icon and its label again.

tests.test_docs.test_manager_logo_credits_renders()[source]

Check every vendored mark is credited with its license and source.

Twelve marks carry an attribution-bearing license, so a missing row is a license violation rather than a cosmetic gap.

tests.test_docs.test_manager_stubs_in_sync()[source]

Check the page stubs of docs/managers/ match a fresh generation.

The committed stubs are generated from the pool.

The directory is wholly owned by update_manager_stubs(): one stub per pool manager, nothing else, each byte-identical to its template. Drift means a manager was added or removed without running docs/docs_update.py (repomatic’s update-docs job self-heals this on the next push).

tests.test_docs.test_api_stubs_are_reachable_from_a_toctree()[source]

Every generated API page sits in the toctree of its parent index.

A page in no toctree still builds, so Sphinx reports it as a warning and the build stays green: tests.test_manager_yarn was unreachable from tests.md for as long as the module existed. The parent is the longest <prefix>.md above a page, which is what puts a sub-package’s modules in its own index rather than the top-level one.

tests.test_docs.test_manager_page_headings_survive_a_build(tmp_path)[source]

Check a real Sphinx build turns the generated headings into sections.

The sections sit under a generated title and below the lede.

The stub carries no heading at all, not even the page title: every one is printed by manager_page() and parsed out of the directive’s output, which only works because myst-parser supports titles in a nested parse. Three ways that can regress, all silent, none visible to a test of the generators alone: the document can lose its title, the sections can vanish, or the lede can be reparented below them, which is what happens the moment anything is printed above the first heading of the parse. So one page is built for real, and its title, heading sequence and infobox position are asserted.

brew is the subject: it is the one manager exercising every section.

Skipped when the docs dependency group is missing, as in the hermetic unit-test environment.

tests.test_docs.test_manager_page_sections_render(manager)[source]

Check every section generator of the manager pages makes valid MyST.

The MyST must be non-empty and heading-free.

The sections are rendered live at Sphinx build time by the single {python:render} block of docs/managers/<id>.md, so there is no checked-in copy to compare against: this test guards the generators against crashes and locks the heading-free invariant documented on MANAGER_SECTIONS (a heading comes from manager_page() alone).

tests.test_docs.test_operation_notes_reach_the_operations_table(manager)[source]

Check every declared operation note lands verbatim in the table.

The Notes column renders the declaration beside its operation row, so a note missing from the table names a key the renderer dropped: an operation renamed, or a vocabulary drift between operation_notes and Operations.

tests.test_docs.test_operation_notes_are_full_sentences(manager)[source]

Check every Notes cell of the operations table reads as sentences.

Each populated cell must read as standalone sentences.

The column mixes the manager’s declared notes with the synthesized backfill captions, so the sentence shape (a capital to open, a period to close, no leading code span) is what keeps the two halves reading alike. Rows are parsed off the rendered table so the check covers both sources at once.

tests.test_docs.test_version_probe_nests_under_the_reference_traces()[source]

Check the version probe is a subsection of the reference traces.

On a page carrying no traces, it is a section of its own.

MANAGER_SECTIONS declares the probe one level below manager_traces, and manager_page() promotes a subsection whose parent rendered nothing. Both halves regress silently: a lost level flattens the probe back into a section, and a lost promotion orphans it under whatever heading precedes the traces on every page documenting no native output sample.

tests.test_docs.test_config_template_block_is_the_command_output(manager_id, invoke)[source]

Check a manager page shows the block mpm config-template prints.

The page composes the command’s own pieces, so a change to its output (a header comment, a renamed table, a different wrapping) would otherwise leave every page showing a block the CLI no longer produces. brew adds an extra_env sub-table to the shape pear has.

tests.test_docs.test_configuration_section_names_no_build_host()[source]

Check no manager page carries a path from the machine that built it.

An overridable field can hold one: SDKMAN resolves its search path from $SDKMAN_DIR, whose default sits under $HOME, and the template block prints the value as it stands. _config_template collapses a path under the builder’s home to ~, the rule the infobox already applies, so the published pages are identical on every host.

tests.test_docs.test_overridable_fields_are_documented(field)[source]

Check each overridable field has a row in the table of docs/overrides.md.

The table is written by hand, so a field added to OVERRIDABLE_FIELDS never reaches it on its own.

tests.test_docs.DEFINITION_ONLY_FIELDS = ['brewfile_entry_type', 'brewfile_skip_warning', 'default_sudo', 'internal_sudo', 'internal_sudo_operations', 'keywords', 'maintenance_note', 'operation_notes', 'resets_sudo_timestamp', 'unmaintained_message', 'version_cli', 'version_from_stderr']

Fields a manager definition accepts and an override does not.

tests.test_docs.test_definition_only_fields_are_documented(field)[source]

Check each definition-only field is in its two reference lists.

The table of docs/overrides.md is the list a user reads, and the one under DEFINITION_CLI_FIELDS the list a developer reads. Both are written by hand, so a field added to the mapping reaches neither on its own.

tests.test_docs.DOCSTRING_FENCE = re.compile('(?ms)^([ \\t]*)(`{3,})(?P<info>[^\\n]*)\\n.*?^[ \\t]*\\2[ \\t]*$', re.MULTILINE|re.DOTALL)

Backtick-fenced block of a docstring, whatever its indentation.

The info string stops at the newline: . spans lines under re.DOTALL, so a greedy one would swallow every fence of the docstring into a single match.

tests.test_docs.PROSE_DIRECTIVES = re.compile('\\{(?!code-block|literalinclude|eval-rst)')

Fence info string of a directive whose body is prose, not code.

An admonition fence (note, warning, caution, seealso, todo) renders its content as regular MyST, so its links matter as much as the surrounding paragraphs’. Only a code block escapes the prose rules.

tests.test_docs.BARE_URL = re.compile('(?<!\\]\\()(?<!<)https?://[^\\s>)\\]`,;\\\'\\"]+')

A URL that is neither a markdown link target nor an autolink.

The single < lookbehind covers autolinks (<https://…>) and, incidentally, angle-bracketed link destinations (](<https://…>)); the latter are rejected outright by ANGLE_LINK_DEST below, so they never need blessing here.

A markdown link whose destination hides in angle brackets.

CommonMark allows the form, but the MyST docstring converter reads a destination only up to the first closing parenthesis, so ](<…>) renders as broken markup — worse than a bare URL. Rewrite the URL to a parenthesis-free variant instead (the man-page query form, say). Lift this ban only when the click-extra floor rises to a release whose converter takes the bracketed form.

The destination of a markdown link, up to its title or its closing parenthesis.

A destination in angle brackets does not match: ANGLE_LINK_DEST rejects it.

tests.test_docs.INLINE_CODE = re.compile('(`+)[^`\\n].*?(?<!`)\\1(?!`)')

An inline code span on one line, opened and closed by the same run of backticks.

The MyST docstring converter reads a code span on one line only. A link in a code span renders as literal text, with no href to resolve.

tests.test_docs.WEB_SCHEMES = frozenset({'http', 'https', 'mailto'})

The URL schemes a markdown link in a docstring can point to.

tests.test_docs.test_docstrings_carry_no_bare_url()[source]

Every URL in docstring prose must be a link.

MyST’s linkify extension is off, so a bare URL renders as dead plain text, both in the API docs and in the manager pages inlining the class docstrings. URLs inside a fenced block are captured CLI output (fwupd’s See https://… warnings) and are left alone.

Write a titled markdown link, and keep its ] and ( on one source line: a line break between them disables the link with no warning.

The ](<url>) destination form renders as broken markup.

See ANGLE_LINK_DEST for the converter limitation and the rewrite to apply.

A markdown link in a docstring points to a web address.

The MyST docstring converter turns each markdown link into an external link. A relative destination like conda.md, or a bare #anchor, then becomes an href that the API page cannot resolve, and the click_extra.dead_link check fails the docs build. The class docstring of a manager also renders on the page of that manager, where the relative link resolves, so the break shows on the API page alone. Link another page with a cross-reference role instead.

tests.test_docs.TRAIL_FAILURE_GLYPH = '✘'

The failure glyph every description of the trail in this tree writes.

Pinned to click-extra’s KO_GLYPH by test_trail_glyph_matches_the_emitted_one: the prose follows the emitted character. Its look-alike U+2717 reads the same on screen and matches nothing in real output.

tests.test_docs.test_trail_glyph_matches_the_emitted_one()[source]

Prose about the trail writes the glyph the trail emits.

A reader grepping the documented failure glyph must find it in real output, so the tree carries KO_GLYPH and never its U+2717 look-alike. The scan is raw text, comments included: a captured fixture printing U+2717 would need an exclusion here, and none exists today.

The bundled skills are scanned as well as docs/, because a skill body publishes: docs/add-new-manager.md is a bare :include: of .claude/skills/add-manager/SKILL.md, so a docs/*.md glob reads the three lines of the directive and never the prose the page renders.

tests.test_docs.test_self_referencing_urls_name_a_file_the_tree_holds()[source]

A raw URL to this repository’s main names a file the tree carries.

The rule covers the raw.githubusercontent.com URLs.

Nothing else resolves these: they are fetched by a reader far from any test. The <xbar.image> header of the bar plugin is what xbarapp.com renders as the plugin’s preview, and the readme images are served to every GitHub visitor. So renaming a file under docs/assets/ breaks them silently, which is how the plugin shipped a dead preview for five weeks after fc8adbfb recaptured the screenshots under new names.

A URL pinned to a tag names a historical tree and is skipped, the working copy being no evidence about what that tag held.

tests.test_docs.test_manager_traces_render_literal_blocks()[source]

The reference traces of a class-based manager match the corpus.

They surface exactly the literal installed/outdated/orphans blocks the corpus validates, in terminal-facing form.

manager_traces and the corpus round-trip both read literal_blocks(), so the rendered traces never drift from what the parsers are tested against. TOML managers keep their [samples] traces, covered by test_bundled_parsing.

tests.test_docs.test_manager_changelog_entries()[source]

Check every changelog bullet reaches the manager pages it is scoped to.

The release-history section is rendered live at Sphinx build time, so there is no checked-in copy to compare against: this recounts the (manager, entry) pairs straight from changelog.md and matches them against the index, which catches an entry silently dropped by a scope the parser fails to resolve.

Every pool manager is asserted to have at least one entry, which makes the section double as the lint for a manager shipped without its changelog line.

tests.test_docs.test_frontend_changelog_sections()[source]

Check each desktop frontend page renders the changelog scoped to it.

Both pages are hand-written, so what pins the section is the pair of {python:render} blocks, one per frontend, each naming its own scope. A scope the index fails to resolve renders an empty section instead of failing, hence the recount straight from changelog.md.

tests.test_docs.test_manager_support_bar_renders()[source]

Check the support bar opens the page with one region per state.

Each region is as wide as its own population, and coloured by a step the stylesheet declares.

Rendered live at Sphinx build time by the {python:render} block opening docs/managers.md, as raw HTML: the shares are a ratio CSS can draw, and a committed image would go stale on the next manager the pool gains.

tests.test_docs.test_manager_support_legend()[source]

Check the glyph legend counts every assessed manager exactly once.

Rendered live at Sphinx build time by the {python:render} block opening docs/managers.md, right above the index table it is the key to. The population it reports replaced a prose summary, so the numbers are asserted against an independent recount of the same two sources.

tests.test_docs.test_managers_index_table_renders()[source]

Check the manager index renders as one well-formed table.

It holds six verdict groups, each opening on its own title row. Wrapped managers link to their documentation page and declined ones to their verdict, in the same columns.

The table is rendered live at Sphinx build time by the {python:render} block in docs/managers.md, so there is no checked-in copy to compare against.

tests.test_docs.test_queued_todos_render()[source]

Check each queued entry becomes one :todo: carrying its blocker verbatim.

sphinx.ext.todo collects them onto docs/todolist.md, the one page listing every 🚧 manager beside what it waits on, but only from a page that renders them.

tests.test_docs.test_brewfile_managers_table_renders()[source]

Check the Brewfile table lists exactly the managers that reach a dump.

--brewfile is an option of one command, so the mapping belongs on that command’s page and nowhere else: it used to be a prose enumeration that had gone stale, repeated by a row on every manager’s own card.

tests.test_docs.test_manager_card_carries_upstream_readings()[source]

Check each sampled upstream reading reaches the card of its manager.

The stars, newest release and newest commit used to be three columns of the index; they now belong to the page devoted to the tool they describe, so this follows them there rather than lapsing when the columns went.

tests.test_docs.test_upstream_badges_cover_every_forge()[source]

Check every sampled repository is hosted where a badge can read it.

A forge missing from UPSTREAM_FORGES costs its managers the whole section, silently. Naming the host here turns that into one failing assertion pointing at the line to add.

tests.test_docs.test_manager_upstream_badges()[source]

Check the upstream section of every sampled manager holds live badges.

Three invariants, each guarding a way the section silently goes wrong: the badges point at the forge family the repository is actually hosted on, the release-gated ones follow the sample rather than guessing (shields answers the same red error for an unreleased project and a missing one), and nothing here repeats a figure the infobox already states.

tests.test_docs.test_matrix_blocks_in_sync()[source]

Check the compatibility matrices of the docs match the git tags.

Each embedded matrix must match a fresh regeneration.

Drift here means a release changed the Python classifiers or the click-extra requirement before repomatic’s update-docs job refreshed the embedded blocks.

Skipped when click-extra’s [sphinx] extra (pulled by the docs dependency group) is missing, as in the hermetic unit-test environment. Without the full tag history (shallow clone, sdist build), regeneration leaves every block untouched and the test passes vacuously.

tests.test_docs.test_mirror_blocks_in_sync()[source]

Check the mirror blocks of the docs and readme match their generators.

The <!-- mirror-src --> and :mirror: blocks must match a fresh regeneration.

Drift here means a generator’s output changed (a manager joined or left the pool) before repomatic’s update-docs job refreshed the embedded blocks with click-extra refresh-directives.

Skipped when click-extra’s [sphinx] extra (pulled by the docs dependency group) is missing, as in the hermetic unit-test environment.

tests.test_docs.test_unsupported_page_matches_benchmark()[source]

Check docs/unsupported.md covers the benchmark’s unsupported set.

It covers exactly that set, with matching glyphs, sorted by anchor.

The benchmark renders each unsupported manager as a glyph linking into that page for the reason, so the two must stay in lockstep. A manager listed on one side only produces either a link into a page that never explains it, or a section nothing points at. Both happened while the mechanism was being introduced, hence this test.

The glyph must agree too: ☠️ and ❌ are read side by side across the two pages, and ⚠️ is reserved for the wrapped managers of the index, so it must never leak onto a page listing what mpm refused to wrap. The 🛟 fallback marker is derived rather than written, so the page is held to what unsupported_status() computes from the competitor data.

A family section carries one verdict for several tools, so every member is checked against that shared title: grouping tools whose glyphs differ would silently restate one tool’s verdict as another’s.

tests.test_docs.test_unsupported_verdicts_cite_a_release()[source]

Check every verdict of docs/unsupported.md closes on its release.

That release published the verdict, and the changelog must declare it.

The page invites a reassessment of any verdict it carries, and the release is what dates one: without it a reader cannot tell a decision taken two years ago from one taken last week. The stamp is hand-written, nothing else on the page holding that fact, so this is what stops a section copied from its neighbour claiming a release it was never published in.

The version is all the page states. The mpm-release role resolves it to a link and a date at build time, so an unresolvable version renders as a docutils error on a page nobody rebuilt to look at: the same index the role reads is checked here against a fresh count of the changelog headings.

Coupling a stamp to the changelog bullet announcing the decline is not available, and never was. A batch of declines ships as one [mpm] entry naming no ID (Record 47 more unsupported managers, covering …), and the entry introducing the page named none of the ten tools it carried. The release is what the page and the changelog do share, so it is what gets checked.

tests.test_docs.test_unsupported_wikipedia_references()[source]

Check the Wikipedia references of docs/unsupported.md read one way.

A verdict section links the English Wikipedia articles of the tools it covers on a single line, right before the stamp closing it, as Wikipedia: `title <url>`_, `title <url>`_ and `title <url>`_.

tests.test_docs.test_unsupported_anchors_match_docutils()[source]

Check the anchors linked from the benchmark are the ones Sphinx emits.

_heading_slug() reimplements what docs/conf.py pins myst_heading_slug_func to, because docutils only reaches this project through the docs dependency group while the benchmark table also renders under the test group. That copy is only safe while the two agree, and a disagreement is invisible: the link renders, resolves to nothing, and drops the reader at the top of the page.

tests.test_docs.test_cooldown_support_statuses_known()[source]

Check every row of the cooldown support table carries a legend glyph.

The “Supported managers” table of docs/cooldown.md is hand-curated and reused on the per-manager pages, so a typo’d or invented status glyph would travel silently. Only the five glyphs its own legend defines are allowed.

tests.test_docs.test_benchmark_operations_rows_have_support()[source]

Check no row of the benchmark’s Operations table is entirely blank.

A row no tool supports carries no information and is usually a leftover from a competitor column that was dropped: the Latest filter, Reshim and Import from external tool rows outlived the mise/asdf columns they were written for. The table is hand-maintained, so nothing else catches it.

tests.test_docs.test_cooldown_support_table_covers_the_pool()[source]

Check the cooldown support table holds one row per pool manager.

The “Supported managers” table of docs/cooldown.md is hand-curated, and manager_cooldown() reuses each manager’s row on its own page. A manager missing from the table silently degrades that page to a “not yet assessed” line, which is how pikaur, trizen and dkp-pacman all shipped uncovered, and one listed twice would resolve to whichever row comes first: the mapping must partition the pool, exactly like the retraction table below.

tests.test_docs.test_retraction_table_well_formed()[source]

Check the retraction table partitions the pool and travels intact.

The “Retraction paths by registry” table of docs/cooldown.md is hand-curated, and manager_cooldown() reuses each row on the pages of the managers listed in it. Two invariants follow. A manager missing from the table silently loses the section on its page and one listed twice would resolve to whichever registry comes first, so the mapping must be a partition of the pool. And a reused cell renders from docs/managers/, one directory below docs/cooldown.md, so any relative target or same-page anchor it carries would resolve against the manager page instead: the reused cells must link absolutely or not at all.

tests.test_docs.test_retraction_status_reuses_table_row(manager)[source]

Check each manager’s page surfaces its own registry row verbatim.

A registry documenting neither a retraction path nor a publish date leaves the row alone: it renders as a plain line rather than a one-item list.

tests.test_docs.SKILL_SPEC_FIELDS = frozenset({'allowed-tools', 'compatibility', 'description', 'license', 'metadata', 'name'})

The six frontmatter fields the Agent Skills spec defines.

tests.test_docs.SKILL_CLAUDE_CODE_EXTENSIONS = frozenset({'argument-hint'})

The only non-spec frontmatter field a skill may carry.

Mirrors the set kdeldycke/repomatic pins in its own tests/test_skills.py: no spec field expresses an autocomplete hint, and the key degrades to a no-op wherever it is not understood. Do not grow this set. In particular there is no model: (the recommended model rides in compatibility) and no disable-model-invocation:: every skill is model-invocable by design, and what it may actually do is gated by the permission layer, not by frontmatter.

tests.test_docs.SKILL_MODEL_HINT = re.compile('Recommended model: \\w+\\.')

Shape of the model recommendation carried by compatibility.

tests.test_docs.test_add_manager_skill_frontmatter()[source]

Check the bundled skill conforms to the Agent Skills specification.

The frontmatter contract is the one kdeldycke/repomatic enforces on its own skills, kept here so this repository’s single local skill cannot drift away from the upstream convention it was aligned to.

A comma-separated allowed-tools is the trap worth pinning: Claude Code accepts it, so the skill keeps working locally while silently failing the spec, which wants a space-separated string.

tests.test_docs.test_add_manager_skill_include_offset()[source]

Check docs/add-new-manager.md slices the skill at its human body.

The page is a bare :include: of the skill, so the two files share one source and can only disagree through the hard-coded :start-line:. That offset silently absorbs any line added to or removed from the skill’s preamble: too low republishes the frontmatter, the skill’s own # heading or its $ARGUMENTS line, and too high eats the opening paragraph. Neither fails a docs build, which is why it is pinned here instead.