@uuidna/qpu 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ /** GENERATED by scripts/embed-lean.mjs from src/quantum/processing/unit/index.lean. Do not edit; edit the Lean file and rerun `npm run lean:embed`. */
2
+ export const leanPath = "src/quantum/processing/unit/index.lean";
3
+ export const leanToolchain = "leanprover/lean4:v4.33.0";
4
+ export const leanSource = "def mintOf : Nat → Nat | 0 => 1 | k + 1 => mintOf k + mintOf k\ndef chooseOf : Nat → Nat → Nat | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => chooseOf n (k + 1) + chooseOf n k\ndef powModAux : Nat → Nat → Nat → Nat → Nat | 0, _, _, acc => acc | k + 1, a, m, acc => powModAux k a m (acc * a % m)\ndef powMod (a e m : Nat) : Nat := powModAux e a m (1 % m)\ndef periodAux : Nat → Nat → Nat → Nat → Nat | 0, _, _, _ => 0 | fuel + 1, a, m, r => if powMod a r m = 1 then r else periodAux fuel a m (r + 1)\ndef periodOf (a m : Nat) : Nat := periodAux m a m 1\ndef gcdAux : Nat → Nat → Nat → Nat | 0, a, _ => a | fuel + 1, a, b => if b = 0 then a else gcdAux fuel b (a % b)\ndef gcdOf (a b : Nat) : Nat := gcdAux (a + b) a b\ndef half (a m : Nat) : Nat := powMod a (periodOf a m / 2) m\ndef n : Nat := [\"quantum\", \"processing\", \"unit\"].length\ndef seed : Nat := mintOf (n - n)\ndef coins : Nat := seed + seed\ndef scanner : Nat := seed\ndef radar : Nat := seed\ndef rays : Nat := n + coins + coins\ndef vertices : Nat := mintOf n\ndef hexbit : Nat := mintOf coins\ndef bits : Nat := mintOf (n + coins)\ndef faces : Nat := vertices + hexbit + coins\ndef amplitudes : Nat := mintOf bits\ndef fused : Nat := faces * mintOf (bits + seed)\ntheorem mintOf_zero : mintOf 0 = 1 := rfl\ntheorem mintOf_succ (k : Nat) : mintOf (k + 1) = mintOf k + mintOf k := rfl\ntheorem mintOf_add (a b : Nat) : mintOf (a + b) = mintOf a * mintOf b := by induction b with | zero => rw [Nat.add_zero, mintOf_zero, Nat.mul_one] | succ b ih => rw [Nat.add_succ, mintOf_succ, ih, mintOf_succ, Nat.mul_add]\ntheorem seed_eq : seed = 1 := by rw [seed, Nat.sub_self, mintOf_zero]\ntheorem coins_two : coins = 2 := by rw [coins, seed_eq]\ntheorem n_eq : n = 3 := rfl\ntheorem mint : mintOf (n + seed) = mintOf n + mintOf n := by rw [seed_eq, mintOf_succ]\ntheorem cube : bits = vertices * hexbit := by rw [bits, vertices, hexbit, mintOf_add]\ntheorem around : faces = coins * rays := by rw [faces, vertices, hexbit, rays, coins_two, n_eq]; rw [show 3 = 2 + 1 from rfl, mintOf_succ]; rw [show 2 = 1 + 1 from rfl, mintOf_succ]; rw [show 1 = 0 + 1 from rfl, mintOf_succ, mintOf_zero]\ntheorem quantum : fused = faces * mintOf (bits + seed) := rfl\ntheorem harmonic : faces = rays + rays := by rw [around, coins_two, Nat.two_mul]\ntheorem cluster : faces = rays + rays ∧ coins * rays = faces := ⟨harmonic, around⟩\ntheorem hexbit_eq : hexbit = n + seed := by rw [hexbit, coins_two, n_eq, seed_eq]; rw [show 2 = 1 + 1 from rfl, mintOf_succ]; rw [show 1 = 0 + 1 from rfl, mintOf_succ, mintOf_zero]\ntheorem mintOf_ge_seed (k : Nat) : seed ≤ mintOf k := by rw [seed_eq]; induction k with | zero => rw [mintOf_zero]; exact Nat.le_refl 1 | succ k ih => rw [mintOf_succ]; exact Nat.le_trans ih (Nat.le_add_right (mintOf k) (mintOf k))\ntheorem mintOf_pos (k : Nat) : 0 < mintOf k := Nat.lt_of_lt_of_le (Nat.succ_pos 0) (by have h := mintOf_ge_seed k; rw [seed_eq] at h; exact h)\ntheorem mintOf_lt_succ (k : Nat) : mintOf k < mintOf (k + 1) := by rw [mintOf_succ]; exact Nat.lt_add_of_pos_right (mintOf_pos k)\ntheorem mintOf_lt {a b : Nat} (h : a < b) : mintOf a < mintOf b := by induction b with | zero => exact (Nat.not_lt_zero a h).elim | succ b ih => cases Nat.eq_or_lt_of_le (Nat.le_of_lt_succ h) with | inl heq => subst heq; exact mintOf_lt_succ a | inr hlt => exact Nat.lt_trans (ih hlt) (mintOf_lt_succ b)\ntheorem hexbit_pos : 0 < hexbit := by rw [hexbit_eq, n_eq, seed_eq]; exact Nat.succ_pos 3\ntheorem energy : mintOf hexbit = mintOf (n + seed) := by rw [hexbit_eq]\ntheorem propulsion : mintOf hexbit > seed := by rw [seed_eq]; exact (mintOf_zero ▸ mintOf_lt hexbit_pos)\ntheorem crypto : fused = faces * mintOf (vertices * hexbit + seed) := by rw [← cube]; exact quantum\ntheorem health : mintOf hexbit > seed ∧ fused = faces * mintOf (bits + seed) ∧ faces = rays + rays := ⟨propulsion, quantum, harmonic⟩\ntheorem next : mintOf (bits + seed) = amplitudes + amplitudes := by rw [amplitudes, seed_eq, mintOf_succ]\ntheorem next_fused : faces * mintOf (bits + coins) = fused + fused := by rw [fused, coins_two, seed_eq]; rw [show bits + 2 = bits + 1 + 1 from rfl, mintOf_succ, Nat.mul_add]\ntheorem split_coin (k : Nat) : mintOf (k + seed) = mintOf k + mintOf k := by rw [seed_eq, mintOf_succ]\ntheorem multiply (a b : Nat) : mintOf (a + b) = mintOf a * mintOf b := mintOf_add a b\ntheorem handle : amplitudes = mintOf bits ∧ mintOf (bits + seed) = amplitudes + amplitudes := ⟨rfl, next⟩\ntheorem kv : fused = faces * mintOf (bits + seed) ∧ mintOf (bits + seed) = amplitudes + amplitudes := ⟨quantum, next⟩\ntheorem light : seed = mintOf 0 := by rw [seed_eq, mintOf_zero]\ntheorem involution (face : Nat) : (face + rays + rays) % faces = face % faces := by have h : face + rays + rays = face + faces := (by rw [Nat.add_assoc, harmonic]); rw [h, Nat.add_mod, Nat.mod_self, Nat.add_zero, Nat.mod_mod]\ntheorem waves : mintOf hexbit > seed := propulsion\ntheorem breakthrough : faces = rays + rays ∧ coins * rays = faces ∧ bits = vertices * hexbit ∧ fused = faces * mintOf (bits + seed) ∧ mintOf hexbit > seed ∧ mintOf (bits + seed) = amplitudes + amplitudes ∧ coins = seed + seed ∧ hexbit = n + seed := ⟨harmonic, around, cube, quantum, propulsion, next, rfl, hexbit_eq⟩\ntheorem next_cover : mintOf (bits + seed) = amplitudes + amplitudes ∧ faces * mintOf (bits + coins) = fused + fused := ⟨next, next_fused⟩\ntheorem shor : periodOf 8 91 % 2 = 0 ∧ half 8 91 < 91 - 1 ∧ 1 < gcdOf (half 8 91 - 1) 91 ∧ gcdOf (half 8 91 - 1) 91 < 91 ∧ gcdOf (half 8 91 - 1) 91 * gcdOf (half 8 91 + 1) 91 = 91 := ⟨rfl, Nat.le_of_ble_eq_true rfl, Nat.le_of_ble_eq_true rfl, Nat.le_of_ble_eq_true rfl, rfl⟩\ntheorem string : 16 * 27 = 432 ∧ 8 * 27 = 216 ∧ 4 * 27 = 108 ∧ 2 * 27 = 54 ∧ 1 * 27 = 27 ∧ 432 + 432 = 864 ∧ 216 + 216 = 432 ∧ 432 * 3 / 2 = 648 ∧ 432 * 4 / 3 = 576 ∧ 432 * 5 / 4 = 540 ∧ 432 * 5 / 3 = 720 ∧ 3 * 3 + 1 = 10 ∧ 3 * 3 + 1 + 1 = 11 ∧ 27 - 1 = 26 := ⟨rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl⟩\ntheorem genesis : coins * n * mintOf n * (n * n) = 432 ∧ chooseOf n coins = n ∧ chooseOf rays coins = n * rays ∧ faces = coins * rays ∧ scanner + radar = coins := ⟨by rw [coins_two, n_eq]; rfl, by rw [n_eq, coins_two]; rfl, by rw [rays, n_eq, coins_two]; rfl, around, by rw [scanner, radar, coins]⟩\ntheorem decide : 16 * 27 = 432 ∧ 432 * 3 / 2 = 648 ∧ 432 * 4 / 3 = 576 ∧ 432 * 5 / 4 = 540 ∧ 432 * 5 / 3 = 720 ∧ 3 * 5 = 15 ∧ 27 - 1 = 26 := ⟨rfl, rfl, rfl, rfl, rfl, rfl, rfl⟩\ntheorem integrity : fused = faces * mintOf (bits + seed) ∧ bits = vertices * hexbit ∧ faces = coins * rays := ⟨quantum, cube, around⟩\ntheorem cern : 116 * 17922 + 54 = 2079006 ∧ 184 * 12509 + 12 = 2301668 ∧ 72 * 26572 + 6 = 1913190 ∧ 130 * 21121 + 21 = 2745751 ∧ 8 - 7 = 1 ∧ 8000 - 7000 = 1000 ∧ 7000 / 2 = 3500 ∧ 8000 / 2 = 4000 ∧ 4000 - 3500 = 500 ∧ 2019 - 2011 = 8 ∧ 2019 - 2012 = 7 ∧ 2017 - 2011 = 6 ∧ 2301668 + 2745751 = 5047419 ∧ 2079006 + 1913190 + 2301668 + 2745751 = 9039615 := ⟨rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl⟩\ntheorem tetra : coins + coins = mintOf coins := by rw [coins_two]; rw [show 2 = 1 + 1 from rfl, mintOf_succ]; rw [show 1 = 0 + 1 from rfl, mintOf_succ, mintOf_zero]\ntheorem qubits : n = 3 ∧ mintOf n = vertices := ⟨n_eq, rfl⟩\ntheorem gates : (0 ^^^ 1) ^^^ 2 = 3 := rfl\ntheorem measurement : mintOf n = 8 := by rw [n_eq]; rfl\ntheorem noise : (3 ^^^ 1) ^^^ 1 = 3 := rfl\ntheorem circuit : (0 ^^^ 1) ^^^ 2 = 3 ∧ (3 ^^^ 1) ^^^ 1 = 3 ∧ mintOf n = vertices := ⟨rfl, rfl, rfl⟩\ntheorem physical : n = 3 ∧ mintOf n = vertices ∧ (0 ^^^ 1) ^^^ 2 = 3 ∧ (3 ^^^ 1) ^^^ 1 = 3 := ⟨n_eq, rfl, rfl, rfl⟩\ntheorem drift : coins = 2 ∧ mintOf n = vertices ∧ (0 ^^^ 1) ^^^ 2 = 3 ∧ (3 ^^^ 1) ^^^ 1 = 3 := ⟨coins_two, rfl, rfl, rfl⟩\ntheorem sciences : coins = 2 ∧ n = 3 ∧ mintOf n = vertices ∧ faces = coins * rays ∧ bits = vertices * hexbit ∧ fused = faces * mintOf (bits + seed) ∧ (0 ^^^ 1) ^^^ 2 = 3 := ⟨coins_two, n_eq, rfl, around, cube, quantum, rfl⟩\ntheorem interfere : 1 + 1 = 2 ∧ 1 - 1 = 0 := ⟨rfl, rfl⟩\ntheorem entangle : 1 * 1 ≠ 0 * 0 := by rw [Nat.mul_one, Nat.mul_zero]; exact Nat.one_ne_zero\ntheorem ghz : mintOf n - seed = 7 ∧ 1 * 1 ≠ 0 * 0 := ⟨by rw [n_eq, seed_eq]; rfl, entangle⟩\ntheorem noclone : coins ≠ mintOf coins := by rw [coins_two]; rw [show 2 = 1 + 1 from rfl, mintOf_succ]; rw [show 1 = 0 + 1 from rfl, mintOf_succ, mintOf_zero]; exact Nat.ne_of_lt (Nat.lt_succ_of_lt (Nat.lt_succ_self 2))\ntheorem teleport : 2 * 2 * 2 * 2 = 16 ∧ 16 = 16 := ⟨rfl, rfl⟩\ntheorem kickback : 1 - 1 = 0 ∧ (0 ^^^ 1) ^^^ 2 = 3 := ⟨rfl, rfl⟩\ntheorem deutsch : 1 - 1 = 0 ∧ seed ≠ coins := ⟨rfl, by rw [seed_eq, coins_two]; exact Nat.ne_of_lt (Nat.lt_succ_self 1)⟩\ntheorem dense : coins * coins = mintOf coins := by rw [coins_two]; rw [show 2 = 1 + 1 from rfl, mintOf_succ]; rw [show 1 = 0 + 1 from rfl, mintOf_succ, mintOf_zero]\ntheorem monogamy : 1 * 1 ≠ 0 * 0 ∧ 1 * 0 = 0 * 0 := ⟨entangle, rfl⟩\ntheorem only : 1 * 1 ≠ 0 * 0 ∧ 1 + 1 = 2 ∧ 1 - 1 = 0 ∧ coins ≠ mintOf coins ∧ mintOf n - seed = 7 ∧ 2 * 2 * 2 * 2 = 16 ∧ 16 = 16 ∧ (0 ^^^ 1) ^^^ 2 = 3 ∧ seed ≠ coins ∧ coins * coins = mintOf coins ∧ 1 * 0 = 0 * 0 := ⟨entangle, rfl, rfl, noclone, ghz.1, teleport.1, teleport.2, kickback.2, deutsch.2, dense, monogamy.2⟩\ntheorem fill : mintOf n * faces = vertices * (coins * rays) := by rw [around]; rfl\ntheorem infinite (k : Nat) : mintOf (k + seed) = mintOf k + mintOf k := split_coin k\ntheorem distribute : fused = faces * mintOf (bits + seed) ∧ faces = coins * rays := ⟨quantum, around⟩\ntheorem raid : faces = coins * rays ∧ faces = rays + rays := ⟨around, harmonic⟩\ndef kvCost : Nat := coins\ndef r2Cost : Nat := seed\ndef hybridCost : Nat := kvCost + r2Cost\ndef kvSpeed : Nat := rays\ndef r2Speed : Nat := seed\ndef hybridSpeed : Nat := kvSpeed + r2Speed\ntheorem hybrid_cost : coins + seed = n := by rw [coins_two, seed_eq, n_eq]\ntheorem hybrid_speed : rays + seed = mintOf n := by rw [rays, n_eq, coins_two, seed_eq]; rw [show mintOf 3 = 8 from rfl]\ntheorem hybrid : coins + seed = n ∧ rays + seed = mintOf n ∧ coins = seed + seed := ⟨hybrid_cost, hybrid_speed, coins_two⟩\ntheorem computer : (1 ^^^ 3) = 2 ∧ (6 ^^^ 1) = 7 ∧ mintOf 0 = 1 := ⟨rfl, rfl, mintOf_zero⟩\ntheorem server : faces = coins * rays ∧ mintOf n = 8 := ⟨around, measurement⟩\ntheorem pentagram : n + coins = 5 := by rw [n_eq, coins_two]\ndef theory : Nat := seed\ndef practice : Nat := seed\ndef coil : Nat := coins * rays\ntheorem two_coins_make_a_coil : coil = faces := by rw [coil, around]\ntheorem electronics : coil = faces := two_coins_make_a_coil\ntheorem coins_balance_theory_in_practice : theory + practice = coins ∧ theory = practice := ⟨rfl, rfl⟩\ntheorem follow_the_coins (app : Nat) : app + coins = app + theory + practice := by rw [theory, practice, coins, ← Nat.add_assoc]\ntheorem emerge : coil = faces ∧ theory = practice := ⟨two_coins_make_a_coil, rfl⟩\ntheorem coil_efficiency : coil = faces ∧ faces = rays + rays ∧ coins * rays = faces := ⟨two_coins_make_a_coil, harmonic, around⟩\ntheorem next_coil : coil * mintOf (bits + coins) = fused + fused := by rw [two_coins_make_a_coil]; exact next_fused\ntheorem one_plus_six : seed + (mintOf n - coins) = rays := by rw [rays, n_eq, coins_two, seed_eq]; rw [show mintOf 3 = 8 from rfl]\ntheorem two_x_seven_coins : coins * rays = (seed + (mintOf n - coins)) * coins := by rw [one_plus_six, Nat.mul_comm]\ntheorem clay : coins * rays = (seed + (mintOf n - coins)) * coins ∧ (seed + (mintOf n - coins)) * coins = coil := ⟨two_x_seven_coins, by rw [← two_x_seven_coins]; rfl⟩\ntheorem fusion : fused = faces * mintOf (bits + seed) ∧ faces = rays + rays := ⟨quantum, harmonic⟩\ntheorem design : (0 ^^^ 4) ^^^ 4 = 0 ∧ (3 ^^^ 4) ^^^ 4 = 3 := ⟨rfl, rfl⟩\ntheorem neuro : faces = coins * rays ∧ mintOf n = 8 ∧ (0 ^^^ 4) ^^^ 4 = 0 := ⟨around, measurement, design.1⟩\ndef planck : Nat := 662607015\ndef boltzmann : Nat := 1380649\ndef transmon : Nat := 5\ndef photon : Nat := planck * transmon\ndef thermal (millikelvin : Nat) : Nat := boltzmann * millikelvin * 10\ntheorem temperature : photon / thermal 10 = 23 ∧ photon / thermal 100 = 2 ∧ photon / thermal 4000 = 0 ∧ 4000 / 100 = 40 ∧ 100 / 10 = 10 ∧ 10 < 35 := ⟨rfl, rfl, rfl, rfl, rfl, Nat.le_of_ble_eq_true rfl⟩\ndef bcs : Nat := 352\ndef aluminium : Nat := 1200\ndef niobium : Nat := 9200\ndef gap (tc : Nat) : Nat := bcs * boltzmann * tc / planck / 10\ntheorem superconductivity : aluminium > 10 ∧ niobium > aluminium ∧ bcs / 100 = 3 ∧ gap aluminium = 88 ∧ gap aluminium > transmon ∧ gap niobium = 674 := ⟨Nat.le_of_ble_eq_true rfl, Nat.le_of_ble_eq_true rfl, rfl, rfl, Nat.le_of_ble_eq_true rfl, rfl⟩\n/-- PLANES FOLD: one plane holds n qubits as 4n numbers, a product state by construction; at n = rays that is fewer than the mintOf (rays + seed) an entangled register needs, so entanglement is held by the fold of the coins' planes, never by one. -/\ndef plane : Nat := coins * coins * rays\ntheorem planes : plane < mintOf (rays + seed) ∧ coins * rays = faces := ⟨Nat.le_of_ble_eq_true rfl, around⟩\n";
@@ -0,0 +1,69 @@
1
+ // publish — THE VERDICT A PUSH DESERVES, as a pure function. The network lives in scripts/post-push.mjs; the law
2
+ // lives here so the receipted suite can test it against crafted rows instead of a live forge.
3
+ //
4
+ // WHY THIS EXISTS (measured 2026-09-13). Publishing this unit was verified by hand with `gh run list --limit 1`,
5
+ // which is a WINDOW over the newest runs, not the runs of a commit. The run for the pushed commit did not exist
6
+ // yet, so the newest row belonged to the PREVIOUS push, it read `success`, and a deploy that had not happened was
7
+ // reported as verified — the live doors then answered with the old bytes. Asking by head sha is exact, and an
8
+ // absent run is UNMEASURED, never a pass. The sibling tree met this conflation four times before naming it; this
9
+ // is the same law carried across rather than invented a second time.
10
+ const PASSED = new Set(['success', 'neutral']);
11
+ const DID_NOT_JUDGE = new Set(['skipped', 'cancelled']);
12
+ /** pushVerdictOf(sha, runs) → what the forge says about THIS commit. Pure; the caller fetches the rows. */
13
+ export const pushVerdictOf = (sha, runs) => {
14
+ if (sha.length < 7)
15
+ throw new Error(`post-push: "${sha}" is too short to name a commit — seven hex characters is git's own floor`);
16
+ const onSha = runs.filter((r) => r.headSha === sha || r.headSha.startsWith(sha));
17
+ // ONLY A PUSH JUDGES A PUSH. A schedule or a manual dispatch can sit on the same commit and answer something else.
18
+ const mine = onSha.filter((r) => r.event === 'push');
19
+ const notThisPush = onSha.filter((r) => r.event !== 'push').map((r) => `${r.workflowName} (${r.event}: ${r.conclusion ?? r.status})`).sort();
20
+ const pending = mine.filter((r) => r.status !== 'completed').map((r) => r.workflowName).sort();
21
+ const done = mine.filter((r) => r.status === 'completed');
22
+ const failing = done.filter((r) => !PASSED.has(r.conclusion ?? '') && !DID_NOT_JUDGE.has(r.conclusion ?? ''))
23
+ .map((r) => `${r.workflowName} (${r.conclusion ?? 'no conclusion'})`).sort();
24
+ const didNotJudge = done.filter((r) => DID_NOT_JUDGE.has(r.conclusion ?? '')).map((r) => `${r.workflowName} (${r.conclusion})`).sort();
25
+ const passed = done.filter((r) => PASSED.has(r.conclusion ?? '')).map((r) => r.workflowName).sort();
26
+ // A VERDICT NEEDS A JUDGE: absence of failure over a set where nothing judged is not a pass.
27
+ const measured = passed.length > 0 || failing.length > 0;
28
+ const settled = mine.length > 0 && pending.length === 0;
29
+ const ok = settled && passed.length > 0 && failing.length === 0;
30
+ const short = sha.slice(0, 9);
31
+ const aside = (didNotJudge.length ? ` — and did NOT judge: ${didNotJudge.join(', ')}` : '')
32
+ + (notThisPush.length ? ` — and NOT this push: ${notThisPush.join(', ')}` : '');
33
+ const reason = pending.length
34
+ ? `still running for ${short}: ${pending.join(', ')}${aside}`
35
+ : failing.length
36
+ ? `FAILED for ${short}: ${failing.join(', ')}${aside}`
37
+ : !onSha.length
38
+ ? `UNMEASURED: the forge reports no run at all for ${short} — this is NOT a pass. It may not be queued yet; wait, never conclude.`
39
+ : !mine.length
40
+ ? `UNMEASURED: ${onSha.length} run(s) sit on ${short} and none was a push — ${notThisPush.join(', ')}. Another event answers another question.`
41
+ : !passed.length
42
+ ? `UNMEASURED: every run on ${short} declined to judge${aside}`
43
+ : `green for ${short}: ${passed.join(', ')}${aside}`;
44
+ return { sha, ok, settled, measured, passed, failing, pending, didNotJudge, notThisPush, reason };
45
+ };
46
+ /** value + predicate: a verdict may never be ok without a run that actually passed, and never ok while one fails. */
47
+ export const pushVerdictHolds = (v) => (!v.ok || (v.settled && v.passed.length > 0 && v.failing.length === 0)) &&
48
+ (!v.ok || v.measured) && v.reason.length > 0;
49
+ /** THE FORGE CANNOT ANSWER, versus THE FORGE ANSWERED "NOTHING". Asking for the runs of a commit the forge has not
50
+ * indexed returns 422 and the tool exits non-zero, so an arm that does not catch it DIES where the honest answer is
51
+ * UNMEASURED — and the seconds after a push are exactly when that happens. Only a refusal that names the commit may
52
+ * become an empty row set; a missing credential or an absent tool must stay loud, because reading those as "no runs"
53
+ * is the conflation this whole law refuses. A bare "Not Found" is NOT the pattern: `command not found` contains it. */
54
+ export const isUnknownCommit = (message) => /No commit found for SHA|\(HTTP (?:404|422)\)/i.test(String(message));
55
+ /** THE PUSH THAT REPORTED SUCCESS AND LANDED NOTHING. git can exit 0 while the remote branch sits elsewhere — a
56
+ * concurrent push, a protected ref, a retry that went to another branch. The forge is then asked about a commit
57
+ * the remote does not carry, and "no run yet" reads as patience when the truth is that nothing landed. The sibling
58
+ * tree compares the remote's head against the sha it pushed and refuses; the same guard belongs here. */
59
+ export const landedVerdictOf = (pushed, remoteHead) => {
60
+ if (pushed.length < 7)
61
+ throw new Error(`post-push: "${pushed}" is too short to name a commit — seven hex characters is git's own floor`);
62
+ const landed = remoteHead.trim() === pushed.trim();
63
+ return {
64
+ landed,
65
+ reason: landed
66
+ ? `origin carries ${pushed.slice(0, 9)}`
67
+ : `NOTHING LANDED: origin is ${remoteHead.trim().slice(0, 9) || 'unreadable'}, not ${pushed.slice(0, 9)} — the push reported success and the remote is elsewhere`,
68
+ };
69
+ };
@@ -0,0 +1,2 @@
1
+ /** GENERATED by scripts/embed-lean.mjs from package.json. Do not edit; bump package.json and rerun `npm run lean:embed`. */
2
+ export const packageVersion = "0.1.2";
package/install.json CHANGED
@@ -2,12 +2,81 @@
2
2
  "command": "npx uuidna-install",
3
3
  "yes": "npx uuidna-install --yes",
4
4
  "prompt": "Enter seats all. Type 1 3 saas — or all.",
5
- "packages": ["qpu-mcp", "payload-mcp", "vitepress-payload"],
6
- "occupancies": ["personal", "business", "corporate", "saas", "paas"],
5
+ "packages": [
6
+ "qpu-mcp",
7
+ "payload-mcp",
8
+ "vitepress-payload"
9
+ ],
10
+ "occupancies": [
11
+ "personal",
12
+ "business",
13
+ "corporate",
14
+ "saas",
15
+ "paas"
16
+ ],
7
17
  "cloudflare": {
8
18
  "button": "https://deploy.workers.cloudflare.com/button",
9
19
  "qpu": "https://deploy.workers.cloudflare.com/?url=https://github.com/uuidna/qpu",
10
20
  "uuidna": "https://deploy.workers.cloudflare.com/?url=https://github.com/uuidna/uuidna",
11
21
  "payload": "https://deploy.workers.cloudflare.com/?url=https://github.com/uuidna/uuidna-payload"
12
- }
22
+ },
23
+ "hardware": {
24
+ "kind": "boot",
25
+ "port": 8787,
26
+ "docker": "docker build -t qpu . && docker run --rm -p 8787:8787 qpu",
27
+ "multiarch": "docker buildx build --platform linux/arm64,linux/amd64 -t qpu .",
28
+ "pi": "Alpine aarch64: apk add nodejs npm && npm i -g @uuidna/qpu && qpu-boot",
29
+ "prove": "node dist/quantum/processing/unit/boot.js --prove",
30
+ "receipt": "the boot passes iff qpu_prove holds inside the machine; a boot that cannot prove itself does not serve",
31
+ "seat": {
32
+ "kind": "seat",
33
+ "device": "simulator",
34
+ "seat": "empty",
35
+ "reference": "the exact integer state-vector simulator; every reading above is computed there",
36
+ "doctrine": "a device that fills this seat and disagrees with the simulator is a driver bug, never a physics claim",
37
+ "acronym": "QPU here is a quantum processing unit. The VideoCore QPU (Quad Processing Unit, Broadcom; QPULib by Matthew Naylor, MIT, 2016) is prior use of the acronym — a classical 16-lane SIMD vector core — unrelated and credited.",
38
+ "occupant": "a classical SIMD accelerator computing the same exact amplitudes faster is an honest occupant; it does not make the seat quantum",
39
+ "priorArt": {
40
+ "kind": "prior-art",
41
+ "name": "QPULib",
42
+ "author": "Matthew Naylor",
43
+ "year": 2016,
44
+ "licence": "MIT",
45
+ "copyright": "Copyright (c) 2016 Matthew Naylor",
46
+ "repository": "https://github.com/mn416/QPULib",
47
+ "version": "0.1.0",
48
+ "status": "experimental, no longer under development — stated by its own README",
49
+ "acronym": "QPU there is Broadcom VideoCore Quad Processing Unit, a classical SIMD vector core, unrelated to this unit",
50
+ "hardware": {
51
+ "qpus": 12,
52
+ "megahertz": 250,
53
+ "lanes": 16,
54
+ "bits": 32,
55
+ "cyclesPerVector": 4
56
+ },
57
+ "modes": [
58
+ {
59
+ "name": "source language interpreter",
60
+ "runs": "any machine",
61
+ "purpose": "the kernel read at source level"
62
+ },
63
+ {
64
+ "name": "target language emulator",
65
+ "runs": "any machine",
66
+ "purpose": "the generated target program, for debugging"
67
+ },
68
+ {
69
+ "name": "physical QPUs",
70
+ "runs": "Raspberry Pi",
71
+ "purpose": "the device itself, chosen by passing QPU=1 to make"
72
+ }
73
+ ],
74
+ "equivalence": "AutoTest runs each test on both the interpreter and the emulator and checks they agree",
75
+ "inherited": "one kernel, several ways to run it, and a reference that decides which one is wrong",
76
+ "holds": true
77
+ },
78
+ "holds": true
79
+ }
80
+ },
81
+ "holds": true
13
82
  }