@vela-science/canopus 0.6.5 → 0.8.0

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +67 -139
  3. package/SECURITY.md +3 -2
  4. package/capsules/erdos1056-k15/bin/linux-arm64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
  5. package/capsules/erdos1056-k15/bin/linux-x86_64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
  6. package/compatibility.json +25 -0
  7. package/dist/src/activity/events.d.ts +4 -1
  8. package/dist/src/activity/events.js +8 -2
  9. package/dist/src/activity/store.d.ts +2 -2
  10. package/dist/src/activity/store.js +4 -3
  11. package/dist/src/{receipt/map.d.ts → candidate/finalize.d.ts} +2 -9
  12. package/dist/src/candidate/finalize.js +71 -0
  13. package/dist/src/cli.js +88 -229
  14. package/dist/src/contracts/mission.d.ts +1 -13
  15. package/dist/src/contracts/mission.js +4 -42
  16. package/dist/src/contracts/validation.d.ts +1 -25
  17. package/dist/src/contracts/validation.js +1 -95
  18. package/dist/src/engines/codex-tools-native.js +2 -2
  19. package/dist/src/index.d.ts +5 -34
  20. package/dist/src/index.js +4 -34
  21. package/dist/src/mission/prepare.d.ts +10 -1
  22. package/dist/src/mission/prepare.js +29 -30
  23. package/dist/src/product/coverage.d.ts +17 -0
  24. package/dist/src/product/coverage.js +137 -0
  25. package/dist/src/product/doctor.d.ts +1 -2
  26. package/dist/src/product/doctor.js +29 -8
  27. package/dist/src/product/profile.js +8 -2
  28. package/dist/src/product/replay.js +11 -12
  29. package/dist/src/product/run.d.ts +5 -9
  30. package/dist/src/product/run.js +17 -88
  31. package/dist/src/product/submission.d.ts +40 -0
  32. package/dist/src/product/submission.js +217 -0
  33. package/dist/src/product/submit.d.ts +22 -0
  34. package/dist/src/product/submit.js +264 -0
  35. package/dist/src/product/version.d.ts +2 -2
  36. package/dist/src/product/version.js +27 -4
  37. package/dist/src/projection/current-run.d.ts +12 -0
  38. package/dist/src/projection/current-run.js +94 -0
  39. package/dist/src/projection/failure.d.ts +17 -7
  40. package/dist/src/projection/failure.js +43 -12
  41. package/dist/src/projection/retained-mission.d.ts +6 -0
  42. package/dist/src/projection/retained-mission.js +41 -0
  43. package/dist/src/projection/retained-run.d.ts +7 -0
  44. package/dist/src/projection/retained-run.js +50 -0
  45. package/dist/src/run.d.ts +43 -41
  46. package/dist/src/run.js +34 -412
  47. package/dist/src/util/canonical.d.ts +1 -5
  48. package/dist/src/util/canonical.js +1 -53
  49. package/dist/src/vela/cli.d.ts +7 -51
  50. package/dist/src/vela/cli.js +102 -523
  51. package/dist/src/vela/types.d.ts +3 -19
  52. package/dist/src/verifier/run.js +1 -1
  53. package/dist/src/workspace/prepare.d.ts +1 -1
  54. package/dist/src/workspace/prepare.js +15 -15
  55. package/docs/EVALUATION.md +142 -0
  56. package/docs/MISSIONS.md +42 -80
  57. package/docs/RUN_RECORD.md +77 -99
  58. package/docs/adr/0010-nonmutating-runs-and-explicit-submission.md +191 -0
  59. package/missions/erdos1056-k15-next/mission.draft.json +10 -8
  60. package/package.json +18 -22
  61. package/profiles/{erdos1056-k15-10428801-10429000.json → erdos1056-k15-10429201-10429400.json} +10 -10
  62. package/schemas/failure.v1.json +17 -0
  63. package/schemas/mission.v0.json +3 -4
  64. package/schemas/mission.v1.json +7 -28
  65. package/schemas/{run.v1.json → run.v2.json} +58 -116
  66. package/schemas/submission-bundle.v1.json +63 -0
  67. package/toolchain.lock.json +31 -0
  68. package/BUILD_WEEK.md +0 -198
  69. package/advisories/erdos1056-claim-fidelity/output.schema.json +0 -90
  70. package/advisories/erdos1056-claim-fidelity/registration.json +0 -42
  71. package/advisories/erdos1056-claim-fidelity/results/assessment.json +0 -1
  72. package/advisories/erdos1056-claim-fidelity/results/verification.json +0 -1
  73. package/capsules/formal-erdos-505-test-dim-one/verifier +0 -105
  74. package/capsules/quantum-10-1-4/verifier.py +0 -152
  75. package/capsules/sidon-a24/bin/linux-arm64/verifier +0 -0
  76. package/capsules/sidon-a24/bin/linux-x86_64/verifier +0 -0
  77. package/dist/src/capability/withdrawal.d.ts +0 -47
  78. package/dist/src/capability/withdrawal.js +0 -487
  79. package/dist/src/engines/codex-exec.d.ts +0 -17
  80. package/dist/src/engines/codex-exec.js +0 -136
  81. package/dist/src/engines/codex-tool-free.d.ts +0 -26
  82. package/dist/src/engines/codex-tool-free.js +0 -213
  83. package/dist/src/product/withdraw.d.ts +0 -8
  84. package/dist/src/product/withdraw.js +0 -255
  85. package/dist/src/projection/diagnostic.d.ts +0 -12
  86. package/dist/src/projection/diagnostic.js +0 -61
  87. package/dist/src/projection/public-run.d.ts +0 -59
  88. package/dist/src/projection/public-run.js +0 -106
  89. package/dist/src/projection/publication.d.ts +0 -36
  90. package/dist/src/projection/publication.js +0 -47
  91. package/dist/src/projection/run.d.ts +0 -95
  92. package/dist/src/projection/run.js +0 -173
  93. package/dist/src/receipt/map.js +0 -168
  94. package/dist/src/repair/plan.d.ts +0 -2
  95. package/dist/src/repair/plan.js +0 -22
  96. package/dist/src/roles.d.ts +0 -2
  97. package/dist/src/roles.js +0 -9
  98. package/docs/RELEASES.md +0 -1389
  99. package/evidence/build-week/run_eb6bcd46-cffd-4ae8-b630-2681bd84da71.public.json +0 -1
  100. package/evidence/build-week/run_f68e4cfc-e5c7-4c73-86cb-d79807c47ec4.public.json +0 -1
  101. package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/pending-commands.json +0 -1
  102. package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/public-run.json +0 -1
  103. package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/root-manifest.json +0 -1
  104. package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/web-import.json +0 -1
  105. package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/pending-commands.json +0 -1
  106. package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/public-run.json +0 -1
  107. package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/root-manifest.json +0 -1
  108. package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/web-import.json +0 -1
  109. package/missions/formal-erdos-505-test-dim-one-gpt56/mission.draft.json +0 -40
  110. package/missions/quantum-10-1-4-retry/mission.draft.json +0 -40
  111. package/missions/sidon-a24-at-least-7194-gpt56/mission.draft.json +0 -42
  112. package/missions/sidon-a24-at-least-7194-gpt56-v2/mission.draft.json +0 -42
  113. package/missions/sidon-a24-at-least-7194-gpt56-v3/mission.draft.json +0 -42
  114. package/profiles/formal-erdos-505-test-dim-one-gpt56.json +0 -35
  115. package/profiles/quantum-10-1-4-stabilizer-retry.json +0 -35
  116. package/profiles/sidon-a24-at-least-7194-gpt56-v2.json +0 -35
  117. package/profiles/sidon-a24-at-least-7194-gpt56-v3.json +0 -35
  118. package/profiles/sidon-a24-at-least-7194-gpt56.json +0 -35
  119. package/schemas/canopus.public-run.v1.json +0 -116
  120. package/scripts/run-claim-fidelity-advisory.mjs +0 -235
@@ -1,42 +0,0 @@
1
- {
2
- "schema": "canopus.claim-fidelity-registration.v1",
3
- "id": "erdos1056-run-eb6b-claim-fidelity-gpt56",
4
- "model": "gpt-5.6-sol",
5
- "reasoning_effort": "high",
6
- "external_gate_credit": false,
7
- "source": {
8
- "repository": "https://github.com/vela-science/erdos-frontier",
9
- "commit": "807f0a8f770cfed05ac0dff00b952dc41052a720",
10
- "run_id": "run_eb6bcd46-cffd-4ae8-b630-2681bd84da71",
11
- "artifact_path": "artifacts/erdos1056-k15-range-10428401-10428600.txt",
12
- "artifact_root": "sha256:79370d5243095f28e65c218f3d5dc4710802e4dbe462fcfff1a35a8697a6f225",
13
- "roots": {
14
- "actor_registry": "sha256:665f3e1c48f0a50fac949681c0af01bdd28de2991f2cdc5cc4cddbe69df6311b",
15
- "artifacts": "sha256:3d58619c5cfb7e28de2f344476e35c9f0b80709c996b2a1bfdb2e11496f7e1da",
16
- "event_log": "sha256:a06797bc0d1b0e3c88a2f97507fe0832661e3992d8df41187a0aa6d3ceee9bde",
17
- "proposals": "sha256:e69b38037814f2e8ca826942cfc50ab370993889be2913cac1c0b3e77711160f",
18
- "snapshot": "sha256:1faedc24f040a60a22177b456c74b969a61ce8836082297b1835797a57b4fa56"
19
- },
20
- "reported_claim": "Exhaustive registered search over primes in 10428401..10428600 completed with a bounded negative result; the maximum factorial-residue fiber multiplicity found was 12 at p=10428581, residue=5141590.",
21
- "reported_metrics": {
22
- "range_start": 10428401,
23
- "range_end": 10428600,
24
- "primes_tested": 15,
25
- "max_multiplicity": 12,
26
- "best_p": 10428581,
27
- "best_residue": 5141590
28
- },
29
- "verifier_status": "passed",
30
- "receipt_root": "sha256:263506aae0144fb2aa4784ff9c145c6c41886b2956191c6458214cedd0bfd4aa",
31
- "policy_route": "defer",
32
- "accepted_state_delta": 0
33
- },
34
- "output_schema": "advisories/erdos1056-claim-fidelity/output.schema.json",
35
- "output_schema_sha256": "sha256:874c61b6fbd44a2bcb68cde8b5a9a89b74f6d00f3d9a9723cb67c682bd64e045",
36
- "runner": {
37
- "codex_version": "codex-cli 0.144.6",
38
- "timeout_ms": 180000,
39
- "max_output_bytes": 1048576,
40
- "maximum_model_calls": 1
41
- }
42
- }
@@ -1 +0,0 @@
1
- {"language":{"classification":"model_assessment","flagged_phrases":[],"rationale":"The claim explicitly limits the exhaustive search and negative result to primes in the bounded range 10428401..10428600 and does not state or imply that the Erdős problem is solved.","solved_language_detected":false,"universal_claim_detected":false},"numeric_correspondence":{"best_p":{"artifact":10428581,"matches":true,"reported":10428581},"best_residue":{"artifact":5141590,"matches":true,"reported":5141590},"max_multiplicity":{"artifact":12,"matches":true,"reported":12},"primes_tested":{"artifact":15,"matches":true,"reported":15},"range_end":{"artifact":10428600,"matches":true,"reported":10428600},"range_start":{"artifact":10428401,"matches":true,"reported":10428401}},"recommendation":{"classification":"model_assessment","publishable_with_caveats":true,"revised_claim":"Exhaustive registered search over primes in 10428401..10428600 completed with a bounded negative result; the maximum factorial-residue fiber multiplicity found was 12 at p=10428581, residue=5141590. This bounded verifier-passed result does not solve the Erdős problem and has not been scientifically accepted."},"schema":"canopus.claim-fidelity-assessment.v1","source":{"artifact_root":"sha256:79370d5243095f28e65c218f3d5dc4710802e4dbe462fcfff1a35a8697a6f225","reported_claim":"Exhaustive registered search over primes in 10428401..10428600 completed with a bounded negative result; the maximum factorial-residue fiber multiplicity found was 12 at p=10428581, residue=5141590.","roots":{"actor_registry":"sha256:665f3e1c48f0a50fac949681c0af01bdd28de2991f2cdc5cc4cddbe69df6311b","artifacts":"sha256:3d58619c5cfb7e28de2f344476e35c9f0b80709c996b2a1bfdb2e11496f7e1da","event_log":"sha256:a06797bc0d1b0e3c88a2f97507fe0832661e3992d8df41187a0aa6d3ceee9bde","proposals":"sha256:e69b38037814f2e8ca826942cfc50ab370993889be2913cac1c0b3e77711160f","snapshot":"sha256:1faedc24f040a60a22177b456c74b969a61ce8836082297b1835797a57b4fa56"},"run_id":"run_eb6bcd46-cffd-4ae8-b630-2681bd84da71"},"standing":{"accepted_state_delta":0,"distinction":"The recorded verifier pass confirms verification of the registered bounded run; it does not constitute scientific acceptance, change accepted scientific state, or make this advisory itself scientific state.","policy_route":"defer","scientific_acceptance_reported":false,"verifier_success_reported":true}}
@@ -1 +0,0 @@
1
- {"assessment_root":"sha256:9205390df001a428b4b3e2fbb0a855e9f1061754b3f87771a85fc7328824ed1f","authority":"non_authoritative_advisory","checks":{"all_five_roots_bound":true,"artifact_root_matched":true,"numeric_correspondence_matched":true,"source_run_bound":true,"verifier_acceptance_distinction_preserved":true},"events_root":"sha256:e412c39b92fe210531e1fa7749fc036d780ee9016292bc5052e0e11a17b7c79e","model":"gpt-5.6-sol","output_schema_root":"sha256:874c61b6fbd44a2bcb68cde8b5a9a89b74f6d00f3d9a9723cb67c682bd64e045","registration_root":"sha256:371390871e1a371207e3de797e45989e84bbb766e07afdab5d47fdb3536f2c1b","schema":"canopus.claim-fidelity-verification.v1","scientific_state_landed":false,"semantic_fields":[{"classification":"model_assessment","path":"language"},{"classification":"model_assessment","path":"recommendation"}],"status":"pass","stderr_root":"sha256:98309d91d149b3bc4682df22c8c9a3d227c9c8506a89b90de32c3f55594e539e","usage":{"cached_input_tokens":0,"input_tokens":9309,"output_tokens":795,"reasoning_output_tokens":74}}
@@ -1,105 +0,0 @@
1
- #!/bin/sh
2
- set -eu
3
-
4
- if [ "$#" -ne 1 ]; then
5
- echo "usage: verifier <proof-term>" >&2
6
- exit 2
7
- fi
8
-
9
- proof=$1
10
- if [ ! -f "$proof" ] || [ -L "$proof" ]; then
11
- echo "proof artifact must be one regular file" >&2
12
- exit 2
13
- fi
14
-
15
- size=$(wc -c < "$proof" | tr -d ' ')
16
- if [ "$size" -eq 0 ] || [ "$size" -gt 131072 ]; then
17
- echo "proof artifact must contain 1..131072 bytes" >&2
18
- exit 2
19
- fi
20
-
21
- if [ "$(head -c 2 "$proof")" != "by" ]; then
22
- echo "proof artifact must begin with a Lean 'by' term" >&2
23
- exit 2
24
- fi
25
-
26
- if LC_ALL=C grep -Eq '(^|[^A-Za-z0-9_])(sorry|admit|axiom|unsafe)([^A-Za-z0-9_]|$)' "$proof"; then
27
- echo "proof artifact contains a forbidden trust-bypassing token" >&2
28
- exit 2
29
- fi
30
-
31
- toolchain=/home/lean/.elan/toolchains/leanprover--lean4---v4.27.0/bin
32
- project=/home/lean/mathlib
33
- if [ ! -x "$toolchain/lean" ]; then
34
- echo "frozen Lean 4.27.0 toolchain is unavailable" >&2
35
- exit 3
36
- fi
37
- if [ ! -f "$project/.lake/build/lib/lean/Mathlib/Analysis/InnerProductSpace/PiL2.olean" ] \
38
- || [ ! -f "$project/.lake/build/lib/lean/Mathlib/Topology/MetricSpace/Bounded.olean" ]; then
39
- echo "frozen minimal Mathlib modules are unavailable" >&2
40
- exit 3
41
- fi
42
-
43
- export PATH="$toolchain:/usr/local/bin:/usr/bin:/bin"
44
- export LC_ALL=C
45
- LEAN_PATH=$(
46
- find "$project" -type d -path '*/.lake/build/lib/lean' -print \
47
- | LC_ALL=C sort \
48
- | paste -sd ':' -
49
- )
50
- if [ -z "$LEAN_PATH" ]; then
51
- echo "frozen Mathlib module path is unavailable" >&2
52
- exit 3
53
- fi
54
- export LEAN_PATH
55
- cd "$project"
56
-
57
- set +e
58
- output=$(
59
- {
60
- printf '%s\n' \
61
- 'import Mathlib.Analysis.InnerProductSpace.PiL2' \
62
- 'import Mathlib.Topology.MetricSpace.Bounded' \
63
- '/-! # Frozen Canopus verification for Erdos 505, dimension one -/' \
64
- 'open Metric Set Classical' \
65
- 'namespace CanopusFormalErdos505' \
66
- 'theorem test_dim_one' \
67
- ' (S : Set (EuclideanSpace ℝ (Fin 1)))' \
68
- ' (hS : Bornology.IsBounded S) (hd : 0 < diam S) :' \
69
- ' ∃ (F : Fin 2 → Set (EuclideanSpace ℝ (Fin 1))),' \
70
- ' S ⊆ ⋃ i, F i ∧ ∀ i, diam (F i) < diam S :='
71
- cat "$proof"
72
- printf '%s\n' \
73
- '#print axioms CanopusFormalErdos505.test_dim_one' \
74
- 'end CanopusFormalErdos505'
75
- } | "$toolchain/lean" --stdin 2>&1
76
- )
77
- status=$?
78
- set -e
79
-
80
- printf '%s\n' "$output"
81
- if [ "$status" -ne 0 ]; then
82
- exit "$status"
83
- fi
84
- if printf '%s\n' "$output" | grep -Fq 'sorryAx'; then
85
- echo "kernel declaration depends on sorryAx" >&2
86
- exit 4
87
- fi
88
-
89
- axiom_line=$(printf '%s\n' "$output" | sed -n "s/^'CanopusFormalErdos505.test_dim_one' depends on axioms: \[\(.*\)\]$/\1/p")
90
- if [ -n "$axiom_line" ]; then
91
- for axiom in $(printf '%s' "$axiom_line" | tr ',' ' '); do
92
- case "$axiom" in
93
- propext|Classical.choice|Quot.sound) ;;
94
- *)
95
- echo "kernel declaration depends on forbidden axiom: $axiom" >&2
96
- exit 4
97
- ;;
98
- esac
99
- done
100
- elif ! printf '%s\n' "$output" | grep -Fq "'CanopusFormalErdos505.test_dim_one' does not depend on any axioms"; then
101
- echo "axiom audit output was missing or malformed" >&2
102
- exit 4
103
- fi
104
-
105
- echo "verified formal:erdos-505-test-dim-one with Lean 4.27.0"
@@ -1,152 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Verify one explicit [[10,1,d>=4]] stabilizer witness."""
3
-
4
- from __future__ import annotations
5
-
6
- import itertools
7
- import json
8
- import pathlib
9
- import sys
10
-
11
- SCHEMA = "canopus.quantum-stabilizer-witness.v1"
12
- TARGET = "quantum:[[10,1,4]]"
13
- N = 10
14
- K = 1
15
- EXPECTED_KEYS = {"schema", "target", "n", "k", "generators"}
16
-
17
-
18
- def fail(message: str) -> "NoReturn":
19
- print(f"quantum verifier: {message}", file=sys.stderr)
20
- raise SystemExit(1)
21
-
22
-
23
- def pauli_vector(pauli: str) -> int:
24
- if len(pauli) != N or any(symbol not in "IXYZ" for symbol in pauli):
25
- fail("each generator must be a length-10 string over I, X, Y, Z")
26
- vector = 0
27
- for qubit, symbol in enumerate(pauli):
28
- if symbol in "XY":
29
- vector |= 1 << qubit
30
- if symbol in "ZY":
31
- vector |= 1 << (N + qubit)
32
- return vector
33
-
34
-
35
- def symplectic(left: int, right: int) -> int:
36
- mask = (1 << N) - 1
37
- left_x, left_z = left & mask, left >> N
38
- right_x, right_z = right & mask, right >> N
39
- return ((left_x & right_z).bit_count() + (left_z & right_x).bit_count()) & 1
40
-
41
-
42
- def binary_rank(rows: list[int]) -> int:
43
- basis: dict[int, int] = {}
44
- for original in rows:
45
- row = original
46
- while row:
47
- pivot = row.bit_length() - 1
48
- if pivot in basis:
49
- row ^= basis[pivot]
50
- else:
51
- basis[pivot] = row
52
- break
53
- return len(basis)
54
-
55
-
56
- def stabilizer_span(generators: list[int]) -> set[int]:
57
- span = {0}
58
- for generator in generators:
59
- span.update(value ^ generator for value in tuple(span))
60
- return span
61
-
62
-
63
- def error_vector(positions: tuple[int, ...], symbols: tuple[str, ...]) -> int:
64
- vector = 0
65
- for qubit, symbol in zip(positions, symbols, strict=True):
66
- if symbol in "XY":
67
- vector |= 1 << qubit
68
- if symbol in "ZY":
69
- vector |= 1 << (N + qubit)
70
- return vector
71
-
72
-
73
- def main() -> None:
74
- if len(sys.argv) != 2:
75
- fail("usage: verifier.py WITNESS.json")
76
- witness_path = pathlib.Path(sys.argv[1])
77
- metadata = witness_path.lstat()
78
- if not witness_path.is_file() or witness_path.is_symlink() or metadata.st_size > 65_536:
79
- fail("witness must be one bounded regular file")
80
- with witness_path.open("rb") as source:
81
- raw = source.read(65_537)
82
- if len(raw) > 65_536:
83
- fail("witness exceeds 65536 bytes")
84
- try:
85
- witness = json.loads(raw)
86
- except (UnicodeDecodeError, json.JSONDecodeError) as error:
87
- fail(f"witness is not valid UTF-8 JSON: {error}")
88
- if not isinstance(witness, dict) or set(witness) != EXPECTED_KEYS:
89
- fail("witness fields must be exactly schema, target, n, k, generators")
90
- if witness["schema"] != SCHEMA or witness["target"] != TARGET:
91
- fail("witness schema or target is wrong")
92
- if type(witness["n"]) is not int or type(witness["k"]) is not int:
93
- fail("n and k must be integers")
94
- if witness["n"] != N or witness["k"] != K:
95
- fail("witness must declare n=10 and k=1")
96
- declared = witness["generators"]
97
- if not isinstance(declared, list) or len(declared) != N - K:
98
- fail("witness must contain exactly nine generators")
99
- if any(not isinstance(generator, str) for generator in declared):
100
- fail("every generator must be a string")
101
- if len(set(declared)) != len(declared):
102
- fail("generators must be distinct")
103
- generators = [pauli_vector(generator) for generator in declared]
104
- if any(generator == 0 for generator in generators):
105
- fail("identity is not a generator")
106
- for left, right in itertools.combinations(generators, 2):
107
- if symplectic(left, right) != 0:
108
- fail("generators do not commute")
109
- rank = binary_rank(generators)
110
- if rank != N - K:
111
- fail(f"generator rank is {rank}, expected nine")
112
- span = stabilizer_span(generators)
113
- if len(span) != 1 << (N - K):
114
- fail("stabilizer span has the wrong cardinality")
115
-
116
- tested = 0
117
- degenerate = 0
118
- for weight in range(1, 4):
119
- for positions in itertools.combinations(range(N), weight):
120
- for symbols in itertools.product("XYZ", repeat=weight):
121
- tested += 1
122
- error = error_vector(positions, symbols)
123
- if all(symplectic(error, generator) == 0 for generator in generators):
124
- if error not in span:
125
- fail(
126
- "found an undetectable non-stabilizer Pauli below weight four: "
127
- f"positions={positions}, symbols={''.join(symbols)}"
128
- )
129
- degenerate += 1
130
- if tested != 3_675:
131
- fail(f"internal enumeration count is {tested}, expected 3675")
132
- print(
133
- json.dumps(
134
- {
135
- "schema": "canopus.quantum-stabilizer-verification.v1",
136
- "target": TARGET,
137
- "n": N,
138
- "k": K,
139
- "rank": rank,
140
- "stabilizer_size": len(span),
141
- "errors_weight_1_to_3_tested": tested,
142
- "low_weight_stabilizers": degenerate,
143
- "distance_at_least": 4,
144
- },
145
- sort_keys=True,
146
- separators=(",", ":"),
147
- )
148
- )
149
-
150
-
151
- if __name__ == "__main__":
152
- main()
@@ -1,47 +0,0 @@
1
- import type { Mission, MissionRoots, StrictBaseline } from "../contracts/mission.js";
2
- import type { LandResult } from "../vela/types.js";
3
- export declare const WITHDRAWAL_CAPABILITY_SCHEMA: "canopus.withdrawal-capability.v1";
4
- export interface WithdrawalCapabilityManifest {
5
- schema: typeof WITHDRAWAL_CAPABILITY_SCHEMA;
6
- state: "available" | "consumed";
7
- proposal_id: string;
8
- proposal_root: string;
9
- receipt_root: string;
10
- identity_binding_id: string;
11
- actor: string;
12
- public_key: string;
13
- frontier: string;
14
- final_roots: MissionRoots;
15
- strict_baseline: StrictBaseline;
16
- vela: {
17
- binary: string;
18
- version: string;
19
- sha256: string;
20
- };
21
- created_at: string;
22
- consumed_at?: string;
23
- consumed_reason?: "withdrawn" | "human_decision_observed";
24
- }
25
- export declare function capabilityDirectory(proposalId: string, storeRoot?: string): string;
26
- export declare function retainWithdrawalCapability(options: {
27
- velaHome: string;
28
- landingRepo: string;
29
- mission: Mission;
30
- landing: LandResult;
31
- finalRoots: MissionRoots;
32
- velaBinary: string;
33
- storeRoot?: string;
34
- }): Promise<{
35
- directory: string;
36
- manifest: WithdrawalCapabilityManifest;
37
- manifest_root: string;
38
- }>;
39
- export declare function loadWithdrawalCapability(proposalId: string, storeRoot?: string): Promise<{
40
- directory: string;
41
- manifest: WithdrawalCapabilityManifest;
42
- manifest_root: string;
43
- secret_available: boolean;
44
- }>;
45
- export declare function installWithdrawalCapabilitySecret(proposalId: string, target: string, storeRoot?: string): Promise<void>;
46
- export declare function withdrawalCapabilityStatus(proposalId: string, storeRoot?: string): Promise<Record<string, unknown>>;
47
- export declare function consumeWithdrawalCapability(proposalId: string, reason: "withdrawn" | "human_decision_observed", storeRoot?: string): Promise<WithdrawalCapabilityManifest>;