@vela-science/canopus 0.6.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -0
- package/README.md +67 -139
- package/SECURITY.md +3 -2
- package/capsules/erdos1056-k15/bin/linux-arm64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
- package/capsules/erdos1056-k15/bin/linux-x86_64/{10428801-10429000 → 10429201-10429400}/verifier +0 -0
- package/compatibility.json +25 -0
- package/dist/src/activity/events.d.ts +4 -1
- package/dist/src/activity/events.js +8 -2
- package/dist/src/activity/store.d.ts +2 -2
- package/dist/src/activity/store.js +4 -3
- package/dist/src/{receipt/map.d.ts → candidate/finalize.d.ts} +2 -9
- package/dist/src/candidate/finalize.js +71 -0
- package/dist/src/cli.js +88 -229
- package/dist/src/contracts/mission.d.ts +1 -13
- package/dist/src/contracts/mission.js +4 -42
- package/dist/src/contracts/validation.d.ts +1 -25
- package/dist/src/contracts/validation.js +1 -95
- package/dist/src/engines/codex-tools-native.js +2 -2
- package/dist/src/index.d.ts +5 -34
- package/dist/src/index.js +4 -34
- package/dist/src/mission/prepare.d.ts +10 -1
- package/dist/src/mission/prepare.js +29 -30
- package/dist/src/product/coverage.d.ts +17 -0
- package/dist/src/product/coverage.js +137 -0
- package/dist/src/product/doctor.d.ts +1 -2
- package/dist/src/product/doctor.js +29 -8
- package/dist/src/product/profile.js +8 -2
- package/dist/src/product/replay.js +11 -12
- package/dist/src/product/run.d.ts +5 -9
- package/dist/src/product/run.js +17 -88
- package/dist/src/product/submission.d.ts +40 -0
- package/dist/src/product/submission.js +217 -0
- package/dist/src/product/submit.d.ts +22 -0
- package/dist/src/product/submit.js +264 -0
- package/dist/src/product/version.d.ts +2 -2
- package/dist/src/product/version.js +27 -4
- package/dist/src/projection/current-run.d.ts +12 -0
- package/dist/src/projection/current-run.js +94 -0
- package/dist/src/projection/failure.d.ts +17 -7
- package/dist/src/projection/failure.js +43 -12
- package/dist/src/projection/retained-mission.d.ts +6 -0
- package/dist/src/projection/retained-mission.js +41 -0
- package/dist/src/projection/retained-run.d.ts +7 -0
- package/dist/src/projection/retained-run.js +50 -0
- package/dist/src/run.d.ts +43 -41
- package/dist/src/run.js +34 -412
- package/dist/src/util/canonical.d.ts +1 -5
- package/dist/src/util/canonical.js +1 -53
- package/dist/src/vela/cli.d.ts +7 -51
- package/dist/src/vela/cli.js +102 -523
- package/dist/src/vela/types.d.ts +3 -19
- package/dist/src/verifier/run.js +1 -1
- package/dist/src/workspace/prepare.d.ts +1 -1
- package/dist/src/workspace/prepare.js +15 -15
- package/docs/EVALUATION.md +142 -0
- package/docs/MISSIONS.md +42 -80
- package/docs/RUN_RECORD.md +77 -99
- package/docs/adr/0010-nonmutating-runs-and-explicit-submission.md +191 -0
- package/missions/erdos1056-k15-next/mission.draft.json +10 -8
- package/package.json +18 -22
- package/profiles/{erdos1056-k15-10428801-10429000.json → erdos1056-k15-10429201-10429400.json} +10 -10
- package/schemas/failure.v1.json +17 -0
- package/schemas/mission.v0.json +3 -4
- package/schemas/mission.v1.json +7 -28
- package/schemas/{run.v1.json → run.v2.json} +58 -116
- package/schemas/submission-bundle.v1.json +63 -0
- package/toolchain.lock.json +31 -0
- package/BUILD_WEEK.md +0 -198
- package/advisories/erdos1056-claim-fidelity/output.schema.json +0 -90
- package/advisories/erdos1056-claim-fidelity/registration.json +0 -42
- package/advisories/erdos1056-claim-fidelity/results/assessment.json +0 -1
- package/advisories/erdos1056-claim-fidelity/results/verification.json +0 -1
- package/capsules/formal-erdos-505-test-dim-one/verifier +0 -105
- package/capsules/quantum-10-1-4/verifier.py +0 -152
- package/capsules/sidon-a24/bin/linux-arm64/verifier +0 -0
- package/capsules/sidon-a24/bin/linux-x86_64/verifier +0 -0
- package/dist/src/capability/withdrawal.d.ts +0 -47
- package/dist/src/capability/withdrawal.js +0 -487
- package/dist/src/engines/codex-exec.d.ts +0 -17
- package/dist/src/engines/codex-exec.js +0 -136
- package/dist/src/engines/codex-tool-free.d.ts +0 -26
- package/dist/src/engines/codex-tool-free.js +0 -213
- package/dist/src/product/withdraw.d.ts +0 -8
- package/dist/src/product/withdraw.js +0 -255
- package/dist/src/projection/diagnostic.d.ts +0 -12
- package/dist/src/projection/diagnostic.js +0 -61
- package/dist/src/projection/public-run.d.ts +0 -59
- package/dist/src/projection/public-run.js +0 -106
- package/dist/src/projection/publication.d.ts +0 -36
- package/dist/src/projection/publication.js +0 -47
- package/dist/src/projection/run.d.ts +0 -95
- package/dist/src/projection/run.js +0 -173
- package/dist/src/receipt/map.js +0 -168
- package/dist/src/repair/plan.d.ts +0 -2
- package/dist/src/repair/plan.js +0 -22
- package/dist/src/roles.d.ts +0 -2
- package/dist/src/roles.js +0 -9
- package/docs/RELEASES.md +0 -1389
- package/evidence/build-week/run_eb6bcd46-cffd-4ae8-b630-2681bd84da71.public.json +0 -1
- package/evidence/build-week/run_f68e4cfc-e5c7-4c73-86cb-d79807c47ec4.public.json +0 -1
- package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/pending-commands.json +0 -1
- package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/public-run.json +0 -1
- package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/root-manifest.json +0 -1
- package/evidence/erdos/run_192b3bef-9d6e-49e5-b72d-7ae903b29d5e/web-import.json +0 -1
- package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/pending-commands.json +0 -1
- package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/public-run.json +0 -1
- package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/root-manifest.json +0 -1
- package/evidence/erdos/run_b3b0cf07-b149-4d53-8258-76ba0e1fc0a5/web-import.json +0 -1
- package/missions/formal-erdos-505-test-dim-one-gpt56/mission.draft.json +0 -40
- package/missions/quantum-10-1-4-retry/mission.draft.json +0 -40
- package/missions/sidon-a24-at-least-7194-gpt56/mission.draft.json +0 -42
- package/missions/sidon-a24-at-least-7194-gpt56-v2/mission.draft.json +0 -42
- package/missions/sidon-a24-at-least-7194-gpt56-v3/mission.draft.json +0 -42
- package/profiles/formal-erdos-505-test-dim-one-gpt56.json +0 -35
- package/profiles/quantum-10-1-4-stabilizer-retry.json +0 -35
- package/profiles/sidon-a24-at-least-7194-gpt56-v2.json +0 -35
- package/profiles/sidon-a24-at-least-7194-gpt56-v3.json +0 -35
- package/profiles/sidon-a24-at-least-7194-gpt56.json +0 -35
- package/schemas/canopus.public-run.v1.json +0 -116
- package/scripts/run-claim-fidelity-advisory.mjs +0 -235
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { exactKeys, gitObjectAt, objectAt, sha256At, } from "../contracts/validation.js";
|
|
2
|
+
import { canonicalJcs, canonicalJson, sha256Bytes } from "../util/canonical.js";
|
|
3
|
+
import { parseCurrentRunRecord } from "./current-run.js";
|
|
4
|
+
export function normalizeRetainedRunRoots(value, at) {
|
|
5
|
+
const roots = objectAt(value, at);
|
|
6
|
+
if (roots.vela_repository !== undefined) {
|
|
7
|
+
exactKeys(roots, ["git_commit", "git_tree", "vela_repository"], [], at);
|
|
8
|
+
return {
|
|
9
|
+
git_commit: gitObjectAt(roots.git_commit, `${at}.git_commit`),
|
|
10
|
+
git_tree: gitObjectAt(roots.git_tree, `${at}.git_tree`),
|
|
11
|
+
vela_repository: sha256At(roots.vela_repository, `${at}.vela_repository`),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exactKeys(roots, ["git_commit", "git_tree", "vela_event_log", "vela_snapshot"], [], at);
|
|
15
|
+
// Current writers emit vela_repository. Retained Run v2 bytes from the
|
|
16
|
+
// predecessor era instead bind event-log and snapshot roots. Readers verify
|
|
17
|
+
// those immutable roots and normalize only an in-memory copy.
|
|
18
|
+
sha256At(roots.vela_event_log, `${at}.vela_event_log`);
|
|
19
|
+
return {
|
|
20
|
+
git_commit: gitObjectAt(roots.git_commit, `${at}.git_commit`),
|
|
21
|
+
git_tree: gitObjectAt(roots.git_tree, `${at}.git_tree`),
|
|
22
|
+
vela_repository: sha256At(roots.vela_snapshot, `${at}.vela_snapshot`),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function parseRetainedRunRecord(value) {
|
|
26
|
+
const raw = objectAt(value, "retained Run");
|
|
27
|
+
const mission = objectAt(raw.mission, "retained Run.mission");
|
|
28
|
+
const reproduction = objectAt(raw.reproduction, "retained Run.reproduction");
|
|
29
|
+
const startingRoots = objectAt(mission.starting_roots, "retained Run.mission.starting_roots");
|
|
30
|
+
const reproductionRoots = objectAt(reproduction.roots, "retained Run.reproduction.roots");
|
|
31
|
+
if (canonicalJcs(startingRoots) !== canonicalJcs(reproductionRoots)) {
|
|
32
|
+
throw new Error("retained Run starting and reproduction roots disagree");
|
|
33
|
+
}
|
|
34
|
+
const normalized = {
|
|
35
|
+
...raw,
|
|
36
|
+
mission: {
|
|
37
|
+
...mission,
|
|
38
|
+
starting_roots: normalizeRetainedRunRoots(startingRoots, "retained Run.mission.starting_roots"),
|
|
39
|
+
},
|
|
40
|
+
reproduction: {
|
|
41
|
+
...reproduction,
|
|
42
|
+
roots: normalizeRetainedRunRoots(reproductionRoots, "retained Run.reproduction.roots"),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
record: parseCurrentRunRecord(normalized),
|
|
47
|
+
exactRoot: sha256Bytes(canonicalJson(raw)),
|
|
48
|
+
exactStartingRoots: canonicalJcs(startingRoots),
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/src/run.d.ts
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import type { Mission, MissionRoots
|
|
2
|
-
import type { FrozenArtifact } from "./contracts/candidate.js";
|
|
1
|
+
import type { Mission, MissionRoots } from "./contracts/mission.js";
|
|
3
2
|
import type { Engine } from "./engines/engine.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
7
|
-
import type { LandResult, VelaCommandResponse, VelaInspection } from "./vela/types.js";
|
|
3
|
+
import type { CommandRunner } from "./util/command.js";
|
|
4
|
+
import type { VelaClient } from "./vela/cli.js";
|
|
5
|
+
import type { VelaCommandResponse, VelaInspection } from "./vela/types.js";
|
|
8
6
|
import { type WorkspacePaths } from "./workspace/prepare.js";
|
|
9
7
|
export interface VelaPort {
|
|
10
|
-
assertRoots(repoRoot: string, frontier: string, expected: MissionRoots
|
|
11
|
-
inspect(repoRoot: string, frontier: string, strictBaseline?: StrictBaseline): Promise<VelaInspection>;
|
|
8
|
+
assertRoots(repoRoot: string, frontier: string, expected: MissionRoots): Promise<VelaInspection>;
|
|
12
9
|
next(mission: Mission, repoRoot: string): Promise<VelaCommandResponse>;
|
|
13
|
-
work(mission: Mission, repoRoot: string, target: string, expected: MissionRoots): Promise<VelaCommandResponse>;
|
|
14
|
-
landAuthoredCommand(mission: Mission, repoRoot: string, input: AuthoredReceiptInput, expected: MissionRoots): Promise<VelaLandCommandObservation>;
|
|
15
|
-
parseLandCommand(observation: VelaLandCommandObservation): Record<string, unknown>;
|
|
16
|
-
validateLandResult(mission: Mission, raw: Record<string, unknown>): LandResult;
|
|
17
|
-
verifyReceiptBinding(mission: Mission, repoRoot: string, landing: LandResult, input: AuthoredReceiptInput, artifacts: readonly FrozenArtifact[]): Promise<void>;
|
|
18
10
|
}
|
|
19
11
|
export interface CanopusRunOptions {
|
|
20
12
|
mission: Mission;
|
|
@@ -25,28 +17,40 @@ export interface CanopusRunOptions {
|
|
|
25
17
|
bundleRoot?: string;
|
|
26
18
|
dockerBinary?: string;
|
|
27
19
|
verifierRunner?: CommandRunner;
|
|
28
|
-
retainWithdrawalCapability?: (context: {
|
|
29
|
-
velaHome: string;
|
|
30
|
-
landingRepo: string;
|
|
31
|
-
mission: Mission;
|
|
32
|
-
landing: LandResult;
|
|
33
|
-
finalRoots: MissionRoots;
|
|
34
|
-
}) => Promise<void>;
|
|
35
|
-
noLand?: false;
|
|
36
20
|
}
|
|
37
|
-
export interface
|
|
38
|
-
|
|
21
|
+
export interface VerifierRun {
|
|
22
|
+
status: "passed" | "failed" | "error";
|
|
23
|
+
sandbox: "macos_sandbox" | "container_network_denied";
|
|
24
|
+
record: {
|
|
25
|
+
argv: string[];
|
|
26
|
+
executable_digest: string;
|
|
27
|
+
exit_code: number;
|
|
28
|
+
stdout_digest: string;
|
|
29
|
+
stderr_digest: string;
|
|
30
|
+
duration_ms: number;
|
|
31
|
+
};
|
|
39
32
|
}
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
export interface ReproductionResult {
|
|
34
|
+
matched: boolean;
|
|
35
|
+
roots: MissionRoots;
|
|
36
|
+
verifier_status: "passed" | "failed" | "error";
|
|
37
|
+
stdout_digest: string;
|
|
38
|
+
stderr_digest: string;
|
|
39
|
+
}
|
|
40
|
+
export interface RunBudget {
|
|
41
|
+
research_elapsed_ms: number;
|
|
42
|
+
research_processes: number;
|
|
43
|
+
research_output_bytes: number;
|
|
44
|
+
prompt_bytes: number;
|
|
45
|
+
artifact_bytes: number;
|
|
46
|
+
attempts: number;
|
|
47
|
+
observed_tokens: number;
|
|
44
48
|
}
|
|
45
|
-
export interface
|
|
46
|
-
schema: "canopus.
|
|
49
|
+
export interface CurrentRunRecord {
|
|
50
|
+
schema: "canopus.run.v2";
|
|
47
51
|
run_id: string;
|
|
48
52
|
status: "completed";
|
|
49
|
-
|
|
53
|
+
effect: "none";
|
|
50
54
|
authority: "non_authoritative";
|
|
51
55
|
external_gate_credit: false;
|
|
52
56
|
mission: {
|
|
@@ -67,21 +71,21 @@ export interface DiagnosticRunRecord {
|
|
|
67
71
|
}>;
|
|
68
72
|
caveats: string[];
|
|
69
73
|
};
|
|
70
|
-
verifier:
|
|
71
|
-
|
|
72
|
-
reproduction:
|
|
73
|
-
budget:
|
|
74
|
+
verifier: VerifierRun;
|
|
75
|
+
submission: null;
|
|
76
|
+
reproduction: ReproductionResult;
|
|
77
|
+
budget: RunBudget;
|
|
74
78
|
}
|
|
75
|
-
export interface
|
|
76
|
-
record:
|
|
79
|
+
export interface CanopusCurrentRunResult {
|
|
80
|
+
record: CurrentRunRecord;
|
|
77
81
|
projection: {
|
|
78
|
-
schema: "canopus.
|
|
82
|
+
schema: "canopus.run-projection.v2";
|
|
79
83
|
authority: "read_only_projection";
|
|
80
84
|
run_id: string;
|
|
81
85
|
target: string;
|
|
82
86
|
candidate_digest: string;
|
|
83
87
|
verifier_status: "passed" | "failed" | "error";
|
|
84
|
-
|
|
88
|
+
submitted: false;
|
|
85
89
|
clean_clone_reproduced: boolean;
|
|
86
90
|
};
|
|
87
91
|
paths: WorkspacePaths;
|
|
@@ -90,6 +94,4 @@ export declare function validateTargetOffer(target: string, response: VelaComman
|
|
|
90
94
|
index: number;
|
|
91
95
|
id: string;
|
|
92
96
|
};
|
|
93
|
-
export declare function
|
|
94
|
-
export declare function runCanopus(options: CanopusNoLandOptions): Promise<CanopusDiagnosticRunResult>;
|
|
95
|
-
export declare function runCanopus(options: CanopusRunOptions): Promise<CanopusRunResult>;
|
|
97
|
+
export declare function runCanopus(options: CanopusRunOptions): Promise<CanopusCurrentRunResult>;
|