@allocator-one/rcl 4.5.2 → 4.5.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/README.md +19 -0
- package/dist/converge/delivery-reconciliation.js +25 -12
- package/dist/converge/delivery-reconciliation.js.map +1 -1
- package/dist/converge/historical-delivery-reconciliation-schema.d.ts +131 -0
- package/dist/converge/historical-delivery-reconciliation-schema.js +111 -0
- package/dist/converge/historical-delivery-reconciliation-schema.js.map +1 -0
- package/dist/converge/historical-delivery-reconciliation.d.ts +15 -0
- package/dist/converge/historical-delivery-reconciliation.js +326 -0
- package/dist/converge/historical-delivery-reconciliation.js.map +1 -0
- package/dist/converge/launch-guard.js +37 -23
- package/dist/converge/launch-guard.js.map +1 -1
- package/dist/converge/launch-record.d.ts +49 -6
- package/dist/converge/launch-record.js +30 -4
- package/dist/converge/launch-record.js.map +1 -1
- package/dist/converge/legacy-launch-health.d.ts +12 -1
- package/dist/converge/run-state.d.ts +4 -0
- package/dist/converge/run-state.js +6 -0
- package/dist/converge/run-state.js.map +1 -1
- package/dist/converge/stale-report-schema.d.ts +45 -1
- package/dist/converge/stale-report-schema.js +34 -8
- package/dist/converge/stale-report-schema.js.map +1 -1
- package/dist/converge/stale-report.d.ts +376 -0
- package/dist/converge/stale-report.js +71 -18
- package/dist/converge/stale-report.js.map +1 -1
- package/dist/converge/stale-retry-reason.d.ts +3 -0
- package/dist/converge/stale-retry-reason.js +17 -0
- package/dist/converge/stale-retry-reason.js.map +1 -0
- package/dist/converge/terminal-rejection.d.ts +1 -0
- package/dist/converge/terminal-rejection.js +6 -6
- package/dist/converge/terminal-rejection.js.map +1 -1
- package/dist/evidence/types.d.ts +1 -0
- package/dist/evidence/types.js +2 -0
- package/dist/evidence/types.js.map +1 -1
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -437,11 +437,30 @@ commands are documented in
|
|
|
437
437
|
| --- | --- |
|
|
438
438
|
| `rcl converge-report` | Dedupe a round report against earlier rounds, enforce the round cap, classify findings (`new` / `repeat` / `suppressed` / `regating`); refuses inconclusive reviewer health |
|
|
439
439
|
| `rcl converge-verdict` | Record fixed/dismissed verdicts and report the round's resolution |
|
|
440
|
+
| `rcl converge-reconcile-history` | Authenticate and append a reconciliation receipt for an exact historical guarded launch after `lastLaunch` advanced |
|
|
440
441
|
| `rcl converge-stale` | Audited disposition of a healthy or reconciled delivered-hard-failure report that became stale before admission |
|
|
441
442
|
| `rcl converge-gap` | Audited record of one evidenced missing terminal report |
|
|
442
443
|
| `rcl converge-rejected` | Audited disposition of a report rejected locally before delivery |
|
|
443
444
|
| `rcl converge-attempt` | Legacy attempt accounting; guarded launches claim their own attempts |
|
|
444
445
|
|
|
446
|
+
Delivered hard-failure continuation requires RCL 4.5.3 or later. Re-run
|
|
447
|
+
`rcl telemetry flush --run <run-id>` to authenticate or upgrade the durable
|
|
448
|
+
reconciliation marker before previewing `converge-stale`. The strong marker is
|
|
449
|
+
bound to the exact run, report, head, input digest, attempt, round, claim PID,
|
|
450
|
+
cycle, reconciliation time and live repository/pull-request authority. New
|
|
451
|
+
stale dispositions are version 3; published 4.5.2 version 2 receipts remain
|
|
452
|
+
verifiable and can be
|
|
453
|
+
followed by a changed-input version 3 disposition only after that exact marker
|
|
454
|
+
upgrade.
|
|
455
|
+
|
|
456
|
+
If a published version 1 marker belongs to a retained version 2 stale receipt
|
|
457
|
+
but a later launch has already replaced `lastLaunch`, use
|
|
458
|
+
`converge-reconcile-history`. Preview prints one reviewed manifest to stdout and
|
|
459
|
+
its SHA-256 to stderr. Apply accepts only those pinned bytes, re-reads every
|
|
460
|
+
local source and the complete live server projection under the target lock,
|
|
461
|
+
and appends a historical audit receipt. It never admits findings, claims an
|
|
462
|
+
attempt or calls a reviewer.
|
|
463
|
+
|
|
445
464
|
---
|
|
446
465
|
|
|
447
466
|
## Configuration
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveGitCommonDir } from './attempt-budget.js';
|
|
2
2
|
import { loadConvergeRunState, writeState } from './run-state.js';
|
|
3
|
+
import { strongDeliveryReconciliationSchema } from './launch-record.js';
|
|
3
4
|
import { withNativeTarget } from './target-ownership.js';
|
|
4
5
|
import { getRun } from '../evidence/reads.js';
|
|
5
|
-
import { deliveryReconciliationSchema } from './launch-record.js';
|
|
6
6
|
export function shouldReconcileDeliveredRun(runId, summary) {
|
|
7
7
|
return runId !== undefined && summary.remaining.length === 0 && summary.failed.length === 0 && summary.dropped.length === 0;
|
|
8
8
|
}
|
|
@@ -23,25 +23,38 @@ export async function reconcileDeliveredRun(runId, sink, options = {}) {
|
|
|
23
23
|
return withNativeTarget(common, target, async (ownership) => {
|
|
24
24
|
const state = await loadConvergeRunState(common, target), launch = state?.lastLaunch;
|
|
25
25
|
const round = detail.converge?.round, attempt = detail.converge?.attempt, headSha = detail.target.head_sha;
|
|
26
|
+
const marker = launch?.deliveryReconciliation;
|
|
27
|
+
const markerlessLegacy = launch?.deliveryPending === false && launch.hardFailure === true &&
|
|
28
|
+
launch.exitCode === 4 && launch.deliveryReconciliation === undefined;
|
|
29
|
+
const weakMarker = marker?.version === 1 && launch?.hardFailure === true && launch.deliveryPending === false &&
|
|
30
|
+
launch.exitCode === 4 && marker.runId === launch.runId && marker.reportJsonSha256 === launch.reportJsonSha256 &&
|
|
31
|
+
marker.headSha === launch.headSha && marker.attempt === launch.attempt && marker.round === launch.round;
|
|
32
|
+
const needsStrongMarker = launch?.hardFailure === true &&
|
|
33
|
+
(launch.deliveryPending === true || markerlessLegacy || weakMarker);
|
|
26
34
|
const reports = detail.artifacts?.filter(artifact => artifact.kind === 'report_json') ?? [];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
const reconciledAt = new Date().toISOString();
|
|
36
|
+
const strongMarker = needsStrongMarker ? strongDeliveryReconciliationSchema.safeParse({ version: 2,
|
|
37
|
+
runId: launch.runId, reportJsonSha256: launch.reportJsonSha256, headSha: launch.headSha,
|
|
38
|
+
inputSha256: launch.inputSha256, attempt: launch.attempt, round: launch.round,
|
|
39
|
+
claimPid: launch.pid, cycleId: state?.cycle?.id ?? null, reconciledAt }) : undefined;
|
|
40
|
+
if (!state || !launch || launch.status !== 'completed' ||
|
|
41
|
+
(!launch.deliveryPending && !markerlessLegacy && !weakMarker) ||
|
|
42
|
+
(launch.deliveryReconciliation !== undefined && !weakMarker) || launch.deliveryFailure === 'local-invalid' ||
|
|
31
43
|
typeof launch.runId !== 'string' || typeof launch.reportJsonSha256 !== 'string' ||
|
|
32
44
|
!Number.isSafeInteger(launch.round) || !Number.isSafeInteger(launch.attempt) || typeof launch.headSha !== 'string' ||
|
|
33
45
|
!Number.isSafeInteger(round) || !Number.isSafeInteger(attempt) || typeof headSha !== 'string' ||
|
|
34
46
|
launch.runId.toLowerCase() !== runId.toLowerCase() ||
|
|
35
47
|
round !== launch.round || attempt !== launch.attempt || headSha !== launch.headSha ||
|
|
36
48
|
reports.length !== 1 || reports[0].stored !== true ||
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
reports[0].declared_sha256 !== launch.reportJsonSha256 ||
|
|
50
|
+
(strongMarker && (!strongMarker.success || detail.provenance !== 'live' ||
|
|
51
|
+
(detail.cycle_id ?? null) !== (state.cycle?.id ?? null) ||
|
|
52
|
+
(state.cycle !== undefined && (detail.target.repo?.toLowerCase() !== state.cycle.repo.toLowerCase() ||
|
|
53
|
+
detail.target.pr_number !== state.cycle.prNumber)))))
|
|
39
54
|
return 'unchanged';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
state.lastLaunch = { ...launch, deliveryPending: false, deliveryReconciliation };
|
|
44
|
-
state.updatedAt = new Date().toISOString();
|
|
55
|
+
state.lastLaunch = { ...launch, deliveryPending: false,
|
|
56
|
+
...(strongMarker?.success ? { deliveryReconciliation: strongMarker.data } : {}) };
|
|
57
|
+
state.updatedAt = reconciledAt;
|
|
45
58
|
await writeState(common, state, ownership);
|
|
46
59
|
return 'reconciled';
|
|
47
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-reconciliation.js","sourceRoot":"","sources":["../../src/converge/delivery-reconciliation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"delivery-reconciliation.js","sourceRoot":"","sources":["../../src/converge/delivery-reconciliation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAM9C,MAAM,UAAU,2BAA2B,CAAC,KAAyB,EAAE,OAAmC;IACxG,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;AAC9H,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAAa,EAAE,IAAiB,EAAE,UAA2E,EAAE;IACzJ,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3D,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,MAA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C,QAAQ,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,WAAW,CAAC;QAC/E,KAAK,CAAC,UAAU,GAAG,EAAE,GAAG,MAAM,EAAE,eAAe,EAAE,KAAK;YACpD,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACpF,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;QAC/B,MAAM,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC3C,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAAyB,EACzB,OAAmC,EACnC,IAAiB,EACjB,UAA+G,EAAE;IAEjH,IAAI,CAAC,2BAA2B,CAAC,KAAK,EAAE,OAAO,CAAC;QAAE,OAAO,WAAW,CAAC;IACrE,MAAM,EAAE,SAAS,GAAG,qBAAqB,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACpF,IAAI,CAAC;QACH,OAAO,MAAM,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QACjB,OAAO,WAAW,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const historicalServerProjectionSchema: z.ZodObject<{
|
|
3
|
+
origin: z.ZodString;
|
|
4
|
+
runId: z.ZodString;
|
|
5
|
+
provenance: z.ZodLiteral<"live">;
|
|
6
|
+
receivedAt: z.ZodString;
|
|
7
|
+
cycleId: z.ZodString;
|
|
8
|
+
repoVerified: z.ZodLiteral<true>;
|
|
9
|
+
isCrossRepository: z.ZodLiteral<false>;
|
|
10
|
+
headVerified: z.ZodString;
|
|
11
|
+
target: z.ZodObject<{
|
|
12
|
+
kind: z.ZodEnum<{
|
|
13
|
+
patch: "patch";
|
|
14
|
+
pr: "pr";
|
|
15
|
+
}>;
|
|
16
|
+
repo: z.ZodString;
|
|
17
|
+
prNumber: z.ZodNumber;
|
|
18
|
+
headSha: z.ZodString;
|
|
19
|
+
baseSha: z.ZodString;
|
|
20
|
+
diffSha256: z.ZodString;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
converge: z.ZodObject<{
|
|
23
|
+
target: z.ZodString;
|
|
24
|
+
attempt: z.ZodNumber;
|
|
25
|
+
round: z.ZodNumber;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
report: z.ZodObject<{
|
|
28
|
+
declaredSha256: z.ZodString;
|
|
29
|
+
declaredBytes: z.ZodNumber;
|
|
30
|
+
stored: z.ZodLiteral<true>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const historicalDeliveryReconciliationManifestSchema: z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"rcl-historical-delivery-reconciliation">;
|
|
35
|
+
version: z.ZodLiteral<1>;
|
|
36
|
+
operationId: z.ZodString;
|
|
37
|
+
createdAt: z.ZodString;
|
|
38
|
+
gitCommonDir: z.ZodString;
|
|
39
|
+
target: z.ZodString;
|
|
40
|
+
runId: z.ZodString;
|
|
41
|
+
nativeStateSha256: z.ZodString;
|
|
42
|
+
attemptStateSha256: z.ZodString;
|
|
43
|
+
sourceStaleManifestSha256s: z.ZodArray<z.ZodString>;
|
|
44
|
+
successor: z.ZodObject<{
|
|
45
|
+
runId: z.ZodString;
|
|
46
|
+
attempt: z.ZodNumber;
|
|
47
|
+
round: z.ZodNumber;
|
|
48
|
+
headSha: z.ZodString;
|
|
49
|
+
inputSha256: z.ZodString;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
reconciliation: z.ZodObject<{
|
|
52
|
+
version: z.ZodLiteral<2>;
|
|
53
|
+
runId: z.ZodString;
|
|
54
|
+
reportJsonSha256: z.ZodString;
|
|
55
|
+
headSha: z.ZodString;
|
|
56
|
+
inputSha256: z.ZodString;
|
|
57
|
+
attempt: z.ZodNumber;
|
|
58
|
+
round: z.ZodNumber;
|
|
59
|
+
claimPid: z.ZodNumber;
|
|
60
|
+
cycleId: z.ZodNullable<z.ZodString>;
|
|
61
|
+
reconciledAt: z.ZodString;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
baseSha: z.ZodString;
|
|
64
|
+
diffSha256: z.ZodString;
|
|
65
|
+
reviewerHealth: z.ZodObject<{
|
|
66
|
+
version: z.ZodLiteral<1>;
|
|
67
|
+
policy: z.ZodObject<{
|
|
68
|
+
version: z.ZodLiteral<1>;
|
|
69
|
+
fraction: z.ZodNumber;
|
|
70
|
+
seatCount: z.ZodNumber;
|
|
71
|
+
minimumSuccessful: z.ZodNumber;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
successfulSeats: z.ZodNumber;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
server: z.ZodObject<{
|
|
76
|
+
origin: z.ZodString;
|
|
77
|
+
runId: z.ZodString;
|
|
78
|
+
provenance: z.ZodLiteral<"live">;
|
|
79
|
+
receivedAt: z.ZodString;
|
|
80
|
+
cycleId: z.ZodString;
|
|
81
|
+
repoVerified: z.ZodLiteral<true>;
|
|
82
|
+
isCrossRepository: z.ZodLiteral<false>;
|
|
83
|
+
headVerified: z.ZodString;
|
|
84
|
+
target: z.ZodObject<{
|
|
85
|
+
kind: z.ZodEnum<{
|
|
86
|
+
patch: "patch";
|
|
87
|
+
pr: "pr";
|
|
88
|
+
}>;
|
|
89
|
+
repo: z.ZodString;
|
|
90
|
+
prNumber: z.ZodNumber;
|
|
91
|
+
headSha: z.ZodString;
|
|
92
|
+
baseSha: z.ZodString;
|
|
93
|
+
diffSha256: z.ZodString;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
converge: z.ZodObject<{
|
|
96
|
+
target: z.ZodString;
|
|
97
|
+
attempt: z.ZodNumber;
|
|
98
|
+
round: z.ZodNumber;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
report: z.ZodObject<{
|
|
101
|
+
declaredSha256: z.ZodString;
|
|
102
|
+
declaredBytes: z.ZodNumber;
|
|
103
|
+
stored: z.ZodLiteral<true>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
serverProjectionSha256: z.ZodString;
|
|
107
|
+
}, z.core.$strict>;
|
|
108
|
+
export type HistoricalDeliveryReconciliationManifest = z.infer<typeof historicalDeliveryReconciliationManifestSchema>;
|
|
109
|
+
export declare const historicalDeliveryReconciliationReceiptSchema: z.ZodObject<{
|
|
110
|
+
kind: z.ZodLiteral<"rcl-historical-delivery-reconciliation-receipt">;
|
|
111
|
+
version: z.ZodLiteral<1>;
|
|
112
|
+
operationId: z.ZodString;
|
|
113
|
+
runId: z.ZodString;
|
|
114
|
+
manifestSha256: z.ZodString;
|
|
115
|
+
beforeStateSha256: z.ZodString;
|
|
116
|
+
afterStateSha256: z.ZodString;
|
|
117
|
+
attemptStateSha256: z.ZodString;
|
|
118
|
+
sourceStaleManifestSha256s: z.ZodArray<z.ZodString>;
|
|
119
|
+
serverProjectionSha256: z.ZodString;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
export type HistoricalDeliveryReconciliationReceipt = z.infer<typeof historicalDeliveryReconciliationReceiptSchema>;
|
|
122
|
+
export interface HistoricalDeliveryReconciliationEntry {
|
|
123
|
+
manifestJson: string;
|
|
124
|
+
manifestSha256: string;
|
|
125
|
+
}
|
|
126
|
+
export declare function historicalDeliveryManifest(entry: HistoricalDeliveryReconciliationEntry): HistoricalDeliveryReconciliationManifest;
|
|
127
|
+
export declare function validateHistoricalDeliveryReconciliationAudit(value: {
|
|
128
|
+
target?: string;
|
|
129
|
+
historicalDeliveryReconciliationAudit?: HistoricalDeliveryReconciliationEntry[];
|
|
130
|
+
historicalDeliveryReconciliationAuditCount?: number;
|
|
131
|
+
}): void;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { reviewerHealthSchema, strongDeliveryReconciliationSchema } from './launch-record.js';
|
|
4
|
+
import { decodeRecoveryDocument } from '../evidence/original-run/decode.js';
|
|
5
|
+
import { serializeRecoveryDocument } from '../evidence/original-run/journal.js';
|
|
6
|
+
import { sha256 } from '../telemetry/recovery/files.js';
|
|
7
|
+
const digest = z.string().regex(/^[a-f0-9]{64}$/);
|
|
8
|
+
const commit = z.string().regex(/^[a-f0-9]{40}$/);
|
|
9
|
+
const uuid = z.string().uuid();
|
|
10
|
+
export const historicalServerProjectionSchema = z.object({
|
|
11
|
+
origin: z.string().url(),
|
|
12
|
+
runId: uuid,
|
|
13
|
+
provenance: z.literal('live'),
|
|
14
|
+
receivedAt: z.string().datetime({ offset: true }),
|
|
15
|
+
cycleId: uuid,
|
|
16
|
+
repoVerified: z.literal(true),
|
|
17
|
+
isCrossRepository: z.literal(false),
|
|
18
|
+
headVerified: z.string().min(1),
|
|
19
|
+
target: z.object({
|
|
20
|
+
kind: z.enum(['pr', 'patch']),
|
|
21
|
+
repo: z.string().min(1),
|
|
22
|
+
prNumber: z.number().int().positive().safe(),
|
|
23
|
+
headSha: commit,
|
|
24
|
+
baseSha: commit,
|
|
25
|
+
diffSha256: digest,
|
|
26
|
+
}).strict(),
|
|
27
|
+
converge: z.object({
|
|
28
|
+
target: z.string().min(1),
|
|
29
|
+
attempt: z.number().int().positive().safe(),
|
|
30
|
+
round: z.number().int().positive().safe(),
|
|
31
|
+
}).strict(),
|
|
32
|
+
report: z.object({
|
|
33
|
+
declaredSha256: digest,
|
|
34
|
+
declaredBytes: z.number().int().nonnegative().safe(),
|
|
35
|
+
stored: z.literal(true),
|
|
36
|
+
}).strict(),
|
|
37
|
+
}).strict();
|
|
38
|
+
export const historicalDeliveryReconciliationManifestSchema = z.object({
|
|
39
|
+
kind: z.literal('rcl-historical-delivery-reconciliation'),
|
|
40
|
+
version: z.literal(1),
|
|
41
|
+
operationId: uuid,
|
|
42
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
43
|
+
gitCommonDir: z.string().min(1),
|
|
44
|
+
target: z.string().min(1),
|
|
45
|
+
runId: uuid,
|
|
46
|
+
nativeStateSha256: digest,
|
|
47
|
+
attemptStateSha256: digest,
|
|
48
|
+
sourceStaleManifestSha256s: z.array(digest).min(1).max(100).refine(values => new Set(values).size === values.length && isDeepStrictEqual(values, [...values].sort()), 'Historical stale manifest digests must be unique and sorted'),
|
|
49
|
+
successor: z.object({
|
|
50
|
+
runId: uuid,
|
|
51
|
+
attempt: z.number().int().positive().safe(),
|
|
52
|
+
round: z.number().int().positive().safe(),
|
|
53
|
+
headSha: commit,
|
|
54
|
+
inputSha256: digest,
|
|
55
|
+
}).strict(),
|
|
56
|
+
reconciliation: strongDeliveryReconciliationSchema,
|
|
57
|
+
baseSha: commit,
|
|
58
|
+
diffSha256: digest,
|
|
59
|
+
reviewerHealth: reviewerHealthSchema,
|
|
60
|
+
server: historicalServerProjectionSchema,
|
|
61
|
+
serverProjectionSha256: digest,
|
|
62
|
+
}).strict();
|
|
63
|
+
export const historicalDeliveryReconciliationReceiptSchema = z.object({
|
|
64
|
+
kind: z.literal('rcl-historical-delivery-reconciliation-receipt'),
|
|
65
|
+
version: z.literal(1),
|
|
66
|
+
operationId: uuid,
|
|
67
|
+
runId: uuid,
|
|
68
|
+
manifestSha256: digest,
|
|
69
|
+
beforeStateSha256: digest,
|
|
70
|
+
afterStateSha256: digest,
|
|
71
|
+
attemptStateSha256: digest,
|
|
72
|
+
sourceStaleManifestSha256s: z.array(digest).min(1).max(100),
|
|
73
|
+
serverProjectionSha256: digest,
|
|
74
|
+
}).strict();
|
|
75
|
+
const historicalDeliveryReconciliationEntrySchema = z.object({
|
|
76
|
+
manifestJson: z.string().max(128 * 1024), manifestSha256: digest,
|
|
77
|
+
}).strict();
|
|
78
|
+
export function historicalDeliveryManifest(entry) {
|
|
79
|
+
const parsedEntry = historicalDeliveryReconciliationEntrySchema.parse(entry);
|
|
80
|
+
if (sha256(parsedEntry.manifestJson) !== parsedEntry.manifestSha256)
|
|
81
|
+
throw new Error('historical_delivery_reconciliation_manifest_digest_mismatch');
|
|
82
|
+
const manifest = historicalDeliveryReconciliationManifestSchema.parse(decodeRecoveryDocument(parsedEntry.manifestJson));
|
|
83
|
+
if (parsedEntry.manifestJson !== serializeRecoveryDocument(manifest)) {
|
|
84
|
+
throw new Error('historical_delivery_reconciliation_manifest_noncanonical');
|
|
85
|
+
}
|
|
86
|
+
return manifest;
|
|
87
|
+
}
|
|
88
|
+
export function validateHistoricalDeliveryReconciliationAudit(value) {
|
|
89
|
+
const audit = value.historicalDeliveryReconciliationAudit;
|
|
90
|
+
if (audit === undefined) {
|
|
91
|
+
if (value.historicalDeliveryReconciliationAuditCount !== undefined) {
|
|
92
|
+
throw new Error('historical_delivery_reconciliation_audit_count_mismatch');
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (!Array.isArray(audit) || audit.length === 0 || audit.length > 10_000 ||
|
|
97
|
+
value.historicalDeliveryReconciliationAuditCount !== audit.length) {
|
|
98
|
+
throw new Error('historical_delivery_reconciliation_audit_count_mismatch');
|
|
99
|
+
}
|
|
100
|
+
const operations = new Set();
|
|
101
|
+
const runs = new Set();
|
|
102
|
+
for (const entry of audit) {
|
|
103
|
+
const manifest = historicalDeliveryManifest(entry);
|
|
104
|
+
if (manifest.target !== value.target || operations.has(manifest.operationId) || runs.has(manifest.runId)) {
|
|
105
|
+
throw new Error('historical_delivery_reconciliation_audit_duplicate');
|
|
106
|
+
}
|
|
107
|
+
operations.add(manifest.operationId);
|
|
108
|
+
runs.add(manifest.runId);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=historical-delivery-reconciliation-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"historical-delivery-reconciliation-schema.js","sourceRoot":"","sources":["../../src/converge/historical-delivery-reconciliation-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAClD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAClD,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AAE/B,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACxB,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjD,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC7B,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACnC,YAAY,EAAE,CAAC,CAAC,MAA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K,GAAG,KAAK,CAAC,qCAAqC,CAAC;IAC1D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,IAAI,KAAK,CAAC,0CAA0C,KAAK,SAAS,EAAE,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO;IACT,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM;QACtE,KAAK,CAAC,0CAA0C,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,QAAQ,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACzG,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type HistoricalDeliveryReconciliationManifest } from './historical-delivery-reconciliation-schema.js';
|
|
2
|
+
import { type ConvergeRunState } from './run-state.js';
|
|
3
|
+
import { getRun } from '../evidence/reads.js';
|
|
4
|
+
import type { HarnessSink } from '../telemetry/sink.js';
|
|
5
|
+
interface HistoricalReconciliationOptions {
|
|
6
|
+
getRun?: typeof getRun;
|
|
7
|
+
now?: () => Date;
|
|
8
|
+
}
|
|
9
|
+
/** Print-only qualification; callers may write the returned reviewed manifest separately. */
|
|
10
|
+
export declare function previewHistoricalDeliveryReconciliation(input: unknown, gitCommonDir: string, sink: HarnessSink, options?: HistoricalReconciliationOptions): Promise<HistoricalDeliveryReconciliationManifest>;
|
|
11
|
+
/** Reverify every authority source under the target lock, then append one local receipt atomically. */
|
|
12
|
+
export declare function applyHistoricalDeliveryReconciliation(input: unknown, gitCommonDir: string, sink: HarnessSink, options?: HistoricalReconciliationOptions): Promise<'applied' | 'unchanged'>;
|
|
13
|
+
/** Local fail-closed verification used before claims and report admission. */
|
|
14
|
+
export declare function verifyHistoricalDeliveryReconciliations(common: string, state: ConvergeRunState): Promise<void>;
|
|
15
|
+
export {};
|