@codyswann/lisa 4.100.1 → 4.100.3

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 (114) hide show
  1. package/all/copy-overwrite/scripts/check-third-party-review-evidence.mjs +172 -30
  2. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.js +6 -0
  4. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  5. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  6. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  7. package/dist/core/upstream-evidence-manifest.js +16 -8
  8. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  9. package/package.json +4 -4
  10. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  13. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +1 -1
  14. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  15. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +1 -1
  16. package/plugins/lisa/rules/reference/rejection-detection.md +2 -2
  17. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  18. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +1 -1
  19. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  20. package/plugins/lisa/skills/lisa-track/SKILL.md +1 -1
  21. package/plugins/lisa-agy/plugin.json +1 -1
  22. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  23. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +1 -1
  24. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  25. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +1 -1
  26. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  29. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  33. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-copilot/rules/reference/rejection-detection.md +2 -2
  35. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  36. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +1 -1
  37. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  38. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +1 -1
  39. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-cursor/rules/rejection-detection-reference.mdc +2 -2
  41. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  42. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +1 -1
  43. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  44. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +1 -1
  45. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  47. package/plugins/lisa-devin/rules/reference/rejection-detection.md +2 -2
  48. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  49. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +1 -1
  50. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  51. package/plugins/lisa-devin/skills/lisa-track/SKILL.md +1 -1
  52. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-expo-agy/plugin.json +1 -1
  55. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  59. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  62. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  66. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  69. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  73. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  76. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  80. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  82. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  83. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  87. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  89. package/plugins/lisa-rails-agy/plugin.json +1 -1
  90. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  94. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  96. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  97. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  101. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  103. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  104. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  108. package/plugins/src/base/rules/reference/rejection-detection.md +2 -2
  109. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +8 -3
  110. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +1 -1
  111. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +60 -9
  112. package/plugins/src/base/skills/lisa-track/SKILL.md +1 -1
  113. package/scripts/lisa-ci-failure-redispatch.mjs +216 -18
  114. package/scripts/lisa-ci-rework-route.mjs +24 -49
@@ -62,12 +62,33 @@
62
62
  * one the reviewer had approved — so every pull request needed a hand-written
63
63
  * substitute review.
64
64
  *
65
- * Both are read now, and statuses exactly as before. A check run is the
66
- * reviewer's evidence only when it carries the declared context as its name,
67
- * was reported for this exact head, and — when the gate pins `posted_by` — was
68
- * posted by that app; an unpinned gate accepts any app, which is GitHub's own
69
- * meaning of an unpinned required check. When such a run exists it is
70
- * authoritative over a status of the same name, and the newest run wins.
65
+ * Both are read now, and for an unpinned gate statuses read exactly as before.
66
+ * A check run is the reviewer's evidence only when it carries the declared
67
+ * context as its name, was reported for this exact head, and — when the gate
68
+ * pins `posted_by` — was posted by that app; an unpinned gate accepts any app,
69
+ * which is GitHub's own meaning of an unpinned required check. When such a run
70
+ * exists it is authoritative over a status of the same name, and the newest
71
+ * run wins.
72
+ *
73
+ * ## A pinned gate is proven only by its app (#4652)
74
+ *
75
+ * `posted_by` is the GitHub App id allowed to post the reviewer's context, and
76
+ * Lisa writes it into the branch ruleset as that context's `integration_id`. A
77
+ * commit status cannot honour it: the combined-status endpoint read here
78
+ * carries no poster, and any collaborator with push access, or any integration
79
+ * or workflow token with commit-status write access, can post a
80
+ * `Review completed` status under the reviewer's name. So when the gate pins
81
+ * `posted_by` — any declared value, a malformed `null` included — NO commit
82
+ * status is evidence; only an eligible check run from that app is. Each status
83
+ * refused that way is listed in the reading's `ignoredStatuses` with its
84
+ * reason, as a refused run is listed in `ignoredCheckRuns`, so the report
85
+ * explains a `Review completed` it shows but did not count. The refusal cuts
86
+ * both ways: a pinned gate's failing, `Changes requested` or pending status no
87
+ * longer holds arming either, because the pinned app's objections arrive
88
+ * through its own check run. Option (b) of the
89
+ * issue — reading the per-status `creator` from
90
+ * `repos/{repo}/commits/{sha}/statuses` — was not taken, because the reviewer
91
+ * Lisa pins now reports only through check runs.
71
92
  *
72
93
  * Those two rules and the decoding below are the ones
73
94
  * `check-skipped-required-checks.mjs` applies (#4547). Four differences are
@@ -79,9 +100,11 @@
79
100
  * the newest run is chosen, so another app's later run under the
80
101
  * reviewer's name cannot shadow the reviewer's own (that prover reads no
81
102
  * app at all);
82
- * - when the check-run read fails, the reviewer's own status still counts,
83
- * so a host whose token cannot read check runs keeps reading statuses
84
- * exactly as before (that prover refuses the whole read);
103
+ * - when the check-run read fails, an UNPINNED reviewer's own status still
104
+ * counts, so a host whose token cannot read check runs keeps reading
105
+ * statuses exactly as before (that prover refuses the whole read); a
106
+ * pinned reviewer reads `unreadable` instead, since no status could
107
+ * prove it;
85
108
  * - a phrase is compared under this prover's existing normalisation — whole
86
109
  * string, case-insensitive, whitespace-collapsed — as statuses always were;
87
110
  * - the words that are denied first are Lisa's shipped no-work phrases, while
@@ -306,8 +329,9 @@ export function normalizeDescription(description) {
306
329
  * for the reason `mergeEvidence` records.
307
330
  *
308
331
  * `postedBy` is the gate's `posted_by` — the app a check run must come from to
309
- * speak for this reviewer — exactly as declared, and absent when the gate omits
310
- * it, which is unpinned. Any declared value is carried as written, so a
332
+ * speak for this reviewer, and under which no commit status counts (#4652) —
333
+ * exactly as declared, and absent when the gate omits it, which is unpinned.
334
+ * Any declared value is carried as written, so a
311
335
  * malformed pin such as `null` or a string id matches no app rather than
312
336
  * widening to every app; `validateGates` refuses it separately.
313
337
  * @param {object} options - Resolution inputs.
@@ -361,7 +385,7 @@ function readsAsNoWork(normalised) {
361
385
  * @typedef {object} ReviewerShape
362
386
  * @property {string} context - The status context or check-run name it reports under.
363
387
  * @property {string[]} proof - The normalised reviewed-when allowlist.
364
- * @property {unknown} [postedBy] - The app id a check run must come from, exactly as declared; absent for any app.
388
+ * @property {unknown} [postedBy] - The app id a check run must come from, exactly as declared; absent for any app. When declared, no commit status counts.
365
389
  */
366
390
 
367
391
  /**
@@ -388,6 +412,7 @@ function readsAsNoWork(normalised) {
388
412
  * @property {string|null} source - One of {@link EVIDENCE_SOURCES}, or null when nothing was found.
389
413
  * @property {unknown} [checkRunId] - The run that decided, for a check-run reading.
390
414
  * @property {Array<{id: unknown, reason: string}>} ignoredCheckRuns - Runs under the reviewer's name that could not speak for it, and why.
415
+ * @property {Array<{context: string, state: string|null, description: string|null, reason: string}>} ignoredStatuses - Statuses under a pinned reviewer's name, refused because a status cannot show its poster (#4652); empty for an unpinned gate.
391
416
  */
392
417
 
393
418
  /**
@@ -428,7 +453,7 @@ const UNSETTLED_RUN_STATUSES = new Set([
428
453
  * @param {ReviewerShape} options.reviewer - One declared reviewer.
429
454
  * @param {ReadonlyArray<{context?: string, state?: string, description?: string}>} options.statuses -
430
455
  * `.statuses` from `repos/{owner}/{repo}/commits/{sha}/status`, newest first.
431
- * @returns {Omit<EvidenceReading, "ignoredCheckRuns">} The reading.
456
+ * @returns {Omit<EvidenceReading, "ignoredCheckRuns" | "ignoredStatuses">} The reading.
432
457
  */
433
458
  function readStatusEvidence({ reviewer, statuses }) {
434
459
  const found = statuses.find(status => status?.context === reviewer.context);
@@ -626,7 +651,7 @@ export function selectReviewerCheckRun({ reviewer, runs, sha }) {
626
651
  * @param {object} options - Reading inputs.
627
652
  * @param {ReviewerShape} options.reviewer - One declared reviewer.
628
653
  * @param {RawCheckRun} options.run - The run selected for it.
629
- * @returns {Omit<EvidenceReading, "ignoredCheckRuns">} The reading.
654
+ * @returns {Omit<EvidenceReading, "ignoredCheckRuns" | "ignoredStatuses">} The reading.
630
655
  */
631
656
  function readCheckRunEvidence({ reviewer, run }) {
632
657
  const status = typeof run.status === "string" ? run.status : "";
@@ -662,16 +687,73 @@ function readCheckRunEvidence({ reviewer, run }) {
662
687
  };
663
688
  }
664
689
 
690
+ /**
691
+ * The statuses under a pinned reviewer's name, each refused with its reason.
692
+ *
693
+ * A gate that pins `posted_by` is proven only by evidence from that app
694
+ * (#4652). A commit status cannot show that: the combined-status endpoint this
695
+ * prover reads carries no poster at all, and any collaborator or integration
696
+ * with commit-status write access can post one under the reviewer's name. So
697
+ * under a pin every such status is refused — never silently, so the report can
698
+ * say why a "Review completed" it shows did not count. An unpinned gate refuses
699
+ * none; absent means unpinned, and a declared pin of any value — a malformed
700
+ * `null` included — pins, exactly as {@link whyNotTheReviewers} reads it.
701
+ * @param {object} options - Refusal inputs.
702
+ * @param {ReviewerShape} options.reviewer - One declared reviewer.
703
+ * @param {ReadonlyArray<{context?: string, state?: string, description?: string}>|null|undefined} options.statuses - The statuses read; null when the read failed.
704
+ * @returns {Array<{context: string, state: string|null, description: string|null, reason: string}>} The refused statuses, with what each said, empty for an unpinned gate.
705
+ */
706
+ function refusePinnedStatuses({ reviewer, statuses }) {
707
+ if (reviewer.postedBy === undefined) return [];
708
+ const reason =
709
+ `not counted: the gate is pinned to app ` +
710
+ `${JSON.stringify(reviewer.postedBy)}, and a commit status cannot show which app posted it`;
711
+ return (statuses ?? [])
712
+ .filter(status => status?.context === reviewer.context)
713
+ .map(status => ({
714
+ context: reviewer.context,
715
+ state: status.state ?? null,
716
+ description: status.description ?? null,
717
+ reason,
718
+ }));
719
+ }
720
+
721
+ /**
722
+ * A pinned reviewer's reading when no run from its app stands.
723
+ *
724
+ * Nothing stands, so it is `absent` — or `unreadable` when the check-run read,
725
+ * the only read that could have found its evidence, failed. A failed status
726
+ * read changes nothing here, because no status could have counted.
727
+ * @param {ReviewerShape} reviewer - One pinned reviewer.
728
+ * @param {ReadonlyArray<RawCheckRun>|null|undefined} checkRuns - Runs read for its name; null when the read failed.
729
+ * @returns {Omit<EvidenceReading, "ignoredCheckRuns" | "ignoredStatuses">} The reading.
730
+ */
731
+ function pinnedWithoutRun(reviewer, checkRuns) {
732
+ return {
733
+ context: reviewer.context,
734
+ reviewed: false,
735
+ reading:
736
+ checkRuns === null
737
+ ? EVIDENCE_READINGS.unreadable
738
+ : EVIDENCE_READINGS.absent,
739
+ observed: null,
740
+ state: null,
741
+ source: null,
742
+ };
743
+ }
744
+
665
745
  /**
666
746
  * Read one reviewer's evidence at one commit, from both representations.
667
747
  *
668
- * A check run that speaks for the reviewer is authoritative; otherwise its
669
- * status is read exactly as before. A read that failed is never reported as
670
- * an absence: when nothing stands and a read this answer depended on failed,
671
- * the reading is `unreadable`, because "nothing was there" and "nothing could
672
- * be seen" call for different operator actions. A failed check-run read never
673
- * takes away a status's credit — reviewers that still post statuses keep
674
- * reading exactly as they did.
748
+ * A check run that speaks for the reviewer is authoritative. Otherwise an
749
+ * unpinned reviewer's status is read exactly as before, while a pinned
750
+ * reviewer's statuses are all refused and listed in `ignoredStatuses` (#4652):
751
+ * only its app's own check run can prove a pinned gate. A read that failed is
752
+ * never reported as an absence: when nothing stands and a read this answer
753
+ * depended on failed, the reading is `unreadable`, because "nothing was there"
754
+ * and "nothing could be seen" call for different operator actions. For an
755
+ * unpinned reviewer a failed check-run read never takes away a status's
756
+ * credit — reviewers that still post statuses keep reading exactly as they did.
675
757
  * @param {object} options - Reading inputs.
676
758
  * @param {ReviewerShape} options.reviewer - One declared reviewer.
677
759
  * @param {ReadonlyArray<{context?: string, state?: string, description?: string}>|null} [options.statuses] -
@@ -686,11 +768,13 @@ export function readReviewerEvidence({ reviewer, statuses, checkRuns, sha }) {
686
768
  runs: checkRuns,
687
769
  sha,
688
770
  });
771
+ const ignoredStatuses = refusePinnedStatuses({ reviewer, statuses });
772
+ const setAside = { ignoredCheckRuns: ignored, ignoredStatuses };
689
773
  if (run !== null) {
690
- return {
691
- ...readCheckRunEvidence({ reviewer, run }),
692
- ignoredCheckRuns: ignored,
693
- };
774
+ return { ...readCheckRunEvidence({ reviewer, run }), ...setAside };
775
+ }
776
+ if (reviewer.postedBy !== undefined) {
777
+ return { ...pinnedWithoutRun(reviewer, checkRuns), ...setAside };
694
778
  }
695
779
  const fromStatus = readStatusEvidence({ reviewer, statuses: statuses ?? [] });
696
780
  const unreadable =
@@ -699,7 +783,7 @@ export function readReviewerEvidence({ reviewer, statuses, checkRuns, sha }) {
699
783
  return {
700
784
  ...fromStatus,
701
785
  ...(unreadable ? { reading: EVIDENCE_READINGS.unreadable } : {}),
702
- ignoredCheckRuns: ignored,
786
+ ...setAside,
703
787
  };
704
788
  }
705
789
 
@@ -1439,6 +1523,7 @@ export function armDecision({
1439
1523
  * @property {boolean} [commentsUnreadable] - Whether the comments a substitute would be in could not all be read.
1440
1524
  * @property {Array<{author: string, reason: string}>} [substituteRefusals] - Markers not counted, by whom, and why.
1441
1525
  * @property {Array<{id: unknown, reason: string}>} [ignoredCheckRuns] - Runs set aside, and why.
1526
+ * @property {Array<{context: string, state?: string|null, description?: string|null, reason: string}>} [ignoredStatuses] - Statuses refused under a pinned gate, and why.
1442
1527
  */
1443
1528
 
1444
1529
  /**
@@ -1479,9 +1564,7 @@ export function humanReport(verdict) {
1479
1564
  }
1480
1565
  const lines = verdict.readings.map(reading => {
1481
1566
  const seen = describeSeen(reading);
1482
- const ignored = (reading.ignoredCheckRuns ?? []).map(
1483
- entry => ` ignored check run ${String(entry.id)}: ${entry.reason}`
1484
- );
1567
+ const ignored = setAsideLines(reading);
1485
1568
  if (reading.reviewed) {
1486
1569
  return [` reviewed ${reading.context}: ${seen}`, ...ignored].join(
1487
1570
  "\n"
@@ -1498,7 +1581,7 @@ export function humanReport(verdict) {
1498
1581
  );
1499
1582
  return [
1500
1583
  ` NOT REVIEWED ${reading.context} (${reading.reading}): ${seen}`,
1501
- ` observed: ${READING_SENTENCES[reading.reading]}`,
1584
+ ` observed: ${observedSentence(reading)}`,
1502
1585
  ` ${stood}`,
1503
1586
  ...refused,
1504
1587
  ...ignored,
@@ -1507,6 +1590,28 @@ export function humanReport(verdict) {
1507
1590
  return `${verdict.outcome.toUpperCase()} at ${verdict.sha}\n${lines.join("\n")}`;
1508
1591
  }
1509
1592
 
1593
+ /**
1594
+ * One report line per run or status set aside for a reviewer, with its reason.
1595
+ *
1596
+ * A refused status is printed with what it said — its state and description —
1597
+ * so an operator can see the `Review completed` (or the `Changes requested`)
1598
+ * that did not count, not just that something was refused.
1599
+ * @param {ReportedReading} reading - One reading.
1600
+ * @returns {string[]} The lines, empty when nothing was set aside.
1601
+ */
1602
+ function setAsideLines(reading) {
1603
+ return [
1604
+ ...(reading.ignoredCheckRuns ?? []).map(
1605
+ entry => ` ignored check run ${String(entry.id)}: ${entry.reason}`
1606
+ ),
1607
+ ...(reading.ignoredStatuses ?? []).map(
1608
+ entry =>
1609
+ ` ignored status ${JSON.stringify(entry.context)} ` +
1610
+ `(${entry.state ?? "?"} — ${JSON.stringify(entry.description ?? null)}): ${entry.reason}`
1611
+ ),
1612
+ ];
1613
+ }
1614
+
1510
1615
  /**
1511
1616
  * What was seen for one reviewer, in the words the report prints.
1512
1617
  *
@@ -1525,9 +1630,46 @@ function describeSeen(reading) {
1525
1630
  const words = `${reading.state ?? "?"} — ${JSON.stringify(reading.observed)}`;
1526
1631
  if (source === EVIDENCE_SOURCES.checkRun) return `check run ${words}`;
1527
1632
  if (source === EVIDENCE_SOURCES.status) return words;
1633
+ if (setAsideAny(reading)) {
1634
+ return "evidence was posted under its name, but none of it could count";
1635
+ }
1528
1636
  return "no status or check run posted";
1529
1637
  }
1530
1638
 
1639
+ /**
1640
+ * Whether anything under the reviewer's name was read and then set aside.
1641
+ *
1642
+ * An `absent` reading with something set aside is not "nothing was there":
1643
+ * a status a pinned gate refused (#4652), or a run from another app or for
1644
+ * another head, WAS there. Saying "nothing was posted" above the very lines
1645
+ * that list it would contradict the report, so the wording changes — and only
1646
+ * then, so a head where truly nothing was posted reads exactly as before.
1647
+ * @param {{ignoredCheckRuns?: ReadonlyArray<unknown>, ignoredStatuses?: ReadonlyArray<unknown>}} reading - One reading.
1648
+ * @returns {boolean} True when at least one status or run was set aside.
1649
+ */
1650
+ function setAsideAny(reading) {
1651
+ return (
1652
+ (reading.ignoredCheckRuns ?? []).length > 0 ||
1653
+ (reading.ignoredStatuses ?? []).length > 0
1654
+ );
1655
+ }
1656
+
1657
+ /**
1658
+ * The `observed:` sentence for a reading that is not evidence of a review.
1659
+ * @param {{reading: string, ignoredCheckRuns?: ReadonlyArray<unknown>, ignoredStatuses?: ReadonlyArray<unknown>}} reading - One reading.
1660
+ * @returns {string} The sentence.
1661
+ */
1662
+ function observedSentence(reading) {
1663
+ if (reading.reading === EVIDENCE_READINGS.absent && setAsideAny(reading)) {
1664
+ return (
1665
+ "a status or check run was posted under this reviewer's name, but none " +
1666
+ "of it could count as the reviewer's evidence — each one set aside is " +
1667
+ "listed below with the reason"
1668
+ );
1669
+ }
1670
+ return READING_SENTENCES[reading.reading];
1671
+ }
1672
+
1531
1673
  /**
1532
1674
  * Parse the CLI arguments.
1533
1675
  * @param {string[]} argv - Arguments after the script path.
@@ -1 +1 @@
1
- {"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAg0EjC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CACpD,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAmuEjC,CAAC"}
1
+ {"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAm0EjC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CACpD,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAsuEjC,CAAC"}
@@ -420,6 +420,7 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
420
420
  "36ae9989abfc0a2bf19d0f035e7e5ce880d157c36e9c515378ae88b696cf86d1",
421
421
  "3fbf12b8bfa36e06cc954d4b4ca953dcae43ed0ae7fb9d4c7e69af344c8ef5bd",
422
422
  "404b5b002d0d639fd862e19c7e136b708a81409df0c14f9f808a6400b39643f2",
423
+ "4166ba635995685fcdd50418809f852c51c949eb90be0d280549adefacd6955a",
423
424
  "444fdab01527fda3ce2bb4f5177bac2079cded0ba8f0166d71fda7ec2e8dc7b3",
424
425
  "61c6896f81d4ceec1f292cd80527a62dea3d985477a26d937d6359d129755713",
425
426
  "71c2c5c82e09cb42d5c7817fe179be8abf05cb3fa4abab2061388b06e1092b43",
@@ -431,8 +432,10 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
431
432
  "a30f25440b418f81d21f4afc8c7eb637a97ff518f330af6532a8dc5beb57ccc7",
432
433
  "abe7221e1cfcee930b4fa3788eccb8a25ee4d499c3b90dc568f3862796c94de0",
433
434
  "b6f0bdbbe4ad625f080d78a72ff7db62286c33200b3ec93b8d9ff68966398054",
435
+ "c44795c43d66aa7fd0736c8a3918b070bf1e99e4c9e941d956c7558cea278f7f",
434
436
  "d00a4c3225efb5c9385a4d5290baf28d39bff08b3a6c40563af777dcb7ec0d99",
435
437
  "de8f6709dc6635be65625b7f7eb679504a4c1c2bc73bbb29f462bca95f3db6fc",
438
+ "e0e4e730556df45c24223305194420d5a3b43ca22e834accd04ef730c4a1dd10",
436
439
  "f74f4fd1e6d44511a358b9aada80600bb6be62228eb65f67dfb20284ec9b35bd",
437
440
  "fb1b7acc945e7a6a6b4f4a2377ec6ce3fb3538afc3135943770bd96502a0816a",
438
441
  "fda72314a6f74394b8d54e7fcf0bd4957d8ad08c05c07791dddc591ff1e4d28f",
@@ -2785,6 +2788,7 @@ export const LISA_OWNED_HASH_HISTORY_DERIVED = Object.freeze({
2785
2788
  "36ae9989abfc0a2bf19d0f035e7e5ce880d157c36e9c515378ae88b696cf86d1",
2786
2789
  "3fbf12b8bfa36e06cc954d4b4ca953dcae43ed0ae7fb9d4c7e69af344c8ef5bd",
2787
2790
  "404b5b002d0d639fd862e19c7e136b708a81409df0c14f9f808a6400b39643f2",
2791
+ "4166ba635995685fcdd50418809f852c51c949eb90be0d280549adefacd6955a",
2788
2792
  "444fdab01527fda3ce2bb4f5177bac2079cded0ba8f0166d71fda7ec2e8dc7b3",
2789
2793
  "61c6896f81d4ceec1f292cd80527a62dea3d985477a26d937d6359d129755713",
2790
2794
  "71c2c5c82e09cb42d5c7817fe179be8abf05cb3fa4abab2061388b06e1092b43",
@@ -2796,8 +2800,10 @@ export const LISA_OWNED_HASH_HISTORY_DERIVED = Object.freeze({
2796
2800
  "a30f25440b418f81d21f4afc8c7eb637a97ff518f330af6532a8dc5beb57ccc7",
2797
2801
  "abe7221e1cfcee930b4fa3788eccb8a25ee4d499c3b90dc568f3862796c94de0",
2798
2802
  "b6f0bdbbe4ad625f080d78a72ff7db62286c33200b3ec93b8d9ff68966398054",
2803
+ "c44795c43d66aa7fd0736c8a3918b070bf1e99e4c9e941d956c7558cea278f7f",
2799
2804
  "d00a4c3225efb5c9385a4d5290baf28d39bff08b3a6c40563af777dcb7ec0d99",
2800
2805
  "de8f6709dc6635be65625b7f7eb679504a4c1c2bc73bbb29f462bca95f3db6fc",
2806
+ "e0e4e730556df45c24223305194420d5a3b43ca22e834accd04ef730c4a1dd10",
2801
2807
  "f74f4fd1e6d44511a358b9aada80600bb6be62228eb65f67dfb20284ec9b35bd",
2802
2808
  "fb1b7acc945e7a6a6b4f4a2377ec6ce3fb3538afc3135943770bd96502a0816a",
2803
2809
  "fda72314a6f74394b8d54e7fcf0bd4957d8ad08c05c07791dddc591ff1e4d28f",