This repository was archived by the owner on Jul 24, 2026. It is now read-only.
feat(nix): re-land the flake + Nix CI orphaned by a merge-order accident (#87) - #91
Merged
schickling-assistant merged 4 commits intoJul 21, 2026
Conversation
convoy had no flake and no CI. This adds both, and they are the same thing:
`nix flake check` is the gate.
The flake is thin and self-contained — nixpkgs, flake-utils, and the two
sibling packages from their own flakes. It builds from `self`, so it packages
whatever revision it ships with rather than a pinned fetchFromGitHub.
Why a flake check and not a Node workflow: convoy depends on smalltalk and pty
via `file:../sibling`, so a plain `npm ci` in CI needs those repos checked out
next to convoy. Flake inputs solve that properly — the sibling packages come
from their own flakes, pinned in flake.lock, and the sibling node_modules links
are expressed declaratively as an npm-name -> store-path attrset.
Checks (all run a REAL built binary, not a source tree):
- help — `convoy --help`
- completions — generates bash/zsh/fish, asserts each is non-empty, that fish
still binds to `convoy`, and that each shell accepts its own
generated script (`-n`). This is where zsh actually gets
syntax-checked; it is often absent from a dev machine.
- typecheck — convoy's own `tsc --noEmit`, against the same sibling deps.
The vitest suite is deliberately not wired up: parts of it shell out to
`git worktree` and probe the host, which the sandbox cannot provide.
Completions are generated at build time from the just-built binary and
installed via installShellCompletion, so what ships can never drift from
src/command-table.ts.
The smalltalk input points at the branch of compoundingtech/smalltalk#104 (the
PR adding smalltalk's flake) because that flake does not exist on its main yet;
there is a TODO to repoint once it merges.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T1xLDkqUDCYUMMADdMqVgP
agent-session-id: 312caff5-3274-4d97-baa4-8ff06ab03fc5
agent-tool: Claude Code
agent-tool-version: 2.1.215
agent-model: claude-opus-4-8
agent-runtime-profile: /nix/store/acr8a3l2v366jgmwiq8xdrhgz1py0db5-coding-agent-runtime-profile/share/coding-agents/profile.json
agent-skills-manifest: /nix/store/sj1v5j91h8v8d1w9lca4040302lwrd6v-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@unknown-dirty
The suite in src/completions.test.ts is what keeps the command table, argv dispatch, and the generated scripts from drifting — but nothing ran it automatically. It is sandbox-safe (it only spawns `convoy` and reads src/cli.ts), unlike the rest of the vitest suite, which shells out to `git worktree` and probes the host. bash, zsh, and fish are in the check's inputs so its per-shell syntax assertions actually run instead of skipping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T1xLDkqUDCYUMMADdMqVgP agent-session-id: 312caff5-3274-4d97-baa4-8ff06ab03fc5 agent-tool: Claude Code agent-tool-version: 2.1.215 agent-model: claude-opus-4-8 agent-runtime-profile: /nix/store/acr8a3l2v366jgmwiq8xdrhgz1py0db5-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/sj1v5j91h8v8d1w9lca4040302lwrd6v-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@unknown-dirty
compoundingtech/smalltalk#104 has merged, so smalltalk's flake now exists on main and the PR-branch pin is no longer needed. Drops the TODO that asked for exactly this. The pty input already pointed at plain `github:compoundingtech/pty` (main) and carried no TODO, so it is left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T1xLDkqUDCYUMMADdMqVgP agent-session-id: 312caff5-3274-4d97-baa4-8ff06ab03fc5 agent-tool: Claude Code agent-tool-version: 2.1.215 agent-model: claude-opus-4-8 agent-runtime-profile: /nix/store/acr8a3l2v366jgmwiq8xdrhgz1py0db5-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/sj1v5j91h8v8d1w9lca4040302lwrd6v-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@unknown-dirty
The flake pinned smalltalk at ec24ac4, whose npmDepsHash was stale -- smalltalk main was broken standalone, so every `nix flake check` here failed on an input it does not own. smalltalk#105 fixed that hash on main; this moves the lock onto that merge commit (850266f). Only the smalltalk node moves. Verified locally: `nix build .#default` succeeds, `nix flake check` is green on all four checks (help, completions, parity, typecheck), and the built `convoy --help` and `convoy completions fish` both work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T1xLDkqUDCYUMMADdMqVgP agent-session-id: 312caff5-3274-4d97-baa4-8ff06ab03fc5 agent-tool: Claude Code agent-tool-version: 2.1.215 agent-model: claude-opus-4-8 agent-runtime-profile: /nix/store/acr8a3l2v366jgmwiq8xdrhgz1py0db5-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/sj1v5j91h8v8d1w9lca4040302lwrd6v-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@unknown-dirty
schickling-assistant
marked this pull request as ready for review
July 21, 2026 00:25
schickling-assistant
deleted the
schickling-assistant/2026-07-20-flake-reland
branch
July 21, 2026 00:25
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Re-lands the Nix flake and its CI workflow onto
main. This is not new work — it is a re-land of #87, whose commits are cherry-picked here with their original authorship preserved.Why: a merge-order accident orphaned #87
#87 was based on the
schickling-assistant/2026-07-20-completionsbranch (the base of #85) rather than onmain. The two merges then landed 24 seconds apart, in the wrong order:main—mainbecomesfabf2c4mainSo #87's merge commit
f90e2d16blanded on the staleschickling-assistant/2026-07-20-completionsbranch, which by then had already been merged and was no longer an ancestor path tomain. Net result:mainhas never had aflake.nix. The orphaned branch reads asdiverged, 3 ahead / 1 behindmain, and everything it is "ahead" by is exactly the 4 files below.Files restored
flake.nixflake.lock.github/workflows/nix.yml.gitignoreInput repoint
The version of the flake in #87 carried a
# TODO:to repointsmalltalkonce its flake landed. That has now happened, so this PR does it and removes the TODO:smalltalk— was pinned to the PR branchschickling-assistant/2026-07-20-nix-flake, since that was the only place smalltalk's flake existed. feat(nix): add self-contained flake with generated shell completions smalltalk#104 has since merged, so it now points atgithub:compoundingtech/smalltalk(main).flake.lockupdated to match.pty— checked, deliberately left alone. It already pointed at plaingithub:compoundingtech/pty(main) and carried no TODO. convoy does not need the pinned-geometry work still open in pty#108.Verification actually run
Full local proof, all green:
nix build .#default— succeedsnix flake check— passes all four checks:help,completions,parity,typecheck./result/bin/convoy --help— prints the subcommand table, exit 0./result/bin/convoy completions fish— emits the generated fish script, exit 0npmDepsHashneeded no change: convoy's npm deps built clean againstmain'spackage-lock.json.Important caveat about how that proof was obtained. It was run with
--override-input smalltalkpointed at the branch of compoundingtech/smalltalk#105, because smalltalkmainis currently red — see below. Everything above is a real observed result, but against a smalltalk state that no committed lock can point at yet.Blocked on: compoundingtech/smalltalk#105
smalltalk
maincannot currently build. Its flake'snpmDepsHashwent stale through the same class of merge-order accident as this PR's: #104 added the flake with a hash computed against its own branch'spackage-lock.json, while12a4772dchanged that lock onmain. The merge combined the new flake with the newer lock, so the hash was stale on arrival. smalltalk's Nix workflow has been red onmainever since.compoundingtech/smalltalk#105 fixes it (hash regenerated via
prefetch-npm-deps, CI green).Observed CI result on this PR
The
nix.ymlworkflow triggered correctly on this PR (run29776963677) and failed, for exactly and only that reason:The failure is in the smalltalk dependency, not in convoy — convoy's own derivation is never reached. Note that the
got:value CI computed independently is byte-for-byte the hash compoundingtech/smalltalk#105 installs, which is third-party confirmation that #105 is the correct and complete fix.Therefore this PR's CI is expected to stay red until:
nix flake update smalltalkis re-run here to move the lock to that greenmaintip.Kept as a draft for that reason. Pinning this PR at smalltalk#105's branch would make CI green today, but that just recreates the fragile PR-branch pin this PR exists to remove — so it points at
mainand waits.Follow-up
schickling-assistant/2026-07-20-completionsis worth deleting once this lands. It is the stale branch the accident landed on, it still carries #87's orphaned merge commit, and re-merging it would reintroduce the old PR-branch smalltalk pin.