Repository navigation
feat(scripts): same-PR Nix pin refresh companion to the dep gate (#14195 bullet 2) - #16839
Conversation
bullet 2) scripts/refresh-nix-dep-pins.sh regenerates stale pinned hashes in place for a dependency bump: npm rows via prefetch-npm-deps (honouring npmDepsFetcherVersion), the pkgs/id flake.lock row via nix flake lock, go/cargo rows reported MANUAL rather than guessed. Coverage is read live from the gate's --list so the two cannot drift; contract tests assert every gate row has a refresh mode. The gate's failure output now points at the repair script, and the dispatch-only nix-dep-refresh workflow commits refreshed pins back to a bump branch.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
…ix test shim printf format (#14195) First remote run of the contract suite (nix-dep-gate workflow on the branch) caught both: assignments inside a let block on the same line as an opening brace were counted as zero, and the fake prefetcher's format string had an unescaped %s for the shell printf.
|
0937-B (alpha DRIVE landings): merged under standing merge authority after full-diff verification (863-line diff read firsthand). The refresh script is fail-closed throughout: strict #3352 argument contract (exit 2 on unknown/positional/uncomputable), coverage read live from the gate's --list so gate and refresh cannot drift, npm pins rewritten only when exactly one hash assignment exists (never guesses), npmDepsFetcherVersion honoured, prefetch failure leaves the pin untouched, dry-run writes nothing (flake.lock restored), go/cargo rows report MANUAL with exit 1 rather than a guessed hash, supergateway carries the #14140 warning. 11 contract tests with named oracles (fake-prefetcher SRI hash; the gate itself as acceptance oracle after refresh; MANUAL/fail-closed cases; --list maps every gate row). Dispatch-only workflow runs the contract tests before any refresh and pushes nothing when the script exits 1. Head e0eb4e8 stable across three reads, OPEN/non-draft/CLEAN/MERGEABLE immediately before merge. MERGED confirmed by second read: merge commit a5a69e8, mergedAt 2026-11-29T16:07:56Z. Refs #14195 (stays open — closure is Felix's call per the PR body). CI was not a gate per Drew's standing rule. |
Refs #14195 — implements bullet 2 (the same-PR hash-refresh step), the landable remainder per the 2026-11-29 census. Bullets 1 (gate) and 3 (dependabot audit) already landed; this PR does not close the issue — Felix judges closure.
What lands
scripts/refresh-nix-dep-pins.sh— the gate's repair companion. For a bump diff (same staleness rule as the gate: an input changed without its companion), it regenerates stale pins in place:npmDepsHashwithprefetch-npm-depsagainst the row'spackage-lock.json(a pure function of the lockfile; honours an explicitnpmDepsFetcherVersion, the pkgs/cf case). Rewrites only when exactly one hash assignment exists — never guesses.nix flake lock(dry-run restores the file).--list, so gate and refresh can never drift on which derivations are covered; per-row refresh modes live in the script's meta table..github/workflows/nix-dep-refresh.yml— the bot step: workflow_dispatch against a bump branch, runs the refresh contract tests, refreshes, and commits the refreshed pins back onto the same branch so the bump PR itself carries the fix. Dispatch-only per ci-policy (no push/PR triggers).scripts/tests/test_refresh_nix_dep_pins.py(11 contract tests; oracle = the prefetcher's own output injected via a shim, plus the gate passing on the refreshed diff). Wired intonix-dep-gate.ymlnightly and the refresh workflow; registered as suitescripts.nix-dep-refreshin.github/test-suite-registry.json.Verification
nix-dep-gateworkflow dispatched on this branch (gate + both contract suites).prefetch-npm-depscomparison against the pins currently on main (pkgs/wrangler, pkgs/cf); verdicts recorded on Dependency bumps land without regenerating pinned Nix hashes (vendorHash / npmDepsHash / FOD) — four build breaks in one night #14195 as they land.No feature flag: this is operator tooling, additive only — the gate's behaviour is unchanged apart from one extra hint line in its failure output.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T15:37:28Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.