Skip to content

feat(consistency-audit): check that the info.xml links are reachable - #372

Merged
ernolf merged 1 commit into
mainfrom
ernolf/feat/info-xml-links
Oct 29, 2026
Merged

ernolf merged 1 commit into
mainfrom
ernolf/feat/info-xml-links

Conversation

@ernolf

@ernolf ernolf commented Oct 29, 2026

Copy link
Copy Markdown
Owner
  • ask whether each link of the App Store listing in info.xml answers, with the findings link-dead, screenshot-not-image, link-error, link-redirect and link-insecure
  • name a screenshot pinned to a release tag that is not pushed yet as link-pending instead of dead
  • add NO_NETWORK=1 and --no-network, which leave the links unchecked (link-unchecked)

Closes #352

consistency-audit now reads the links of the App Store listing from appinfo/info.xml: <website>, <bugs>, <repository>, the <user>, <admin> and <developer> links of <documentation>, every <screenshot> with its small-thumbnail, and <donation>. Each URL is asked once per run with a HEAD, and with a GET where a server answers 400, 403, 405 or 501 to HEAD. Redirects are followed one hop at a time, up to five, so a permanent one can be named. A request waits 10 seconds at most, and all of them run at once.

  • link-dead [!]: 404 or 410, a host that does not resolve, or no http(s) URL. A <repository> or <bugs> that is not http(s) stays with repository-link, so it is not reported twice.
  • screenshot-not-image [!]: a screenshot that answers without an image/* content type, such as a github.com/.../blob/... page.
  • link-error [i]: any other 4xx or 5xx, a timeout, a refused connection or a redirect loop. These may be temporary, or come from a server that refuses requests without a browser, so they are noted and not counted as dead.
  • link-redirect [i]: a chain of permanent redirects (301 or 308), with its target. A move that only drops .git or a trailing slash is not named, since <repository> states the git URL and the forge sends it to its page.
  • link-insecure [i]: an http:// link that the server does not move to https, while the same address answers over https.
  • [ok] with the number of links when none of these applies.

Two ids are new beyond the issue. A screenshot pinned to a release tag of the app's own repository (#304), which answers 404 while the checkout has no such tag, is link-pending [i] as long as its file is in the working tree; without the file it is link-dead. The repository is taken from the origin remote, as make version takes it. A tag that origin has and the checkout lacks, as in a shallow clone, answers and is checked like any other link. link-unchecked [i] says that the links were not asked, either with NO_NETWORK=1 or --no-network, or because not one of them answered, which is a run without network rather than a listing full of dead links.

Until now the audit read nothing from the network itself; make handed in the server majors and the Node schedule. The links are now the one exception. The file header, the summary line of the report, the help and the skill say so, and NO_NETWORK=1 (as CONSISTENCY_AUDIT_NO_NETWORK) leaves them out. The text of repository-link, which said the audit reads no network, now points to link-dead.

Tested on a fixture against a local server that answers 200, 404, 301, 302, 405 to HEAD, 503, a redirect loop and an HTML page as a screenshot, with an unresolvable host, a tag-pinned screenshot with and without its file, and an http link next to a local https server. Each produced its finding. On a shallow clone of ernolf/twofactor_oath the four tag-pinned screenshots answer, and the .git redirect of <repository> is not named. NO_NETWORK=1 through make consistency-audit RUNTIME=bare reports link-unchecked. make lint-markdown and reuse lint pass.

Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
@ernolf ernolf self-assigned this Oct 29, 2026
@ernolf ernolf added enhancement New feature or request audit consistency-audit: whether the metadata of a checkout agrees with itself labels Oct 29, 2026
@ernolf
ernolf merged commit ad511ba into main Oct 29, 2026
12 checks passed
@github-actions
github-actions Bot deleted the ernolf/feat/info-xml-links branch October 29, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit consistency-audit: whether the metadata of a checkout agrees with itself enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

consistency-audit: check that the info.xml links are reachable

1 participant