Skip to content
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 into
mainfrom
schickling-assistant/2026-07-20-flake-reland
Jul 21, 2026
Merged

feat(nix): re-land the flake + Nix CI orphaned by a merge-order accident (#87)#91
schickling-assistant merged 4 commits into
mainfrom
schickling-assistant/2026-07-20-flake-reland

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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-completions branch (the base of #85) rather than on main. The two merges then landed 24 seconds apart, in the wrong order:

time event
19:34:51 #85 merges into mainmain becomes fabf2c4
19:35:15 #87 merges into its now-already-merged base branch, not into main

So #87's merge commit f90e2d16b landed on the stale schickling-assistant/2026-07-20-completions branch, which by then had already been merged and was no longer an ancestor path to main. Net result: main has never had a flake.nix. The orphaned branch reads as diverged, 3 ahead / 1 behind main, and everything it is "ahead" by is exactly the 4 files below.

Files restored

  • flake.nix
  • flake.lock
  • .github/workflows/nix.yml
  • .gitignore

Input repoint

The version of the flake in #87 carried a # TODO: to repoint smalltalk once its flake landed. That has now happened, so this PR does it and removes the TODO:

  • smalltalk — was pinned to the PR branch schickling-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 at github:compoundingtech/smalltalk (main). flake.lock updated to match.
  • pty — checked, deliberately left alone. It already pointed at plain github: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 — succeeds
  • nix 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 0

npmDepsHash needed no change: convoy's npm deps built clean against main's package-lock.json.

Important caveat about how that proof was obtained. It was run with --override-input smalltalk pointed at the branch of compoundingtech/smalltalk#105, because smalltalk main is 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 main cannot currently build. Its flake's npmDepsHash went 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's package-lock.json, while 12a4772d changed that lock on main. The merge combined the new flake with the newer lock, so the hash was stale on arrival. smalltalk's Nix workflow has been red on main ever since.

compoundingtech/smalltalk#105 fixes it (hash regenerated via prefetch-npm-deps, CI green).

Observed CI result on this PR

The nix.yml workflow triggered correctly on this PR (run 29776963677) and failed, for exactly and only that reason:

error: hash mismatch in fixed-output derivation '...-smalltalk-0.3.0-npm-deps.drv':
         specified: sha256-CfgSssHEdSjL9liKjaw9aYKMtCJdaxWKGbFM59PgNwg=
         got:       sha256-FsAjO/CYxyMf30F8ESsxFDI30ckYv1uS4+nkvn9Fl+k=

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:

  1. fix(nix): regenerate npmDepsHash against main's package-lock.json smalltalk#105 merges, and
  2. nix flake update smalltalk is re-run here to move the lock to that green main tip.

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 main and waits.

Follow-up

schickling-assistant/2026-07-20-completions is 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.

schickling-assistant and others added 4 commits July 20, 2026 22:25
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
schickling-assistant marked this pull request as ready for review July 21, 2026 00:25
@schickling-assistant
schickling-assistant merged commit 59895f5 into main Jul 21, 2026
1 check passed
@schickling-assistant
schickling-assistant deleted the schickling-assistant/2026-07-20-flake-reland branch July 21, 2026 00:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant