mirror of
https://github.com/morluto/rea.git
synced 2026-11-10 00:36:35 +00:00
refactor(application): use current Evidence and CLI contracts
Require the immutable Evidence read APIs already implemented by production owners. Remove the detached-only compatibility fallbacks and forwarding helpers, and bind consumers directly to their owner. Preserve editable detached exports and existing snapshot semantics. Use the shared canonical CLI error classifier for process commands instead of reinterpreting their projection. Validation: 172 focused application and process tests, build, static checks and documentation checks passed using local fixtures.
This commit is contained in:
1 parent
3f168af2e8
commit
faf219e90b
13 files changed
+64
-149
No files matched your search
@@ -3,7 +3,6 @@ import { Cli, z } from "incur";
|
||||
import {
|
||||
captureProcessScenarioFile,
|
||||
compareProcessEvidenceFiles,
|
||||
isProcessCliFailure,
|
||||
} from "../application/process/ProcessCli.js";
|
||||
import { logCliCommand } from "../cliLogging.js";
|
||||
import type { Logger } from "pino";
|
||||
@@ -21,11 +20,8 @@ export const registerProcessCommands = (
|
||||
args: z.object({ scenario: z.string().describe("Scenario JSON path") }),
|
||||
run: ({ args }) =>
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(
|
||||
logger,
|
||||
"capture-process",
|
||||
() => captureProcessScenarioFile(args.scenario, environment, signal),
|
||||
isProcessCliFailure,
|
||||
logCliCommand(logger, "capture-process", () =>
|
||||
captureProcessScenarioFile(args.scenario, environment, signal),
|
||||
),
|
||||
),
|
||||
});
|
||||
@@ -41,17 +37,13 @@ export const registerProcessCommands = (
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(
|
||||
logger,
|
||||
"compare-process-captures",
|
||||
() =>
|
||||
compareProcessEvidenceFiles(
|
||||
args.left,
|
||||
args.right,
|
||||
args.traceSpec,
|
||||
signal,
|
||||
),
|
||||
isProcessCliFailure,
|
||||
logCliCommand(logger, "compare-process-captures", () =>
|
||||
compareProcessEvidenceFiles(
|
||||
args.left,
|
||||
args.right,
|
||||
args.traceSpec,
|
||||
signal,
|
||||
),
|
||||
),
|
||||
),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user