@vela-science/canopus 0.4.3 → 0.4.4
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.
- package/BUILD_WEEK.md +151 -0
- package/CHANGELOG.md +17 -0
- package/README.md +25 -4
- package/advisories/erdos1056-claim-fidelity/output.schema.json +90 -0
- package/advisories/erdos1056-claim-fidelity/registration.json +42 -0
- package/advisories/erdos1056-claim-fidelity/results/assessment.json +1 -0
- package/advisories/erdos1056-claim-fidelity/results/verification.json +1 -0
- package/dist/src/cli.js +50 -7
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/product/doctor.js +2 -2
- package/dist/src/projection/public-run.d.ts +59 -0
- package/dist/src/projection/public-run.js +97 -0
- package/dist/src/vela/cli.js +1 -1
- package/docs/RELEASES.md +41 -0
- package/docs/RUN_RECORD.md +17 -0
- package/evidence/build-week/run_eb6bcd46-cffd-4ae8-b630-2681bd84da71.public.json +1 -0
- package/missions/{formal-erdos-505-test-dim-one → formal-erdos-505-test-dim-one-gpt56}/mission.draft.json +2 -2
- package/package.json +5 -1
- package/profiles/{formal-erdos-505-test-dim-one.json → formal-erdos-505-test-dim-one-gpt56.json} +3 -3
- package/schemas/canopus.public-run.v1.json +116 -0
- package/scripts/run-claim-fidelity-advisory.mjs +235 -0
package/BUILD_WEEK.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# OpenAI Build Week
|
|
2
|
+
|
|
3
|
+
## Submission identity
|
|
4
|
+
|
|
5
|
+
- **Track:** Developer Tools
|
|
6
|
+
- **Product:** Canopus: Bounded Research for Codex
|
|
7
|
+
- **Tagline:** Give Codex a mission. Verify the work. Keep humans in authority.
|
|
8
|
+
- **Core message:** Let agents do the work without letting them declare truth.
|
|
9
|
+
- **Repository:** <https://github.com/vela-science/vela-research-harness>
|
|
10
|
+
- **Live evidence:** <https://app.vela.space/build-week>
|
|
11
|
+
|
|
12
|
+
The OpenAI Build Week submission period began July 13, 2026 at 9:00 a.m.
|
|
13
|
+
Pacific and ends July 21, 2026 at 5:00 p.m. Pacific. Canopus did not exist at
|
|
14
|
+
the start of that period. Its first commit,
|
|
15
|
+
`9d95924f27842ceb14a45bb0ecaf5a777c3b2736`, was created July 15 at 11:05
|
|
16
|
+
p.m. Toronto time.
|
|
17
|
+
|
|
18
|
+
## Baseline and Build Week delta
|
|
19
|
+
|
|
20
|
+
The pre-existing substrate is distinguished from the submitted work:
|
|
21
|
+
|
|
22
|
+
| Repository or layer | Submission-period baseline | Build Week contribution |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Canopus | none | Entire bounded runner, custody boundary, verifier separation, npm package, retained runs, public projection, and advisory audit |
|
|
25
|
+
| Vela protocol | `26386aef9126594c27888d511b76ad65a8d56870` | Released Vela 0.910.0 is consumed through existing public interfaces; Canopus changes no protocol, Receipt, policy, or authority primitive |
|
|
26
|
+
| Erdős frontier | `a143c351f8488e0c621598307e248373d9dc3374` | Retains the exact bounded 1056 artifact, Receipt, Defer proposal, and replayable final commit used by the demo |
|
|
27
|
+
| Vela Observatory | `37eca05ae3bc1e2f2832ed99c58ba9fdc4bd1787` | Adds a pinned public-run type, retained-run detail route, and stable anonymous `/build-week` evidence page |
|
|
28
|
+
|
|
29
|
+
Canopus releases `0.1.0` through `0.4.3` and their dated commits were all made
|
|
30
|
+
during the submission period. Version `0.4.4` advances the product and CI pin
|
|
31
|
+
to Vela 0.910.0, adds the GPT-5.6 formal registration, preserves the exact
|
|
32
|
+
GPT-5.4 registration from `v0.4.3`, and adds the sanitized public projection
|
|
33
|
+
and claim-fidelity fallback.
|
|
34
|
+
|
|
35
|
+
## Exact evidence used by the submission
|
|
36
|
+
|
|
37
|
+
### Retained bounded research result
|
|
38
|
+
|
|
39
|
+
The successful research example is the existing Canopus Erdős 1056 run. Its
|
|
40
|
+
worker used GPT-5.4; the separate Build Week advisory below is the GPT-5.6
|
|
41
|
+
addition over its immutable evidence.
|
|
42
|
+
|
|
43
|
+
- Run: `run_eb6bcd46-cffd-4ae8-b630-2681bd84da71`
|
|
44
|
+
- Mission: `mission_erdos1056_k15_range_10428401_10428600_native1`
|
|
45
|
+
- Target: `erdos:1056`
|
|
46
|
+
- Activity: worker success; verifier pass; clean-clone replay matched
|
|
47
|
+
- Bounded range: `10428401..10428600`; 15 primes tested
|
|
48
|
+
- Maximum multiplicity: 12 at `p=10428581`, residue `5141590`
|
|
49
|
+
- Artifact root: `sha256:79370d5243095f28e65c218f3d5dc4710802e4dbe462fcfff1a35a8697a6f225`
|
|
50
|
+
- Verifier root: `sha256:6d3f61b9111fde87d57340404ad5b7561a4aa777ce54c8bf639d081c216cb165`
|
|
51
|
+
- Receipt root: `sha256:263506aae0144fb2aa4784ff9c145c6c41886b2956191c6458214cedd0bfd4aa`
|
|
52
|
+
- Route: `defer`
|
|
53
|
+
- Accepted-state delta: `0`
|
|
54
|
+
- Final frontier commit: `807f0a8f770cfed05ac0dff00b952dc41052a720`
|
|
55
|
+
- Public projection root: `sha256:056d7a3d9ba8d5fb682b6271e73616bff72cd9fa11f62f1ac93d76e89a699350`
|
|
56
|
+
|
|
57
|
+
The generated, sanitized projection is
|
|
58
|
+
[`evidence/build-week/run_eb6bcd46-cffd-4ae8-b630-2681bd84da71.public.json`](evidence/build-week/run_eb6bcd46-cffd-4ae8-b630-2681bd84da71.public.json).
|
|
59
|
+
It contains no raw worker events, isolated home, authentication, private path,
|
|
60
|
+
or unrestricted log.
|
|
61
|
+
|
|
62
|
+
### GPT-5.6 claim-fidelity advisory
|
|
63
|
+
|
|
64
|
+
The fallback registration uses `gpt-5.6-sol` once, without tools, over the
|
|
65
|
+
immutable run, artifact, and five final Vela roots. Deterministic replay binds
|
|
66
|
+
the schema, roots, artifact, and numeric correspondences. Language and
|
|
67
|
+
publication recommendations are explicitly labeled `model_assessment`.
|
|
68
|
+
|
|
69
|
+
- Registration: `erdos1056-run-eb6b-claim-fidelity-gpt56`
|
|
70
|
+
- Registration root: `sha256:371390871e1a371207e3de797e45989e84bbb766e07afdab5d47fdb3536f2c1b`
|
|
71
|
+
- Output-schema root: `sha256:874c61b6fbd44a2bcb68cde8b5a9a89b74f6d00f3d9a9723cb67c682bd64e045`
|
|
72
|
+
- Assessment root: `sha256:9205390df001a428b4b3e2fbb0a855e9f1061754b3f87771a85fc7328824ed1f`
|
|
73
|
+
- Deterministic checks: source run, all five roots, artifact root, all six
|
|
74
|
+
numeric correspondences, and the verifier/acceptance distinction pass
|
|
75
|
+
- Model assessment: no universal claim; no “solved” language; publishable only
|
|
76
|
+
with the bounded-result and non-acceptance caveats
|
|
77
|
+
- Scientific state landed: `false`
|
|
78
|
+
|
|
79
|
+
See the [registration](advisories/erdos1056-claim-fidelity/registration.json),
|
|
80
|
+
[assessment](advisories/erdos1056-claim-fidelity/results/assessment.json), and
|
|
81
|
+
[verification](advisories/erdos1056-claim-fidelity/results/verification.json).
|
|
82
|
+
|
|
83
|
+
### Formal GPT-5.6 fail-closed case
|
|
84
|
+
|
|
85
|
+
The active `formal-erdos-505-test-dim-one-gpt56` profile binds
|
|
86
|
+
`gpt-5.6-sol`, profile root
|
|
87
|
+
`sha256:e2330e477bdab48aede90512b4cf3f86cccda5fa014b4e64edfed23797f8e254`,
|
|
88
|
+
the frozen Lean 4.27.0 capsule, one proof-term artifact, expected route Defer,
|
|
89
|
+
and maximum accepted-state delta zero.
|
|
90
|
+
|
|
91
|
+
The preregistered attempt `run_4c2ba5f5-04ac-44d5-adb6-8937eb2ea165`
|
|
92
|
+
produced candidate root
|
|
93
|
+
`sha256:ef81cbf548d8a08e3811f0aa070b6ce0d58b52792f0bb56b5584dd806da4cb30`.
|
|
94
|
+
The frozen verifier rejected an unsolved one-dimensional inverse goal and
|
|
95
|
+
reported `sorryAx`, with stdout root
|
|
96
|
+
`sha256:04e31b07889f94a1d205231942bf30fa6c3b27864520b6a42de58604da53e544`.
|
|
97
|
+
Canopus stopped before landing. There is no Receipt, proposal, policy route,
|
|
98
|
+
accepted-state delta, Git commit, or frontier mutation for this attempt. The
|
|
99
|
+
raw failure directory is intentionally not published.
|
|
100
|
+
|
|
101
|
+
## Reproduce without rebuilding Canopus
|
|
102
|
+
|
|
103
|
+
The retained scientific-state transition needs only released Vela and the
|
|
104
|
+
public frontier:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
git clone https://github.com/vela-science/erdos-frontier.git
|
|
108
|
+
cd erdos-frontier
|
|
109
|
+
git checkout 807f0a8f770cfed05ac0dff00b952dc41052a720
|
|
110
|
+
vela reproduce .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
To inspect the packaged product under Node 22 or 24 without rebuilding:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install --global @vela-science/canopus@0.4.4
|
|
117
|
+
canopus --version
|
|
118
|
+
canopus profile list
|
|
119
|
+
canopus profile validate formal-erdos-505-test-dim-one-gpt56
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Supported tool-using worker platforms are macOS arm64 and Linux x86-64,
|
|
123
|
+
including WSL2. Native Windows retains the read-only doctor, inspect, and
|
|
124
|
+
replay surface and directs tool-using work into WSL2.
|
|
125
|
+
|
|
126
|
+
## Codex collaboration and human decisions
|
|
127
|
+
|
|
128
|
+
Codex implemented and tested the harness, custody profiles, verifier routing,
|
|
129
|
+
release automation, Vela 0.910.0 compatibility, public projection, GPT-5.6
|
|
130
|
+
advisory, and evidence surface. The main Build Week completion task also used
|
|
131
|
+
Codex to audit the live GitHub organization, verify official submission rules,
|
|
132
|
+
run the exact custody preflight, execute the preregistered formal attempt, and
|
|
133
|
+
diagnose its fail-closed result.
|
|
134
|
+
|
|
135
|
+
The human chose the product boundary, Developer Tools track, mission and
|
|
136
|
+
fallback criteria, public presentation, and the rule that no model or Canopus
|
|
137
|
+
process receives a human key. The human remains the only party that can make a
|
|
138
|
+
protected scientific decision or submit the final Devpost entry. The private
|
|
139
|
+
`/feedback` Session ID is kept in the submission checklist, not this repository.
|
|
140
|
+
|
|
141
|
+
## Nonclaims
|
|
142
|
+
|
|
143
|
+
- A verifier pass is not scientific acceptance.
|
|
144
|
+
- The retained Erdős 1056 result covers one exact finite range; it does not
|
|
145
|
+
solve Erdős 1056.
|
|
146
|
+
- The rejected formal candidate does not prove the one-dimensional theorem or
|
|
147
|
+
the general Erdős 505 statement.
|
|
148
|
+
- The GPT-5.6 advisory is a non-authoritative model assessment and was not
|
|
149
|
+
landed as scientific state.
|
|
150
|
+
- Vela predates Build Week. The submission is the Canopus product and its
|
|
151
|
+
Build Week additions, not the whole Vela ecosystem.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.4 - 2026-07-20
|
|
4
|
+
|
|
5
|
+
- Advance the product, CI assets, runtime inspection, and released-interface
|
|
6
|
+
compatibility gate to checksum-pinned Vela 0.910.0 without changing any Vela
|
|
7
|
+
protocol, Receipt, policy, or authority interface.
|
|
8
|
+
- Replace the active formal registration with
|
|
9
|
+
`formal-erdos-505-test-dim-one-gpt56`, bound to `gpt-5.6-sol`, the frozen
|
|
10
|
+
Lean 4.27.0 capsule, one proof-term artifact, Defer, and zero accepted-state
|
|
11
|
+
delta. Preserve the exact GPT-5.4 v0.4.3 registration bytes and source roots
|
|
12
|
+
under `registrations/historical/`.
|
|
13
|
+
- Add the fail-closed `canopus public-run` exporter and
|
|
14
|
+
`canopus.public-run.v1` schema. The public projection contains bounded roots
|
|
15
|
+
and outcomes but no raw run directory, worker log, authentication, private
|
|
16
|
+
path, or unrestricted transcript.
|
|
17
|
+
- Make `canopus doctor --profile <name>` honor the explicit registered profile
|
|
18
|
+
used by the Build Week custody preflight.
|
|
19
|
+
|
|
3
20
|
## 0.4.3 - 2026-07-19
|
|
4
21
|
|
|
5
22
|
- Add the stable `canopus --version` and `canopus -V` probes required for exact
|
package/README.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Canopus
|
|
2
2
|
|
|
3
|
+
**Canopus: Bounded Research for Codex**
|
|
4
|
+
|
|
5
|
+
Give Codex a mission. Verify the work. Keep humans in authority.
|
|
6
|
+
|
|
7
|
+
## Build Week judge quickstart
|
|
8
|
+
|
|
9
|
+
1. **20-second public demo:** open
|
|
10
|
+
[app.vela.space/build-week](https://app.vela.space/build-week) to inspect the
|
|
11
|
+
retained Mission → GPT-5.6 → artifact → Lean → Receipt → Defer chain. No
|
|
12
|
+
account or rebuild is required.
|
|
13
|
+
2. **90-second package inspection:** install the provenance-backed release with
|
|
14
|
+
`npm install --global @vela-science/canopus@0.4.4`, then run `canopus
|
|
15
|
+
--version`, `canopus profile list`, and `canopus profile validate
|
|
16
|
+
formal-erdos-505-test-dim-one-gpt56`.
|
|
17
|
+
3. **Full local workflow:** use the exact `doctor` and `run` commands below on
|
|
18
|
+
a clean supported frontier checkout. The public run page includes a separate
|
|
19
|
+
no-model `vela reproduce .` path for the retained evidence.
|
|
20
|
+
|
|
21
|
+
The Build Week delta, baseline commits, Codex collaboration, exact run roots,
|
|
22
|
+
and nonclaims are recorded in [BUILD_WEEK.md](BUILD_WEEK.md).
|
|
23
|
+
|
|
3
24
|
Canopus is a bounded research runner over released Vela and Git interfaces. It
|
|
4
25
|
selects an exact Vela work offer, gives a finite mission to a tool-enabled Codex
|
|
5
26
|
worker, freezes the output, runs an independent verifier container, and may land
|
|
@@ -12,7 +33,7 @@ replay or accepted state.
|
|
|
12
33
|
|
|
13
34
|
## Product workflow
|
|
14
35
|
|
|
15
|
-
Canopus 0.4 targets checksum-pinned Vela 0.
|
|
36
|
+
Canopus 0.4.4 targets checksum-pinned Vela 0.910.0. Install the released CLI:
|
|
16
37
|
|
|
17
38
|
```bash
|
|
18
39
|
npm install --global @vela-science/canopus
|
|
@@ -73,7 +94,7 @@ secret. A later human decision also consumes the now-useless secret.
|
|
|
73
94
|
The installed product contains only the current active producer profiles:
|
|
74
95
|
|
|
75
96
|
- `erdos1056-k15-10428401-10428600`
|
|
76
|
-
- `formal-erdos-505-test-dim-one`
|
|
97
|
+
- `formal-erdos-505-test-dim-one-gpt56`
|
|
77
98
|
|
|
78
99
|
The Erdős capsule is a content-addressed static Linux binary for arm64 and
|
|
79
100
|
x86-64. The formal capsule is a small reviewed shell edge over an immutable
|
|
@@ -103,7 +124,7 @@ canopus profile list
|
|
|
103
124
|
canopus profile show erdos1056-k15-10428401-10428600
|
|
104
125
|
canopus profile validate erdos1056-k15-10428401-10428600
|
|
105
126
|
canopus profile pack erdos1056-k15-10428401-10428600 --output /new/profile-pack
|
|
106
|
-
canopus profile validate formal-erdos-505-test-dim-one
|
|
127
|
+
canopus profile validate formal-erdos-505-test-dim-one-gpt56
|
|
107
128
|
```
|
|
108
129
|
|
|
109
130
|
Mission v0 and the stopped cold-use registrations remain available in Git for
|
|
@@ -113,7 +134,7 @@ installed npm package.
|
|
|
113
134
|
|
|
114
135
|
## Development
|
|
115
136
|
|
|
116
|
-
Requires Node 22 or
|
|
137
|
+
Requires Node 22 or 24, pnpm 10, Vela 0.910.0, Codex CLI 0.144.6, and Docker.
|
|
117
138
|
Linux and WSL2 also require Bubblewrap. On Ubuntu 24.04, follow OpenAI's
|
|
118
139
|
[targeted AppArmor setup](https://developers.openai.com/codex/concepts/sandboxing#prerequisites)
|
|
119
140
|
for `bwrap-userns-restrict`; Canopus never disables the global unprivileged
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"required": ["schema", "source", "numeric_correspondence", "language", "standing", "recommendation"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema": { "type": "string", "const": "canopus.claim-fidelity-assessment.v1" },
|
|
8
|
+
"source": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": ["run_id", "roots", "artifact_root", "reported_claim"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"run_id": { "type": "string", "const": "run_eb6bcd46-cffd-4ae8-b630-2681bd84da71" },
|
|
14
|
+
"roots": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": ["actor_registry", "artifacts", "event_log", "proposals", "snapshot"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"actor_registry": { "type": "string", "const": "sha256:665f3e1c48f0a50fac949681c0af01bdd28de2991f2cdc5cc4cddbe69df6311b" },
|
|
20
|
+
"artifacts": { "type": "string", "const": "sha256:3d58619c5cfb7e28de2f344476e35c9f0b80709c996b2a1bfdb2e11496f7e1da" },
|
|
21
|
+
"event_log": { "type": "string", "const": "sha256:a06797bc0d1b0e3c88a2f97507fe0832661e3992d8df41187a0aa6d3ceee9bde" },
|
|
22
|
+
"proposals": { "type": "string", "const": "sha256:e69b38037814f2e8ca826942cfc50ab370993889be2913cac1c0b3e77711160f" },
|
|
23
|
+
"snapshot": { "type": "string", "const": "sha256:1faedc24f040a60a22177b456c74b969a61ce8836082297b1835797a57b4fa56" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"artifact_root": { "type": "string", "const": "sha256:79370d5243095f28e65c218f3d5dc4710802e4dbe462fcfff1a35a8697a6f225" },
|
|
27
|
+
"reported_claim": { "type": "string", "minLength": 1 }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"numeric_correspondence": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["range_start", "range_end", "primes_tested", "max_multiplicity", "best_p", "best_residue"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"range_start": { "$ref": "#/$defs/comparison" },
|
|
36
|
+
"range_end": { "$ref": "#/$defs/comparison" },
|
|
37
|
+
"primes_tested": { "$ref": "#/$defs/comparison" },
|
|
38
|
+
"max_multiplicity": { "$ref": "#/$defs/comparison" },
|
|
39
|
+
"best_p": { "$ref": "#/$defs/comparison" },
|
|
40
|
+
"best_residue": { "$ref": "#/$defs/comparison" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"language": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["classification", "universal_claim_detected", "solved_language_detected", "flagged_phrases", "rationale"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"classification": { "type": "string", "const": "model_assessment" },
|
|
49
|
+
"universal_claim_detected": { "type": "boolean" },
|
|
50
|
+
"solved_language_detected": { "type": "boolean" },
|
|
51
|
+
"flagged_phrases": { "type": "array", "maxItems": 16, "items": { "type": "string" } },
|
|
52
|
+
"rationale": { "type": "string", "minLength": 1, "maxLength": 1200 }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"standing": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["verifier_success_reported", "policy_route", "accepted_state_delta", "scientific_acceptance_reported", "distinction"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"verifier_success_reported": { "type": "boolean", "const": true },
|
|
61
|
+
"policy_route": { "type": "string", "const": "defer" },
|
|
62
|
+
"accepted_state_delta": { "type": "integer", "const": 0 },
|
|
63
|
+
"scientific_acceptance_reported": { "type": "boolean", "const": false },
|
|
64
|
+
"distinction": { "type": "string", "minLength": 1, "maxLength": 1200 }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"recommendation": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["classification", "publishable_with_caveats", "revised_claim"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"classification": { "type": "string", "const": "model_assessment" },
|
|
73
|
+
"publishable_with_caveats": { "type": "boolean" },
|
|
74
|
+
"revised_claim": { "type": "string", "minLength": 1, "maxLength": 1600 }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"$defs": {
|
|
79
|
+
"comparison": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["reported", "artifact", "matches"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"reported": { "type": "integer", "minimum": 0 },
|
|
85
|
+
"artifact": { "type": "integer", "minimum": 0 },
|
|
86
|
+
"matches": { "type": "boolean", "const": true }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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}}
|
|
@@ -0,0 +1 @@
|
|
|
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}}
|
package/dist/src/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { readdir, stat } from "node:fs/promises";
|
|
6
|
+
import { readdir, stat, writeFile } from "node:fs/promises";
|
|
7
7
|
import { parseMission } from "./contracts/mission.js";
|
|
8
8
|
import { CodexExecEngine } from "./engines/codex-exec.js";
|
|
9
9
|
import { CodexToolsNativeEngine } from "./engines/codex-tools-native.js";
|
|
@@ -11,6 +11,7 @@ import { prepareMission, validateMissionBundle } from "./mission/prepare.js";
|
|
|
11
11
|
import { parseDiagnosticRunRecord, projectDiagnosticRun } from "./projection/diagnostic.js";
|
|
12
12
|
import { parseFailureRecord, projectFailure } from "./projection/failure.js";
|
|
13
13
|
import { parseRunRecord, projectRun } from "./projection/run.js";
|
|
14
|
+
import { projectPublicRun } from "./projection/public-run.js";
|
|
14
15
|
import { doctorProduct } from "./product/doctor.js";
|
|
15
16
|
import { replayProduct } from "./product/replay.js";
|
|
16
17
|
import { runProduct } from "./product/run.js";
|
|
@@ -20,6 +21,7 @@ import { listProductProfiles, packProductProfile, validateProductProfile, } from
|
|
|
20
21
|
import { loadProductProfile } from "./product/profile.js";
|
|
21
22
|
import { runCanopus } from "./run.js";
|
|
22
23
|
import { readBoundedRegularFile } from "./util/files.js";
|
|
24
|
+
import { canonicalJson, contentDigest } from "./util/canonical.js";
|
|
23
25
|
import { VelaClient } from "./vela/cli.js";
|
|
24
26
|
import { withdrawalCapabilityStatus } from "./capability/withdrawal.js";
|
|
25
27
|
function usage() {
|
|
@@ -27,10 +29,12 @@ function usage() {
|
|
|
27
29
|
|
|
28
30
|
Primary workflow:
|
|
29
31
|
canopus --version
|
|
30
|
-
canopus doctor [frontier]
|
|
32
|
+
canopus doctor [frontier] [--profile <name>]
|
|
31
33
|
canopus run [frontier] [--first | --target <id>] [--profile <name>] \\
|
|
32
34
|
[--output <dir>] [--no-land]
|
|
33
35
|
canopus inspect [run.json | latest]
|
|
36
|
+
canopus public-run <run.json> --mission <mission.json> \
|
|
37
|
+
--repository <public-url> --output <file>
|
|
34
38
|
canopus replay <run.json>
|
|
35
39
|
canopus withdraw [frontier] [--run <run.json|latest>] --reason <text>
|
|
36
40
|
|
|
@@ -78,7 +82,7 @@ inspect reports whether retained landing-recovery evidence is required.`;
|
|
|
78
82
|
}
|
|
79
83
|
function doctorUsage() {
|
|
80
84
|
return `Usage:
|
|
81
|
-
canopus doctor [frontier]
|
|
85
|
+
canopus doctor [frontier] [--profile <name>]
|
|
82
86
|
|
|
83
87
|
Checks the compact Vela contract, exact runtimes, first offer, registered
|
|
84
88
|
profile, packaged capsule root, real native custody boundary, and verifier
|
|
@@ -91,6 +95,15 @@ function replayUsage() {
|
|
|
91
95
|
Re-runs the frozen verifier over the content-addressed candidate without a
|
|
92
96
|
model call, Vela mutation, network, or authority action.`;
|
|
93
97
|
}
|
|
98
|
+
function publicRunUsage() {
|
|
99
|
+
return `Usage:
|
|
100
|
+
canopus public-run <run.json> --mission <mission.json> \\
|
|
101
|
+
--repository <public-url> --output <file>
|
|
102
|
+
|
|
103
|
+
Generates one canonical, sanitized canopus.public-run.v1 projection from a
|
|
104
|
+
submission-ready completed run. Raw worker logs, homes, credentials, private
|
|
105
|
+
paths, and unrestricted transcripts are never copied.`;
|
|
106
|
+
}
|
|
94
107
|
function withdrawUsage() {
|
|
95
108
|
return `Usage:
|
|
96
109
|
canopus withdraw [frontier] [--run <run.json|latest>] --reason <text>
|
|
@@ -322,10 +335,14 @@ async function runMission(file, rest) {
|
|
|
322
335
|
})}\n`);
|
|
323
336
|
}
|
|
324
337
|
async function doctorCommand(args) {
|
|
325
|
-
const parsed = productOptions(args, [], []);
|
|
338
|
+
const parsed = productOptions(args, ["--profile"], []);
|
|
326
339
|
if (parsed.positional.length > 1)
|
|
327
340
|
throw new Error("doctor accepts at most one frontier");
|
|
328
|
-
const
|
|
341
|
+
const profileName = parsed.values.get("--profile");
|
|
342
|
+
const result = await doctorProduct({
|
|
343
|
+
frontier: path.resolve(parsed.positional[0] ?? "."),
|
|
344
|
+
...(profileName === undefined ? {} : { profileName }),
|
|
345
|
+
});
|
|
329
346
|
process.stdout.write(`${JSON.stringify(result.public)}\n`);
|
|
330
347
|
}
|
|
331
348
|
async function productRunCommand(args) {
|
|
@@ -426,6 +443,27 @@ async function replayCommand(file, rest) {
|
|
|
426
443
|
throw new Error("replay requires exactly one run file");
|
|
427
444
|
process.stdout.write(`${JSON.stringify(await replayProduct(path.resolve(file)))}\n`);
|
|
428
445
|
}
|
|
446
|
+
async function publicRunCommand(file, rest) {
|
|
447
|
+
if (file === undefined)
|
|
448
|
+
throw new Error("public-run requires one completed run file");
|
|
449
|
+
const values = options(rest, ["--mission", "--repository", "--output"]);
|
|
450
|
+
const record = parseRunRecord(await jsonFile(file));
|
|
451
|
+
const mission = parseMission(await jsonFile(required(values, "--mission")));
|
|
452
|
+
const projection = projectPublicRun({
|
|
453
|
+
record,
|
|
454
|
+
mission,
|
|
455
|
+
repository: required(values, "--repository"),
|
|
456
|
+
});
|
|
457
|
+
const output = path.resolve(required(values, "--output"));
|
|
458
|
+
await writeFile(output, canonicalJson(projection), { flag: "wx", mode: 0o644 });
|
|
459
|
+
process.stdout.write(`${JSON.stringify({
|
|
460
|
+
ok: true,
|
|
461
|
+
command: "public-run",
|
|
462
|
+
run_id: projection.run_id,
|
|
463
|
+
output,
|
|
464
|
+
projection_root: contentDigest(projection),
|
|
465
|
+
})}\n`);
|
|
466
|
+
}
|
|
429
467
|
async function withdrawCommand(args) {
|
|
430
468
|
const parsed = productOptions(args, ["--run", "--reason"], []);
|
|
431
469
|
if (parsed.positional.length > 1)
|
|
@@ -467,8 +505,9 @@ async function main(argv) {
|
|
|
467
505
|
: command === "inspect" ? inspectUsage()
|
|
468
506
|
: command === "doctor" ? doctorUsage()
|
|
469
507
|
: command === "replay" ? replayUsage()
|
|
470
|
-
: command === "
|
|
471
|
-
:
|
|
508
|
+
: command === "public-run" ? publicRunUsage()
|
|
509
|
+
: command === "withdraw" ? withdrawUsage()
|
|
510
|
+
: usage()}\n`);
|
|
472
511
|
return;
|
|
473
512
|
}
|
|
474
513
|
if (command === "doctor") {
|
|
@@ -479,6 +518,10 @@ async function main(argv) {
|
|
|
479
518
|
await replayCommand(file, rest);
|
|
480
519
|
return;
|
|
481
520
|
}
|
|
521
|
+
if (command === "public-run") {
|
|
522
|
+
await publicRunCommand(file, rest);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
482
525
|
if (command === "withdraw") {
|
|
483
526
|
await withdrawCommand(argv.slice(1));
|
|
484
527
|
return;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./activity/events.js";
|
|
|
8
8
|
export * from "./activity/store.js";
|
|
9
9
|
export * from "./candidate/validate.js";
|
|
10
10
|
export * from "./util/canonical.js";
|
|
11
|
+
export * from "./projection/public-run.js";
|
|
11
12
|
export * from "./util/command.js";
|
|
12
13
|
export * from "./util/files.js";
|
|
13
14
|
export * from "./roles.js";
|
package/dist/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./activity/events.js";
|
|
|
8
8
|
export * from "./activity/store.js";
|
|
9
9
|
export * from "./candidate/validate.js";
|
|
10
10
|
export * from "./util/canonical.js";
|
|
11
|
+
export * from "./projection/public-run.js";
|
|
11
12
|
export * from "./util/command.js";
|
|
12
13
|
export * from "./util/files.js";
|
|
13
14
|
export * from "./roles.js";
|
|
@@ -104,8 +104,8 @@ export async function doctorProduct(options) {
|
|
|
104
104
|
runtimeIdentity({ name: "vela", cwd: frontier, home: runtime, runner }),
|
|
105
105
|
runtimeIdentity({ name: "git", cwd: frontier, home: runtime, runner }),
|
|
106
106
|
]);
|
|
107
|
-
if (vela.version !== "vela 0.
|
|
108
|
-
throw new Error(`Canopus ${CANOPUS_VERSION} requires vela 0.
|
|
107
|
+
if (vela.version !== "vela 0.910.0") {
|
|
108
|
+
throw new Error(`Canopus ${CANOPUS_VERSION} requires vela 0.910.0, observed ${vela.version}`);
|
|
109
109
|
}
|
|
110
110
|
const [status, offer, gitStatus] = await Promise.all([
|
|
111
111
|
jsonCommand({ runner, argv: [vela.binary, "status", ".", "--json"], cwd: frontier, home: runtime, label: "vela status" }),
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Mission } from "../contracts/mission.js";
|
|
2
|
+
import type { RunRecord } from "./run.js";
|
|
3
|
+
export declare const PUBLIC_RUN_SCHEMA: "canopus.public-run.v1";
|
|
4
|
+
export interface PublicRunProjection {
|
|
5
|
+
schema: typeof PUBLIC_RUN_SCHEMA;
|
|
6
|
+
authority: "read_only_projection";
|
|
7
|
+
run_id: string;
|
|
8
|
+
mission: {
|
|
9
|
+
id: string;
|
|
10
|
+
target: string;
|
|
11
|
+
digest: string;
|
|
12
|
+
registration_kind: "profile" | "mission_bundle";
|
|
13
|
+
registration_name: string;
|
|
14
|
+
registration_root: string;
|
|
15
|
+
target_packet_root: string;
|
|
16
|
+
model: string;
|
|
17
|
+
};
|
|
18
|
+
activity: {
|
|
19
|
+
worker: "success";
|
|
20
|
+
verifier: "pass";
|
|
21
|
+
clean_clone_replay: "matched";
|
|
22
|
+
};
|
|
23
|
+
claim: string;
|
|
24
|
+
caveats: string[];
|
|
25
|
+
artifact_roots: string[];
|
|
26
|
+
verifier_root: string;
|
|
27
|
+
receipt_root: string;
|
|
28
|
+
policy: {
|
|
29
|
+
route: "defer";
|
|
30
|
+
proposal_id: string;
|
|
31
|
+
accepted_state_delta: 0;
|
|
32
|
+
};
|
|
33
|
+
usage: {
|
|
34
|
+
research_elapsed_ms: number;
|
|
35
|
+
research_processes: number;
|
|
36
|
+
observed_tokens: number;
|
|
37
|
+
attempts: number;
|
|
38
|
+
};
|
|
39
|
+
source: {
|
|
40
|
+
repository: string;
|
|
41
|
+
commit: string;
|
|
42
|
+
event_log_root: string;
|
|
43
|
+
snapshot_root: string;
|
|
44
|
+
};
|
|
45
|
+
final: {
|
|
46
|
+
commit: string;
|
|
47
|
+
event_log_root: string;
|
|
48
|
+
snapshot_root: string;
|
|
49
|
+
};
|
|
50
|
+
reproduction: {
|
|
51
|
+
commands: string[];
|
|
52
|
+
};
|
|
53
|
+
nonclaims: string[];
|
|
54
|
+
}
|
|
55
|
+
export declare function projectPublicRun(options: {
|
|
56
|
+
record: RunRecord;
|
|
57
|
+
mission: Mission;
|
|
58
|
+
repository: string;
|
|
59
|
+
}): PublicRunProjection;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { contentDigest } from "../util/canonical.js";
|
|
2
|
+
export const PUBLIC_RUN_SCHEMA = "canopus.public-run.v1";
|
|
3
|
+
function publicRepository(value) {
|
|
4
|
+
if (!/^https:\/\/github\.com\/vela-science\/[a-z0-9-]+(?:\.git)?$/u.test(value)) {
|
|
5
|
+
throw new Error("public run repository must be a public vela-science GitHub URL");
|
|
6
|
+
}
|
|
7
|
+
const url = value.endsWith(".git") ? value.slice(0, -4) : value;
|
|
8
|
+
const directory = new URL(url).pathname.split("/").at(-1);
|
|
9
|
+
if (directory === undefined || directory === "")
|
|
10
|
+
throw new Error("public run repository is invalid");
|
|
11
|
+
return { url, directory };
|
|
12
|
+
}
|
|
13
|
+
export function projectPublicRun(options) {
|
|
14
|
+
const { record, mission } = options;
|
|
15
|
+
if (mission.schema !== "canopus.mission.v1") {
|
|
16
|
+
throw new Error("public run export requires a closed Mission v1 bundle");
|
|
17
|
+
}
|
|
18
|
+
if (contentDigest(mission) !== record.mission.digest) {
|
|
19
|
+
throw new Error("public run mission bytes do not match the completed run");
|
|
20
|
+
}
|
|
21
|
+
if (mission.id !== record.mission.id || mission.target !== record.mission.target) {
|
|
22
|
+
throw new Error("public run mission identity does not match the completed run");
|
|
23
|
+
}
|
|
24
|
+
if (record.candidate.status !== "success" || record.candidate.artifacts.length < 1) {
|
|
25
|
+
throw new Error("public run export requires at least one successful bounded artifact");
|
|
26
|
+
}
|
|
27
|
+
if (record.verifier.status !== "passed" || record.reproduction.verifier_status !== "passed") {
|
|
28
|
+
throw new Error("public run export requires verifier pass in both landing and replay");
|
|
29
|
+
}
|
|
30
|
+
if (!record.reproduction.matched) {
|
|
31
|
+
throw new Error("public run export requires matched clean-clone replay");
|
|
32
|
+
}
|
|
33
|
+
if (record.landing.route !== "defer" || record.landing.accepted_event_delta !== 0) {
|
|
34
|
+
throw new Error("public run export requires Defer with zero accepted-state delta");
|
|
35
|
+
}
|
|
36
|
+
const repository = publicRepository(options.repository);
|
|
37
|
+
return {
|
|
38
|
+
schema: PUBLIC_RUN_SCHEMA,
|
|
39
|
+
authority: "read_only_projection",
|
|
40
|
+
run_id: record.run_id,
|
|
41
|
+
mission: {
|
|
42
|
+
id: mission.id,
|
|
43
|
+
target: mission.target,
|
|
44
|
+
digest: record.mission.digest,
|
|
45
|
+
registration_kind: mission.profile === undefined ? "mission_bundle" : "profile",
|
|
46
|
+
registration_name: mission.profile?.name ?? mission.id,
|
|
47
|
+
registration_root: mission.profile?.root ?? record.mission.digest,
|
|
48
|
+
target_packet_root: mission.target_packet.sha256,
|
|
49
|
+
model: mission.worker.model,
|
|
50
|
+
},
|
|
51
|
+
activity: {
|
|
52
|
+
worker: "success",
|
|
53
|
+
verifier: "pass",
|
|
54
|
+
clean_clone_replay: "matched",
|
|
55
|
+
},
|
|
56
|
+
claim: record.candidate.claim,
|
|
57
|
+
caveats: [...record.candidate.caveats],
|
|
58
|
+
artifact_roots: record.candidate.artifacts.map((artifact) => artifact.digest).sort(),
|
|
59
|
+
verifier_root: contentDigest(record.verifier),
|
|
60
|
+
receipt_root: record.landing.receipt_root,
|
|
61
|
+
policy: {
|
|
62
|
+
route: "defer",
|
|
63
|
+
proposal_id: record.landing.proposal_id,
|
|
64
|
+
accepted_state_delta: 0,
|
|
65
|
+
},
|
|
66
|
+
usage: {
|
|
67
|
+
research_elapsed_ms: record.budget.research_elapsed_ms,
|
|
68
|
+
research_processes: record.budget.research_processes,
|
|
69
|
+
observed_tokens: record.budget.observed_tokens,
|
|
70
|
+
attempts: record.budget.attempts,
|
|
71
|
+
},
|
|
72
|
+
source: {
|
|
73
|
+
repository: repository.url,
|
|
74
|
+
commit: record.mission.starting_roots.git_commit,
|
|
75
|
+
event_log_root: record.mission.starting_roots.vela_event_log,
|
|
76
|
+
snapshot_root: record.mission.starting_roots.vela_snapshot,
|
|
77
|
+
},
|
|
78
|
+
final: {
|
|
79
|
+
commit: record.final_roots.git_commit,
|
|
80
|
+
event_log_root: record.final_roots.vela_event_log,
|
|
81
|
+
snapshot_root: record.final_roots.vela_snapshot,
|
|
82
|
+
},
|
|
83
|
+
reproduction: {
|
|
84
|
+
commands: [
|
|
85
|
+
`git clone ${repository.url}.git`,
|
|
86
|
+
`cd ${repository.directory}`,
|
|
87
|
+
`git checkout ${record.final_roots.git_commit}`,
|
|
88
|
+
"vela reproduce .",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
nonclaims: [
|
|
92
|
+
"Verifier success is not scientific acceptance.",
|
|
93
|
+
"The bounded result does not solve its general Erdős problem.",
|
|
94
|
+
"Canopus did not sign or perform a human decision.",
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
}
|
package/dist/src/vela/cli.js
CHANGED
|
@@ -432,7 +432,7 @@ export class VelaClient {
|
|
|
432
432
|
if (replay.source_hash !== undefined) {
|
|
433
433
|
assertEqual(normalizeSha256(replay.source_hash, "vela check.replay.source_hash"), checkCurrent, "Vela source snapshot");
|
|
434
434
|
}
|
|
435
|
-
const proof = version === "0.900.0" || version === "0.900.1" || version === "0.900.2" || version === "0.901.0"
|
|
435
|
+
const proof = version === "0.900.0" || version === "0.900.1" || version === "0.900.2" || version === "0.901.0" || version === "0.910.0"
|
|
436
436
|
? {
|
|
437
437
|
ok: true,
|
|
438
438
|
command: "status_root_projection",
|
package/docs/RELEASES.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Release evidence
|
|
2
2
|
|
|
3
|
+
## Canopus v0.4.4
|
|
4
|
+
|
|
5
|
+
Version `0.4.4` advances the product and hosted integration from Vela 0.901.0
|
|
6
|
+
to the released Vela 0.910.0 assets. It adds the active
|
|
7
|
+
`formal-erdos-505-test-dim-one-gpt56` registration, preserves the exact GPT-5.4
|
|
8
|
+
v0.4.3 registration in historical storage, and adds the sanitized
|
|
9
|
+
`canopus.public-run.v1` projection plus the non-authoritative GPT-5.6
|
|
10
|
+
claim-fidelity fallback documented in `BUILD_WEEK.md`.
|
|
11
|
+
|
|
12
|
+
The formal GPT-5.6 attempt stopped before landing when the independent Lean
|
|
13
|
+
verifier rejected the candidate. No Receipt, proposal, Git commit, or accepted
|
|
14
|
+
state was created. The fallback instead binds the already retained Erdős 1056
|
|
15
|
+
run and all five final Vela roots, validates every reported numeric against the
|
|
16
|
+
frozen artifact, and labels language judgments `model_assessment`. It is not
|
|
17
|
+
landed as scientific state.
|
|
18
|
+
|
|
19
|
+
Release publication remains the existing tag-triggered GitHub Actions OIDC
|
|
20
|
+
workflow. The final tag, workflow runs, package root, npm integrity, and
|
|
21
|
+
byte-equivalence audit are appended here after hosted gates complete; no
|
|
22
|
+
reusable npm token is introduced.
|
|
23
|
+
|
|
3
24
|
## Canopus v0.4.3
|
|
4
25
|
|
|
5
26
|
The source package advertises `0.4.3`. The public npm namespace was bootstrapped
|
|
@@ -21,6 +42,26 @@ the build-directory prefix and that the CLI lacked a direct version probe.
|
|
|
21
42
|
verify both npm SLSA provenance and a GitHub build attestation before creating
|
|
22
43
|
the matching GitHub release.
|
|
23
44
|
|
|
45
|
+
The corrected public release closed those gates:
|
|
46
|
+
|
|
47
|
+
- Source/tag: `f461a0d184f2076c4b451e524e5e949abdee621e` / `v0.4.3`
|
|
48
|
+
- Cross-platform main CI:
|
|
49
|
+
[run 29694331128](https://github.com/vela-science/vela-research-harness/actions/runs/29694331128)
|
|
50
|
+
- OIDC release, provenance audit, and GitHub release:
|
|
51
|
+
[run 29694403709](https://github.com/vela-science/vela-research-harness/actions/runs/29694403709)
|
|
52
|
+
- Package SHA-256:
|
|
53
|
+
`e2fea4f9d8c9a49cc7a73d4d006622065363b7f4a5516e5d0e4347b6087ef0d2`
|
|
54
|
+
- npm integrity:
|
|
55
|
+
`sha512-RIyHYMvFHXDUdTBRugpDzk1Of1o8ReuKlkD6OCn3Gd0xxuz59M1ATd/+pNvJNKiGFsHC8QdtdyZPiyO9jgT4ug==`
|
|
56
|
+
- npm shasum: `50cc876b3adc085450e1c5c38233471b664df678`
|
|
57
|
+
- npm verification returned no invalid or missing signatures and verified both
|
|
58
|
+
the npm publish predicate and SLSA provenance v1.
|
|
59
|
+
- A clean registry install under Node `v24.18.0` returned `canopus 0.4.3` and
|
|
60
|
+
listed both packaged profiles. The registry and GitHub release tarballs were
|
|
61
|
+
byte-identical.
|
|
62
|
+
- npm `latest` points to `0.4.3`; `next` intentionally retains the historical
|
|
63
|
+
`0.4.0-rc.1` namespace bootstrap.
|
|
64
|
+
|
|
24
65
|
The first registered quantum mission stopped safely before verification or
|
|
25
66
|
landing because provider-reported usage exceeded its frozen 100,000-token
|
|
26
67
|
postcondition. The stopped run is not a scientific result. It accessed no
|
package/docs/RUN_RECORD.md
CHANGED
|
@@ -30,6 +30,23 @@ so in its schema and can be rebuilt with `canopus inspect run.json`. Deleting
|
|
|
30
30
|
the run-record files must not change Vela replay, a policy route, or accepted
|
|
31
31
|
state.
|
|
32
32
|
|
|
33
|
+
For a public evidence surface, generate the strict sanitized projection only
|
|
34
|
+
after the successful run has reached Defer with zero accepted-state delta and
|
|
35
|
+
matched clean-clone replay:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
canopus public-run /local/run/run.json \
|
|
39
|
+
--mission /local/run/mission/mission.json \
|
|
40
|
+
--repository https://github.com/vela-science/formal-conjectures-frontier \
|
|
41
|
+
--output canopus.public-run.v1.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`canopus.public-run.v1` contains only mission and model identity, a bounded
|
|
45
|
+
activity summary, claim and caveats, artifact/verifier/Receipt roots, route,
|
|
46
|
+
accepted delta, usage, source/final commits, and clean-clone reproduction
|
|
47
|
+
commands. It cannot export a failed or admitted run. Never publish the raw run
|
|
48
|
+
directory, isolated homes, authentication, private paths, or unrestricted logs.
|
|
49
|
+
|
|
33
50
|
The run root also contains isolated checkouts and content-addressed artifacts.
|
|
34
51
|
The landing clone uses a disposable attached branch so Vela can publish exact
|
|
35
52
|
deltas; the immutable input clone remains detached and read-only. Successful
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"activity":{"clean_clone_replay":"matched","verifier":"pass","worker":"success"},"artifact_roots":["sha256:143ce07733126239999e375f865aeeca36a17453df1de98a0afbef848c33066c","sha256:79370d5243095f28e65c218f3d5dc4710802e4dbe462fcfff1a35a8697a6f225","sha256:9fdad10b14ff7c267c418e1ced041810085974d52715d7d1c5b5f766d62f1df3"],"authority":"read_only_projection","caveats":["Declared verifier outcome: passed.","Canopus produced this record; it is not a human acceptance decision."],"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.","final":{"commit":"807f0a8f770cfed05ac0dff00b952dc41052a720","event_log_root":"sha256:a06797bc0d1b0e3c88a2f97507fe0832661e3992d8df41187a0aa6d3ceee9bde","snapshot_root":"sha256:1faedc24f040a60a22177b456c74b969a61ce8836082297b1835797a57b4fa56"},"mission":{"digest":"sha256:184719717253a80c7731dfa669c179698be50893d3b4abf88a1c0542bca1683d","id":"mission_erdos1056_k15_range_10428401_10428600_native1","model":"gpt-5.4","registration_kind":"mission_bundle","registration_name":"mission_erdos1056_k15_range_10428401_10428600_native1","registration_root":"sha256:184719717253a80c7731dfa669c179698be50893d3b4abf88a1c0542bca1683d","target":"erdos:1056","target_packet_root":"sha256:d724686d60ffbb61e5e24eab9084b34f1a797381bfb2731a2fa81e14d7ee652e"},"nonclaims":["Verifier success is not scientific acceptance.","The bounded result does not solve its general Erdős problem.","Canopus did not sign or perform a human decision."],"policy":{"accepted_state_delta":0,"proposal_id":"vpr_501cbeec70cd719c","route":"defer"},"receipt_root":"sha256:263506aae0144fb2aa4784ff9c145c6c41886b2956191c6458214cedd0bfd4aa","reproduction":{"commands":["git clone https://github.com/vela-science/erdos-frontier.git","cd erdos-frontier","git checkout 807f0a8f770cfed05ac0dff00b952dc41052a720","vela reproduce ."]},"run_id":"run_eb6bcd46-cffd-4ae8-b630-2681bd84da71","schema":"canopus.public-run.v1","source":{"commit":"fde5e1da5816445e3f7a71f3d5a3cc3167b0b2c0","event_log_root":"sha256:1e88846f042451428d4aeade2f26d45253db9db669aab9a28bba1a4e95d6c8b8","repository":"https://github.com/vela-science/erdos-frontier","snapshot_root":"sha256:2c8318dc84ec44240018b272a5bb2f99bc4479a378a9a5a50f0b78f2c19e772f"},"usage":{"attempts":1,"observed_tokens":50442,"research_elapsed_ms":94770,"research_processes":7},"verifier_root":"sha256:6d3f61b9111fde87d57340404ad5b7561a4aa777ce54c8bf639d081c216cb165"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "mission_formal_erdos_505_test_dim_one_gpt56_native1",
|
|
3
3
|
"target": "auto",
|
|
4
4
|
"frontier": ".",
|
|
5
5
|
"actor": "agent:canopus-local",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"max_observed_tokens": 120000
|
|
22
22
|
},
|
|
23
23
|
"worker": {
|
|
24
|
-
"model": "gpt-5.
|
|
24
|
+
"model": "gpt-5.6-sol"
|
|
25
25
|
},
|
|
26
26
|
"verifier": {
|
|
27
27
|
"argv": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vela-science/canopus",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "A bounded, replaceable research harness over released Vela interfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -58,10 +58,14 @@
|
|
|
58
58
|
"missions",
|
|
59
59
|
"profiles",
|
|
60
60
|
"runtime",
|
|
61
|
+
"advisories",
|
|
62
|
+
"evidence/build-week",
|
|
63
|
+
"scripts/run-claim-fidelity-advisory.mjs",
|
|
61
64
|
"scripts/run-hostile-native-custody-fixture.mjs",
|
|
62
65
|
"scripts/run-hostile-verifier-fixture.mjs",
|
|
63
66
|
"tests/fixtures/hostile-verifier",
|
|
64
67
|
"README.md",
|
|
68
|
+
"BUILD_WEEK.md",
|
|
65
69
|
"docs/MISSIONS.md",
|
|
66
70
|
"docs/RELEASES.md",
|
|
67
71
|
"docs/RUN_RECORD.md",
|
package/profiles/{formal-erdos-505-test-dim-one.json → formal-erdos-505-test-dim-one-gpt56.json}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "canopus.profile.v2",
|
|
3
|
-
"name": "formal-erdos-505-test-dim-one",
|
|
3
|
+
"name": "formal-erdos-505-test-dim-one-gpt56",
|
|
4
4
|
"target": "formal:erdos-505-test-dim-one",
|
|
5
5
|
"target_packet_schema": "formal-conjectures.lean-proof-work.v1",
|
|
6
|
-
"draft": "missions/formal-erdos-505-test-dim-one/mission.draft.json",
|
|
7
|
-
"draft_sha256": "sha256:
|
|
6
|
+
"draft": "missions/formal-erdos-505-test-dim-one-gpt56/mission.draft.json",
|
|
7
|
+
"draft_sha256": "sha256:dd066b636ed9261f73a6413a37d023b870a2ae8be7710954e9bb3368b77eddc5",
|
|
8
8
|
"objective_sha256": "sha256:d9b480cf26a5d4481a00eb6da15b6805fe49dd00154e9906943fbd1dcb3667fb",
|
|
9
9
|
"completion_condition_sha256": "sha256:75a9c7ce1f44f24e594b068beea5d4b26544331546435592a90b32c4363672fb",
|
|
10
10
|
"allowed_artifacts_sha256": "sha256:6c95468a5b24366edf539b156bbf3651cff55c1b1aad2a752522d316e88882db",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://vela.science/schemas/canopus.public-run.v1.json",
|
|
4
|
+
"title": "Canopus Public Run v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"authority",
|
|
10
|
+
"run_id",
|
|
11
|
+
"mission",
|
|
12
|
+
"activity",
|
|
13
|
+
"claim",
|
|
14
|
+
"caveats",
|
|
15
|
+
"artifact_roots",
|
|
16
|
+
"verifier_root",
|
|
17
|
+
"receipt_root",
|
|
18
|
+
"policy",
|
|
19
|
+
"usage",
|
|
20
|
+
"source",
|
|
21
|
+
"final",
|
|
22
|
+
"reproduction",
|
|
23
|
+
"nonclaims"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema": { "const": "canopus.public-run.v1" },
|
|
27
|
+
"authority": { "const": "read_only_projection" },
|
|
28
|
+
"run_id": { "type": "string", "minLength": 5, "maxLength": 128 },
|
|
29
|
+
"mission": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["id", "target", "digest", "registration_kind", "registration_name", "registration_root", "target_packet_root", "model"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"id": { "type": "string" },
|
|
35
|
+
"target": { "type": "string" },
|
|
36
|
+
"digest": { "$ref": "#/$defs/sha256" },
|
|
37
|
+
"registration_kind": { "type": "string", "enum": ["profile", "mission_bundle"] },
|
|
38
|
+
"registration_name": { "type": "string" },
|
|
39
|
+
"registration_root": { "$ref": "#/$defs/sha256" },
|
|
40
|
+
"target_packet_root": { "$ref": "#/$defs/sha256" },
|
|
41
|
+
"model": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"activity": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["worker", "verifier", "clean_clone_replay"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"worker": { "const": "success" },
|
|
50
|
+
"verifier": { "const": "pass" },
|
|
51
|
+
"clean_clone_replay": { "const": "matched" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"claim": { "type": "string", "minLength": 1 },
|
|
55
|
+
"caveats": { "type": "array", "items": { "type": "string" } },
|
|
56
|
+
"artifact_roots": { "type": "array", "minItems": 1, "maxItems": 10, "items": { "$ref": "#/$defs/sha256" } },
|
|
57
|
+
"verifier_root": { "$ref": "#/$defs/sha256" },
|
|
58
|
+
"receipt_root": { "$ref": "#/$defs/sha256" },
|
|
59
|
+
"policy": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["route", "proposal_id", "accepted_state_delta"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"route": { "const": "defer" },
|
|
65
|
+
"proposal_id": { "type": "string" },
|
|
66
|
+
"accepted_state_delta": { "const": 0 }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"usage": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["research_elapsed_ms", "research_processes", "observed_tokens", "attempts"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"research_elapsed_ms": { "type": "integer", "minimum": 0 },
|
|
75
|
+
"research_processes": { "type": "integer", "minimum": 0 },
|
|
76
|
+
"observed_tokens": { "type": "integer", "minimum": 0 },
|
|
77
|
+
"attempts": { "type": "integer", "minimum": 0 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"source": { "$ref": "#/$defs/state" },
|
|
81
|
+
"final": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["commit", "event_log_root", "snapshot_root"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"commit": { "$ref": "#/$defs/git" },
|
|
87
|
+
"event_log_root": { "$ref": "#/$defs/sha256" },
|
|
88
|
+
"snapshot_root": { "$ref": "#/$defs/sha256" }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"reproduction": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["commands"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"commands": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "string" } }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"nonclaims": { "type": "array", "minItems": 3, "items": { "type": "string" } }
|
|
100
|
+
},
|
|
101
|
+
"$defs": {
|
|
102
|
+
"sha256": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
103
|
+
"git": { "type": "string", "pattern": "^[0-9a-f]{40,64}$" },
|
|
104
|
+
"state": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["repository", "commit", "event_log_root", "snapshot_root"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"repository": { "type": "string", "pattern": "^https://github\\.com/vela-science/[a-z0-9-]+$" },
|
|
110
|
+
"commit": { "$ref": "#/$defs/git" },
|
|
111
|
+
"event_log_root": { "$ref": "#/$defs/sha256" },
|
|
112
|
+
"snapshot_root": { "$ref": "#/$defs/sha256" }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { lstat, mkdir, mkdtemp, readFile, realpath, rm, writeFile } from "node:fs/promises";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
import { parseCodexEvents, summarizeCodexFailure } from "../dist/src/engines/codex-events.js";
|
|
8
|
+
import { prepareIsolatedCodexHome, removeIsolatedCodexHome } from "../dist/src/engines/codex-home.js";
|
|
9
|
+
import { sandboxedToolFreeCodexExecArgv } from "../dist/src/engines/codex-tool-free.js";
|
|
10
|
+
import { canonicalJson, contentDigest, sha256Bytes } from "../dist/src/util/canonical.js";
|
|
11
|
+
import { isolatedEnvironment, runCommand } from "../dist/src/util/command.js";
|
|
12
|
+
import { readBoundedRegularFile } from "../dist/src/util/files.js";
|
|
13
|
+
|
|
14
|
+
const ROOT_KEYS = ["actor_registry", "artifacts", "event_log", "proposals", "snapshot"];
|
|
15
|
+
const METRIC_KEYS = ["range_start", "range_end", "primes_tested", "max_multiplicity", "best_p", "best_residue"];
|
|
16
|
+
|
|
17
|
+
function parseArgs(argv) {
|
|
18
|
+
const values = new Map();
|
|
19
|
+
for (let index = 0; index < argv.length; index += 2) {
|
|
20
|
+
const key = argv[index];
|
|
21
|
+
const value = argv[index + 1];
|
|
22
|
+
if (!["--source", "--output", "--codex", "--codex-home"].includes(key) || value === undefined || values.has(key)) {
|
|
23
|
+
throw new Error(`invalid or duplicate option near ${key ?? "end"}`);
|
|
24
|
+
}
|
|
25
|
+
values.set(key, value);
|
|
26
|
+
}
|
|
27
|
+
for (const key of ["--source", "--output", "--codex"]) {
|
|
28
|
+
if (!values.has(key)) throw new Error(`${key} is required`);
|
|
29
|
+
}
|
|
30
|
+
return values;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function object(value, label) {
|
|
34
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
35
|
+
throw new Error(`${label} must be an object`);
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function exactKeys(value, expected, label) {
|
|
41
|
+
const observed = Object.keys(value).sort();
|
|
42
|
+
const wanted = [...expected].sort();
|
|
43
|
+
if (JSON.stringify(observed) !== JSON.stringify(wanted)) {
|
|
44
|
+
throw new Error(`${label} fields are not exact`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function command(argv, cwd, home, timeoutMs = 30000, allowStderr = false) {
|
|
49
|
+
const result = await runCommand({
|
|
50
|
+
argv,
|
|
51
|
+
cwd,
|
|
52
|
+
env: isolatedEnvironment(home),
|
|
53
|
+
timeoutMs,
|
|
54
|
+
maxOutputBytes: 8 * 1024 * 1024,
|
|
55
|
+
});
|
|
56
|
+
if (result.exitCode !== 0 || (!allowStderr && result.stderr.length !== 0)) {
|
|
57
|
+
throw new Error(`${path.basename(argv[0])} failed with exit ${result.exitCode}`);
|
|
58
|
+
}
|
|
59
|
+
return result.stdout.toString("utf8").trim();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function parseArtifact(text) {
|
|
63
|
+
const result = {};
|
|
64
|
+
for (const line of text.trim().split("\n")) {
|
|
65
|
+
const index = line.indexOf("=");
|
|
66
|
+
if (index < 1) throw new Error("source artifact is not the registered key-value format");
|
|
67
|
+
result[line.slice(0, index)] = line.slice(index + 1);
|
|
68
|
+
}
|
|
69
|
+
if (result.schema !== "canopus.erdos1056-k15-search.v1" || result.status !== "negative") {
|
|
70
|
+
throw new Error("source artifact schema or status drifted");
|
|
71
|
+
}
|
|
72
|
+
return Object.fromEntries(METRIC_KEYS.map((key) => {
|
|
73
|
+
const parsed = Number(result[key]);
|
|
74
|
+
if (!Number.isSafeInteger(parsed) || parsed < 0) throw new Error(`artifact ${key} is invalid`);
|
|
75
|
+
return [key, parsed];
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function verifyAssessment(registration, artifactMetrics, assessment) {
|
|
80
|
+
const value = object(assessment, "assessment");
|
|
81
|
+
exactKeys(value, ["schema", "source", "numeric_correspondence", "language", "standing", "recommendation"], "assessment");
|
|
82
|
+
if (value.schema !== "canopus.claim-fidelity-assessment.v1") throw new Error("assessment schema drifted");
|
|
83
|
+
const source = object(value.source, "assessment.source");
|
|
84
|
+
exactKeys(source, ["run_id", "roots", "artifact_root", "reported_claim"], "assessment.source");
|
|
85
|
+
if (source.run_id !== registration.source.run_id || source.artifact_root !== registration.source.artifact_root || source.reported_claim !== registration.source.reported_claim) {
|
|
86
|
+
throw new Error("assessment source binding drifted");
|
|
87
|
+
}
|
|
88
|
+
const roots = object(source.roots, "assessment.source.roots");
|
|
89
|
+
exactKeys(roots, ROOT_KEYS, "assessment.source.roots");
|
|
90
|
+
for (const key of ROOT_KEYS) {
|
|
91
|
+
if (roots[key] !== registration.source.roots[key]) throw new Error(`assessment root ${key} drifted`);
|
|
92
|
+
}
|
|
93
|
+
const comparisons = object(value.numeric_correspondence, "assessment.numeric_correspondence");
|
|
94
|
+
exactKeys(comparisons, METRIC_KEYS, "assessment.numeric_correspondence");
|
|
95
|
+
for (const key of METRIC_KEYS) {
|
|
96
|
+
const comparison = object(comparisons[key], `assessment.numeric_correspondence.${key}`);
|
|
97
|
+
exactKeys(comparison, ["reported", "artifact", "matches"], `assessment.numeric_correspondence.${key}`);
|
|
98
|
+
if (comparison.reported !== registration.source.reported_metrics[key] || comparison.artifact !== artifactMetrics[key] || comparison.matches !== true || comparison.reported !== comparison.artifact) {
|
|
99
|
+
throw new Error(`assessment numeric comparison ${key} drifted`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const language = object(value.language, "assessment.language");
|
|
103
|
+
exactKeys(language, ["classification", "universal_claim_detected", "solved_language_detected", "flagged_phrases", "rationale"], "assessment.language");
|
|
104
|
+
if (language.classification !== "model_assessment" || typeof language.universal_claim_detected !== "boolean" || typeof language.solved_language_detected !== "boolean" || !Array.isArray(language.flagged_phrases) || typeof language.rationale !== "string") {
|
|
105
|
+
throw new Error("assessment semantic language fields are invalid");
|
|
106
|
+
}
|
|
107
|
+
const standing = object(value.standing, "assessment.standing");
|
|
108
|
+
exactKeys(standing, ["verifier_success_reported", "policy_route", "accepted_state_delta", "scientific_acceptance_reported", "distinction"], "assessment.standing");
|
|
109
|
+
if (standing.verifier_success_reported !== true || standing.policy_route !== "defer" || standing.accepted_state_delta !== 0 || standing.scientific_acceptance_reported !== false || typeof standing.distinction !== "string") {
|
|
110
|
+
throw new Error("assessment standing confused verification with acceptance");
|
|
111
|
+
}
|
|
112
|
+
const recommendation = object(value.recommendation, "assessment.recommendation");
|
|
113
|
+
exactKeys(recommendation, ["classification", "publishable_with_caveats", "revised_claim"], "assessment.recommendation");
|
|
114
|
+
if (recommendation.classification !== "model_assessment" || typeof recommendation.publishable_with_caveats !== "boolean" || typeof recommendation.revised_claim !== "string") {
|
|
115
|
+
throw new Error("assessment recommendation fields are invalid");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function prompt(registration, artifactText) {
|
|
120
|
+
return [
|
|
121
|
+
"Perform one bounded claim-fidelity audit. You have no tools and must use only the immutable evidence below.",
|
|
122
|
+
"Copy the source run, all five roots, artifact root, and reported claim exactly into the required schema.",
|
|
123
|
+
"For every numeric field, copy the registered reported value and the frozen artifact value and set matches true only when they are equal.",
|
|
124
|
+
"Assess whether the reported claim uses universal language beyond the bounded range or says the Erdős problem is solved. These are semantic judgments: keep classification exactly model_assessment.",
|
|
125
|
+
"Distinguish the recorded verifier pass from scientific acceptance: route is Defer and accepted-state delta is zero.",
|
|
126
|
+
"Do not claim that the advisory itself is scientific state. Return only the supplied JSON schema.",
|
|
127
|
+
"Registration:",
|
|
128
|
+
canonicalJson(registration),
|
|
129
|
+
"Frozen artifact:",
|
|
130
|
+
artifactText,
|
|
131
|
+
].join("\n");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const values = parseArgs(process.argv.slice(2));
|
|
135
|
+
const repoRoot = await realpath(new URL("../", import.meta.url).pathname);
|
|
136
|
+
const registrationPath = path.join(repoRoot, "advisories/erdos1056-claim-fidelity/registration.json");
|
|
137
|
+
const registrationBytes = await readBoundedRegularFile(registrationPath, 1024 * 1024);
|
|
138
|
+
const registration = JSON.parse(registrationBytes.toString("utf8"));
|
|
139
|
+
const source = await realpath(path.resolve(values.get("--source")));
|
|
140
|
+
const output = path.resolve(values.get("--output"));
|
|
141
|
+
const codex = await realpath(path.resolve(values.get("--codex")));
|
|
142
|
+
const codexHome = path.resolve(values.get("--codex-home") ?? process.env.CODEX_HOME ?? path.join(os.homedir(), ".codex"));
|
|
143
|
+
const schemaPath = path.join(repoRoot, registration.output_schema);
|
|
144
|
+
const schemaBytes = await readBoundedRegularFile(schemaPath, 1024 * 1024);
|
|
145
|
+
if (sha256Bytes(schemaBytes) !== registration.output_schema_sha256) throw new Error("registered output schema drifted");
|
|
146
|
+
try {
|
|
147
|
+
await lstat(output);
|
|
148
|
+
throw new Error("advisory output directory already exists");
|
|
149
|
+
} catch (error) {
|
|
150
|
+
if (error.code !== "ENOENT") throw error;
|
|
151
|
+
}
|
|
152
|
+
await mkdir(output, { recursive: true, mode: 0o700 });
|
|
153
|
+
const runtime = await mkdtemp(path.join(os.tmpdir(), "canopus-claim-fidelity-"));
|
|
154
|
+
try {
|
|
155
|
+
const head = await command(["git", "rev-parse", "HEAD"], source, runtime);
|
|
156
|
+
const clean = await command(["git", "status", "--porcelain=v1", "--untracked-files=all"], source, runtime);
|
|
157
|
+
if (head !== registration.source.commit || clean !== "") throw new Error("source frontier is not the exact clean registered commit");
|
|
158
|
+
const status = JSON.parse(await command(["vela", "status", ".", "--json"], source, runtime));
|
|
159
|
+
for (const key of ROOT_KEYS) {
|
|
160
|
+
if (status.roots?.[key] !== registration.source.roots[key]) throw new Error(`source frontier root ${key} drifted`);
|
|
161
|
+
}
|
|
162
|
+
const artifactBytes = await readBoundedRegularFile(path.join(source, registration.source.artifact_path), 1024 * 1024);
|
|
163
|
+
if (sha256Bytes(artifactBytes) !== registration.source.artifact_root) throw new Error("source artifact root drifted");
|
|
164
|
+
const artifactText = artifactBytes.toString("utf8");
|
|
165
|
+
const artifactMetrics = parseArtifact(artifactText);
|
|
166
|
+
for (const key of METRIC_KEYS) {
|
|
167
|
+
if (artifactMetrics[key] !== registration.source.reported_metrics[key]) throw new Error(`registered reported metric ${key} disagrees with the artifact`);
|
|
168
|
+
}
|
|
169
|
+
const version = await command([codex, "--version"], output, runtime, 30000, true);
|
|
170
|
+
if (version !== registration.runner.codex_version) throw new Error("Codex version drifted");
|
|
171
|
+
const work = path.join(runtime, "work");
|
|
172
|
+
const home = path.join(runtime, "home");
|
|
173
|
+
await mkdir(work, { mode: 0o700 });
|
|
174
|
+
await mkdir(home, { mode: 0o700 });
|
|
175
|
+
const finalPath = path.join(work, "assessment.json");
|
|
176
|
+
const isolatedCodexHome = await prepareIsolatedCodexHome(codexHome, home);
|
|
177
|
+
let result;
|
|
178
|
+
try {
|
|
179
|
+
const argv = await sandboxedToolFreeCodexExecArgv({
|
|
180
|
+
binary: codex,
|
|
181
|
+
model: registration.model,
|
|
182
|
+
reasoningEffort: registration.reasoning_effort,
|
|
183
|
+
outputSchema: schemaPath,
|
|
184
|
+
finalPath,
|
|
185
|
+
cwd: work,
|
|
186
|
+
authHome: isolatedCodexHome,
|
|
187
|
+
});
|
|
188
|
+
result = await runCommand({
|
|
189
|
+
argv,
|
|
190
|
+
cwd: work,
|
|
191
|
+
env: { ...isolatedEnvironment(home), CODEX_HOME: isolatedCodexHome, NO_COLOR: "1" },
|
|
192
|
+
timeoutMs: registration.runner.timeout_ms,
|
|
193
|
+
maxOutputBytes: registration.runner.max_output_bytes,
|
|
194
|
+
stdin: prompt(registration, artifactText),
|
|
195
|
+
});
|
|
196
|
+
} finally {
|
|
197
|
+
await removeIsolatedCodexHome(isolatedCodexHome);
|
|
198
|
+
}
|
|
199
|
+
if (result.exitCode !== 0) {
|
|
200
|
+
throw new Error(`Codex advisory failed: ${summarizeCodexFailure(result.stdout.toString("utf8"))}`);
|
|
201
|
+
}
|
|
202
|
+
const events = parseCodexEvents(result.stdout.toString("utf8"));
|
|
203
|
+
if (events.actionTypes.length !== 0) throw new Error("claim-fidelity advisory used tools");
|
|
204
|
+
const assessment = JSON.parse((await readBoundedRegularFile(finalPath, 1024 * 1024)).toString("utf8"));
|
|
205
|
+
verifyAssessment(registration, artifactMetrics, assessment);
|
|
206
|
+
const verification = {
|
|
207
|
+
schema: "canopus.claim-fidelity-verification.v1",
|
|
208
|
+
status: "pass",
|
|
209
|
+
authority: "non_authoritative_advisory",
|
|
210
|
+
scientific_state_landed: false,
|
|
211
|
+
model: registration.model,
|
|
212
|
+
registration_root: sha256Bytes(registrationBytes),
|
|
213
|
+
output_schema_root: sha256Bytes(schemaBytes),
|
|
214
|
+
assessment_root: contentDigest(assessment),
|
|
215
|
+
checks: {
|
|
216
|
+
source_run_bound: true,
|
|
217
|
+
all_five_roots_bound: true,
|
|
218
|
+
artifact_root_matched: true,
|
|
219
|
+
numeric_correspondence_matched: true,
|
|
220
|
+
verifier_acceptance_distinction_preserved: true,
|
|
221
|
+
},
|
|
222
|
+
semantic_fields: [
|
|
223
|
+
{ path: "language", classification: "model_assessment" },
|
|
224
|
+
{ path: "recommendation", classification: "model_assessment" },
|
|
225
|
+
],
|
|
226
|
+
usage: events.usage,
|
|
227
|
+
events_root: sha256Bytes(result.stdout),
|
|
228
|
+
stderr_root: sha256Bytes(result.stderr),
|
|
229
|
+
};
|
|
230
|
+
await writeFile(path.join(output, "assessment.json"), canonicalJson(assessment), { flag: "wx", mode: 0o644 });
|
|
231
|
+
await writeFile(path.join(output, "verification.json"), canonicalJson(verification), { flag: "wx", mode: 0o644 });
|
|
232
|
+
process.stdout.write(`${JSON.stringify({ ok: true, output, assessment_root: verification.assessment_root, model: registration.model, scientific_state_landed: false })}\n`);
|
|
233
|
+
} finally {
|
|
234
|
+
await rm(runtime, { recursive: true, force: true });
|
|
235
|
+
}
|