Skip to content

[#39] CI: test the stale-entry notice and the CR escape of the baseline check - #40

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:ci-self-test-round3
Oct 5, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:ci-self-test-round3

Conversation

@vharseko

@vharseko vharseko commented Oct 2, 2026

Copy link
Copy Markdown
Member

Fixes #39 — the third review round of #28 (review 5389582272), done on master, where the code arrived through #38.

Changes

.github/workflows/build.yml:

  • Self-test the baseline check: a known entry that is gone must give exactly one ::notice title=No longer found; … line and exit 0.
  • Self-test the baseline check: a message 50% + CR, as a new Antora error and as a stale known one, must appear as 50%25%0D in both the ::error and the ::notice line.
  • Both self-tests: on failure, the output of check.sh / head-meta.sh goes to stderr quoted with > , because the runner reads workflow commands on stderr too and its ::error lines would become annotations of the pull request. This is done in all three places, including the two that [#36] [#37] CI: check link anchors, head meta tags and the robots.txt Sitemap line #38 added.

Verification

The steps were cut out of build.yml and run locally in an Ubuntu container (bash 5, jq, node):

  • both self-tests pass on the head;
  • the baseline self-test fails against each of these mutants: no failed=true, swapped comm operands, .errormap in broken-links.jq, comm -13 → comm -12, fixed=, ::notice → ::debug, and the CR escape deleted in both places, in the error only, or in the notice only; the head meta self-test fails against a broken head-meta.sh;
  • when either self-test fails, no line of its stderr starts with ::.

The <br> replacement in the "Errors and warnings" table of the job summary stays untested, as noted in the review.

…escape of the baseline check

- The self-test of check.sh checks that a known entry which is gone gives
  exactly one "No longer found" notice and exit 0.
- It feeds a message with % and CR to a new and to a stale entry, and
  expects 50%25%0D in both the ::error and the ::notice line.
- On failure, the self-tests quote the output of check.sh and head-meta.sh
  with "> " on stderr: the runner reads workflow commands there too, and
  their ::error lines would become annotations of the pull request.
@vharseko vharseko added enhancement New feature or request ci Continuous integration, build and publish workflows tests Tests and self-tests, of the site build or its checks labels Oct 2, 2026
@vharseko
vharseko requested a review from maximthomas October 2, 2026 11:43

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: the new pins kill the notice-path mutants they were written for.

  • The stale-entry block compares stdout exactly (.github/workflows/build.yml:138), so an extra notice fails it as well as a missing one. Locally the HEAD step is green, and fixed=, comm -13 → -12 (check.sh:60) and a deleted failed=true (check.sh:73) each turn it red.
  • The 50% + CR fixture goes through both the error path (JSON \r in antora.log, :144) and the notice path (printf 'y.adoc\tgone 50%%\r\n', :145). Both 50%25%0D lines are asserted with grep -qxF.

@vharseko
vharseko merged commit b3d9ea6 into OpenIdentityPlatform:master Oct 5, 2026
1 check passed
@vharseko
vharseko deleted the ci-self-test-round3 branch October 5, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration, build and publish workflows enhancement New feature or request tests Tests and self-tests, of the site build or its checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: the self-test misses the stale-entry notice and the CR escape, and annotates what it quotes

2 participants