From 19bb2317d1bd6773e5fa3f61e32cbf3d6d257830 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Mon, 13 Jul 2026 18:26:36 +0800 Subject: [PATCH] fix(ci): remove redundant process exports --- src/application/ProcessHarness.ts | 1 - src/domain/processCapture.ts | 1 - src/domain/processCaptureValidation.ts | 4 ++-- src/domain/processScenario.ts | 6 ++---- tests/setupSkill.test.ts | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/application/ProcessHarness.ts b/src/application/ProcessHarness.ts index 986867a537..67f540e803 100644 --- a/src/application/ProcessHarness.ts +++ b/src/application/ProcessHarness.ts @@ -35,7 +35,6 @@ import { import { assertNotCancelled } from "./ProcessCaptureAuthority.js"; export { probeProcessCaptureCapability } from "./ProcessCaptureCapability.js"; -export type { ProcessCaptureCapability } from "./ProcessCaptureCapability.js"; interface EnvironmentOptions { readonly scenario: ProcessScenario; diff --git a/src/domain/processCapture.ts b/src/domain/processCapture.ts index 03d451408f..945fcd8793 100644 --- a/src/domain/processCapture.ts +++ b/src/domain/processCapture.ts @@ -325,7 +325,6 @@ export const processCaptureSchema: z.ZodType = z.object({ }); export { validateProcessCapture } from "./processCaptureValidation.js"; -export type { ProcessCaptureValidationIssue } from "./processCaptureValidation.js"; import { validateProcessCapture } from "./processCaptureValidation.js"; /** Parse unknown input as v4 and reject invalid commitments or semantics. */ diff --git a/src/domain/processCaptureValidation.ts b/src/domain/processCaptureValidation.ts index 5716177462..8c7b62d4e9 100644 --- a/src/domain/processCaptureValidation.ts +++ b/src/domain/processCaptureValidation.ts @@ -1,5 +1,5 @@ import type { ProcessCapture } from "./processCapture.js"; -import { canonicalProcessSha256 } from "./processScenario.js"; +import { digestProcessCommitment } from "./processScenario.js"; /** One pure semantic validation failure in an otherwise shaped v4 capture. */ export interface ProcessCaptureValidationIssue { @@ -35,7 +35,7 @@ const validateCommitments = ( ["replay_plan_sha256", manifest.replay_plan], ] as const) require(manifest[field] === - canonicalProcessSha256( + digestProcessCommitment( value, ), `manifest.${field}`, "commitment does not match its canonical value"); require(Date.parse(manifest.started_at) <= diff --git a/src/domain/processScenario.ts b/src/domain/processScenario.ts index 5d7d5cea16..a3ec96704a 100644 --- a/src/domain/processScenario.ts +++ b/src/domain/processScenario.ts @@ -42,7 +42,8 @@ const outputChunkSchema = z.object({ export const LEGACY_PROCESS_CAPTURE_MESSAGE = "Process Capture v3 is unsupported. Re-run the scenario with this REA version using capture_process_scenario to produce Process Capture v4; captures cannot be upgraded because v4 requires new manifest and settlement evidence."; -export const canonicalProcessSha256 = (value: unknown): string => { +/** Compute a canonical SHA-256 commitment independent of object key order. */ +export const digestProcessCommitment = (value: unknown): string => { const serialized = canonicalize(value); if (serialized === undefined) throw new TypeError("Process capture commitment is not canonical JSON"); @@ -86,9 +87,6 @@ export const processComparisonContract = ( replay: scenario.replay, }); -/** Compute a canonical SHA-256 commitment independent of object key order. */ -export const digestProcessCommitment = canonicalProcessSha256; - /** * Boundary schema for one explicitly approved, bounded process experiment. * Defaults are part of the evidence contract and must remain deterministic. diff --git a/tests/setupSkill.test.ts b/tests/setupSkill.test.ts index 97c981272f..537a8e5bf9 100644 --- a/tests/setupSkill.test.ts +++ b/tests/setupSkill.test.ts @@ -27,7 +27,7 @@ describe("canonical skill transaction", () => { expect(await readFile(`${destination}.rea.backup`, "utf8")).toBe( "stale managed skill\n", ); - expect(await readFile(destination, "utf8")).toContain('version: "10"'); + expect(await readFile(destination, "utf8")).toContain('version: "11"'); expect(await readFile(destination, "utf8")).toContain( `tool_count: ${String(TOOL_CONTRACTS.length)}`, );