crysk 0.3.1 → 0.3.2

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 (65) hide show
  1. package/README.md +9 -5
  2. package/dist/SKILL-6j27707y.md +140 -0
  3. package/dist/SKILL-816621e5.md +74 -0
  4. package/dist/SKILL-bnh7nrjz.md +74 -0
  5. package/dist/SKILL-fv8x6hhx.md +140 -0
  6. package/dist/SKILL-nv32jpc5.md +74 -0
  7. package/dist/SKILL-qnfc8yp3.md +539 -0
  8. package/dist/SKILL-xr56f0b6.md +140 -0
  9. package/dist/SKILL-yz6wk92g.md +542 -0
  10. package/dist/ci-admission-09k2ba89.md +126 -0
  11. package/dist/ci-admission-f19qh39t.md +128 -0
  12. package/dist/ci-admission-tcqsj7b2.md +126 -0
  13. package/dist/cli.js +1831 -1150
  14. package/dist/index.js +1464 -911
  15. package/dist/materiality-f1qwnvg1.md +27 -0
  16. package/package.json +3 -2
  17. package/prompts/materiality.md +27 -0
  18. package/skills/crysk/SKILL.md +2 -2
  19. package/skills/crysk-ci-setup/SKILL.md +13 -7
  20. package/skills/crysk-ci-setup/references/ci-admission.md +4 -0
  21. package/skills/crysk-loop/SKILL.md +32 -5
  22. package/src/asset-manifest.ts +2 -0
  23. package/src/assets.ts +4 -1
  24. package/src/brand.ts +11 -9
  25. package/src/ci/cli-record.ts +1 -1
  26. package/src/ci/gates.ts +31 -0
  27. package/src/ci/outcome.ts +2 -1
  28. package/src/ci/override.ts +11 -10
  29. package/src/ci/publish.ts +44 -103
  30. package/src/ci/reporter.ts +34 -5
  31. package/src/ci/review-levels.ts +21 -0
  32. package/src/ci/setup.ts +1 -2
  33. package/src/commands/post.ts +17 -0
  34. package/src/compare/loop.ts +356 -0
  35. package/src/compare/materiality.ts +266 -0
  36. package/src/compare/noise.ts +166 -0
  37. package/src/diversity/projection.ts +3 -0
  38. package/src/index.ts +1 -1
  39. package/src/model/routing.ts +62 -0
  40. package/src/pr/admission.ts +13 -1
  41. package/src/pr/discovery.ts +17 -5
  42. package/src/pr/inline.ts +15 -1
  43. package/src/pr/plan.ts +5 -0
  44. package/src/pr/post-floor.ts +30 -0
  45. package/src/pr/posting.ts +4 -0
  46. package/src/pr/pr-status.ts +14 -0
  47. package/src/pr/pr.ts +50 -34
  48. package/src/pr/preflight.ts +2 -2
  49. package/src/pr/publish-outcome.ts +4 -0
  50. package/src/pr/review-pr.ts +65 -26
  51. package/src/pr/teardown.ts +1 -1
  52. package/src/rereview/prepare.ts +16 -0
  53. package/src/rereview/state.ts +206 -25
  54. package/src/review/boundary.ts +4 -1
  55. package/src/review/dedupe.ts +48 -4
  56. package/src/review/findings.ts +47 -1
  57. package/src/review/materiality-gate.ts +134 -0
  58. package/src/review/pipeline.ts +521 -41
  59. package/src/review/preflight.ts +69 -0
  60. package/src/review/report.ts +73 -10
  61. package/src/review/review.ts +16 -0
  62. package/src/review/route-preflight.ts +29 -1
  63. package/src/review/run.ts +2 -0
  64. package/src/ui/config.ts +8 -0
  65. package/src/updater.ts +1 -1
package/src/ci/publish.ts CHANGED
@@ -56,7 +56,6 @@ import {
56
56
  MARKER_OPEN,
57
57
  matchMarkerPrefix,
58
58
  STATUS_CONTEXT,
59
- statusContextForms,
60
59
  } from "../brand";
61
60
  import type {
62
61
  CliRecord,
@@ -616,43 +615,17 @@ function workflowCommand(
616
615
  return `::${command} title=crysk::${escaped}\n`;
617
616
  }
618
617
 
619
- // The status write, on BOTH names of its context: the new one, then the legacy `pr-hero` one
620
- // (statusContextForms). Users have `pr-hero` as a required check in branch protection, and a
621
- // head that stops getting it blocks every PR, so the publisher keeps writing it for one version.
622
- // A failed write never skips the other: the required check may be either name. The first
623
- // failure is the one reported, so the renderer sees the same answer a single write gave.
618
+ // The status write: one POST on `status.context`, the crysk name, retried once unless
619
+ // `attempts` is 1. Since #457 the legacy `pr-hero` context is never written, only read
620
+ // (isStatusContext), so a branch protection that still requires `pr-hero` must switch to
621
+ // `crysk`. Returns the failure's HTTP status when gh printed one, so the renderer can pick
622
+ // the permission or the server wording.
624
623
  function postStatus(
625
624
  deps: PublishDeps,
626
625
  repository: string,
627
626
  headSha: string,
628
627
  status: StatusPost,
629
628
  attempts = 2,
630
- ): { ok: true } | { ok: false; httpStatus: number | undefined } {
631
- let failure: { ok: false; httpStatus: number | undefined } | undefined;
632
- for (const context of statusContextForms(status.context)) {
633
- const posted = postStatusOn(
634
- deps,
635
- repository,
636
- headSha,
637
- status,
638
- context,
639
- attempts,
640
- );
641
- if (!posted.ok) failure ??= posted;
642
- }
643
- return failure ?? { ok: true };
644
- }
645
-
646
- // One write on one context, retried once unless `attempts` is 1. Returns the failure's HTTP
647
- // status when gh printed one, so the renderer can pick the permission or the server
648
- // wording.
649
- function postStatusOn(
650
- deps: PublishDeps,
651
- repository: string,
652
- headSha: string,
653
- status: StatusPost,
654
- context: string,
655
- attempts: number,
656
629
  ): { ok: true } | { ok: false; httpStatus: number | undefined } {
657
630
  const args = [
658
631
  "api",
@@ -660,7 +633,7 @@ function postStatusOn(
660
633
  "-f",
661
634
  `state=${status.state}`,
662
635
  "-f",
663
- `context=${context}`,
636
+ `context=${status.context}`,
664
637
  "-f",
665
638
  `description=${status.description}`,
666
639
  "-f",
@@ -1112,13 +1085,15 @@ function parseStatusRow(line: string): HeadStatusRow | undefined {
1112
1085
  // The head's newest pr-hero status, as the three states the table needs. The newest row is
1113
1086
  // picked by its time, not by its place in the answer. A failed read, no pr-hero row, or a
1114
1087
  // state the table does not name is unknown, which the table answers with the status.
1115
- // Copies the verdict of a half-landed pair onto the name that missed it (strandedStatusPair).
1116
- // The stuck name may be the repository's required check, and the readers below take the
1117
- // newest row across both names, so nothing else would ever settle it. Only the stuck name
1118
- // is written: the verdict, which may be a human's override, is never replaced. A failed
1119
- // copy is a warning, and the run goes on as it would have. Returns the verdict whenever
1120
- // the pair is stranded, copied or not: it, not the stuck pending row, is the gate's state,
1121
- // and the readers' newest-row pick could still choose the stuck row on a same-second tie.
1088
+ // Copies the verdict of a stranded pair onto crysk when crysk is the name that missed it
1089
+ // (strandedStatusPair): a crysk pending behind a later pr-hero verdict an older action or a
1090
+ // run before #457 wrote. crysk is the required check, and the readers below take the newest
1091
+ // row across both names, so nothing else would ever settle it. Only crysk is written: the
1092
+ // verdict, which may be a human's override, is never replaced, and a stuck legacy `pr-hero`
1093
+ // row is left as it is, because the legacy name is never written since #457. A failed copy is
1094
+ // a warning, and the run goes on as it would have. Returns the verdict whenever the pair is
1095
+ // stranded, copied or not: it, not the stuck pending row, is the gate's state, and the
1096
+ // readers' newest-row pick could still choose the stuck row on a same-second tie.
1122
1097
  function repairStrandedPair(
1123
1098
  deps: PublishDeps,
1124
1099
  repo: string,
@@ -1127,6 +1102,7 @@ function repairStrandedPair(
1127
1102
  ): HeadStatusRow | undefined {
1128
1103
  const pair = strandedStatusPair(statuses, STATUS_CONTEXT);
1129
1104
  if (pair === undefined) return undefined;
1105
+ if (pair.stranded.context !== STATUS_CONTEXT) return pair.verdict;
1130
1106
  const state = pair.verdict.state;
1131
1107
  const description = pair.verdict.description;
1132
1108
  // A verdict this step cannot reproduce faithfully is not copied: a blank description
@@ -1138,19 +1114,12 @@ function repairStrandedPair(
1138
1114
  ) {
1139
1115
  return pair.verdict;
1140
1116
  }
1141
- const posted = postStatusOn(
1142
- deps,
1143
- repo,
1144
- sha,
1145
- {
1146
- state,
1147
- context: STATUS_CONTEXT,
1148
- description,
1149
- targetUrl: pair.verdict.targetUrl ?? actionsRunUrl(deps.env) ?? "",
1150
- },
1151
- pair.stranded.context,
1152
- 2,
1153
- );
1117
+ const posted = postStatus(deps, repo, sha, {
1118
+ state,
1119
+ context: STATUS_CONTEXT,
1120
+ description,
1121
+ targetUrl: pair.verdict.targetUrl ?? actionsRunUrl(deps.env) ?? "",
1122
+ });
1154
1123
  deps.stdout(
1155
1124
  posted.ok
1156
1125
  ? workflowCommand(
@@ -1237,30 +1206,19 @@ function overrideDescription(actor: string): string {
1237
1206
  // an override the status never received would be a false record.
1238
1207
  function overrideCommentBody(
1239
1208
  plan: Extract<Publication, { kind: "override" }>,
1240
- landed: readonly string[],
1209
+ landed: boolean,
1241
1210
  at: Date,
1242
1211
  ): string {
1243
1212
  const when = `${at.toISOString().slice(0, 16).replace("T", " ")} UTC`;
1244
1213
  const marker = `${MARKER_OPEN}override head=${plan.headSha ?? "unknown"} run=${plan.runId} attempt=${plan.runAttempt} -->`;
1245
- if (landed.length > 0 && plan.headSha !== undefined) {
1246
- // Name exactly the contexts that were written: a branch protection that requires the
1247
- // other one is still blocked, and this comment is never cleaned up (#435 F001).
1248
- const names = landed.map((context) => `\`${context}\``).join(" and ");
1249
- const missed = statusContextForms(STATUS_CONTEXT).filter(
1250
- (context) => !landed.includes(context),
1251
- );
1252
- const missedNote =
1253
- missed.length === 0
1254
- ? ""
1255
- : ` The ${missed.map((context) => `\`${context}\``).join(" and ")} status could not be written, so a rule that requires it is still blocked: comment ${commandHint(OVERRIDE_COMMAND)} again to retry.`;
1214
+ if (landed && plan.headSha !== undefined) {
1215
+ // Names the one context written: since #457 an override posts `crysk` alone, and this
1216
+ // comment is never cleaned up, so it must not claim a legacy `pr-hero` status.
1256
1217
  return [
1257
1218
  marker,
1258
1219
  "",
1259
- (landed.includes(STATUS_CONTEXT)
1260
- ? `Crysk's gate was overridden by @${plan.actor} on head \`${plan.headSha}\` at ${when}. `
1261
- : `@${plan.actor}'s override of Crysk's gate on head \`${plan.headSha}\` at ${when} landed only in part. `) +
1262
- `The ${names} status${landed.length > 1 ? "es" : ""} on that head ${landed.length > 1 ? "are" : "is"} now success, with no review of this head.` +
1263
- missedNote +
1220
+ `Crysk's gate was overridden by @${plan.actor} on head \`${plan.headSha}\` at ${when}. ` +
1221
+ `The \`${STATUS_CONTEXT}\` status on that head is now success, with no review of this head.` +
1264
1222
  ` A new push or a later ${commandHint(REVIEW_COMMAND)} on this head replaces it.`,
1265
1223
  ].join("\n");
1266
1224
  }
@@ -1283,41 +1241,26 @@ function publishOverride(
1283
1241
  deps: PublishDeps,
1284
1242
  plan: Extract<Publication, { kind: "override" }>,
1285
1243
  ): number {
1286
- const landed: string[] = [];
1244
+ let landed = false;
1287
1245
  let exitCode = 0;
1288
1246
  if (plan.headSha !== undefined) {
1289
- // Each context is written on its own (postStatus would fold the pair into one answer):
1290
- // when one lands and the other fails, the head IS overridden on the one that landed, and
1291
- // the permanent audit comment must say so (#434 F001). The failed half is still reported.
1292
- let failure: { ok: false; httpStatus: number | undefined } | undefined;
1293
- for (const context of statusContextForms(STATUS_CONTEXT)) {
1294
- const posted = postStatusOn(
1295
- deps,
1296
- plan.repository,
1297
- plan.headSha,
1298
- {
1299
- state: "success",
1300
- context: STATUS_CONTEXT,
1301
- description: overrideDescription(plan.actor),
1302
- targetUrl: plan.runUrl,
1303
- },
1304
- context,
1305
- 2,
1306
- );
1307
- if (posted.ok) landed.push(context);
1308
- else failure ??= posted;
1309
- }
1310
- if (landed.includes(STATUS_CONTEXT)) {
1247
+ // One write, on crysk alone (#457): the legacy `pr-hero` context is no longer posted.
1248
+ const posted = postStatus(deps, plan.repository, plan.headSha, {
1249
+ state: "success",
1250
+ context: STATUS_CONTEXT,
1251
+ description: overrideDescription(plan.actor),
1252
+ targetUrl: plan.runUrl,
1253
+ });
1254
+ landed = posted.ok;
1255
+ if (posted.ok) {
1311
1256
  // WHY here, right after the success and before the audit comment: the crysk gate is
1312
- // green now, so an earlier run's outcome comment contradicts it. When only the legacy
1313
- // pr-hero status landed, crysk is still red and that comment still explains why. The audit comment does not
1314
- // gate this cleanup, and its warnings never change the exit code (as for a review).
1257
+ // green now, so an earlier run's outcome comment contradicts it. The audit comment does
1258
+ // not gate this cleanup, and its warnings never change the exit code (as for a review).
1315
1259
  cleanupOlderOutcomes(deps, plan);
1316
- }
1317
- if (failure !== undefined) {
1260
+ } else {
1318
1261
  reportStatusWriteFailure(
1319
1262
  deps,
1320
- failure.httpStatus,
1263
+ posted.httpStatus,
1321
1264
  plan.runId,
1322
1265
  plan.runUrl,
1323
1266
  );
@@ -1327,11 +1270,9 @@ function publishOverride(
1327
1270
  deps.stdout(
1328
1271
  workflowCommand(
1329
1272
  "notice",
1330
- landed.includes(STATUS_CONTEXT)
1273
+ landed
1331
1274
  ? `crysk gate overridden by @${plan.actor} on head ${plan.headSha}.`
1332
- : landed.length > 0
1333
- ? `crysk override by @${plan.actor} set only the ${landed.join(", ")} status on head ${plan.headSha}.`
1334
- : `crysk override by @${plan.actor} set no commit status.`,
1275
+ : `crysk override by @${plan.actor} set no commit status.`,
1335
1276
  ),
1336
1277
  );
1337
1278
  const at = (deps.now ?? (() => new Date()))();
@@ -31,10 +31,12 @@
31
31
  // multiple output keys written across several tool calls). An overwrite here
32
32
  // would silently destroy an earlier step's contribution to the same file.
33
33
  import { appendFile } from "node:fs/promises";
34
+ import { listPaths } from "#git/refs";
34
35
  import type { CiMode } from "#pr/preflight";
35
36
  import type { Finding, Severity } from "#review/findings";
36
37
  import {
37
38
  blobUrl,
39
+ code,
38
40
  formatElapsed,
39
41
  type PrCommentDelta,
40
42
  severityEmoji,
@@ -155,6 +157,12 @@ interface CiSkipBudgetSummary {
155
157
  budgetUsd: number;
156
158
  }
157
159
 
160
+ interface CiSkipExcludedSummary {
161
+ kind: "skipped-excluded";
162
+ prNumber: number;
163
+ excludedPaths: string[];
164
+ }
165
+
158
166
  interface CiSkipCoverageSummary {
159
167
  kind: "skipped-coverage";
160
168
  prNumber: number;
@@ -198,6 +206,7 @@ export type CiSummaryData =
198
206
  | CiReviewSummary
199
207
  | CiSkipSizeSummary
200
208
  | CiSkipBudgetSummary
209
+ | CiSkipExcludedSummary
201
210
  | CiSkipCoverageSummary
202
211
  | CiManualRequiredSummary;
203
212
 
@@ -336,6 +345,24 @@ function skipBudgetLines(data: CiSkipBudgetSummary): string[] {
336
345
  ];
337
346
  }
338
347
 
348
+ // #317: not a review held back but a diff with nothing in scope, so the heading
349
+ // is a plain fact, not a warning, and the wording never says "found nothing":
350
+ // nothing was looked at.
351
+ function skipExcludedLines(data: CiSkipExcludedSummary): string[] {
352
+ return [
353
+ `### Crysk: nothing to review — PR #${data.prNumber}`,
354
+ "",
355
+ "**Reason:** every changed file is excluded from review by the ignore " +
356
+ "rules (`.cryskignore` and the shipped defaults).",
357
+ "",
358
+ // Capped like every other path list (listPaths), and each path through
359
+ // code(): the paths are the author's, and a backtick would break the span.
360
+ listPaths(data.excludedPaths.map(code)),
361
+ "",
362
+ "Nothing was spawned and nothing was spent.",
363
+ ];
364
+ }
365
+
339
366
  function admissionMetricRows(
340
367
  data: CiSkipCoverageSummary | CiManualRequiredSummary,
341
368
  ): string[] {
@@ -466,11 +493,13 @@ export function renderStepSummary(
466
493
  ? skipSizeLines(data)
467
494
  : data.kind === "skipped-budget"
468
495
  ? skipBudgetLines(data)
469
- : data.kind === "skipped-coverage"
470
- ? skipCoverageLines(data)
471
- : data.kind === "manual-required"
472
- ? manualRequiredLines(data)
473
- : reviewedLines(data);
496
+ : data.kind === "skipped-excluded"
497
+ ? skipExcludedLines(data)
498
+ : data.kind === "skipped-coverage"
499
+ ? skipCoverageLines(data)
500
+ : data.kind === "manual-required"
501
+ ? manualRequiredLines(data)
502
+ : reviewedLines(data);
474
503
  const out = [...body, "---", "", footerFor(ciMode)];
475
504
  return `${out.join("\n").trimEnd()}\n`;
476
505
  }
@@ -8,6 +8,7 @@
8
8
  // keys it sets are always written to .crysk/config.json, so what a repo does
9
9
  // is visible in the file it versions, never inherited silently.
10
10
 
11
+ import type { PostMinSeverity } from "#pr/post-floor";
11
12
  import { DEFAULT_SIZE_GATE } from "#review/size-gate";
12
13
  import { CI_DEFAULT_METERED_BUDGET_USD } from "./gates";
13
14
  import {
@@ -236,6 +237,12 @@ export interface ConfigPlan {
236
237
  remove: string[];
237
238
  }
238
239
 
240
+ // What setup writes for `post_min_severity`. The engine's own default stays
241
+ // "post everything", so a repo changes only when setup runs on it: a new repo,
242
+ // or a re-run (`--force` included) on one whose config has no floor yet. Filled
243
+ // only when absent, so a floor someone chose is never reset.
244
+ export const RECOMMENDED_POST_MIN_SEVERITY: PostMinSeverity = "warning";
245
+
239
246
  export function configPlan(choices: CiSetupChoices): ConfigPlan {
240
247
  const { ignorePatterns: _ignored, ...advanced } = choices.advanced;
241
248
  const set: Record<string, unknown> = {};
@@ -251,6 +258,7 @@ export function configPlan(choices: CiSetupChoices): ConfigPlan {
251
258
  } else fillIfAbsent.push(levelKeys);
252
259
  if (choices.chosen.maxChangedLines) Object.assign(set, lineKeys);
253
260
  else fillIfAbsent.push(lineKeys);
261
+ fillIfAbsent.push({ post_min_severity: RECOMMENDED_POST_MIN_SEVERITY });
254
262
  // An advanced key is present only because someone gave it.
255
263
  for (const [key, value] of Object.entries(advanced)) {
256
264
  if (value !== undefined) set[key] = value;
@@ -303,8 +311,21 @@ export function renderChoicesSummary(
303
311
  ` observe only ${a.ci_admission_observe_only === true ? "yes: skip decisions are logged, every push is reviewed" : "no"}`,
304
312
  ` trusted actors ${a.ci_trusted_actors && a.ci_trusted_actors.length > 0 ? a.ci_trusted_actors.join(", ") : "none beyond the workflow actor"}`,
305
313
  ` size limit ${"max_changed_lines" in kept ? `${JSON.stringify(kept.max_changed_lines)} changed lines (kept)` : choices.maxChangedLines === 0 ? "no changed-lines limit (0)" : `${choices.maxChangedLines} changed lines`}, ${a.max_changed_files === undefined ? "files resolved from how the review is paid" : `${a.max_changed_files} files`}`,
314
+ ` posting ${postingLine(effective.post_min_severity)}`,
306
315
  ` exclusions ${a.ignorePatterns && a.ignorePatterns.length > 0 ? `${a.ignorePatterns.join(", ")} (.cryskignore)` : "none added (.cryskignore)"}`,
307
316
  "Change them later in the repo config (.crysk/config.json, or .prhero/config.json in a repo set up before the rename) and the review workflow (.github/workflows/crysk.yml, or pr-hero.yml in a repo set up before the rename) (`npx -y crysk config` shows the effective values).",
308
317
  ];
309
318
  return lines;
310
319
  }
320
+
321
+ // Read off the file as written, so a floor set by hand is reported as it stands.
322
+ function postingLine(value: unknown): string {
323
+ if (value === "blocking") {
324
+ return "blocking findings only; advisory ones are counted in the summary (post_min_severity)";
325
+ }
326
+ if (value === "warning") {
327
+ return "every finding except advisory suggestions, which are counted in the summary (post_min_severity)";
328
+ }
329
+ if (value === "suggestion") return "every finding (post_min_severity)";
330
+ return "every finding (post_min_severity unset)";
331
+ }
package/src/ci/setup.ts CHANGED
@@ -12,8 +12,7 @@
12
12
  // caller points it at (via `crysk setup --ci` / `crysk ci init`); a repo that
13
13
  // already has the pre-rename `pr-hero.yml` keeps that file, updated in place.
14
14
  // Pillar 3 Phase 5 (tasks.md 5.2) reuses this SAME function to produce this
15
- // repo's own canonical example workflow (which stays at `pr-hero.yml`: this
16
- // repo is the existing-repo case), rather than
15
+ // repo's own canonical example workflow (at `crysk.yml`), rather than
17
16
  // hand-authoring a second copy that could silently drift from what every
18
17
  // caller of `setup --ci` actually gets — test/packaging.test.ts asserts the
19
18
  // committed file's bytes equal generateCiWorkflowTemplate()'s output exactly.
@@ -1,8 +1,11 @@
1
1
  import { existsSync } from "node:fs";
2
+ import os from "node:os";
2
3
  import path from "node:path";
3
4
  import { assertRunMatchesPr } from "#ci/gates";
5
+ import { loadEffectiveConfig } from "#config/config";
4
6
  import { resolveRepoRoot } from "#git/git";
5
7
  import { postingExitCode } from "#pr/inline";
8
+ import type { PostMinSeverity } from "#pr/post-floor";
6
9
  import {
7
10
  ghCurrentBranchPr,
8
11
  ghRepoWebUrl,
@@ -54,11 +57,19 @@ export async function postCommand(options: CliOptions): Promise<number> {
54
57
  options.pr === "current"
55
58
  ? resolveCurrentPrNumber(await ghCurrentBranchPr(operatorRoot))
56
59
  : options.pr;
60
+ // The same floor `review --pr --post` applies, read from the same layers,
61
+ // so a replayed run posts what the live run would have.
62
+ const { effective } = await loadEffectiveConfig({
63
+ root: operatorRoot,
64
+ home: os.homedir(),
65
+ configFlag: options.config,
66
+ });
57
67
  return runPostCommand({
58
68
  operatorRoot,
59
69
  pr: prNumber,
60
70
  from: options.from,
61
71
  dryRun: options.dryRun,
72
+ postMinSeverity: effective.post_min_severity,
62
73
  });
63
74
  }
64
75
 
@@ -68,6 +79,7 @@ export async function runPostCommand(input: {
68
79
  from: string;
69
80
  dryRun: boolean;
70
81
  spawnFn?: typeof Bun.spawn;
82
+ postMinSeverity?: PostMinSeverity;
71
83
  }): Promise<number> {
72
84
  const { operatorRoot, pr: prNumber, dryRun, spawnFn } = input;
73
85
  const runDir = path.resolve(input.from);
@@ -193,6 +205,7 @@ export async function runPostCommand(input: {
193
205
  doc,
194
206
  diffPatch,
195
207
  spawnFn,
208
+ postMinSeverity: input.postMinSeverity,
196
209
  });
197
210
  // The preview refuses whatever the post would refuse. A dry run that
198
211
  // prints a plan for a run dir the live path then rejects is a $0 gate
@@ -234,6 +247,9 @@ export async function runPostCommand(input: {
234
247
  for (const finding of plan.issueComments) {
235
248
  log(` outside ${finding.path}:${finding.line} ${finding.id}`);
236
249
  }
250
+ for (const finding of plan.notPosted) {
251
+ log(` hidden ${finding.path}:${finding.line} ${finding.id}`);
252
+ }
237
253
  log("dry run: nothing was fetched-for-mutation or posted.");
238
254
  return 0;
239
255
  }
@@ -253,6 +269,7 @@ export async function runPostCommand(input: {
253
269
  ...(rereview === undefined ? {} : { rereview, rereviewPriors: [] }),
254
270
  requireRereviewOnPriorSummary: true,
255
271
  refuseOnVanishedPriorSummary: true,
272
+ postMinSeverity: input.postMinSeverity,
256
273
  });
257
274
  await writePostReceipt(runDir, prNumber, doc.head_sha, outcome);
258
275
  log(