@codyswann/lisa 4.92.1 → 4.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +11 -1
  2. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.js +2 -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 +54 -4
  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 +103 -2
  13. package/plugins/lisa/.codex-plugin/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  14. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  15. package/plugins/lisa/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  18. package/plugins/lisa-agy/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  19. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  22. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  26. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  28. package/plugins/lisa-copilot/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  29. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  31. package/plugins/lisa-cursor/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  32. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  34. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  35. package/plugins/lisa-devin/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  36. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-agy/plugin.json +1 -1
  39. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  57. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  60. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  67. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  73. package/plugins/lisa-rails-agy/plugin.json +1 -1
  74. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  78. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  80. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  81. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  85. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  87. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  88. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  92. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
  93. package/plugins/src/base/skills/lisa-verification-lifecycle/SKILL.md +49 -0
  94. package/scripts/fixtures/packaged-apply/Dockerfile +7 -0
  95. package/scripts/fixtures/packaged-apply/guard-cases.json +16 -0
  96. package/scripts/lib/packaged-apply-driver.mjs +292 -0
  97. package/scripts/lib/packaged-apply-isolation.d.mts +25 -0
  98. package/scripts/lib/packaged-apply-isolation.mjs +160 -0
  99. package/scripts/lisa-enforcement-fallback.sh +11 -1
  100. package/scripts/verify-packaged-apply.mjs +327 -0
package/package.json CHANGED
@@ -191,7 +191,7 @@
191
191
  "qs": "^6.16.0"
192
192
  },
193
193
  "name": "@codyswann/lisa",
194
- "version": "4.92.1",
194
+ "version": "4.93.0",
195
195
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
196
196
  "main": "dist/index.js",
197
197
  "exports": {
@@ -349,7 +349,7 @@
349
349
  "test": "tests"
350
350
  },
351
351
  "types": "./dist/index.d.ts",
352
- "lisaReleaseCommit": "6ed118928e6227eb3fdc8cca4c8c5858aff63192",
353
- "gitHead": "6ed118928e6227eb3fdc8cca4c8c5858aff63192",
354
- "lisaReleaseTag": "v4.92.1"
352
+ "lisaReleaseCommit": "38d62c0a3afb979c6e82bf5ff388a86fb045d47d",
353
+ "gitHead": "38d62c0a3afb979c6e82bf5ff388a86fb045d47d",
354
+ "lisaReleaseTag": "v4.93.0"
355
355
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.92.1",
3
+ "version": "4.93.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.92.1",
3
+ "version": "4.93.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -705,6 +705,98 @@ Handle every blocker class; after any fix, re-poll and continue. Do not stop whi
705
705
  the PR is still open and progress is possible. On each iteration, refresh the
706
706
  babysitter lease if its last stamp is older than ~30 minutes (section 0).
707
707
 
708
+ **Waiting on CI: one bounded CI watch, in the foreground.** When the only thing
709
+ left is required checks still running, wait with a blocking watch, run under a
710
+ timeout no longer than the harness's single-command limit (`timeout 540` where
711
+ the `timeout` utility exists; otherwise the harness's own command timeout):
712
+
713
+ ```bash
714
+ timeout 540 gh pr checks <pr> --required --watch --interval 30 --fail-fast
715
+ ```
716
+
717
+ Give the tool call that runs it a timeout above that value (for example
718
+ 600000 ms on Claude Code's Bash tool), or lower 540 to fit under the harness's
719
+ limit: a harness that kills the command first loses the result the bound exists
720
+ to deliver.
721
+
722
+ When it returns, for any reason, re-poll the full PR state (the `gh pr view`
723
+ line above) and handle whatever blocker it shows exactly as below — a failed
724
+ check is step (c).
725
+ Repeat until the PR is merged, a blocker needs action, or the run's budget is spent.
726
+ **The run's budget** is the caller's stated limit when one was passed, otherwise
727
+ the point where this session cannot keep running (the harness's turn, context or
728
+ wall-clock limit). One watch timing out is NOT the budget being spent — it is
729
+ the cue to re-poll and watch again.
730
+ **A non-zero exit is not a CI failure on its own**: the
731
+ watch exits non-zero when `--fail-fast` sees a failed check, when the timeout
732
+ fires, and — with empty stdout — when the token lacks `actions: read` (section 1's arm gate).
733
+ The re-poll of `statusCheckRollup` is the authority on which one happened.
734
+
735
+ **No required checks reported yet.** The watch also returns at once when no
736
+ required check has registered on the head. First confirm whether the base
737
+ requires any, reading both places a requirement can live:
738
+
739
+ ```bash
740
+ gh api "repos/<owner>/<repo>/rules/branches/<base>" \
741
+ --jq '[.[] | select(.type == "required_status_checks")] | length'
742
+ gh api "repos/<owner>/<repo>/branches/<base>/protection/required_status_checks" \
743
+ --jq '(.contexts // []) + [(.checks // [])[].context] | length'
744
+ gh api "repos/<owner>/<repo>/branches/<base>" --jq .protected
745
+ ```
746
+
747
+ The wait does not apply only when BOTH say none: the rules read returns `0`
748
+ AND the classic read returns `0`, or 404 while the branch read says `.protected`
749
+ is `false`. GitHub also answers 404 when the token cannot read protection (it
750
+ needs admin), so a 404 on a protected branch — or any other error from either
751
+ read — means the requirement is unknown: treat the base as requiring checks.
752
+ With no required checks, the loop just re-polls for the other blockers. Otherwise the
753
+ head's checks have not started: re-poll, and re-run the bounded watch once the
754
+ re-poll shows required checks registered. Between those re-polls, wait with this
755
+ one foreground bounded gap — the `sleep` always runs, because the watch can
756
+ return at once (no checks yet, or every reported check already green while a
757
+ required one has not registered):
758
+
759
+ ```bash
760
+ timeout 60 gh pr checks <pr> --watch --interval 10; sleep 30
761
+ ```
762
+
763
+ Never a detached or unbounded sleep loop. After 10 re-polls with no required
764
+ check registered on the head, that is a blocker, not a wait: stop and name the
765
+ missing checks (report mode: `blocked:checks`).
766
+
767
+ **Report mode does not wait on CI.** With `on_blocker=report`, never run the
768
+ watch and never end in `ci-pending`: pending required checks classify through
769
+ the existing report-mode outcomes. When auto-merge is armed and pending checks
770
+ are the only thing outstanding, return `will-merge-after-resync` — the caller
771
+ keeps the item claimed and a later cycle re-reads the PR; any other standing
772
+ blocker returns its own `blocked:<reason>`.
773
+
774
+ **Never start a detached or background watcher as the way to wait on CI** — no
775
+ trailing `&`, no `nohup`, no harness background task, no scheduled re-check, no
776
+ detached or unbounded sleep loop. Each of those stalls silently, dies with the
777
+ session, or lets the session end while required checks are still pending, and
778
+ the later result then reaches nobody. The wait is the bounded watch above, and
779
+ nothing else.
780
+
781
+ **Budget spent with required checks still pending.** Do not end silently and do
782
+ not report success. Record the state on the PR in one comment carrying the
783
+ PR number, the head SHA, and the names of the required checks still pending,
784
+ deduplicated by a marker so a resumed run updates rather than repeats it. A
785
+ later run that finds that head's required checks finished edits the marker
786
+ comment to say so, so the record never reads as still pending:
787
+
788
+ ```text
789
+ <!-- [lisa-ci-pending] sha=<head-sha> -->
790
+ ```
791
+
792
+ A check that fails later is not this run's to catch: the CI-failure re-dispatch
793
+ (its `[lisa-ci-failed]` marker on the work item) wakes the owning agent. End
794
+ with the `ci-pending` terminal state (section 4) and this exact report line:
795
+
796
+ ```text
797
+ CI PENDING — <n> required checks still running at <sha>
798
+ ```
799
+
708
800
  **Poll by PR number, and never discover the PR set from "what is currently open".**
709
801
  A watcher whose target list comes from `gh pr list --state open` **cannot observe a
710
802
  merge**: the moment the PR merges it leaves that list, so the branch that would
@@ -1359,8 +1451,8 @@ gh run list --branch <baseRefName> --commit "$merge_sha" \
1359
1451
  ```
1360
1452
 
1361
1453
  **Bounded wait:** a just-created run can take a few seconds to register — poll
1362
- briefly (a small number of short intervals / a short ceiling, mirroring the "wait
1363
- for that head's checks to start" bound used above) before concluding the run is
1454
+ briefly (a small number of short intervals / a short ceiling, mirroring section 2's
1455
+ bounded CI watch) before concluding the run is
1364
1456
  absent, so a not-yet-registered run is not mis-read as zero. When no run matches
1365
1457
  the merge SHA directly, also accept a descendant run whose head has `$merge_sha`
1366
1458
  as an ancestor (`git merge-base --is-ancestor "$merge_sha" <run_head_sha>`).
@@ -1589,6 +1681,15 @@ Loop until one of:
1589
1681
  bot is rate limited and cannot re-review, and I posted my own review of the
1590
1682
  current version. Someone with dismissal rights needs to dismiss review 456,
1591
1683
  or decide it should stand."* Do not wait for the bot's window to reset.
1684
+ - **`ci-pending`** — the run's budget was spent while required checks were still
1685
+ running on an OPEN PR. The PR number, head SHA and pending check names are
1686
+ recorded in the `[lisa-ci-pending]` comment (section 2), a later failure is
1687
+ left to the `[lisa-ci-failed]` re-dispatch, and the run ends with
1688
+ `CI PENDING — <n> required checks still running at <sha>`. This is never
1689
+ reported as success: the work is not done until CI is green. If the checks
1690
+ later pass and auto-merge merges the PR, post-merge verification and
1691
+ work-item completion (section 3) are left to `lisa-repair-intake`'s
1692
+ merged-PR recovery; re-invoking this skill on the PR also completes them.
1592
1693
  - **`CLOSED`** → report (PR was closed without merge).
1593
1694
  - **Hard block needing a human**: an unresolvable conflict, a failing check that
1594
1695
  needs design input, or genuine unresolved human objection (not a bot gate). Stop
@@ -74,6 +74,55 @@ A claim that the change is "behavior-preserving", a "no-visual-regression" refac
74
74
 
75
75
  After implementation, run the verification plan. Execute each verification type in order.
76
76
 
77
+ #### Packaged Lisa applies: destination preflight
78
+
79
+ Before running a packaged Lisa apply for verification, use the package's shared
80
+ `scripts/verify-packaged-apply.mjs` controller. Select the narrowest harness
81
+ that exercises the required behavior; measure generated-copy parity separately.
82
+ Never run a verification apply directly against the operator's environment.
83
+ The controller's default host preflight refuses before spawning apply: a
84
+ temporary project, missing agent CLI, XDG override, or unchanged HOME does not
85
+ contain Antigravity's unconditional user-global MCP writer, vendor plugin
86
+ registrations, Git configuration, temporary backups, or package-manager caches.
87
+
88
+ Build the tool image from the shipped `scripts/fixtures/packaged-apply/Dockerfile`,
89
+ then use the exact candidate or published archive, a new private evidence
90
+ directory, and the same shared controller on every agent:
91
+
92
+ ```bash
93
+ docker build -t lisa-packaged-verification -f scripts/fixtures/packaged-apply/Dockerfile scripts/fixtures/packaged-apply
94
+ node scripts/verify-packaged-apply.mjs --backend docker --archive /absolute/path/lisa.tgz --image lisa-packaged-verification --harness codex --output /absolute/path/new-evidence-directory
95
+ ```
96
+
97
+ Run those paths from the installed package. Record registry integrity/version
98
+ for a published archive; a local pack establishes candidate behavior only.
99
+ Keep the CLI's release-pin checks enabled. If an unstamped local CLI pack
100
+ refuses full apply, record that refusal instead of inventing a release stamp.
101
+ To qualify a new verifier before publication, run the candidate package's
102
+ controller against an identified, genuine public CLI archive and record both
103
+ identities separately. That proves the candidate verifier and that public CLI;
104
+ repeat with the exact new public package after release before completing work.
105
+ The controller inspects the actual stopped container before starting it,
106
+ rejects host mounts/shared namespaces/privileges, and copies inputs into its
107
+ disposable filesystem. It does not change the operator's HOME or CODEX_HOME,
108
+ forward credentials, replace runtime tools, or change normal apply defaults.
109
+ Fleet requires that same proved boundary for every writer and descendant;
110
+ unresolved host destinations cause refusal, not a weaker fallback.
111
+
112
+ Add every declared outside configuration/sentinel file with repeated
113
+ `--preserve /absolute/path/file` arguments. Capture both host-authored and
114
+ Lisa-managed entries, plus absent paths, without exclusions. Preserve the full
115
+ before/after comparison on success and failure; use `--failure-control` to
116
+ exercise a genuine failed CLI child with `--harness fleet` and require
117
+ preservation even though that command returns nonzero. The control reaches
118
+ Antigravity's user-config writer after project mutations, inside the disposable
119
+ filesystem. An unexpected write stops execution; privately
120
+ preserve current bytes and report any missing before-image as unknown. Never
121
+ guess a restoration or delete the operator's settings. Generated hooks and
122
+ native allow/refuse controls establish emitted behavior; absent vendor
123
+ authentication or activation remains explicitly unverified. Docker image and
124
+ container bookkeeping is expected infrastructure state, not agent settings.
125
+
77
126
  Evidence output must explicitly label each verification result as either `verified empirically` or `artifact-only / verification deferred`. Artifact-only evidence can support a blocked escalation packet, but it cannot mark a required runtime verification complete.
78
127
 
79
128
  For a required user-visible regression spec, evidence must prove execution, not only existence. Record a CI log line, reporter output, or equivalent artifact that names the new spec and shows it ran and passed in the PR. A green CI run without named execution proof is not enough; explicitly check for `test.skip`, suite-level environment gates, shard filters, and "0 tests" passes.
@@ -703,6 +703,98 @@ Handle every blocker class; after any fix, re-poll and continue. Do not stop whi
703
703
  the PR is still open and progress is possible. On each iteration, refresh the
704
704
  babysitter lease if its last stamp is older than ~30 minutes (section 0).
705
705
 
706
+ **Waiting on CI: one bounded CI watch, in the foreground.** When the only thing
707
+ left is required checks still running, wait with a blocking watch, run under a
708
+ timeout no longer than the harness's single-command limit (`timeout 540` where
709
+ the `timeout` utility exists; otherwise the harness's own command timeout):
710
+
711
+ ```bash
712
+ timeout 540 gh pr checks <pr> --required --watch --interval 30 --fail-fast
713
+ ```
714
+
715
+ Give the tool call that runs it a timeout above that value (for example
716
+ 600000 ms on Claude Code's Bash tool), or lower 540 to fit under the harness's
717
+ limit: a harness that kills the command first loses the result the bound exists
718
+ to deliver.
719
+
720
+ When it returns, for any reason, re-poll the full PR state (the `gh pr view`
721
+ line above) and handle whatever blocker it shows exactly as below — a failed
722
+ check is step (c).
723
+ Repeat until the PR is merged, a blocker needs action, or the run's budget is spent.
724
+ **The run's budget** is the caller's stated limit when one was passed, otherwise
725
+ the point where this session cannot keep running (the harness's turn, context or
726
+ wall-clock limit). One watch timing out is NOT the budget being spent — it is
727
+ the cue to re-poll and watch again.
728
+ **A non-zero exit is not a CI failure on its own**: the
729
+ watch exits non-zero when `--fail-fast` sees a failed check, when the timeout
730
+ fires, and — with empty stdout — when the token lacks `actions: read` (section 1's arm gate).
731
+ The re-poll of `statusCheckRollup` is the authority on which one happened.
732
+
733
+ **No required checks reported yet.** The watch also returns at once when no
734
+ required check has registered on the head. First confirm whether the base
735
+ requires any, reading both places a requirement can live:
736
+
737
+ ```bash
738
+ gh api "repos/<owner>/<repo>/rules/branches/<base>" \
739
+ --jq '[.[] | select(.type == "required_status_checks")] | length'
740
+ gh api "repos/<owner>/<repo>/branches/<base>/protection/required_status_checks" \
741
+ --jq '(.contexts // []) + [(.checks // [])[].context] | length'
742
+ gh api "repos/<owner>/<repo>/branches/<base>" --jq .protected
743
+ ```
744
+
745
+ The wait does not apply only when BOTH say none: the rules read returns `0`
746
+ AND the classic read returns `0`, or 404 while the branch read says `.protected`
747
+ is `false`. GitHub also answers 404 when the token cannot read protection (it
748
+ needs admin), so a 404 on a protected branch — or any other error from either
749
+ read — means the requirement is unknown: treat the base as requiring checks.
750
+ With no required checks, the loop just re-polls for the other blockers. Otherwise the
751
+ head's checks have not started: re-poll, and re-run the bounded watch once the
752
+ re-poll shows required checks registered. Between those re-polls, wait with this
753
+ one foreground bounded gap — the `sleep` always runs, because the watch can
754
+ return at once (no checks yet, or every reported check already green while a
755
+ required one has not registered):
756
+
757
+ ```bash
758
+ timeout 60 gh pr checks <pr> --watch --interval 10; sleep 30
759
+ ```
760
+
761
+ Never a detached or unbounded sleep loop. After 10 re-polls with no required
762
+ check registered on the head, that is a blocker, not a wait: stop and name the
763
+ missing checks (report mode: `blocked:checks`).
764
+
765
+ **Report mode does not wait on CI.** With `on_blocker=report`, never run the
766
+ watch and never end in `ci-pending`: pending required checks classify through
767
+ the existing report-mode outcomes. When auto-merge is armed and pending checks
768
+ are the only thing outstanding, return `will-merge-after-resync` — the caller
769
+ keeps the item claimed and a later cycle re-reads the PR; any other standing
770
+ blocker returns its own `blocked:<reason>`.
771
+
772
+ **Never start a detached or background watcher as the way to wait on CI** — no
773
+ trailing `&`, no `nohup`, no harness background task, no scheduled re-check, no
774
+ detached or unbounded sleep loop. Each of those stalls silently, dies with the
775
+ session, or lets the session end while required checks are still pending, and
776
+ the later result then reaches nobody. The wait is the bounded watch above, and
777
+ nothing else.
778
+
779
+ **Budget spent with required checks still pending.** Do not end silently and do
780
+ not report success. Record the state on the PR in one comment carrying the
781
+ PR number, the head SHA, and the names of the required checks still pending,
782
+ deduplicated by a marker so a resumed run updates rather than repeats it. A
783
+ later run that finds that head's required checks finished edits the marker
784
+ comment to say so, so the record never reads as still pending:
785
+
786
+ ```text
787
+ <!-- [lisa-ci-pending] sha=<head-sha> -->
788
+ ```
789
+
790
+ A check that fails later is not this run's to catch: the CI-failure re-dispatch
791
+ (its `[lisa-ci-failed]` marker on the work item) wakes the owning agent. End
792
+ with the `ci-pending` terminal state (section 4) and this exact report line:
793
+
794
+ ```text
795
+ CI PENDING — <n> required checks still running at <sha>
796
+ ```
797
+
706
798
  **Poll by PR number, and never discover the PR set from "what is currently open".**
707
799
  A watcher whose target list comes from `gh pr list --state open` **cannot observe a
708
800
  merge**: the moment the PR merges it leaves that list, so the branch that would
@@ -1357,8 +1449,8 @@ gh run list --branch <baseRefName> --commit "$merge_sha" \
1357
1449
  ```
1358
1450
 
1359
1451
  **Bounded wait:** a just-created run can take a few seconds to register — poll
1360
- briefly (a small number of short intervals / a short ceiling, mirroring the "wait
1361
- for that head's checks to start" bound used above) before concluding the run is
1452
+ briefly (a small number of short intervals / a short ceiling, mirroring section 2's
1453
+ bounded CI watch) before concluding the run is
1362
1454
  absent, so a not-yet-registered run is not mis-read as zero. When no run matches
1363
1455
  the merge SHA directly, also accept a descendant run whose head has `$merge_sha`
1364
1456
  as an ancestor (`git merge-base --is-ancestor "$merge_sha" <run_head_sha>`).
@@ -1587,6 +1679,15 @@ Loop until one of:
1587
1679
  bot is rate limited and cannot re-review, and I posted my own review of the
1588
1680
  current version. Someone with dismissal rights needs to dismiss review 456,
1589
1681
  or decide it should stand."* Do not wait for the bot's window to reset.
1682
+ - **`ci-pending`** — the run's budget was spent while required checks were still
1683
+ running on an OPEN PR. The PR number, head SHA and pending check names are
1684
+ recorded in the `[lisa-ci-pending]` comment (section 2), a later failure is
1685
+ left to the `[lisa-ci-failed]` re-dispatch, and the run ends with
1686
+ `CI PENDING — <n> required checks still running at <sha>`. This is never
1687
+ reported as success: the work is not done until CI is green. If the checks
1688
+ later pass and auto-merge merges the PR, post-merge verification and
1689
+ work-item completion (section 3) are left to `lisa-repair-intake`'s
1690
+ merged-PR recovery; re-invoking this skill on the PR also completes them.
1590
1691
  - **`CLOSED`** → report (PR was closed without merge).
1591
1692
  - **Hard block needing a human**: an unresolvable conflict, a failing check that
1592
1693
  needs design input, or genuine unresolved human objection (not a bot gate). Stop
@@ -72,6 +72,55 @@ A claim that the change is "behavior-preserving", a "no-visual-regression" refac
72
72
 
73
73
  After implementation, run the verification plan. Execute each verification type in order.
74
74
 
75
+ #### Packaged Lisa applies: destination preflight
76
+
77
+ Before running a packaged Lisa apply for verification, use the package's shared
78
+ `scripts/verify-packaged-apply.mjs` controller. Select the narrowest harness
79
+ that exercises the required behavior; measure generated-copy parity separately.
80
+ Never run a verification apply directly against the operator's environment.
81
+ The controller's default host preflight refuses before spawning apply: a
82
+ temporary project, missing agent CLI, XDG override, or unchanged HOME does not
83
+ contain Antigravity's unconditional user-global MCP writer, vendor plugin
84
+ registrations, Git configuration, temporary backups, or package-manager caches.
85
+
86
+ Build the tool image from the shipped `scripts/fixtures/packaged-apply/Dockerfile`,
87
+ then use the exact candidate or published archive, a new private evidence
88
+ directory, and the same shared controller on every agent:
89
+
90
+ ```bash
91
+ docker build -t lisa-packaged-verification -f scripts/fixtures/packaged-apply/Dockerfile scripts/fixtures/packaged-apply
92
+ node scripts/verify-packaged-apply.mjs --backend docker --archive /absolute/path/lisa.tgz --image lisa-packaged-verification --harness codex --output /absolute/path/new-evidence-directory
93
+ ```
94
+
95
+ Run those paths from the installed package. Record registry integrity/version
96
+ for a published archive; a local pack establishes candidate behavior only.
97
+ Keep the CLI's release-pin checks enabled. If an unstamped local CLI pack
98
+ refuses full apply, record that refusal instead of inventing a release stamp.
99
+ To qualify a new verifier before publication, run the candidate package's
100
+ controller against an identified, genuine public CLI archive and record both
101
+ identities separately. That proves the candidate verifier and that public CLI;
102
+ repeat with the exact new public package after release before completing work.
103
+ The controller inspects the actual stopped container before starting it,
104
+ rejects host mounts/shared namespaces/privileges, and copies inputs into its
105
+ disposable filesystem. It does not change the operator's HOME or CODEX_HOME,
106
+ forward credentials, replace runtime tools, or change normal apply defaults.
107
+ Fleet requires that same proved boundary for every writer and descendant;
108
+ unresolved host destinations cause refusal, not a weaker fallback.
109
+
110
+ Add every declared outside configuration/sentinel file with repeated
111
+ `--preserve /absolute/path/file` arguments. Capture both host-authored and
112
+ Lisa-managed entries, plus absent paths, without exclusions. Preserve the full
113
+ before/after comparison on success and failure; use `--failure-control` to
114
+ exercise a genuine failed CLI child with `--harness fleet` and require
115
+ preservation even though that command returns nonzero. The control reaches
116
+ Antigravity's user-config writer after project mutations, inside the disposable
117
+ filesystem. An unexpected write stops execution; privately
118
+ preserve current bytes and report any missing before-image as unknown. Never
119
+ guess a restoration or delete the operator's settings. Generated hooks and
120
+ native allow/refuse controls establish emitted behavior; absent vendor
121
+ authentication or activation remains explicitly unverified. Docker image and
122
+ container bookkeeping is expected infrastructure state, not agent settings.
123
+
75
124
  Evidence output must explicitly label each verification result as either `verified empirically` or `artifact-only / verification deferred`. Artifact-only evidence can support a blocked escalation packet, but it cannot mark a required runtime verification complete.
76
125
 
77
126
  For a required user-visible regression spec, evidence must prove execution, not only existence. Record a CI log line, reporter output, or equivalent artifact that names the new spec and shows it ran and passed in the PR. A green CI run without named execution proof is not enough; explicitly check for `test.skip`, suite-level environment gates, shard filters, and "0 tests" passes.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.92.1",
3
+ "version": "4.93.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -703,6 +703,98 @@ Handle every blocker class; after any fix, re-poll and continue. Do not stop whi
703
703
  the PR is still open and progress is possible. On each iteration, refresh the
704
704
  babysitter lease if its last stamp is older than ~30 minutes (section 0).
705
705
 
706
+ **Waiting on CI: one bounded CI watch, in the foreground.** When the only thing
707
+ left is required checks still running, wait with a blocking watch, run under a
708
+ timeout no longer than the harness's single-command limit (`timeout 540` where
709
+ the `timeout` utility exists; otherwise the harness's own command timeout):
710
+
711
+ ```bash
712
+ timeout 540 gh pr checks <pr> --required --watch --interval 30 --fail-fast
713
+ ```
714
+
715
+ Give the tool call that runs it a timeout above that value (for example
716
+ 600000 ms on Claude Code's Bash tool), or lower 540 to fit under the harness's
717
+ limit: a harness that kills the command first loses the result the bound exists
718
+ to deliver.
719
+
720
+ When it returns, for any reason, re-poll the full PR state (the `gh pr view`
721
+ line above) and handle whatever blocker it shows exactly as below — a failed
722
+ check is step (c).
723
+ Repeat until the PR is merged, a blocker needs action, or the run's budget is spent.
724
+ **The run's budget** is the caller's stated limit when one was passed, otherwise
725
+ the point where this session cannot keep running (the harness's turn, context or
726
+ wall-clock limit). One watch timing out is NOT the budget being spent — it is
727
+ the cue to re-poll and watch again.
728
+ **A non-zero exit is not a CI failure on its own**: the
729
+ watch exits non-zero when `--fail-fast` sees a failed check, when the timeout
730
+ fires, and — with empty stdout — when the token lacks `actions: read` (section 1's arm gate).
731
+ The re-poll of `statusCheckRollup` is the authority on which one happened.
732
+
733
+ **No required checks reported yet.** The watch also returns at once when no
734
+ required check has registered on the head. First confirm whether the base
735
+ requires any, reading both places a requirement can live:
736
+
737
+ ```bash
738
+ gh api "repos/<owner>/<repo>/rules/branches/<base>" \
739
+ --jq '[.[] | select(.type == "required_status_checks")] | length'
740
+ gh api "repos/<owner>/<repo>/branches/<base>/protection/required_status_checks" \
741
+ --jq '(.contexts // []) + [(.checks // [])[].context] | length'
742
+ gh api "repos/<owner>/<repo>/branches/<base>" --jq .protected
743
+ ```
744
+
745
+ The wait does not apply only when BOTH say none: the rules read returns `0`
746
+ AND the classic read returns `0`, or 404 while the branch read says `.protected`
747
+ is `false`. GitHub also answers 404 when the token cannot read protection (it
748
+ needs admin), so a 404 on a protected branch — or any other error from either
749
+ read — means the requirement is unknown: treat the base as requiring checks.
750
+ With no required checks, the loop just re-polls for the other blockers. Otherwise the
751
+ head's checks have not started: re-poll, and re-run the bounded watch once the
752
+ re-poll shows required checks registered. Between those re-polls, wait with this
753
+ one foreground bounded gap — the `sleep` always runs, because the watch can
754
+ return at once (no checks yet, or every reported check already green while a
755
+ required one has not registered):
756
+
757
+ ```bash
758
+ timeout 60 gh pr checks <pr> --watch --interval 10; sleep 30
759
+ ```
760
+
761
+ Never a detached or unbounded sleep loop. After 10 re-polls with no required
762
+ check registered on the head, that is a blocker, not a wait: stop and name the
763
+ missing checks (report mode: `blocked:checks`).
764
+
765
+ **Report mode does not wait on CI.** With `on_blocker=report`, never run the
766
+ watch and never end in `ci-pending`: pending required checks classify through
767
+ the existing report-mode outcomes. When auto-merge is armed and pending checks
768
+ are the only thing outstanding, return `will-merge-after-resync` — the caller
769
+ keeps the item claimed and a later cycle re-reads the PR; any other standing
770
+ blocker returns its own `blocked:<reason>`.
771
+
772
+ **Never start a detached or background watcher as the way to wait on CI** — no
773
+ trailing `&`, no `nohup`, no harness background task, no scheduled re-check, no
774
+ detached or unbounded sleep loop. Each of those stalls silently, dies with the
775
+ session, or lets the session end while required checks are still pending, and
776
+ the later result then reaches nobody. The wait is the bounded watch above, and
777
+ nothing else.
778
+
779
+ **Budget spent with required checks still pending.** Do not end silently and do
780
+ not report success. Record the state on the PR in one comment carrying the
781
+ PR number, the head SHA, and the names of the required checks still pending,
782
+ deduplicated by a marker so a resumed run updates rather than repeats it. A
783
+ later run that finds that head's required checks finished edits the marker
784
+ comment to say so, so the record never reads as still pending:
785
+
786
+ ```text
787
+ <!-- [lisa-ci-pending] sha=<head-sha> -->
788
+ ```
789
+
790
+ A check that fails later is not this run's to catch: the CI-failure re-dispatch
791
+ (its `[lisa-ci-failed]` marker on the work item) wakes the owning agent. End
792
+ with the `ci-pending` terminal state (section 4) and this exact report line:
793
+
794
+ ```text
795
+ CI PENDING — <n> required checks still running at <sha>
796
+ ```
797
+
706
798
  **Poll by PR number, and never discover the PR set from "what is currently open".**
707
799
  A watcher whose target list comes from `gh pr list --state open` **cannot observe a
708
800
  merge**: the moment the PR merges it leaves that list, so the branch that would
@@ -1357,8 +1449,8 @@ gh run list --branch <baseRefName> --commit "$merge_sha" \
1357
1449
  ```
1358
1450
 
1359
1451
  **Bounded wait:** a just-created run can take a few seconds to register — poll
1360
- briefly (a small number of short intervals / a short ceiling, mirroring the "wait
1361
- for that head's checks to start" bound used above) before concluding the run is
1452
+ briefly (a small number of short intervals / a short ceiling, mirroring section 2's
1453
+ bounded CI watch) before concluding the run is
1362
1454
  absent, so a not-yet-registered run is not mis-read as zero. When no run matches
1363
1455
  the merge SHA directly, also accept a descendant run whose head has `$merge_sha`
1364
1456
  as an ancestor (`git merge-base --is-ancestor "$merge_sha" <run_head_sha>`).
@@ -1587,6 +1679,15 @@ Loop until one of:
1587
1679
  bot is rate limited and cannot re-review, and I posted my own review of the
1588
1680
  current version. Someone with dismissal rights needs to dismiss review 456,
1589
1681
  or decide it should stand."* Do not wait for the bot's window to reset.
1682
+ - **`ci-pending`** — the run's budget was spent while required checks were still
1683
+ running on an OPEN PR. The PR number, head SHA and pending check names are
1684
+ recorded in the `[lisa-ci-pending]` comment (section 2), a later failure is
1685
+ left to the `[lisa-ci-failed]` re-dispatch, and the run ends with
1686
+ `CI PENDING — <n> required checks still running at <sha>`. This is never
1687
+ reported as success: the work is not done until CI is green. If the checks
1688
+ later pass and auto-merge merges the PR, post-merge verification and
1689
+ work-item completion (section 3) are left to `lisa-repair-intake`'s
1690
+ merged-PR recovery; re-invoking this skill on the PR also completes them.
1590
1691
  - **`CLOSED`** → report (PR was closed without merge).
1591
1692
  - **Hard block needing a human**: an unresolvable conflict, a failing check that
1592
1693
  needs design input, or genuine unresolved human objection (not a bot gate). Stop
@@ -72,6 +72,55 @@ A claim that the change is "behavior-preserving", a "no-visual-regression" refac
72
72
 
73
73
  After implementation, run the verification plan. Execute each verification type in order.
74
74
 
75
+ #### Packaged Lisa applies: destination preflight
76
+
77
+ Before running a packaged Lisa apply for verification, use the package's shared
78
+ `scripts/verify-packaged-apply.mjs` controller. Select the narrowest harness
79
+ that exercises the required behavior; measure generated-copy parity separately.
80
+ Never run a verification apply directly against the operator's environment.
81
+ The controller's default host preflight refuses before spawning apply: a
82
+ temporary project, missing agent CLI, XDG override, or unchanged HOME does not
83
+ contain Antigravity's unconditional user-global MCP writer, vendor plugin
84
+ registrations, Git configuration, temporary backups, or package-manager caches.
85
+
86
+ Build the tool image from the shipped `scripts/fixtures/packaged-apply/Dockerfile`,
87
+ then use the exact candidate or published archive, a new private evidence
88
+ directory, and the same shared controller on every agent:
89
+
90
+ ```bash
91
+ docker build -t lisa-packaged-verification -f scripts/fixtures/packaged-apply/Dockerfile scripts/fixtures/packaged-apply
92
+ node scripts/verify-packaged-apply.mjs --backend docker --archive /absolute/path/lisa.tgz --image lisa-packaged-verification --harness codex --output /absolute/path/new-evidence-directory
93
+ ```
94
+
95
+ Run those paths from the installed package. Record registry integrity/version
96
+ for a published archive; a local pack establishes candidate behavior only.
97
+ Keep the CLI's release-pin checks enabled. If an unstamped local CLI pack
98
+ refuses full apply, record that refusal instead of inventing a release stamp.
99
+ To qualify a new verifier before publication, run the candidate package's
100
+ controller against an identified, genuine public CLI archive and record both
101
+ identities separately. That proves the candidate verifier and that public CLI;
102
+ repeat with the exact new public package after release before completing work.
103
+ The controller inspects the actual stopped container before starting it,
104
+ rejects host mounts/shared namespaces/privileges, and copies inputs into its
105
+ disposable filesystem. It does not change the operator's HOME or CODEX_HOME,
106
+ forward credentials, replace runtime tools, or change normal apply defaults.
107
+ Fleet requires that same proved boundary for every writer and descendant;
108
+ unresolved host destinations cause refusal, not a weaker fallback.
109
+
110
+ Add every declared outside configuration/sentinel file with repeated
111
+ `--preserve /absolute/path/file` arguments. Capture both host-authored and
112
+ Lisa-managed entries, plus absent paths, without exclusions. Preserve the full
113
+ before/after comparison on success and failure; use `--failure-control` to
114
+ exercise a genuine failed CLI child with `--harness fleet` and require
115
+ preservation even though that command returns nonzero. The control reaches
116
+ Antigravity's user-config writer after project mutations, inside the disposable
117
+ filesystem. An unexpected write stops execution; privately
118
+ preserve current bytes and report any missing before-image as unknown. Never
119
+ guess a restoration or delete the operator's settings. Generated hooks and
120
+ native allow/refuse controls establish emitted behavior; absent vendor
121
+ authentication or activation remains explicitly unverified. Docker image and
122
+ container bookkeeping is expected infrastructure state, not agent settings.
123
+
75
124
  Evidence output must explicitly label each verification result as either `verified empirically` or `artifact-only / verification deferred`. Artifact-only evidence can support a blocked escalation packet, but it cannot mark a required runtime verification complete.
76
125
 
77
126
  For a required user-visible regression spec, evidence must prove execution, not only existence. Record a CI log line, reporter output, or equivalent artifact that names the new spec and shows it ran and passed in the PR. A green CI run without named execution proof is not enough; explicitly check for `test.skip`, suite-level environment gates, shard filters, and "0 tests" passes.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.92.1",
3
+ "version": "4.93.0",
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.92.1",
3
+ "version": "4.93.0",
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.92.1",
3
+ "version": "4.93.0",
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.92.1",
3
+ "version": "4.93.0",
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.92.1",
3
+ "version": "4.93.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"