Skip to content

fix(nix): add codeload fallback for Ghostty package archives - #220

Draft
schickling-assistant wants to merge 1 commit into
mainfrom
schickling-assistant/2026-11-08-zig-archive-fallback
Draft

schickling-assistant wants to merge 1 commit into
mainfrom
schickling-assistant/2026-11-08-zig-archive-fallback

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Problem

Cold Nix builds of ghostty-a887df4-zig-deps fail when GitHub archive endpoints return HTTP 5xx, blocking consumers before Rust compilation. The pinned imgui and zigimg archives are also available through codeload.

Goal

Make archive transport resilient without changing dependency contents or the package-cache output hash.

Decisions

  • Derive GitHub archive records and byte checksums from the pinned Ghostty source's existing flatpak/zig-packages.json.
  • Fetch each archive as its own fixed-output fetchurl derivation with urls = [ original codeload ].
  • Replace those URL entries with immutable local archive paths in build.zig.zon.txt. Keep Ghostty's existing cache population script and all other fetching unchanged.
  • Preserve ghosttyContract.zigDepsHash. Both archive checksums and the complete cache recursive output hash stay enforced.

Verification

PROOF PENDING: the local heavy-gate request is queued at this exact head. The proof will rebuild the two archive derivations with github.com forced to loopback, requiring codeload fallback, then --rebuild the complete cache against its unchanged recursive output hash. No existing store path is deleted. Results will be posted as a PR comment after completion; no successful local evaluation/build is claimed yet.

Complexity

Two archive inputs derived from upstream metadata, no new independent pin list or changed version. Reading the upstream manifest realizes its already-pinned source during evaluation.

Concerns

Archive transport only: Git sources and other archive origins retain their existing behavior. The FOD output is unchanged, so consumers that already have it need no fetch.

Release note

Improves cold-cache Nix build reliability during GitHub archive outages. No runtime behavior, API, schema, migration, or dependency content changes. README documents the fetch behavior.

Friction & bottlenecks

The archive outage prevents cold builds; local proof admission is queued behind shared build capacity.

Follow-ups

Consumer pin adoption after producer review and merge.

References

Content authority remains libghostty-vt-contract.json; archive metadata comes from the exact Ghostty revision it pins.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fractal-product-lead
session 01a1b525
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model openai-codex/gpt-6.1-sol
worktree zig-archive-fallback/2026-11-08-zig-archive-fallback

agent-identity: agent/dotfiles/fractal-product-lead
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: openai-codex/gpt-6.1-sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant