@gate-forge/cli 0.13.10 → 0.14.0

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/dist/adopted-baseline.d.ts +2 -0
  3. package/dist/adopted-baseline.d.ts.map +1 -1
  4. package/dist/adopted-baseline.js +1 -0
  5. package/dist/adopted-baseline.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +3 -0
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/adapters.d.ts.map +1 -1
  10. package/dist/commands/adapters.js +17 -12
  11. package/dist/commands/adapters.js.map +1 -1
  12. package/dist/commands/adopt.d.ts.map +1 -1
  13. package/dist/commands/adopt.js +162 -12
  14. package/dist/commands/adopt.js.map +1 -1
  15. package/dist/commands/baseline.d.ts.map +1 -1
  16. package/dist/commands/baseline.js +23 -5
  17. package/dist/commands/baseline.js.map +1 -1
  18. package/dist/commands/check.d.ts.map +1 -1
  19. package/dist/commands/check.js +48 -69
  20. package/dist/commands/check.js.map +1 -1
  21. package/dist/commands/config.d.ts +3 -0
  22. package/dist/commands/config.d.ts.map +1 -0
  23. package/dist/commands/config.js +106 -0
  24. package/dist/commands/config.js.map +1 -0
  25. package/dist/commands/init-presets.d.ts +11 -0
  26. package/dist/commands/init-presets.d.ts.map +1 -1
  27. package/dist/commands/init-presets.js +6 -0
  28. package/dist/commands/init-presets.js.map +1 -1
  29. package/dist/commands/init.d.ts.map +1 -1
  30. package/dist/commands/init.js +13 -1
  31. package/dist/commands/init.js.map +1 -1
  32. package/dist/commands/next.d.ts.map +1 -1
  33. package/dist/commands/next.js +33 -4
  34. package/dist/commands/next.js.map +1 -1
  35. package/dist/commands/test-gates.d.ts +7 -0
  36. package/dist/commands/test-gates.d.ts.map +1 -1
  37. package/dist/commands/test-gates.js +38 -2
  38. package/dist/commands/test-gates.js.map +1 -1
  39. package/dist/endpoint-compiler.d.ts.map +1 -1
  40. package/dist/endpoint-compiler.js +73 -6
  41. package/dist/endpoint-compiler.js.map +1 -1
  42. package/dist/evaluate.d.ts +31 -1
  43. package/dist/evaluate.d.ts.map +1 -1
  44. package/dist/evaluate.js +62 -4
  45. package/dist/evaluate.js.map +1 -1
  46. package/dist/evidence-authority.d.ts +68 -0
  47. package/dist/evidence-authority.d.ts.map +1 -0
  48. package/dist/evidence-authority.js +114 -0
  49. package/dist/evidence-authority.js.map +1 -0
  50. package/dist/pipeline.d.ts.map +1 -1
  51. package/dist/pipeline.js +1 -0
  52. package/dist/pipeline.js.map +1 -1
  53. package/dist/run-evidence.d.ts +1 -1
  54. package/dist/run-evidence.d.ts.map +1 -1
  55. package/dist/run-evidence.js +7 -3
  56. package/dist/run-evidence.js.map +1 -1
  57. package/dist/state.d.ts +19 -1
  58. package/dist/state.d.ts.map +1 -1
  59. package/dist/state.js +39 -1
  60. package/dist/state.js.map +1 -1
  61. package/guides/QUICKSTART.md +7 -7
  62. package/guides/REFERENCE.md +256 -0
  63. package/package.json +11 -11
@@ -701,6 +701,11 @@ async function legacyTestGates(io, options) {
701
701
  engineLine: reportEngineLine(),
702
702
  lifecycleDerivation: pipeline.lifecycleDerivation,
703
703
  diagnosticContext,
704
+ ...(evaluated.httpCallAdvisories.length === 0
705
+ ? {}
706
+ : { advisories: [...evaluated.httpCallAdvisories] }),
707
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
708
+ httpCoverage: evaluated.httpCoverage.summary,
704
709
  });
705
710
  writeLine(io.stdout, report);
706
711
  writeReport(stateDir, renderRun(evaluated.verdicts, {
@@ -713,6 +718,11 @@ async function legacyTestGates(io, options) {
713
718
  engineLine: reportEngineLine(),
714
719
  lifecycleDerivation: pipeline.lifecycleDerivation,
715
720
  diagnosticContext,
721
+ ...(evaluated.httpCallAdvisories.length === 0
722
+ ? {}
723
+ : { advisories: [...evaluated.httpCallAdvisories] }),
724
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
725
+ httpCoverage: evaluated.httpCoverage.summary,
716
726
  }));
717
727
  const gateCode = runExitCode({ verdicts: evaluated.verdicts, blocking: evaluated.blocking });
718
728
  return suiteFailed && gateCode === 0 ? 1 : gateCode;
@@ -778,6 +788,7 @@ function runOptionsJson(options) {
778
788
  inventory: [...options.twinShapes.inventory],
779
789
  },
780
790
  }),
791
+ ...(options.responseShape === undefined ? {} : { responseShape: { ...options.responseShape } }),
781
792
  };
782
793
  }
783
794
  /**
@@ -2796,6 +2807,11 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
2796
2807
  },
2797
2808
  }),
2798
2809
  },
2810
+ ...(evaluated.httpCallAdvisories.length === 0
2811
+ ? {}
2812
+ : { advisories: [...evaluated.httpCallAdvisories] }),
2813
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
2814
+ httpCoverage: evaluated.httpCoverage.summary,
2799
2815
  });
2800
2816
  writeLine(io.stdout, report);
2801
2817
  const gateCode = runExitCode({ verdicts: evaluated.verdicts, blocking: evaluated.blocking });
@@ -3197,6 +3213,11 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
3197
3213
  },
3198
3214
  }),
3199
3215
  },
3216
+ ...(evaluated.httpCallAdvisories.length === 0
3217
+ ? {}
3218
+ : { advisories: [...evaluated.httpCallAdvisories] }),
3219
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
3220
+ httpCoverage: evaluated.httpCoverage.summary,
3200
3221
  });
3201
3222
  writeLine(io.stdout, report);
3202
3223
  writeLine(io.stderr, 'test-gates: --scope changed produced no runnable slice — nothing was executed and no receipt was sealed');
@@ -3366,6 +3387,9 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
3366
3387
  },
3367
3388
  }
3368
3389
  : {}),
3390
+ ...(config.http.responseShape === 'off'
3391
+ ? {}
3392
+ : { responseShape: { openapiPath: config.http.openapiPath } }),
3369
3393
  };
3370
3394
  let appliedOptions = null;
3371
3395
  if (effectiveWitnessUrl !== undefined &&
@@ -3392,6 +3416,10 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
3392
3416
  writeLine(io.stderr, 'test-gates: twin path coverage needs a witness that accepts run options — this witness does not; ' +
3393
3417
  'pairs were not compared');
3394
3418
  }
3419
+ if (config.http.responseShape !== 'off' && appliedOptions?.responseShape == null) {
3420
+ writeLine(io.stderr, 'test-gates: http response-shape checks need a witness that accepts run options — this witness does not; ' +
3421
+ 'no exchange body was checked');
3422
+ }
3395
3423
  // A witness that perturbs timing on its OWN (its environment, never
3396
3424
  // this run's binding) can never serve a run that seals.
3397
3425
  if (chaosRun === null &&
@@ -5043,7 +5071,9 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
5043
5071
  // Twin path coverage (E64): reported, never blocking, in advisory
5044
5072
  // mode. An empty list adds no report key, so a run without twin
5045
5073
  // findings keeps exactly the document it always had.
5046
- ...(runAdvisories.length === 0 ? {} : { advisories: runAdvisories }),
5074
+ ...([...evaluated.httpCallAdvisories, ...runAdvisories].length === 0
5075
+ ? {}
5076
+ : { advisories: [...evaluated.httpCallAdvisories, ...runAdvisories] }),
5047
5077
  waiverCounts: evaluated.waiverCounts,
5048
5078
  run: manifest,
5049
5079
  toolVersion: VERSION,
@@ -5062,6 +5092,8 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
5062
5092
  ? {}
5063
5093
  : { chaos: { ...chaosRun, ...(chaosSchedule === null ? {} : { schedule: chaosSchedule }) } }),
5064
5094
  ...(localFailures.length === 0 ? {} : { failedTests: localFailures }),
5095
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
5096
+ httpCoverage: evaluated.httpCoverage.summary,
5065
5097
  });
5066
5098
  /**
5067
5099
  * The persisted json document: the same report shape stdout shows for a
@@ -5073,7 +5105,9 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
5073
5105
  ...JSON.parse(renderRun(evaluated.verdicts, {
5074
5106
  format: 'json',
5075
5107
  blocking: evaluated.blocking,
5076
- ...(runAdvisories.length === 0 ? {} : { advisories: runAdvisories }),
5108
+ ...([...evaluated.httpCallAdvisories, ...runAdvisories].length === 0
5109
+ ? {}
5110
+ : { advisories: [...evaluated.httpCallAdvisories, ...runAdvisories] }),
5077
5111
  waiverCounts: evaluated.waiverCounts,
5078
5112
  run: manifest,
5079
5113
  toolVersion: VERSION,
@@ -5087,6 +5121,8 @@ async function runSupervisedTestGatesInner(io, options, declaredRunnerEnvNames)
5087
5121
  ...(chaosRun === null
5088
5122
  ? {}
5089
5123
  : { chaos: { ...chaosRun, ...(chaosSchedule === null ? {} : { schedule: chaosSchedule }) } }),
5124
+ ...(evaluated.httpLedger === undefined ? {} : { httpLedger: evaluated.httpLedger }),
5125
+ httpCoverage: evaluated.httpCoverage.summary,
5090
5126
  })),
5091
5127
  ...(gateMode === 'strict'
5092
5128
  ? {}