Repository navigation
test(site): check the download page's release fields (#229) - #252
Merged
juancguerrerodev merged 12 commits intoDec 6, 2026
Merged
juancguerrerodev merged 12 commits into
juancguerrerodev merged 12 commits into
Conversation
10 of 16 tasks
Contributor
|
One fix before this can merge: |
Contributor
Author
|
Fixed: the |
juancguerrerodev
force-pushed
the
test/site-release-229
branch
from
December 6, 2026 07:57
fa6e945 to
43c04fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #229
The site's download page shows the latest preview APK from
apps/site/lib/release.ts: its file name, link, SHA-256 andthe signing certificate's SHA-256, copied by hand for every release (CONTRIBUTING.md, For maintainers). The only check
was a regular expression in
check-site.mjsrefusing an empty field, after a full build. A SHA-256 one character short,or a link to another tag's APK, would ship, and people check the APK against that hash.
What this PR does
apps/site/test/release.test.ts(Vitest, like the other files inapps/site/test), importingRELEASEfrom../lib/release.tsandREPO_URLfrom../lib/site-config.mjs.release.tsis unchanged, and the regularexpression in
check-site.mjsis left as it is.releaseProblems(release, headingAnchors), returning alist of problems that say what is wrong. When
publishedis false it returns no problems and checks nothing else.When true:
sha256andcertSha256are each 64 lowercase hex characters;filelooks likehermit-<version>.apk;urlstarts with${REPO_URL}/releases/download/and ends with/${file}; the tag inurlisvfollowed by the same version as infile; andrecipeUrlpoints at the same tag with an#anchorthat matches a heading in
docs/devices.md(read locally and slugged as GitHub slugs headings).Tests
RELEASEhas no problems.tag, a file name that does not match, a recipe link to another tag, and a recipe anchor with no heading each give
exactly one problem naming the field at fault. Made-up hashes are 64 copies of one letter, as agreed there.
No network: the test never downloads the APK or opens a link.
How to check
Verified here: the new file passes 8/8 against today's
release.ts. The full site suite in this Windows checkout alsoshows the pre-existing
badges.test.tshash failure (reproduced on the clean tree earlier; a line-ending artifact ofthis checkout), untouched by this change.
Pull request template
What and why
Closes #229.
Adds checks for the download page's release fields: hashes, file name, tag agreement and the recipe anchor.
Vision fit
Principle 4, honest about limits: the hashes people check the APK against are verified by test, published or not.
Non-negotiables
Checklist
acceptedproposal.pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Gate note: privacy and guard pass on this checkout today; the rest was run per package as listed under AI agents, not as one root gate on this Windows machine, where unrelated pre-existing failures appear in the site badges, the devices table and mobile source scans.packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes.Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.Screenshots
New dependencies and network calls
None. No new dependency and no new network call.
AI agents
What was run: pnpm --filter @hermit/site exec vitest run test/release.test.ts (8/8), including after removing the published assertion per review; site typecheck; eslint.