Skip to content

Commit e25d52f

Browse files
committed
fix(artifact_pin): point at the canonical published HF dataset
The committed `priv/sakana_trinity/artifact_pin.json` shipped with `repo_id: "your-org/trinity-coordinator-adapted-qwen3-0.6b"` as a placeholder. That repo does not exist on the Hub, so every fresh-clone invocation of `mix trinity.artifact.fetch` failed with `:unauthorized` (the Hub returns 401 for unknown repos rather than 404). Surfaced by the clean-room test on 2026-05-21: cd /tmp && git clone https://github.com/nshkrdotcom/trinity_coordinator cd trinity_coordinator XLA_TARGET=cuda12 mix deps.get && XLA_TARGET=cuda12 mix compile XLA_TARGET=cuda12 mix trinity.artifact.fetch → RuntimeError: trinity.artifact.fetch failed for manifest.json: :unauthorized Repoint the pin at the canonical published dataset `nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b` (published v1.0.0 on 2026-05-21). Sweep `guides/artifact_distribution.md` for the same placeholder. Add a regression test that pins the committed artifact_pin.json's `repo_id`, `revision`, and file count so a future fork-and-republish cycle cannot reintroduce `your-org/`. Gates: format / compile / test (297 / 0, 24 excluded) — all green.
1 parent 8852bd7 commit e25d52f

3 files changed

Lines changed: 54 additions & 5 deletions

File tree

guides/artifact_distribution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ against silent regressions in the commit payload format.
118118

119119
```elixir
120120
artifact_dir = "priv/sakana_trinity/adapted_qwen3_0_6b_layer26"
121-
repo_id = "your-org/trinity-coordinator-adapted-qwen3-0.6b"
121+
repo_id = "nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b"
122122
token = System.fetch_env!("HF_TOKEN")
123123

124124
# 1. Create the dataset repo (idempotent with `exist_ok: true`).
@@ -195,7 +195,7 @@ points at the new revision:
195195
XLA_TARGET=cuda12 mix run build_support/build_artifact_pin.exs \
196196
--manifest priv/sakana_trinity/adapted_qwen3_0_6b_layer26/manifest.json \
197197
--bundle-dir priv/sakana_trinity/adapted_qwen3_0_6b_layer26 \
198-
--repo-id your-org/trinity-coordinator-adapted-qwen3-0.6b \
198+
--repo-id nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b \
199199
--revision v1.0.0 \
200200
--out priv/sakana_trinity/artifact_pin.json
201201
```
@@ -210,7 +210,7 @@ has `:hf_hub` and `:jason` as dependencies, verify the public tag can
210210
resolve `manifest.json`:
211211

212212
```elixir
213-
repo_id = "your-org/trinity-coordinator-adapted-qwen3-0.6b"
213+
repo_id = "nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b"
214214

215215
{:ok, path} =
216216
HfHub.Download.hf_hub_download(
@@ -256,7 +256,7 @@ under that.
256256
```bash
257257
TARBALL=adapted_qwen3_0_6b_layer26-v1.0.0.tar.gz
258258
curl -L -o /tmp/$TARBALL \
259-
https://github.com/your-org/trinity_coordinator/releases/download/v1.0.0-artifact-only/$TARBALL
259+
https://github.com/nshkrdotcom/trinity_coordinator/releases/download/v1.0.0-artifact-only/$TARBALL
260260

261261
echo "<expected-sha256> /tmp/$TARBALL" | sha256sum -c -
262262
tar xzf /tmp/$TARBALL -C priv/sakana_trinity/

priv/sakana_trinity/artifact_pin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"sha256": "6608a2669a921201c5fe81b2ddb938764663d63f5ec612a855ab7d5f6dc6966c"
4848
}
4949
],
50-
"repo_id": "your-org/trinity-coordinator-adapted-qwen3-0.6b",
50+
"repo_id": "nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b",
5151
"manifest_sha256": "2a1476a4d2c7b66633232a564114dfb7ebe46f6bea624fc9ae9123678cafcbb9"
5252
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
defmodule TrinityCoordinator.ArtifactPinTest do
2+
@moduledoc """
3+
Pins the committed `priv/sakana_trinity/artifact_pin.json` against the
4+
canonical published HF dataset so that `mix trinity.artifact.fetch`
5+
works on a fresh clone without operator edits.
6+
7+
History: the pin file shipped with `repo_id: "your-org/..."` as a
8+
placeholder; that crashed every fresh-clone onboarding flow with
9+
`:unauthorized` because the `your-org/...` repo does not exist on
10+
the Hub. The clean-room test on 2026-05-21 surfaced this.
11+
"""
12+
13+
use ExUnit.Case, async: true
14+
15+
alias TrinityCoordinator.ArtifactFetch
16+
17+
@committed_pin_path "priv/sakana_trinity/artifact_pin.json"
18+
19+
test "committed artifact_pin.json points at the canonical nshkrdotcom dataset" do
20+
pin = ArtifactFetch.load_pin!(@committed_pin_path)
21+
22+
assert pin.repo_id == "nshkrdotcom/trinity-coordinator-adapted-qwen3-0.6b",
23+
"""
24+
The committed artifact_pin.json must point at the published HF
25+
dataset, not a placeholder. If you are forking the project, fork
26+
the dataset too and update both pin.repo_id and the corresponding
27+
SHA-256 values. Do NOT commit `your-org/` placeholders.
28+
"""
29+
end
30+
31+
test "committed artifact_pin.json revision is a published tag" do
32+
pin = ArtifactFetch.load_pin!(@committed_pin_path)
33+
34+
assert pin.revision == "v1.0.0",
35+
"pin revision must match a tag published on the HF dataset"
36+
end
37+
38+
test "committed artifact_pin.json lists exactly 11 files (manifest + router_head + 9 checkpoints)" do
39+
pin = ArtifactFetch.load_pin!(@committed_pin_path)
40+
41+
assert length(pin.files) == 11,
42+
"pin must enumerate every file in the artifact bundle (manifest.json, router_head.safetensors, 9 checkpoint safetensors)"
43+
44+
paths = Enum.map(pin.files, & &1.path)
45+
assert "manifest.json" in paths
46+
assert "router_head.safetensors" in paths
47+
assert Enum.any?(paths, &String.starts_with?(&1, "checkpoints/"))
48+
end
49+
end

0 commit comments

Comments
 (0)