@fro.bot/systematic 3.13.7 → 3.14.1

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/dist/cli.js CHANGED
@@ -1991,7 +1991,8 @@ var REVIEW_ARTIFACT_CUSTOM_MESSAGES = [
1991
1991
  "filtered findings require a validation reason",
1992
1992
  "risk-critical dispatches require a non-empty selection surface",
1993
1993
  "satisfied risk coverage requires a citing input finding ID",
1994
- "unsatisfied risk coverage must not cite an input finding ID"
1994
+ "unsatisfied risk coverage must not cite an input finding ID",
1995
+ "passed validation must not include a reason; non-passed validation requires a reason"
1995
1996
  ];
1996
1997
  var boundedText = (maxLength) => exports_external.string().min(1).max(maxLength).regex(/\S/);
1997
1998
  var DispatchOutcomeSchema = exports_external.enum([
@@ -2142,6 +2143,30 @@ var DeclinedMergeSchema = exports_external.object({
2142
2143
  input_finding_ids: exports_external.array(boundedText(MAX_INPUT_ID_LENGTH)).min(2).max(MAX_FINDINGS),
2143
2144
  reason: ReasonSchema
2144
2145
  }).strict();
2146
+ var ValidationSchema = exports_external.object({
2147
+ status: exports_external.enum([
2148
+ "passed",
2149
+ "failed",
2150
+ "unavailable",
2151
+ "not_attempted"
2152
+ ]),
2153
+ reason: ReasonSchema.optional()
2154
+ }).strict().superRefine((validation, ctx) => {
2155
+ if (validation.status === "passed" && validation.reason !== undefined) {
2156
+ ctx.addIssue({
2157
+ code: "custom",
2158
+ path: ["reason"],
2159
+ message: REVIEW_ARTIFACT_CUSTOM_MESSAGES[5]
2160
+ });
2161
+ }
2162
+ if (validation.status !== "passed" && validation.reason === undefined) {
2163
+ ctx.addIssue({
2164
+ code: "custom",
2165
+ path: ["reason"],
2166
+ message: REVIEW_ARTIFACT_CUSTOM_MESSAGES[5]
2167
+ });
2168
+ }
2169
+ });
2145
2170
  var RiskCoverageSchema = exports_external.object({
2146
2171
  persona: RiskCriticalPersonaSchema,
2147
2172
  satisfied: exports_external.boolean(),
@@ -2186,7 +2211,8 @@ var ReviewArtifactSchema = exports_external.object({
2186
2211
  applied_fixes: exports_external.array(ReasonSchema).max(MAX_FINDINGS),
2187
2212
  residual_actionable_work: exports_external.array(ReasonSchema).max(MAX_FINDINGS),
2188
2213
  advisory_outputs: exports_external.array(ReasonSchema).max(MAX_FINDINGS),
2189
- coverage: CoverageSchema
2214
+ coverage: CoverageSchema,
2215
+ validation: ValidationSchema.optional()
2190
2216
  }).strict();
2191
2217
 
2192
2218
  // src/lib/setup.ts