Skip to content

ci: check that pkgs/pinned.nix matches what the update script generates - #215

Merged
seberm merged 1 commit into
bitcoinix:masterfrom
ostermayer:versions-check-pinned
Nov 6, 2026
Merged

seberm merged 1 commit into
bitcoinix:masterfrom
ostermayer:versions-check-pinned

Conversation

@ostermayer

Copy link
Copy Markdown
Collaborator

Follow-up to my review on #205, which merged before the review posted.

check-versions.sh regenerates versions.json and the docs table and diffs them, but it never checks pkgs/pinned.nix. versionsFile recomputes which channel each package comes from instead of reading pinned.nix. So if someone moves a package between the stable and unstable inherit blocks by hand, CI stays green and the published table shows a different version than the node runs.

  • check-versions.sh now also regenerates pinnedFile and diffs it against pkgs/pinned.nix.
  • update-flake.sh now writes and compares the same raw eval output byte for byte, using a temp file and cmp. Before, it compared through $(cat), which drops trailing newlines, so the two scripts could disagree about whether pinned.nix is up to date.
  • dev/README.md says what CI checks.

The check only uses nix eval and diff, which check_flake already has, so the workflow doesn't change.

Tested

On my KVM host: the check passes on a clean tree. It fails when I move electrs from the unstable block to the stable one, and when I move charge-lnd the other way. The old script passed both of those edits. ./test/shellcheck.sh passes.

Opus 5.5 wrote this. Codex GPT-5.6 Sol found the trailing-newline mismatch in update-flake.sh. Codex GPT-6 Astra and Claude Fable 5.1 reviewed it until nothing was left, the last point being an EXIT trap for the temp file. Kimi K3.1 Pro and DeepSeek V4.1 Flash ran over 0c9fa80, and Astra checked their report. Nothing came up in the files this PR touches.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: packages pkgs/ and flake pins labels Nov 6, 2026

@seberm seberm 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.

No action items.

Tested: rebased onto master (after #213), check-versions.sh passes; moving bitcoind from the stable to the unstable block by hand fails the new check while master passes it; an extra trailing newline in pinned.nix also fails it; ./test/shellcheck.sh passes.

Review performed with Claude Code (Claude Opus 5.5).

check-versions.sh regenerated versions.json and the docs table, but never
pkgs/pinned.nix. versionsFile recomputes each package's channel instead of
reading pinned.nix, so a package moved by hand between the stable and
unstable blocks kept CI green while the node ran the other version.
Regenerate pinnedFile and diff it against the committed file too.

update-flake.sh now writes and compares the same raw eval output byte for
byte, so the two scripts agree on what an up-to-date pinned.nix is.

Assisted-by: Claude Code (Claude Opus 5.5)
@seberm
seberm force-pushed the versions-check-pinned branch from 0c9fa80 to 89e9bce Compare November 6, 2026 20:25
@seberm
seberm enabled auto-merge November 6, 2026 20:26
@seberm
seberm merged commit 89e3cb3 into bitcoinix:master Nov 6, 2026
11 checks passed
@seberm seberm added this to the v0.1.5 milestone Nov 8, 2026
@ostermayer
ostermayer deleted the versions-check-pinned branch November 8, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: packages pkgs/ and flake pins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants