Shows the running build's commit and binary hash in the footer #86

Merged
miko merged 1 commit from feat/footer-build-hash into main 2026-11-02 00:06:10 +00:00
Owner

The footer version line now names the build serving the page: the source commit it was built from (short form, linked to the commit in the public repo) and the SHA-256 of the running binary, truncated for display with the full hash in the title attribute. Anyone can compare that hash against the one the signed release publishes for the raw binary.

The identity is read once at startup (build info vcs.revision, and the executable file hashed once) and served from memory; nothing is read per request. Either half is left out when it cannot be known, so an unstamped build renders the version line alone.

Release workflow: no change needed. The Forgejo release build already publishes the raw binary's SHA-256, in the signed latest-.json manifests next to the binaries, so the displayed hash already has a published value to check against.

Build stamping, for the record: the release build runs plain go build from a full checkout with VCS stamping left on, so the commit shows. It does not pass -trimpath, so builds are not yet byte-reproducible across different build directories.

Tests: TestVersionFileAndFooter pins the line with a known identity and with none; TestBriefingFontPreloadAndFooter pins the line's ends, with the identity middle pinned by the version test.

The footer version line now names the build serving the page: the source commit it was built from (short form, linked to the commit in the public repo) and the SHA-256 of the running binary, truncated for display with the full hash in the title attribute. Anyone can compare that hash against the one the signed release publishes for the raw binary. The identity is read once at startup (build info vcs.revision, and the executable file hashed once) and served from memory; nothing is read per request. Either half is left out when it cannot be known, so an unstamped build renders the version line alone. Release workflow: no change needed. The Forgejo release build already publishes the raw binary's SHA-256, in the signed latest-<arch>.json manifests next to the binaries, so the displayed hash already has a published value to check against. Build stamping, for the record: the release build runs plain go build from a full checkout with VCS stamping left on, so the commit shows. It does not pass -trimpath, so builds are not yet byte-reproducible across different build directories. Tests: TestVersionFileAndFooter pins the line with a known identity and with none; TestBriefingFontPreloadAndFooter pins the line's ends, with the identity middle pinned by the version test.
Shows the running build's commit and binary hash in the footer
All checks were successful
github/analysis Analysis gate on GitHub runners
github/test Test gate on GitHub runners
github/race Race gate on GitHub runners
github/core-only Core-only gate on GitHub runners
9a5f9e63bd
miko merged commit da26f74e69 into main 2026-11-02 00:06:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EveSynapse/evesynapse!86
No description provided.