@codyswann/lisa 4.96.0 → 4.96.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 (90) hide show
  1. package/all/copy-overwrite/scripts/check-third-party-review-evidence.mjs +688 -3
  2. package/dist/configs/vitest/socket-safe-temp-base.d.ts +4 -3
  3. package/dist/configs/vitest/socket-safe-temp-base.d.ts.map +1 -1
  4. package/dist/configs/vitest/socket-safe-temp-base.js +11 -5
  5. package/dist/configs/vitest/socket-safe-temp-base.js.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  7. package/dist/core/lisa-owned-hash-ledger.js +12 -0
  8. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  9. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  10. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.js +4 -2
  12. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  13. package/package.json +4 -4
  14. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  17. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  18. package/plugins/lisa-agy/plugin.json +1 -1
  19. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  20. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  23. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  29. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  31. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  33. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
  34. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-agy/plugin.json +1 -1
  37. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  48. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  51. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  55. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  58. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  62. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  65. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails-agy/plugin.json +1 -1
  72. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  76. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  78. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  79. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  83. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  85. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  86. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  90. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +110 -30
@@ -306,13 +306,27 @@ are two different questions with two different answers: arming prematurely is
306
306
  what this gate prevents; turning off a live latch is what the rest of section
307
307
  1 forbids.
308
308
 
309
- **Scope: repositories that declare a review check.** The defect is a required
310
- review context reporting satisfied having read nothing, so where no such
311
- context exists there is no false green to withhold the latch from, and arming is
312
- unchanged. A repository with no `evidence_bearing_checks` in
313
- `.github/required-checks.json` — or none at all — passes this gate immediately.
314
- Holding those PRs would redden a whole fleet for a gate none of them asked for,
315
- which is how a guard gets deleted rather than adopted.
309
+ **Scope: repositories that declare a review check — in EITHER place.** The
310
+ defect is a required review context reporting satisfied having read nothing, so
311
+ where no such context exists there is no false green to withhold the latch from,
312
+ and arming is unchanged. A review context is declared by either of two signals,
313
+ and the gate engages on either one:
314
+
315
+ - a gate in `.lisa.config.json` whose `pull-request` moment declares
316
+ `evidence.reviewer: true` — every stack can carry this, Rails included;
317
+ - an `evidence_bearing_checks` entry in `.github/required-checks.json` — seeded
318
+ only on TypeScript-family hosts.
319
+
320
+ Only a repository that declares neither passes this gate immediately. Holding
321
+ those PRs would redden a whole fleet for a gate none of them asked for, which is
322
+ how a guard gets deleted rather than adopted.
323
+
324
+ Measured (#4653): keyed to `required-checks.json` alone, the gate passed by
325
+ construction on every Rails host, because Lisa seeds that file, the classifier
326
+ and `review-evidence.yml` only on TypeScript-family hosts. A Rails host that
327
+ declared `code-review` with `evidence.reviewer: true` exactly as Lisa does still
328
+ armed at open and merged on a rate-limited reviewer's `neutral` check run,
329
+ which GitHub counts as passing the required context.
316
330
 
317
331
  Arming is a decision to merge, made in advance and executed by GitHub without
318
332
  you. Everything this skill knows about the review — step (d)'s `reviewed` /
@@ -329,20 +343,75 @@ any pull request, because GitHub had already merged it the moment CI went green.
329
343
  A guard that cannot be reached is not a guard: the merge happened on the latch,
330
344
  not on the reasoning.
331
345
 
332
- **So the latch may only ever be armed against a review context that did work.**
333
- The consequence is the whole point. An unreviewed merge then has exactly one
334
- route left — step (d), which verifies its five conditions against a live poll
335
- and is *required* to write `MERGED — NOT REVIEWED`. This does not forbid the
336
- unreviewed merge; the owner's ruling on #3221 is explicit that a vendor
337
- entitlement state must not redden every pull request. It makes the unreviewed
338
- merge VISIBLE, by leaving it only one path that can produce it, and that path
339
- reports itself.
346
+ **So the latch may only ever be armed against a review context that did work —
347
+ or against a head a writer has already substituted for.** The consequence is the
348
+ whole point. An unreviewed merge then has exactly two routes left, and both
349
+ report themselves: step (d), which verifies its five conditions against a live
350
+ poll; and an arm on a writer's first-line substitute for the current head
351
+ (#4653). Before arming on a substitute, post one PR comment saying this head
352
+ will merge `NOT REVIEWED (<context> "<observed>"), local adversarial review
353
+ substituted and posted` — a session can end before GitHub merges, and the
354
+ comment is the record that survives it; the watch loop, if it is still running,
355
+ also writes that line when it observes the merge. This does
356
+ not forbid the unreviewed merge; the owner's ruling on #3221 is explicit that a
357
+ vendor entitlement state must not redden every pull request. It makes the
358
+ unreviewed merge VISIBLE, by leaving it only paths that report themselves, and
359
+ by never arming before something has read the diff.
340
360
 
341
361
  #### Classify before arming
342
362
 
343
- **Vacuity is the prover's answer, not a string you match here.** The repository
344
- already ships the detector; consult it on the merge path instead of re-deriving
345
- its vocabulary, which is how the two drift apart:
363
+ **The arm decision is the prover's answer, not a judgement you make here.** It
364
+ ships to every stack from `all/copy-overwrite/scripts/`, and it decides from
365
+ both signals at once:
366
+
367
+ ```bash
368
+ node scripts/check-third-party-review-evidence.mjs --sha <head-sha> --repo <owner>/<repo> \
369
+ --arm --json [--vacuity-report <path>]
370
+ ```
371
+
372
+ Read `arm` and `action`, not the exit code. Only `arm: true` (`action: arm`)
373
+ turns auto-merge on. It requires every engaged signal to have proved work: the
374
+ config-declared reviewer `satisfied`, or `substituted` by a writer's
375
+ first-line substitute for this exact head (#4628); where the classifier below
376
+ ran, a non-vacuous review context at this head (or one a writer's substitute
377
+ covers); and no standing `CHANGES_REQUESTED` at the head. A substitute counts
378
+ here only when its marker is the comment's **first line** and its author has
379
+ **write access** — the prover's report-only `substituted` outcome counts a
380
+ marker anywhere, which is fine for a report and fail-open for a merge. A
381
+ `Changes requested` proof phrase proves the reviewer worked, not that the head
382
+ may merge, and decides `blocker`. A change request counts until its author
383
+ approves or it is dismissed, whichever commit it was made on — a push does not
384
+ clear it.
385
+
386
+ **An arm with `basis: "substitute"` is authorised for that head only.** A
387
+ substitute names one commit; a push makes a new head nothing covers, and with
388
+ the reviewer still rate limited its `neutral` check passes, so GitHub would
389
+ merge unread code. Before pushing to a PR whose latch rests on a substitute,
390
+ disarm it (`gh pr merge <pr> --disable-auto`, re-read until
391
+ `autoMergeRequest` is `null`), push, post a substitute for the new head, and
392
+ decide again. This is the one exception to keeping the latch armed across
393
+ fix pushes below: that rule assumes required checks re-verify the new head, and
394
+ a rate-limited reviewer's check does not. A latch with `basis: "review"` stays
395
+ armed across pushes as usual.
396
+
397
+ The other actions keep the latch off and name the next step:
398
+
399
+ | `action` | what it means | do |
400
+ | --- | --- | --- |
401
+ | `substitute` | nothing read this head, and no writer's first-line substitute stands in | post the local adversarial review now (step (d), "In case 3, substitute"), from an account with write access, then decide again. A substitute posted by a bot or app token (`*[bot]`) never counts here; if that is the only identity available, do not arm — leave the merge to step (d), or report `blocked:unreviewed` |
402
+ | `watch` | not an answer yet: the reviewer is still running (a substitute never stands in for a review in flight), or the classifier report is missing, stale, untrusted or names a review kind this prover does not know | do not arm; keep driving and decide again on the next pass |
403
+ | `blocker` | a review ran and objected, or requested changes | a real blocker; steps (d)/(e) |
404
+ | `stop` | the pull requests, reviews or classifier inspection could not be read | stop under `tool-access-gate`, as for `pull-requests-unreadable` in step (d) |
405
+
406
+ **Where the host ships the vacuity classifier, keep it — pass its report in.**
407
+ On a TypeScript-family host, run the classifier first, save its JSON, and hand
408
+ the path to `--vacuity-report`; a Rails or other host without it omits the flag
409
+ and the decision rests on the config-declared reviewer alone. Re-run the
410
+ classifier on every new head: a report for another head is refused (`watch`),
411
+ and so is a host whose `.github/required-checks.json` declares an
412
+ evidence-bearing check when no report is passed. Vacuity is the
413
+ classifier's answer, not a string you match here; consult it on the merge path
414
+ instead of re-deriving its vocabulary, which is how the two drift apart:
346
415
 
347
416
  ```bash
348
417
  node scripts/check-skipped-required-checks.mjs --vacuity --pr=<pr> --json
@@ -362,11 +431,12 @@ zero exit is not evidence that a review happened:
362
431
  | reading | what it means | arm? |
363
432
  | --- | --- | --- |
364
433
  | `inspected: true`, no review-related violation | the check did work | **arm** |
365
- | `review_evidence_unsatisfied` | a review RAN AND OBJECTED | no — a real blocker; steps (d)/(e) |
434
+ | `review_evidence_objected`, or `review_evidence_unsatisfied` with `condition: objected` | a review RAN AND OBJECTED | no — a real blocker; steps (d)/(e) |
435
+ | `review_evidence_unsatisfied` with any other `condition` | absent, pending, not reviewed or undetermined — read `condition` | no — pending waits; the rest are vacuous |
366
436
  | `review_evidence_waived` | a named vendor entitlement | no — vacuous |
367
437
  | `vacuous_required_check` | success carrying a no-work description | no — vacuous |
368
438
  | `unproven_required_check` | a description proving nothing either way, or no status at all | no — vacuous |
369
- | `inspected: false` with `vacuity_none_declared` | this repository declares no review check | **arm** — out of scope, see above |
439
+ | `inspected: false` with `vacuity_none_declared` | `required-checks.json` declares no review check | the classifier is out of scope; the config-declared reviewer still decides (`--arm` does this) |
370
440
  | `inspected: false`, any other refusal | something was supposed to be read and was not | no — an empty inspection is not a pass |
371
441
 
372
442
  The last two rows are the same field and opposite answers, so read the refusal
@@ -386,8 +456,9 @@ gh pr checks <pr> --json name,state,description,bucket \
386
456
  ```
387
457
 
388
458
  `<review-context>` is whatever `.github/required-checks.json` declares under
389
- `evidence_bearing_checks` — do not assume `CodeRabbit`, and if nothing is
390
- declared, arm normally (the scope rule above). Where one IS declared, absent a
459
+ `evidence_bearing_checks`, plus the `await` of every `.lisa.config.json` gate
460
+ that declares `evidence.reviewer: true` — do not assume `CodeRabbit`, and if
461
+ neither declares anything, arm normally (the scope rule above). Where one IS declared, absent a
391
462
  description that positively states a review ran, treat the context as vacuous.
392
463
  Fail closed: absence of evidence is not evidence of a review.
393
464
 
@@ -537,7 +608,9 @@ purpose. Everything below is the `auto_merge=true` path.)
537
608
 
538
609
  Once a fix is PUSHED the latch is safe: GitHub evaluates required checks against
539
610
  the PR's current head, so a new commit whose checks have not reported leaves the
540
- PR blocked. Auto-merge cannot ship a commit nothing has verified.
611
+ PR blocked. Auto-merge cannot ship a commit nothing has verified. (The exception
612
+ is a latch armed with `basis: "substitute"`: disarm it before the push — see
613
+ "Classify before arming".)
541
614
 
542
615
  The only window a disarm ever protected is the gap between deciding to fix
543
616
  something and that fix landing — during which the PR is genuinely green and
@@ -838,6 +911,8 @@ The arm gate binds in report mode too, and this is the mode where forgetting it
838
911
  does the most damage: a diagnose-only run that arms the latch has not diagnosed
839
912
  anything, it has authorised a merge. Under a vacuous review context, report mode
840
913
  neither arms nor takes step (d)'s exception — it returns `blocked:unreviewed`.
914
+ That holds even when `--arm` answers `arm: true` on a writer's substitute:
915
+ report mode never arms, whatever the arm decision says.
841
916
 
842
917
  ### a. Branch behind base (`mergeStateStatus == BEHIND`)
843
918
  Before proactively syncing a clean `BEHIND` PR, check whether the base branch
@@ -1184,11 +1259,13 @@ read the diff, and the report says what did.
1184
1259
 
1185
1260
  **Merging past a vacuous review context is permitted — but ONLY when that
1186
1261
  context is the sole gate still blocking the merge, and only after the substitute
1187
- is posted.** This is the *only* route by
1188
- which a PR merges unreviewed: the arm gate (section 1) holds the latch off while
1189
- the context is vacuous precisely so that this decision, with its conditions and
1190
- its mandatory report line, is the one that merges. If you find yourself merging
1191
- unreviewed anywhere else, that is the defect, not a shortcut.
1262
+ is posted.** This and the arm gate's substitute arm (section 1) are the *only*
1263
+ routes by which a PR merges unreviewed: the arm gate holds the latch off while
1264
+ the context is vacuous and no writer's first-line substitute covers the head,
1265
+ precisely so that a decision with its conditions and its mandatory report line
1266
+ is the one that merges. Both routes write the `MERGED — NOT REVIEWED` line. If
1267
+ you find yourself merging unreviewed anywhere else, that is the defect, not a
1268
+ shortcut.
1192
1269
 
1193
1270
  **Every vacuity mode qualifies, not just the rate limit.** A size-limit skip, the
1194
1271
  public-repository policy skip, and a bare `Review skipped` are the same vacuity
@@ -1212,8 +1289,11 @@ Once the signal is explicit, merge directly with `gh pr merge <pr>
1212
1289
  --<merge_method>` (pass `--admin` only if branch protection lists the vacuous
1213
1290
  context as required and refuses the plain merge).
1214
1291
  **Do not arm the latch to accomplish this** — arming would hand the decision
1215
- back to GitHub and lose the report, and under the arm gate (section 1) the
1216
- latch is deliberately not armed in the first place. "Sole gate" means every one of these is
1292
+ back to GitHub, and under the arm gate (section 1) the latch is deliberately
1293
+ not armed in the first place. The one exception is section 1's own: when
1294
+ `--arm` answers `arm: true` for the current head on a writer's first-line
1295
+ substitute, the latch may be armed, and the watch loop still owes the
1296
+ `MERGED — NOT REVIEWED` report line when it observes the merge. "Sole gate" means every one of these is
1217
1297
  already true at the moment you merge — verify each against the live poll, never
1218
1298
  from memory:
1219
1299
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -306,13 +306,27 @@ are two different questions with two different answers: arming prematurely is
306
306
  what this gate prevents; turning off a live latch is what the rest of section
307
307
  1 forbids.
308
308
 
309
- **Scope: repositories that declare a review check.** The defect is a required
310
- review context reporting satisfied having read nothing, so where no such
311
- context exists there is no false green to withhold the latch from, and arming is
312
- unchanged. A repository with no `evidence_bearing_checks` in
313
- `.github/required-checks.json` — or none at all — passes this gate immediately.
314
- Holding those PRs would redden a whole fleet for a gate none of them asked for,
315
- which is how a guard gets deleted rather than adopted.
309
+ **Scope: repositories that declare a review check — in EITHER place.** The
310
+ defect is a required review context reporting satisfied having read nothing, so
311
+ where no such context exists there is no false green to withhold the latch from,
312
+ and arming is unchanged. A review context is declared by either of two signals,
313
+ and the gate engages on either one:
314
+
315
+ - a gate in `.lisa.config.json` whose `pull-request` moment declares
316
+ `evidence.reviewer: true` — every stack can carry this, Rails included;
317
+ - an `evidence_bearing_checks` entry in `.github/required-checks.json` — seeded
318
+ only on TypeScript-family hosts.
319
+
320
+ Only a repository that declares neither passes this gate immediately. Holding
321
+ those PRs would redden a whole fleet for a gate none of them asked for, which is
322
+ how a guard gets deleted rather than adopted.
323
+
324
+ Measured (#4653): keyed to `required-checks.json` alone, the gate passed by
325
+ construction on every Rails host, because Lisa seeds that file, the classifier
326
+ and `review-evidence.yml` only on TypeScript-family hosts. A Rails host that
327
+ declared `code-review` with `evidence.reviewer: true` exactly as Lisa does still
328
+ armed at open and merged on a rate-limited reviewer's `neutral` check run,
329
+ which GitHub counts as passing the required context.
316
330
 
317
331
  Arming is a decision to merge, made in advance and executed by GitHub without
318
332
  you. Everything this skill knows about the review — step (d)'s `reviewed` /
@@ -329,20 +343,75 @@ any pull request, because GitHub had already merged it the moment CI went green.
329
343
  A guard that cannot be reached is not a guard: the merge happened on the latch,
330
344
  not on the reasoning.
331
345
 
332
- **So the latch may only ever be armed against a review context that did work.**
333
- The consequence is the whole point. An unreviewed merge then has exactly one
334
- route left — step (d), which verifies its five conditions against a live poll
335
- and is *required* to write `MERGED — NOT REVIEWED`. This does not forbid the
336
- unreviewed merge; the owner's ruling on #3221 is explicit that a vendor
337
- entitlement state must not redden every pull request. It makes the unreviewed
338
- merge VISIBLE, by leaving it only one path that can produce it, and that path
339
- reports itself.
346
+ **So the latch may only ever be armed against a review context that did work —
347
+ or against a head a writer has already substituted for.** The consequence is the
348
+ whole point. An unreviewed merge then has exactly two routes left, and both
349
+ report themselves: step (d), which verifies its five conditions against a live
350
+ poll; and an arm on a writer's first-line substitute for the current head
351
+ (#4653). Before arming on a substitute, post one PR comment saying this head
352
+ will merge `NOT REVIEWED (<context> "<observed>"), local adversarial review
353
+ substituted and posted` — a session can end before GitHub merges, and the
354
+ comment is the record that survives it; the watch loop, if it is still running,
355
+ also writes that line when it observes the merge. This does
356
+ not forbid the unreviewed merge; the owner's ruling on #3221 is explicit that a
357
+ vendor entitlement state must not redden every pull request. It makes the
358
+ unreviewed merge VISIBLE, by leaving it only paths that report themselves, and
359
+ by never arming before something has read the diff.
340
360
 
341
361
  #### Classify before arming
342
362
 
343
- **Vacuity is the prover's answer, not a string you match here.** The repository
344
- already ships the detector; consult it on the merge path instead of re-deriving
345
- its vocabulary, which is how the two drift apart:
363
+ **The arm decision is the prover's answer, not a judgement you make here.** It
364
+ ships to every stack from `all/copy-overwrite/scripts/`, and it decides from
365
+ both signals at once:
366
+
367
+ ```bash
368
+ node scripts/check-third-party-review-evidence.mjs --sha <head-sha> --repo <owner>/<repo> \
369
+ --arm --json [--vacuity-report <path>]
370
+ ```
371
+
372
+ Read `arm` and `action`, not the exit code. Only `arm: true` (`action: arm`)
373
+ turns auto-merge on. It requires every engaged signal to have proved work: the
374
+ config-declared reviewer `satisfied`, or `substituted` by a writer's
375
+ first-line substitute for this exact head (#4628); where the classifier below
376
+ ran, a non-vacuous review context at this head (or one a writer's substitute
377
+ covers); and no standing `CHANGES_REQUESTED` at the head. A substitute counts
378
+ here only when its marker is the comment's **first line** and its author has
379
+ **write access** — the prover's report-only `substituted` outcome counts a
380
+ marker anywhere, which is fine for a report and fail-open for a merge. A
381
+ `Changes requested` proof phrase proves the reviewer worked, not that the head
382
+ may merge, and decides `blocker`. A change request counts until its author
383
+ approves or it is dismissed, whichever commit it was made on — a push does not
384
+ clear it.
385
+
386
+ **An arm with `basis: "substitute"` is authorised for that head only.** A
387
+ substitute names one commit; a push makes a new head nothing covers, and with
388
+ the reviewer still rate limited its `neutral` check passes, so GitHub would
389
+ merge unread code. Before pushing to a PR whose latch rests on a substitute,
390
+ disarm it (`gh pr merge <pr> --disable-auto`, re-read until
391
+ `autoMergeRequest` is `null`), push, post a substitute for the new head, and
392
+ decide again. This is the one exception to keeping the latch armed across
393
+ fix pushes below: that rule assumes required checks re-verify the new head, and
394
+ a rate-limited reviewer's check does not. A latch with `basis: "review"` stays
395
+ armed across pushes as usual.
396
+
397
+ The other actions keep the latch off and name the next step:
398
+
399
+ | `action` | what it means | do |
400
+ | --- | --- | --- |
401
+ | `substitute` | nothing read this head, and no writer's first-line substitute stands in | post the local adversarial review now (step (d), "In case 3, substitute"), from an account with write access, then decide again. A substitute posted by a bot or app token (`*[bot]`) never counts here; if that is the only identity available, do not arm — leave the merge to step (d), or report `blocked:unreviewed` |
402
+ | `watch` | not an answer yet: the reviewer is still running (a substitute never stands in for a review in flight), or the classifier report is missing, stale, untrusted or names a review kind this prover does not know | do not arm; keep driving and decide again on the next pass |
403
+ | `blocker` | a review ran and objected, or requested changes | a real blocker; steps (d)/(e) |
404
+ | `stop` | the pull requests, reviews or classifier inspection could not be read | stop under `tool-access-gate`, as for `pull-requests-unreadable` in step (d) |
405
+
406
+ **Where the host ships the vacuity classifier, keep it — pass its report in.**
407
+ On a TypeScript-family host, run the classifier first, save its JSON, and hand
408
+ the path to `--vacuity-report`; a Rails or other host without it omits the flag
409
+ and the decision rests on the config-declared reviewer alone. Re-run the
410
+ classifier on every new head: a report for another head is refused (`watch`),
411
+ and so is a host whose `.github/required-checks.json` declares an
412
+ evidence-bearing check when no report is passed. Vacuity is the
413
+ classifier's answer, not a string you match here; consult it on the merge path
414
+ instead of re-deriving its vocabulary, which is how the two drift apart:
346
415
 
347
416
  ```bash
348
417
  node scripts/check-skipped-required-checks.mjs --vacuity --pr=<pr> --json
@@ -362,11 +431,12 @@ zero exit is not evidence that a review happened:
362
431
  | reading | what it means | arm? |
363
432
  | --- | --- | --- |
364
433
  | `inspected: true`, no review-related violation | the check did work | **arm** |
365
- | `review_evidence_unsatisfied` | a review RAN AND OBJECTED | no — a real blocker; steps (d)/(e) |
434
+ | `review_evidence_objected`, or `review_evidence_unsatisfied` with `condition: objected` | a review RAN AND OBJECTED | no — a real blocker; steps (d)/(e) |
435
+ | `review_evidence_unsatisfied` with any other `condition` | absent, pending, not reviewed or undetermined — read `condition` | no — pending waits; the rest are vacuous |
366
436
  | `review_evidence_waived` | a named vendor entitlement | no — vacuous |
367
437
  | `vacuous_required_check` | success carrying a no-work description | no — vacuous |
368
438
  | `unproven_required_check` | a description proving nothing either way, or no status at all | no — vacuous |
369
- | `inspected: false` with `vacuity_none_declared` | this repository declares no review check | **arm** — out of scope, see above |
439
+ | `inspected: false` with `vacuity_none_declared` | `required-checks.json` declares no review check | the classifier is out of scope; the config-declared reviewer still decides (`--arm` does this) |
370
440
  | `inspected: false`, any other refusal | something was supposed to be read and was not | no — an empty inspection is not a pass |
371
441
 
372
442
  The last two rows are the same field and opposite answers, so read the refusal
@@ -386,8 +456,9 @@ gh pr checks <pr> --json name,state,description,bucket \
386
456
  ```
387
457
 
388
458
  `<review-context>` is whatever `.github/required-checks.json` declares under
389
- `evidence_bearing_checks` — do not assume `CodeRabbit`, and if nothing is
390
- declared, arm normally (the scope rule above). Where one IS declared, absent a
459
+ `evidence_bearing_checks`, plus the `await` of every `.lisa.config.json` gate
460
+ that declares `evidence.reviewer: true` — do not assume `CodeRabbit`, and if
461
+ neither declares anything, arm normally (the scope rule above). Where one IS declared, absent a
391
462
  description that positively states a review ran, treat the context as vacuous.
392
463
  Fail closed: absence of evidence is not evidence of a review.
393
464
 
@@ -537,7 +608,9 @@ purpose. Everything below is the `auto_merge=true` path.)
537
608
 
538
609
  Once a fix is PUSHED the latch is safe: GitHub evaluates required checks against
539
610
  the PR's current head, so a new commit whose checks have not reported leaves the
540
- PR blocked. Auto-merge cannot ship a commit nothing has verified.
611
+ PR blocked. Auto-merge cannot ship a commit nothing has verified. (The exception
612
+ is a latch armed with `basis: "substitute"`: disarm it before the push — see
613
+ "Classify before arming".)
541
614
 
542
615
  The only window a disarm ever protected is the gap between deciding to fix
543
616
  something and that fix landing — during which the PR is genuinely green and
@@ -838,6 +911,8 @@ The arm gate binds in report mode too, and this is the mode where forgetting it
838
911
  does the most damage: a diagnose-only run that arms the latch has not diagnosed
839
912
  anything, it has authorised a merge. Under a vacuous review context, report mode
840
913
  neither arms nor takes step (d)'s exception — it returns `blocked:unreviewed`.
914
+ That holds even when `--arm` answers `arm: true` on a writer's substitute:
915
+ report mode never arms, whatever the arm decision says.
841
916
 
842
917
  ### a. Branch behind base (`mergeStateStatus == BEHIND`)
843
918
  Before proactively syncing a clean `BEHIND` PR, check whether the base branch
@@ -1184,11 +1259,13 @@ read the diff, and the report says what did.
1184
1259
 
1185
1260
  **Merging past a vacuous review context is permitted — but ONLY when that
1186
1261
  context is the sole gate still blocking the merge, and only after the substitute
1187
- is posted.** This is the *only* route by
1188
- which a PR merges unreviewed: the arm gate (section 1) holds the latch off while
1189
- the context is vacuous precisely so that this decision, with its conditions and
1190
- its mandatory report line, is the one that merges. If you find yourself merging
1191
- unreviewed anywhere else, that is the defect, not a shortcut.
1262
+ is posted.** This and the arm gate's substitute arm (section 1) are the *only*
1263
+ routes by which a PR merges unreviewed: the arm gate holds the latch off while
1264
+ the context is vacuous and no writer's first-line substitute covers the head,
1265
+ precisely so that a decision with its conditions and its mandatory report line
1266
+ is the one that merges. Both routes write the `MERGED — NOT REVIEWED` line. If
1267
+ you find yourself merging unreviewed anywhere else, that is the defect, not a
1268
+ shortcut.
1192
1269
 
1193
1270
  **Every vacuity mode qualifies, not just the rate limit.** A size-limit skip, the
1194
1271
  public-repository policy skip, and a bare `Review skipped` are the same vacuity
@@ -1212,8 +1289,11 @@ Once the signal is explicit, merge directly with `gh pr merge <pr>
1212
1289
  --<merge_method>` (pass `--admin` only if branch protection lists the vacuous
1213
1290
  context as required and refuses the plain merge).
1214
1291
  **Do not arm the latch to accomplish this** — arming would hand the decision
1215
- back to GitHub and lose the report, and under the arm gate (section 1) the
1216
- latch is deliberately not armed in the first place. "Sole gate" means every one of these is
1292
+ back to GitHub, and under the arm gate (section 1) the latch is deliberately
1293
+ not armed in the first place. The one exception is section 1's own: when
1294
+ `--arm` answers `arm: true` for the current head on a writer's first-line
1295
+ substitute, the latch may be armed, and the watch loop still owes the
1296
+ `MERGED — NOT REVIEWED` report line when it observes the merge. "Sole gate" means every one of these is
1217
1297
  already true at the moment you merge — verify each against the live poll, never
1218
1298
  from memory:
1219
1299
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.96.0",
3
+ "version": "4.96.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"