@probelabs/visor 0.1.85 → 0.1.87

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.
@@ -773,7 +773,8 @@ ${prContext}
773
773
  <rule>For INCREMENTAL analysis, ONLY review changes in commit_diff section</rule>
774
774
  <rule>For FULL analysis, review all changes in full_diff section</rule>
775
775
  <rule>Reference specific XML elements like files_summary, metadata when providing context</rule>
776
- <rule>SEVERITY ASSIGNMENT: All severity levels (critical, error, warning, info) should be based on the NEW code being introduced, not on what it fixes. When code INTRODUCES new problems (bugs, vulnerabilities, performance issues, breaking changes), assign appropriate severity (critical/error/warning). When code FIXES or IMPROVES existing issues, use lower severity (info/warning) to acknowledge the improvement. This applies to all issue types: security, performance, style, logic, documentation. The schema provides detailed severity level definitions.</rule>
776
+ <rule>STRICT OUTPUT POLICY: Report only actual problems, risks, or deficiencies. Do not write praise, congratulations, or celebratory text. Do not create issues that merely restate improvements or say "no action needed".</rule>
777
+ <rule>SEVERITY ASSIGNMENT: Assign severity ONLY to problems introduced or left unresolved by this change (critical/error/warning/info as appropriate). Do NOT create issue entries solely to acknowledge improvements; if no problems exist, return zero issues.</rule>
777
778
  </rules>
778
779
  </review_request>`;
779
780
  }
@@ -1549,7 +1550,7 @@ var PRReviewer = class {
1549
1550
  async reviewPR(owner, repo, prNumber, prInfo, options = {}) {
1550
1551
  const { debug = false, config, checks } = options;
1551
1552
  if (config && checks && checks.length > 0) {
1552
- const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-X7VCV6KI.mjs");
1553
+ const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-2YUDSTZS.mjs");
1553
1554
  const engine = new CheckExecutionEngine2();
1554
1555
  const { results } = await engine.executeGroupedChecks(
1555
1556
  prInfo,
@@ -5215,26 +5216,36 @@ var FailureConditionEvaluator = class _FailureConditionEvaluator {
5215
5216
  // eslint-disable-line @typescript-eslint/no-unused-vars
5216
5217
  ...otherFields
5217
5218
  } = reviewSummaryWithOutput;
5219
+ const aggregatedOutput = {
5220
+ issues: (issues || []).map((issue) => ({
5221
+ file: issue.file,
5222
+ line: issue.line,
5223
+ endLine: issue.endLine,
5224
+ ruleId: issue.ruleId,
5225
+ message: issue.message,
5226
+ severity: issue.severity,
5227
+ category: issue.category,
5228
+ group: issue.group,
5229
+ schema: issue.schema,
5230
+ suggestion: issue.suggestion,
5231
+ replacement: issue.replacement
5232
+ })),
5233
+ // Include additional schema-specific data from reviewSummary
5234
+ ...otherFields
5235
+ };
5236
+ if (Array.isArray(extractedOutput)) {
5237
+ aggregatedOutput.items = extractedOutput;
5238
+ const anyError = extractedOutput.find(
5239
+ (it) => it && typeof it === "object" && it.error
5240
+ );
5241
+ if (anyError && anyError.error !== void 0) {
5242
+ aggregatedOutput.error = anyError.error;
5243
+ }
5244
+ } else if (extractedOutput && typeof extractedOutput === "object") {
5245
+ Object.assign(aggregatedOutput, extractedOutput);
5246
+ }
5218
5247
  const context = {
5219
- output: {
5220
- issues: (issues || []).map((issue) => ({
5221
- file: issue.file,
5222
- line: issue.line,
5223
- endLine: issue.endLine,
5224
- ruleId: issue.ruleId,
5225
- message: issue.message,
5226
- severity: issue.severity,
5227
- category: issue.category,
5228
- group: issue.group,
5229
- schema: issue.schema,
5230
- suggestion: issue.suggestion,
5231
- replacement: issue.replacement
5232
- })),
5233
- // Include additional schema-specific data from reviewSummary
5234
- ...otherFields,
5235
- // Spread the extracted output directly (avoid output.output nesting)
5236
- ...extractedOutput && typeof extractedOutput === "object" ? extractedOutput : {}
5237
- },
5248
+ output: aggregatedOutput,
5238
5249
  outputs: (() => {
5239
5250
  if (!previousOutputs) return {};
5240
5251
  const outputs = {};
@@ -7081,6 +7092,9 @@ ${expr}
7081
7092
  // Pass event context for templates
7082
7093
  transform: checkConfig.transform,
7083
7094
  transform_js: checkConfig.transform_js,
7095
+ // Important: pass through provider-level timeout from check config
7096
+ // (e.g., command/http_client providers expect seconds/ms here)
7097
+ timeout: checkConfig.timeout,
7084
7098
  level: extendedCheckConfig.level,
7085
7099
  message: extendedCheckConfig.message,
7086
7100
  env: checkConfig.env,
@@ -7115,10 +7129,19 @@ ${expr}
7115
7129
  const id = issue.ruleId || "";
7116
7130
  return id.endsWith("/__skipped");
7117
7131
  });
7118
- const hasFatalFailure = (depRes.issues || []).some((issue) => {
7132
+ let hasFatalFailure = (depRes.issues || []).some((issue) => {
7119
7133
  const id = issue.ruleId || "";
7120
- return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error") || id.endsWith("/forEach/iteration_error");
7134
+ return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/timeout" || id.endsWith("/command/timeout") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error") || id.endsWith("/forEach/iteration_error") || id === "forEach/undefined_output" || id.endsWith("/forEach/undefined_output") || id.endsWith("_fail_if") || id.endsWith("/global_fail_if");
7121
7135
  });
7136
+ if (!hasFatalFailure && config && (config.fail_if || config.checks[depId]?.fail_if)) {
7137
+ const failIfResults = await this.evaluateFailureConditions(depId, depRes, config);
7138
+ hasFatalFailure = failIfResults.some((r) => r.failed);
7139
+ }
7140
+ if (debug) {
7141
+ log2(
7142
+ `\u{1F527} Debug: gating check '${checkName}' against dep '${depId}': wasSkipped=${wasSkipped} hasFatalFailure=${hasFatalFailure}`
7143
+ );
7144
+ }
7122
7145
  if (wasSkipped || hasFatalFailure) failedDeps.push(depId);
7123
7146
  }
7124
7147
  if (failedDeps.length > 0) {
@@ -7280,7 +7303,7 @@ ${expr}
7280
7303
  );
7281
7304
  const hadFatalError = (itemResult.issues || []).some((issue) => {
7282
7305
  const id = issue.ruleId || "";
7283
- return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error");
7306
+ return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error") || id === "forEach/undefined_output" || id.endsWith("/forEach/undefined_output");
7284
7307
  });
7285
7308
  const iterationDuration = (Date.now() - iterationStart) / 1e3;
7286
7309
  this.recordIterationComplete(
@@ -7350,6 +7373,24 @@ ${expr}
7350
7373
  issues: allIssues,
7351
7374
  ...finalOutput !== void 0 ? { output: finalOutput } : {}
7352
7375
  };
7376
+ if (config && (config.fail_if || checkConfig.fail_if)) {
7377
+ const failureResults = await this.evaluateFailureConditions(
7378
+ checkName,
7379
+ finalResult,
7380
+ config
7381
+ );
7382
+ if (failureResults.length > 0) {
7383
+ const failureIssues = failureResults.filter((f) => f.failed).map((f) => ({
7384
+ file: "system",
7385
+ line: 0,
7386
+ ruleId: f.conditionName,
7387
+ message: f.message || `Failure condition met: ${f.expression}`,
7388
+ severity: f.severity || "error",
7389
+ category: "logic"
7390
+ }));
7391
+ finalResult.issues = [...finalResult.issues || [], ...failureIssues];
7392
+ }
7393
+ }
7353
7394
  if (allOutputs.length > 0) {
7354
7395
  finalResult.isForEach = true;
7355
7396
  finalResult.forEachItems = allOutputs;
@@ -7396,9 +7437,27 @@ ${expr}
7396
7437
  debug,
7397
7438
  results
7398
7439
  );
7440
+ if (config && (config.fail_if || checkConfig.fail_if)) {
7441
+ const failureResults = await this.evaluateFailureConditions(
7442
+ checkName,
7443
+ finalResult,
7444
+ config
7445
+ );
7446
+ if (failureResults.length > 0) {
7447
+ const failureIssues = failureResults.filter((f) => f.failed).map((f) => ({
7448
+ file: "system",
7449
+ line: 0,
7450
+ ruleId: f.conditionName,
7451
+ message: f.message || `Failure condition met: ${f.expression}`,
7452
+ severity: f.severity || "error",
7453
+ category: "logic"
7454
+ }));
7455
+ finalResult.issues = [...finalResult.issues || [], ...failureIssues];
7456
+ }
7457
+ }
7399
7458
  const hadFatalError = (finalResult.issues || []).some((issue) => {
7400
7459
  const id = issue.ruleId || "";
7401
- return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error");
7460
+ return id === "command/execution_error" || id.endsWith("/command/execution_error") || id === "command/timeout" || id.endsWith("/command/timeout") || id === "command/transform_js_error" || id.endsWith("/command/transform_js_error") || id === "command/transform_error" || id.endsWith("/command/transform_error") || id === "forEach/undefined_output" || id.endsWith("/forEach/undefined_output");
7402
7461
  });
7403
7462
  this.recordIterationComplete(
7404
7463
  checkName,
@@ -8769,4 +8828,4 @@ export {
8769
8828
  logger,
8770
8829
  CheckExecutionEngine
8771
8830
  };
8772
- //# sourceMappingURL=chunk-Q55L5EPS.mjs.map
8831
+ //# sourceMappingURL=chunk-VQGP55ZL.mjs.map