The metrics job cannot fail. The comparison of docs/metrics.md against a re-measurement of the tagged tree ends in || true under allow_failure: true, so the job reports nothing whatever the diff says.

The page is stale. It is dated 2026-09-02 and claims 1,342 files and 150,883 lines of code. A re-measurement of the 1.x head gives 1,359 files and 156,227 lines.

Why the diff is not an assertion today. The page counts the file it writes, so writing it changes the tree it just measured. On this tree two consecutive regenerations happen to agree, because the page it replaces has the same number of lines, but that is luck rather than a property: any change to the page's own length makes the first regeneration after it irreproducible. cloc also counts differently from version to version, and the job installs whatever apt offers rather than the version the page was written with.

Proposed

  • Exclude docs/metrics.md from its own measurement, so one regeneration reproduces exactly.
  • Record the cloc version on the page, read from the JSON header cloc already supplies, and have the job install exactly that release.
  • Sort the file walk, so two entries with the same count cannot swap places between one machine and another.
  • Drop || true and allow_failure, and run the job on a merge request touching the page or the generator as well as on a tag.
  • Regenerate the page.

The same defect was fixed in orchestra #3624570, and this issue carries that fix across. The re-measurements above were taken with cloc 2.08 against the current 1.x head; a little of each difference is the cloc version rather than the tree, which is exactly why the page has to record the version that measured it.

AI-Generated: Yes (Claude Code was used to help draft this issue summary and to write the change on the merge request. I reviewed and ran the work myself before posting it.)

Issue fork yoyaku-3624605

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 79a43d38 on 1.x
    task: #3624605 Let the metrics job fail when the page is stale, and...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.