flake-status --upstream ignores the locked ref and compares every pin to the default branch #170

Closed
opened 2026-09-08 16:21:14 +01:00 by vnprc-agent · 0 comments
Contributor

flake-status --upstream compares every pin against the remote's default-branch HEAD, ignoring the ref the lock's original entry names, so a nixpkgs input tracking nixos-26.05 is reported as behind nixpkgs master, and a home-manager input already at the tip of release-26.05 is marked stale against master.

Symptom

Run on 2026-09-08 across the workspace. Every nixpkgs row, whatever channel it tracks, shows the same target revision, and it is the revision of nixpkgs master:

==> allod-vm
  home-manager          fd0956c  2026-09-05  → 2c0350c
  nixpkgs               6713828  2026-09-05  → 9718499
  nixpkgs-unstable      c043004  2026-09-05  → 9718499

==> allod-tools
  nixpkgs               c043004  2026-09-05  → 9718499

The same run lists home-manager and nixpkgs-unstable in the closing Outdated (external) line, and suggests a flake-update-cascade over them.

Evidence

What the locks name and where the branches actually were at the time of the run:

$ jq -r '.nodes["home-manager_2"].original.ref' flake.lock     # in allod/vm
release-26.05
$ git ls-remote https://github.com/nix-community/home-manager refs/heads/release-26.05 refs/heads/master
fd0956c99c41ae3c13a73a638f1f7e963aebc4ab	refs/heads/release-26.05
2c0350c759688177331b8f5242311fae8877bdb3	refs/heads/master

$ git ls-remote https://github.com/NixOS/nixpkgs refs/heads/nixos-26.05 refs/heads/nixos-unstable refs/heads/master
93108a538f079596c9a16c72cf03e9322782b6dd	refs/heads/nixos-26.05
dc5d91f840324650bac8c379428c7037a416959a	refs/heads/nixos-unstable
97184999c19cca9eb397c564cb1774f81b4c18e1	refs/heads/master

So home-manager at fd0956c is exactly at its branch tip and is reported stale, the nixos-26.05 pin at 6713828 is behind by 93108a5 and not by 9718499, and running the suggested flake-update-cascade home-manager would be a no-op. nix flake update itself honours the ref, so the tool's arrow can never be reached by the command it recommends.

Affects the --upstream mode only; the no-argument and named-input tables are unaffected. flake/README.md documents the mode as comparing to "upstream HEAD", so the documentation and the behaviour agree with each other and disagree with what a lock pin means.

Related: allod/tools#158 ports this tool to Go and says an open correctness bug may diverge from the Bash oracle only with a regression test and a PR-body note; this is such a bug.

`flake-status --upstream` compares every pin against the remote's default-branch HEAD, ignoring the `ref` the lock's `original` entry names, so a nixpkgs input tracking `nixos-26.05` is reported as behind nixpkgs `master`, and a home-manager input already at the tip of `release-26.05` is marked stale against `master`. ### Symptom Run on 2026-09-08 across the workspace. Every nixpkgs row, whatever channel it tracks, shows the same target revision, and it is the revision of nixpkgs `master`: ``` ==> allod-vm home-manager fd0956c 2026-09-05 → 2c0350c nixpkgs 6713828 2026-09-05 → 9718499 nixpkgs-unstable c043004 2026-09-05 → 9718499 ==> allod-tools nixpkgs c043004 2026-09-05 → 9718499 ``` The same run lists `home-manager` and `nixpkgs-unstable` in the closing `Outdated (external)` line, and suggests a `flake-update-cascade` over them. ### Evidence What the locks name and where the branches actually were at the time of the run: ``` $ jq -r '.nodes["home-manager_2"].original.ref' flake.lock # in allod/vm release-26.05 $ git ls-remote https://github.com/nix-community/home-manager refs/heads/release-26.05 refs/heads/master fd0956c99c41ae3c13a73a638f1f7e963aebc4ab refs/heads/release-26.05 2c0350c759688177331b8f5242311fae8877bdb3 refs/heads/master $ git ls-remote https://github.com/NixOS/nixpkgs refs/heads/nixos-26.05 refs/heads/nixos-unstable refs/heads/master 93108a538f079596c9a16c72cf03e9322782b6dd refs/heads/nixos-26.05 dc5d91f840324650bac8c379428c7037a416959a refs/heads/nixos-unstable 97184999c19cca9eb397c564cb1774f81b4c18e1 refs/heads/master ``` So `home-manager` at `fd0956c` is exactly at its branch tip and is reported stale, the `nixos-26.05` pin at `6713828` is behind by `93108a5` and not by `9718499`, and running the suggested `flake-update-cascade home-manager` would be a no-op. `nix flake update` itself honours the ref, so the tool's arrow can never be reached by the command it recommends. Affects the `--upstream` mode only; the no-argument and named-input tables are unaffected. `flake/README.md` documents the mode as comparing to "upstream HEAD", so the documentation and the behaviour agree with each other and disagree with what a lock pin means. Related: allod/tools#158 ports this tool to Go and says an open correctness bug may diverge from the Bash oracle only with a regression test and a PR-body note; this is such a bug.
vnprc closed this issue 2026-09-09 19:59:56 +01:00
Sign in to join this conversation.
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
allod/tools#170
No description provided.