mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 06:04:03 +00:00
feat(evidence): report comparison constraints, remaining issue counts and observed workflows as fields (#11078)
* feat(evidence): report comparison-source constraints, remaining issue counts and observed workflows as fields * fix(evidence): locate snapshot bundle schema issues within the snapshot document * test(evidence): check each comparison-input mismatch and terminal omission once (#11087)
This commit is contained in:
1 parent
de7d4dec83
commit
7dd24dc08c
17 files changed
+222
-91
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
} from "../../domain/evidenceErrors.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
import { describeValidationFailure } from "../../domain/validationFailure.js";
|
||||
import { validationIssueOptions } from "../../domain/evidenceValidation.js";
|
||||
import { isUnsupportedEvidenceFormat } from "../../domain/evidenceFormat.js";
|
||||
import type { AnalysisResourceConstraintError } from "../../domain/analysisErrorCore.js";
|
||||
import {
|
||||
@@ -87,7 +88,10 @@ export const readAnalysisSnapshot = async (
|
||||
if (signal?.aborted === true)
|
||||
return err(cancelledBy(READ_OPERATION, signal));
|
||||
return err(
|
||||
new EvidenceIntegrityError(snapshotValidationMessage(cause), { cause }),
|
||||
new EvidenceIntegrityError(snapshotValidationMessage(cause), {
|
||||
cause,
|
||||
...validationIssueOptions(cause, []),
|
||||
}),
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -156,7 +160,10 @@ export const writeAnalysisSnapshot = async (
|
||||
encoded = serializeAnalysisSnapshot(snapshot);
|
||||
} catch (cause: unknown) {
|
||||
return err(
|
||||
new EvidenceIntegrityError(snapshotValidationMessage(cause), { cause }),
|
||||
new EvidenceIntegrityError(snapshotValidationMessage(cause), {
|
||||
cause,
|
||||
...validationIssueOptions(cause, []),
|
||||
}),
|
||||
);
|
||||
}
|
||||
return writeTextFile(encoded, path, overwrite, resources);
|
||||
|
||||
Reference in new issue
Block a user