@vela-science/canopus 0.7.0 → 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 (94) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +67 -145
  3. package/capsules/erdos1056-k15/bin/linux-arm64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
  4. package/capsules/erdos1056-k15/bin/linux-x86_64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
  5. package/compatibility.json +25 -0
  6. package/dist/src/{receipt/map.d.ts → candidate/finalize.d.ts} +2 -9
  7. package/dist/src/candidate/finalize.js +71 -0
  8. package/dist/src/cli.js +89 -195
  9. package/dist/src/contracts/mission.d.ts +1 -13
  10. package/dist/src/contracts/mission.js +4 -42
  11. package/dist/src/contracts/validation.d.ts +1 -25
  12. package/dist/src/contracts/validation.js +1 -95
  13. package/dist/src/engines/codex-tools-native.js +2 -2
  14. package/dist/src/index.d.ts +5 -34
  15. package/dist/src/index.js +4 -34
  16. package/dist/src/mission/prepare.d.ts +10 -1
  17. package/dist/src/mission/prepare.js +29 -30
  18. package/dist/src/product/coverage.d.ts +17 -0
  19. package/dist/src/product/coverage.js +137 -0
  20. package/dist/src/product/doctor.d.ts +1 -2
  21. package/dist/src/product/doctor.js +29 -8
  22. package/dist/src/product/profile.js +8 -2
  23. package/dist/src/product/replay.js +11 -12
  24. package/dist/src/product/run.d.ts +5 -9
  25. package/dist/src/product/run.js +17 -81
  26. package/dist/src/product/submission.d.ts +40 -0
  27. package/dist/src/product/submission.js +217 -0
  28. package/dist/src/product/submit.d.ts +22 -0
  29. package/dist/src/product/submit.js +264 -0
  30. package/dist/src/product/version.d.ts +2 -2
  31. package/dist/src/product/version.js +27 -4
  32. package/dist/src/projection/current-run.d.ts +12 -0
  33. package/dist/src/projection/current-run.js +94 -0
  34. package/dist/src/projection/failure.d.ts +17 -7
  35. package/dist/src/projection/failure.js +43 -12
  36. package/dist/src/projection/retained-mission.d.ts +6 -0
  37. package/dist/src/projection/retained-mission.js +41 -0
  38. package/dist/src/projection/retained-run.d.ts +7 -0
  39. package/dist/src/projection/retained-run.js +50 -0
  40. package/dist/src/run.d.ts +43 -34
  41. package/dist/src/run.js +34 -397
  42. package/dist/src/util/canonical.d.ts +1 -5
  43. package/dist/src/util/canonical.js +1 -53
  44. package/dist/src/vela/cli.d.ts +7 -42
  45. package/dist/src/vela/cli.js +102 -475
  46. package/dist/src/vela/types.d.ts +3 -19
  47. package/dist/src/verifier/run.js +1 -1
  48. package/dist/src/workspace/prepare.d.ts +1 -1
  49. package/dist/src/workspace/prepare.js +15 -15
  50. package/docs/EVALUATION.md +142 -0
  51. package/docs/MISSIONS.md +42 -80
  52. package/docs/RUN_RECORD.md +77 -99
  53. package/docs/adr/0010-nonmutating-runs-and-explicit-submission.md +191 -0
  54. package/missions/erdos1056-k15-next/mission.draft.json +10 -8
  55. package/package.json +18 -15
  56. package/profiles/{erdos1056-k15-10428801-10429000.json → erdos1056-k15-10429201-10429400.json} +10 -10
  57. package/schemas/failure.v1.json +17 -0
  58. package/schemas/mission.v0.json +3 -4
  59. package/schemas/mission.v1.json +7 -28
  60. package/schemas/{run.v1.json → run.v2.json} +58 -116
  61. package/schemas/submission-bundle.v1.json +63 -0
  62. package/toolchain.lock.json +31 -0
  63. package/capsules/formal-erdos-505-test-dim-one/verifier +0 -105
  64. package/capsules/quantum-10-1-4/verifier.py +0 -152
  65. package/capsules/sidon-a24/bin/linux-arm64/verifier +0 -0
  66. package/capsules/sidon-a24/bin/linux-x86_64/verifier +0 -0
  67. package/dist/src/engines/codex-exec.d.ts +0 -17
  68. package/dist/src/engines/codex-exec.js +0 -136
  69. package/dist/src/engines/codex-tool-free.d.ts +0 -26
  70. package/dist/src/engines/codex-tool-free.js +0 -213
  71. package/dist/src/projection/diagnostic.d.ts +0 -12
  72. package/dist/src/projection/diagnostic.js +0 -61
  73. package/dist/src/projection/public-run.d.ts +0 -59
  74. package/dist/src/projection/public-run.js +0 -106
  75. package/dist/src/projection/publication.d.ts +0 -36
  76. package/dist/src/projection/publication.js +0 -47
  77. package/dist/src/projection/run.d.ts +0 -95
  78. package/dist/src/projection/run.js +0 -173
  79. package/dist/src/receipt/map.js +0 -168
  80. package/dist/src/repair/plan.d.ts +0 -2
  81. package/dist/src/repair/plan.js +0 -22
  82. package/dist/src/roles.d.ts +0 -2
  83. package/dist/src/roles.js +0 -9
  84. package/missions/formal-erdos-505-test-dim-one-gpt56/mission.draft.json +0 -40
  85. package/missions/quantum-10-1-4-retry/mission.draft.json +0 -40
  86. package/missions/sidon-a24-at-least-7194-gpt56/mission.draft.json +0 -42
  87. package/missions/sidon-a24-at-least-7194-gpt56-v2/mission.draft.json +0 -42
  88. package/missions/sidon-a24-at-least-7194-gpt56-v3/mission.draft.json +0 -42
  89. package/profiles/formal-erdos-505-test-dim-one-gpt56.json +0 -35
  90. package/profiles/quantum-10-1-4-stabilizer-retry.json +0 -35
  91. package/profiles/sidon-a24-at-least-7194-gpt56-v2.json +0 -35
  92. package/profiles/sidon-a24-at-least-7194-gpt56-v3.json +0 -35
  93. package/profiles/sidon-a24-at-least-7194-gpt56.json +0 -35
  94. package/schemas/canopus.public-run.v1.json +0 -116
package/CHANGELOG.md CHANGED
@@ -2,6 +2,86 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.0 - 2026-07-28
6
+
7
+ - Release the nonmutating Run, explicit Submission, and framework-neutral
8
+ evaluation boundary from the Vela product monorepo.
9
+ - Depend on the shared authority-free `@vela-science/protocol` package instead
10
+ of copying canonical JSON and validation primitives.
11
+ - Drive exact Vela and Codex composition from one toolchain lock rather than
12
+ copied source, test, documentation, and workflow versions.
13
+ - Preserve and reproduce the corrected Erdős Submission and scoped Verification
14
+ through the completed human Decision loop.
15
+
16
+ - Advance Canopus `0.8.0-rc.8` after real campaign replay exposed a retained
17
+ predecessor-epoch compatibility defect. Current readers now validate and
18
+ replay immutable Run and Mission bytes through bounded in-memory projections;
19
+ the retained records and their exact roots remain unchanged.
20
+ - Advance Canopus `0.8.0-rc.7` for the Vela `0.940.7` current Target Index
21
+ writer repair.
22
+ - Keep retained Run and Submission source identities unchanged while requiring
23
+ registration through the exact repaired Vela release.
24
+
25
+ - Advance Canopus `0.8.0-rc.6` for the Vela `0.940.6` retained-Artifact
26
+ repair. Current registration may reuse exact retained Artifact bytes and
27
+ canonical paths, while path substitution remains fail-closed.
28
+ - Refuse a duplicate verifier-passing mission before output creation or model
29
+ execution. Historical schemas remain replayable but do not weaken the
30
+ current Mission v1 coverage gate.
31
+ - Export immutable predecessor-root Run v2 records without rewriting their
32
+ bytes, and allow their authenticated Submission bundles to register only
33
+ against an exact source commit or its current descendant.
34
+ - Add a rooted, source-only framework-neutral evaluation contract. Optional
35
+ engine experiments and metadata-only trace export remain outside the npm
36
+ payload and cannot change Vela Standing or authority.
37
+ - Advance Canopus `0.8.0-rc.5` after real Erdős dogfood exposed stale
38
+ post-verifier wording at the Submission waist. New workers keep verifier
39
+ status out of the Claim, verifier-pending caveats are normalized after the
40
+ separate check, and export fails closed on stale verifier language or control
41
+ bytes. An explicit Claim-plus-scope-limit correction can author a new signed
42
+ producer Submission while preserving the immutable Run unchanged.
43
+ - Consume Vela's current `produce` lane directly when selecting the first
44
+ canonical offer. Remove the retired `attack`-lane and `task.packet_ref`
45
+ compatibility path that blocked real `0.940.5` Frontiers before a model call.
46
+ - Advance Canopus `0.8.0-rc.4` to the attested Vela `0.940.5` release. The
47
+ macOS and Linux archives and binaries are pinned by exact SHA-256;
48
+ the product contract is unchanged.
49
+ - Begin Canopus `0.8.0-rc.1` as an exact candidate composition with attested
50
+ Vela `0.930.0-rc.12`. The older `0.7.0`/`0.915.1` composition remains
51
+ available only from immutable release history; it is no longer an active
52
+ operating path.
53
+ - Advance the sole active Erdős 1056 k=15 profile to the next non-overlapping
54
+ range `10429201..10429400` before any model call. The closed profile root is
55
+ `sha256:2034d6b6a49ba1345518340ba74dfd75931035788924c53e629fb0260304ece1`;
56
+ its static Linux ARM64 and x86-64 verifier roots are
57
+ `sha256:6abe6125b5ed7cfeb256a1d86f3a66c6e7000a5542417d9dd04b2e5f9d3ffe81`
58
+ and
59
+ `sha256:ce73ca27d54a2ed31607a6d279d85ed36f28c2a830891b5d5d27b9cf50f0fcb4`.
60
+ The completed `10429001..10429200` run and pending Proposal remain
61
+ reproducible from immutable Git and Frontier history but are removed from
62
+ default discovery and the package payload.
63
+ - Preserve the first candidate artifact for `10429001..10429200` as a
64
+ verifier-rejected bounded failure, then retain the exact successful repair
65
+ separately from the new active range. No prior numeric result is supplied
66
+ to the new worker.
67
+ - Allow a verifier-passing review-only Run to export Submission v1 without an
68
+ optional `vela.execution-binding.v1`. The Submission still binds the exact
69
+ verifier capsule in its verification requirement and can only enter the
70
+ ordinary pending-review path; policy eligibility continues to require the
71
+ full execution binding and result contract.
72
+ - Pin Vela rc.12 after the repository-authority landing regression proved that
73
+ repository authorization must not occupy Receipt v1's scientific
74
+ `acceptance.policyRef`, signed agent observations require canonical
75
+ whole-second timestamps, and repository-authority landing must materialize
76
+ derived views inside the same recoverable transaction without adding those
77
+ views to the signed scientific delta. The released macOS binary is
78
+ `sha256:2e6c4f5aadf0d3e6e7102d71f8fa0a46d31567cc847c25914706183248167471`.
79
+ - Raise only the bounded Vela subprocess ceiling from two to ten minutes after
80
+ a real Erdős landing reached its frozen verifier and atomic authority
81
+ transaction but was killed during large-frontier materialization at exactly
82
+ 120 seconds. Model, verifier, workspace, and mission budgets remain
83
+ independently bounded.
84
+
5
85
  ## 0.7.0 - 2026-07-25
6
86
 
7
87
  - Retire long-lived proposal-withdrawal capabilities. Successful runs now
package/README.md CHANGED
@@ -1,191 +1,113 @@
1
1
  <p align="center">
2
- <img src="docs/assets/canopus-readme-hero.jpg" width="960" alt="Canopus carries one bounded target through an isolated Codex worker and separate verifier into a Receipt pending human review." />
2
+ <img src="docs/assets/canopus-readme-hero.jpg" width="960" alt="One bounded Canopus Run moves from a rooted target through an isolated worker and verifier to an optional Vela Submission." />
3
3
  </p>
4
4
 
5
5
  <p align="center"><strong>Bounded research for Codex.</strong></p>
6
6
 
7
7
  <p align="center">
8
- Give Codex one finite mission. Verify the artifact independently. Keep humans in authority.
8
+ Run one exact mission. Reproduce the artifact. Submit only when you choose.
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/@vela-science/canopus"><img alt="npm" src="https://img.shields.io/npm/v/@vela-science/canopus?style=flat-square&color=C9A664&labelColor=081224" /></a>
13
- <a href="https://github.com/vela-science/vela-research-harness/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/vela-science/vela-research-harness/ci.yml?branch=main&style=flat-square&label=build&labelColor=081224" /></a>
13
+ <a href="https://github.com/vela-science/vela/actions/workflows/product-ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/vela-science/vela/product-ci.yml?branch=main&style=flat-square&label=build&labelColor=081224" /></a>
14
14
  <a href="LICENSE-APACHE"><img alt="Apache-2.0 OR MIT" src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-4F8F8B?style=flat-square&labelColor=081224" /></a>
15
15
  </p>
16
16
 
17
- <p align="center">
18
- <a href="https://app.vela.space/frontiers/sidon-sets/runs/run_f68e4cfc-e5c7-4c73-86cb-d79807c47ec4">Retained Sidon run</a> ·
19
- <a href="https://github.com/vela-science/vela-research-harness/blob/v0.6.5/BUILD_WEEK.md">Build Week archive</a> ·
20
- <a href="docs/MISSIONS.md">Missions</a> ·
21
- <a href="docs/RUN_RECORD.md">Run records</a> ·
22
- <a href="https://github.com/vela-science/vela">Vela</a>
23
- </p>
24
-
25
- Canopus is a removable producer over released Vela and Git. It gives Codex one
26
- exact work offer, freezes the result, runs a separate verifier, and can land a
27
- Receipt through `vela land`.
28
-
29
- It cannot sign, accept a proposal, or make a scientific decision. Removing
30
- Canopus does not change accepted state or Vela replay.
31
-
32
- ## Where Canopus fits
33
-
34
- The Vela product story has five steps:
35
-
36
- 1. **Produce:** any suitable workbench may produce bounded work; Canopus is the
37
- optional isolated producer for Codex.
38
- 2. **Preserve:** the canonical frontier Git repository preserves the exact
39
- source, artifacts, and history.
40
- 3. **Check:** Vela replays the frontier and frozen verifiers fail closed.
41
- 4. **Decide:** signed policy or one protected human decision determines
42
- scientific standing.
43
- 5. **Reuse:** the read-only Observatory and other replaceable readers help
44
- people inspect, reproduce, and continue the work.
45
-
46
- Canopus owns **Produce** only. It reuses Git for preservation and Vela for
47
- checking, landing, replay, and authority; it does not become a second state
48
- store, verifier authority, or scientific workbench platform.
49
-
50
- ## Inspect one retained example
51
-
52
- **20 seconds — inspect the real result:** open the anonymous
53
- [retained Sidon run](https://app.vela.space/frontiers/sidon-sets/runs/run_f68e4cfc-e5c7-4c73-86cb-d79807c47ec4)
54
- and follow
55
- Mission → GPT-5.6 → artifact → verifier → Receipt → Defer.
17
+ Canopus is a removable research runner over Vela and Git. It gives Codex one
18
+ rooted target, freezes the produced bytes, runs a separate verifier, and
19
+ reproduces the result from a clean clone.
56
20
 
57
- **90 seconds inspect the shipped product:**
21
+ A Run is nonmutating. It does not create a Proposal, Verification Record,
22
+ Decision, Event, or scientific Standing. A successful Run may be exported as an
23
+ authenticated `vela.submission.v1`; only the separate `submit` command registers
24
+ that Submission as pending review.
58
25
 
59
- ```sh
60
- bunx @vela-science/canopus@0.7.0 --version
61
- bunx @vela-science/canopus@0.7.0 profile validate sidon-a24-at-least-7194-gpt56-v3
62
- ```
63
-
64
- **Retained historical result — reproduce without rebuilding Canopus:**
26
+ ## The loop
65
27
 
66
- This Sidon artifact remains bound to the Vela version recorded when it landed.
67
- Install the provenance-checked prebuilt
68
- [Vela 0.912.0 release](https://github.com/vela-science/vela/releases/tag/v0.912.0)
69
- for this replay only, then:
70
-
71
- ```sh
72
- git clone https://github.com/vela-science/sidon-frontier.git
73
- cd sidon-frontier
74
- git checkout 825657d7e87618c0aa6fc9af7e3182e05f324750
75
- vela reproduce artifacts/sidon-a24-gpt56-7194.witness.json
76
- node verification/verify-sidon-a24-7194.mjs \
77
- artifacts/sidon-a24-gpt56-7194.witness.json
28
+ ```text
29
+ doctor run → show → replay → export → submit
78
30
  ```
79
31
 
80
- The first command selects the pending artifact explicitly and runs Vela's
81
- frozen Sidon verifier. The second is an independent base-3 implementation that
82
- also rejects a bound collision injection. Neither command accepts the proposal.
83
-
84
- For new missions, use Vela `0.915.1`, the version composed with Canopus
85
- `0.7.0` and enforced by `canopus doctor`.
86
-
87
- ## Quickstart
88
-
89
- Run the provenance-backed public package with Bun:
90
-
91
32
  ```sh
92
- bunx @vela-science/canopus@0.7.0 --version
93
- ```
94
-
95
- Inspect a clean frontier, then run its first ranked producer offer:
96
-
97
- ```sh
98
- bunx @vela-science/canopus@0.7.0 doctor /path/to/frontier
99
- bunx @vela-science/canopus@0.7.0 run /path/to/frontier --first
100
- bunx @vela-science/canopus@0.7.0 inspect latest
101
- bunx @vela-science/canopus@0.7.0 replay /path/to/run.json
102
- ```
103
-
104
- Export a completed Defer run without publishing or mutating anything:
105
-
106
- ```sh
107
- canopus publish-run /path/to/run.json --mission /path/to/mission.json \
108
- --repository https://github.com/vela-science/<frontier> \
109
- --output ./public-evidence
33
+ bun install --frozen-lockfile
34
+ bun run build
35
+
36
+ canopus doctor /path/to/frontier
37
+ canopus run /path/to/frontier --first
38
+ canopus show latest
39
+ canopus replay /path/to/run.json
40
+ canopus export /path/to/run.json --output /path/to/submission-bundle
41
+ canopus submit /path/to/submission-bundle /path/to/frontier
110
42
  ```
111
43
 
112
- The new directory contains `public-run.json`, `root-manifest.json`, exact
113
- pending-state commands, and a read-only Observatory import descriptor. Run v1
114
- separates worker observations, verifier observations, and caveats that remain
115
- standing after verification; historical run v0 records remain inspectable.
44
+ - `doctor` binds the exact frontier, target, Vela, Codex, profile, packet, and
45
+ verifier identities.
46
+ - `run` executes in disposable workspaces and leaves the frontier unchanged.
47
+ - `show` inspects current and historical run records.
48
+ - `replay` reruns the frozen verifier without a model call.
49
+ - `export` creates a signed portable Submission and retains no producer key.
50
+ If a retained Run from an older worker contract still says verification is
51
+ pending after its verifier passed, export fails closed until the producer
52
+ supplies one corrected bounded Claim and explicit scope limit.
53
+ - `submit` explicitly registers that Submission through Vela. The expected
54
+ result is `pending_review` with accepted-event delta zero.
116
55
 
117
- Use `--no-land` for a diagnostic mission that cannot change the source frontier:
56
+ `inspect`, `--no-land`, Receipt authoring, and automatic landing are not current
57
+ interfaces.
118
58
 
119
- ```sh
120
- bunx @vela-science/canopus@0.7.0 run /path/to/frontier --first --no-land
121
- ```
59
+ ## Authority boundary
122
60
 
123
- `doctor` binds the exact Vela, Codex, Git, frontier, packet, profile, and verifier
124
- roots. `run` refuses dirty frontiers, drifted roots, missing capsules, and
125
- unregistered targets. It never silently skips the first ranked offer.
61
+ | Component | Owns | Does not own |
62
+ | --- | --- | --- |
63
+ | Codex worker | One bounded attempt inside an isolated workspace | Host files, human keys, verifier, network tools |
64
+ | Frozen verifier | A scoped mechanical result over exact bytes | Scientific acceptance |
65
+ | Canopus | Run evidence, replay, Submission export | Verification Records, Decisions, Events, Standing |
66
+ | Vela | Registration, review, decisions, replay, Standing | Model execution |
126
67
 
127
- ## Custody and authority
68
+ The worker uses macOS Seatbelt or Codex Bubblewrap on Linux/WSL2. The verifier
69
+ runs separately with network and writes denied. Canopus never reads a human key
70
+ or interprets verifier success as acceptance.
128
71
 
129
- | Surface | Can do | Cannot do |
130
- | --- | --- | --- |
131
- | Codex worker | Use tools inside one bounded workspace | Reach the network, host home, human keys, or verifier |
132
- | Verifier | Read frozen candidate bytes and declared inputs | Write, use the network, or make an authority decision |
133
- | Canopus | Preserve evidence, replay, and land a Receipt | Sign, accept, reject, retain producer keys, or call verifier success acceptance |
72
+ ## Exact product contract
134
73
 
135
- The worker uses macOS Seatbelt or Codex's Bubblewrap sandbox on Linux and WSL2.
136
- The verifier runs in a separate pinned container with network and writes denied.
74
+ Current source is Canopus `0.8.0`. Its exact Vela, Codex, and platform
75
+ composition is declared once in `toolchain.lock.json`; compatible public
76
+ contracts are declared separately in `compatibility.json`. Historical releases
77
+ remain available for exact replay; they are not current writers.
137
78
 
138
- ## Everyday commands
79
+ Mission v1 and profile v2 remain the advanced portable interfaces:
139
80
 
140
81
  ```sh
141
- canopus doctor [frontier]
142
- canopus run [frontier] [--first | --target <id>] [--profile <name>] [--no-land]
143
- canopus inspect [run.json | latest]
144
- canopus replay <run.json>
82
+ canopus mission prepare ...
83
+ canopus mission validate bundle/mission.json
84
+ canopus profile list
85
+ canopus profile show <name>
86
+ canopus profile validate <name>
87
+ canopus profile pack <name> --output <directory>
145
88
  ```
146
89
 
147
- Advanced profile commands are documented in [Missions](docs/MISSIONS.md).
148
- Installed profiles are closed,
149
- content-addressed contracts that bind the target, packet, objective, artifact
150
- types, worker, verifier, replay command, budgets, and landing ceiling.
151
-
152
- Producer identities are ephemeral. After a successful landing and clean-clone
153
- reproduction, Canopus destroys the isolated Vela home instead of retaining a
154
- proposal-scoped private key. A proposal may remain pending until Vela policy or
155
- a human reviewer decides it; Canopus does not need a second control channel.
156
-
157
- ## Retained Build Week evidence
158
-
159
- Inspect the retained Mission → worker → artifact → verifier → Receipt → Defer
160
- chain on the [exact Sidon run](https://app.vela.space/frontiers/sidon-sets/runs/run_f68e4cfc-e5c7-4c73-86cb-d79807c47ec4).
161
- Exact commits, run roots, audit evidence, and nonclaims live in
162
- the retained
163
- [`v0.6.5` Build Week archive](https://github.com/vela-science/vela-research-harness/blob/v0.6.5/BUILD_WEEK.md).
164
-
165
90
  ## Development
166
91
 
167
- Requires Bun 1.3.12, Vela 0.915.1, Codex CLI 0.145.0, and Docker. The built
168
- package also runs under Node 22 or 24; unsupported odd-numbered Node releases
169
- are rejected rather than silently treated as supported.
170
-
171
92
  ```sh
172
93
  bun install --frozen-lockfile
173
94
  bun run check
174
95
  bun run pack:check
175
96
  ```
176
97
 
98
+ The installed package has one runtime dependency:
99
+ `@vela-science/protocol`, Vela's authority-free public TypeScript contract.
100
+
177
101
  ## Documentation
178
102
 
179
103
  - [Missions and profiles](docs/MISSIONS.md)
180
- - [Run records and publication](docs/RUN_RECORD.md)
181
- - [Historical release evidence](https://github.com/vela-science/vela-research-harness/blob/v0.7.0/docs/RELEASES.md)
182
- - [Why the harness stays removable](docs/adr/0001-harness-boundary-and-name.md)
104
+ - [Run, export, and submit records](docs/RUN_RECORD.md)
105
+ - [Evaluation gates](docs/EVALUATION.md)
106
+ - [Nonmutating Runs and explicit Submission](docs/adr/0010-nonmutating-runs-and-explicit-submission.md)
107
+ - [Why Canopus stays removable](docs/adr/0001-harness-boundary-and-name.md)
108
+ - [Historical Build Week evidence](https://github.com/vela-science/vela-research-harness/blob/v0.6.5/BUILD_WEEK.md)
183
109
 
184
110
  ## License
185
111
 
186
- Apache-2.0 OR MIT, at your option. Canopus is a replaceable producer; Vela
187
- remains the protocol and authority boundary.
188
-
189
- The published CLI has no runtime npm dependencies. See
190
- [Third-party components](THIRD_PARTY.md) for the bundled verifier and external
191
- toolchain boundary.
112
+ Apache-2.0 OR MIT, at your option. Vela remains the protocol and authority
113
+ boundary.
@@ -0,0 +1,25 @@
1
+ {
2
+ "schema": "canopus.compatibility.v1",
3
+ "repository_epoch": "current",
4
+ "required_schemas": [
5
+ "vela.repository.v1",
6
+ "vela.status.v1",
7
+ "vela.offer.v1",
8
+ "vela.submission.v1",
9
+ "vela.verification-record.v1"
10
+ ],
11
+ "required_commands": [
12
+ "status",
13
+ "next",
14
+ "start",
15
+ "submit",
16
+ "verification import",
17
+ "check",
18
+ "reproduce"
19
+ ],
20
+ "forbidden_authority_capabilities": [
21
+ "review accept",
22
+ "review reject",
23
+ "repository authority"
24
+ ]
25
+ }
@@ -1,10 +1,10 @@
1
- import { type FrozenArtifactLocation } from "../artifact/freeze.js";
1
+ import type { FrozenArtifactLocation } from "../artifact/freeze.js";
2
2
  import type { BudgetSnapshot } from "../budget/enforce.js";
3
3
  import { type Candidate } from "../contracts/candidate.js";
4
4
  import type { Mission } from "../contracts/mission.js";
5
5
  import type { EngineResult } from "../engines/engine.js";
6
6
  import type { VerifierOutcome } from "../verifier/run.js";
7
- import type { AuthoredReceiptInput } from "../vela/cli.js";
7
+ export declare function finalizeWorkerCaveat(value: string): string;
8
8
  export declare function finalizeCandidate(options: {
9
9
  mission: Mission;
10
10
  engine: EngineResult;
@@ -16,10 +16,3 @@ export declare function finalizeCandidate(options: {
16
16
  kind: string;
17
17
  }>;
18
18
  }): Candidate;
19
- export declare function mapCandidateToReceipt(mission: Mission, candidate: Candidate, verifier: VerifierOutcome, work?: string): AuthoredReceiptInput;
20
- export declare function installFrozenArtifacts(options: {
21
- landingRepo: string;
22
- frontier: string;
23
- frozen: readonly FrozenArtifactLocation[];
24
- maxBytes: number;
25
- }): Promise<string[]>;
@@ -0,0 +1,71 @@
1
+ import { parseCandidate } from "../contracts/candidate.js";
2
+ function unique(values) {
3
+ return [...new Set(values)];
4
+ }
5
+ export function finalizeWorkerCaveat(value) {
6
+ if (/verif(?:y|ication|ier).*(?:pending|has not run|not (?:been )?(?:performed|executed|run))|pending.*verif(?:y|ication|ier)/iu.test(value)) {
7
+ return "The worker handed off without verifier authority; Canopus subsequently recorded the separate verifier outcome.";
8
+ }
9
+ return value;
10
+ }
11
+ export function finalizeCandidate(options) {
12
+ const draftPaths = options.engine.draft.artifacts
13
+ .map((artifact) => `${artifact.path}:${artifact.kind}`)
14
+ .sort();
15
+ const supporting = new Map((options.supportingArtifacts ?? []).map((entry) => [entry.path, entry.kind]));
16
+ const frozenPaths = options.frozen
17
+ .filter((entry) => !supporting.has(entry.artifact.path))
18
+ .map((entry) => `${entry.artifact.path}:${entry.artifact.kind}`)
19
+ .sort();
20
+ if (JSON.stringify(draftPaths) !== JSON.stringify(frozenPaths)) {
21
+ throw new Error("frozen artifacts do not exactly match the engine declaration");
22
+ }
23
+ for (const [path, kind] of supporting) {
24
+ const entry = options.frozen.find((candidate) => candidate.artifact.path === path);
25
+ if (entry === undefined || entry.artifact.kind !== kind) {
26
+ throw new Error(`supporting artifact ${path} is absent or misclassified`);
27
+ }
28
+ }
29
+ const verifierFailed = options.engine.draft.status === "success" && options.verifier.status !== "passed";
30
+ const status = verifierFailed ? "failed" : options.engine.draft.status;
31
+ const exactPositiveClaim = options.mission.schema === "canopus.mission.v1" &&
32
+ options.mission.result_contract !== undefined &&
33
+ options.engine.draft.status === "success" &&
34
+ options.verifier.status === "passed"
35
+ ? options.mission.result_contract.claim_exact
36
+ : undefined;
37
+ const claim = verifierFailed
38
+ ? `The engine proposed a candidate, but the declared verifier did not pass: ${options.engine.draft.claim}`
39
+ : exactPositiveClaim ?? options.engine.draft.claim;
40
+ const caveats = unique([
41
+ ...options.engine.draft.caveats.map(finalizeWorkerCaveat),
42
+ `Declared verifier outcome: ${options.verifier.status}.`,
43
+ "Canopus produced this record; it is not a Verification Record or Decision.",
44
+ ]);
45
+ const base = {
46
+ schema: "canopus.candidate.v0",
47
+ mission_id: options.mission.id,
48
+ status,
49
+ claim,
50
+ artifacts: options.frozen.map((entry) => entry.artifact),
51
+ observations: options.engine.draft.observations,
52
+ tests: [options.verifier.record],
53
+ costs: {
54
+ wall_time_ms: options.budget.research_elapsed_ms,
55
+ attempt: options.budget.attempts,
56
+ input_tokens: options.engine.usage.input_tokens,
57
+ output_tokens: options.engine.usage.output_tokens,
58
+ },
59
+ caveats,
60
+ engine: options.engine.engine,
61
+ };
62
+ return parseCandidate(options.mission.parent_candidate === undefined
63
+ ? base
64
+ : {
65
+ ...base,
66
+ repair: {
67
+ parent_candidate: options.mission.parent_candidate,
68
+ reason: options.mission.repair_reason ?? "Bounded repair of the named candidate.",
69
+ },
70
+ });
71
+ }