Repository navigation
Expand file tree
/
Copy pathresearchLibraryTrialTypes.ts
More file actions
129 lines (127 loc) · 3.72 KB
/
Copy pathresearchLibraryTrialTypes.ts
File metadata and controls
129 lines (127 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import type {
ResearchConfigurationSelection,
ResearchLibraryPack,
ResearchMathDeclaration,
ResearchReleaseRef,
} from './researchAssetTypes';
import type { ResearchFeedbackTarget } from './researchProjectTypes';
import type { WebPrecheckDiagnostic } from './shared';
import type { ResearchModulePlan } from '../../src/solver/modules/policy';
export type ResearchLibraryTrialTargetRef = {
runId: string;
projectId?: string;
taskId: string;
taskVersion: string;
commit: string;
sourceDigest: string;
environmentDigest: string;
file: string;
};
export type ResearchLibraryTrialTarget = {
ref: ResearchLibraryTrialTargetRef;
runTitle: string;
projectTitle?: string;
taskTitle: string;
declaration: string;
type: string;
environment: 'standard' | 'mathlib';
premises: string[];
compatible: boolean;
incompatibility?: string;
};
export type ResearchLibraryTrialReceipt = {
schema: 'theorem-os.research-library-trial-check.v1';
trialId: string;
draftDigest: string;
release: ResearchReleaseRef;
target: ResearchLibraryTrialTargetRef;
declaration: ResearchMathDeclaration;
checkedDeclaration: string;
environment: 'standard' | 'mathlib';
sourceDigest: string;
libraryPackDigest: string;
dependencies: { file: string; digest: string }[];
passed: boolean;
exitCode: number | null;
timedOut: boolean;
diagnostics: WebPrecheckDiagnostic[];
remainingOriginalSorries: number;
scope: 'isolated-task-trial';
acceptance: 'not-assessed';
checkedAt: string;
reason?: string;
};
export type ResearchLibraryTrial = {
id: string;
digest: string;
release: ResearchReleaseRef;
target: ResearchLibraryTrialTarget;
declaration: ResearchMathDeclaration;
proof: string;
argumentNotes: string;
missingPremises: string;
source: string;
sourceDigest: string;
imports: string[];
libraryPackDigest: string;
createdAt: string;
status: 'prepared' | 'checking' | 'passed' | 'failed';
check?: { receiptId: string; receipt: ResearchLibraryTrialReceipt };
};
/** Shared only after the trial owner confirms disclosure to the named project. */
export type ResearchLibraryCandidateAttachment = {
schema: 'theorem-os.research-library-candidate.v1';
trial: ResearchLibraryTrial;
projectId: string;
imports: string[];
libraryPack: ResearchLibraryPack;
dependencySources: { file: string; source: string }[];
candidateTarget: { name: string; expectedType?: string };
requiresNewAttempt: boolean;
};
export type ResearchLibraryProposalTarget = {
projectId: string;
title: string;
target: ResearchFeedbackTarget;
requiresNewAttempt: boolean;
};
export type ResearchLibraryAttemptPreparation = {
projectId: string;
feedbackId: string;
source: string;
task: string;
environment: 'standard' | 'mathlib';
selection: ResearchConfigurationSelection;
refs: ResearchReleaseRef[];
configurationDigest: string;
libraryPackDigest: string;
modulePlan?: ResearchModulePlan;
target: ResearchLibraryTrialTargetRef;
trialDigest: string;
};
export type ResearchLibraryPersonalAttemptPreparation = Omit<
ResearchLibraryAttemptPreparation,
'projectId' | 'feedbackId'
> & { trialId: string; originRunId: string };
export type ResearchLibraryTrialHistoryItem = Pick<
ResearchLibraryTrial,
'id' | 'digest' | 'release' | 'createdAt' | 'status'
> & {
target: ResearchLibraryTrialTargetRef;
runTitle: string;
taskTitle: string;
declaration: string;
current: boolean;
reason?: string;
receiptId?: string;
checkedAt?: string;
};
export type ResearchLibraryTrialHistory = {
trial: ResearchLibraryTrial;
current: boolean;
reason?: string;
personalAttempt: boolean;
personalAttemptReason?: string;
libraryPack: ResearchLibraryPack;
dependencySources: { file: string; source: string }[];
};