Lab 11: reproducible quicknotes builds with a nix flake#1329
Open
Dekart-hub wants to merge 13 commits into
Open
Lab 11: reproducible quicknotes builds with a nix flake#1329Dekart-hub wants to merge 13 commits into
Dekart-hub wants to merge 13 commits into
Conversation
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
…orkflow Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
Signed-off-by: Aleksandr <55945487+Dekart-hub@users.noreply.github.com>
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.
Goal
Build QuickNotes reproducibly with a Nix flake, extend it to a deterministic OCI image, prove both with identical hashes from two independent environments, and (bonus) turn the proof into a CI gate that fails when two parallel runners disagree.
Changes
flake.nix+flake.lockat the repo rootpackages.quicknotes(anddefault):buildGoModulefromapp/, nixpkgs pinned to nixos-25.11 (locked tob6018f87), toolchain overridden togo_1_26= 1.26.4 (the same version the Lab 6 Dockerfile builder uses),CGO_ENABLED=0,ldflags -s -wvendorHash = null, a documented deviation: QuickNotes has zero dependencies and the first failed build refused to emit a hash, demanding null for the empty vendor treepackages.docker:dockerTools.buildImagetarball with exec-form entrypoint,8080/tcpexposed, nonroot uid 65532, built without DockerdevShells.default: go, gopls, golangci-lint.github/workflows/nix-repro.yml(bonus): two parallel build jobs publishsha256sum resultas outputs, a third job fails on mismatch; actions pinned by 40-char SHA; two named jobs instead of a matrix because matrix cells share one outputs namespace and would compare a digest with itselfsubmissions/lab11.md: flake, all proofs, size and determinism comparison with the Lab 6 Docker build, design questions a-japp/andcompose.yaml, the "Lab 6 image works" starting point this lab builds onTesting
sha256:0n7wlzxw...vsinxfrom environment A (bind-mounted worktree, its own store) and environment B (pristine store, fresh clone); the binary serves/healthand the unit tests run inside the sandboxed checkPhase093f2295...cb8abfrom both environments; the loaded image runs as uid 65532 and serves the seeded notes; two--no-cachebuilds of the Lab 6 Dockerfile produced two different image IDs on the same machine minutes apartSOURCE_DATE_EPOCHset in the caller environment does not move the digest (the sandbox scrubs the env), which is why the red demo drifts the source insteadChecklist
git log --show-signature)