@codyswann/lisa 4.92.2 → 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.
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +34 -1
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +103 -2
package/package.json
CHANGED
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"qs": "^6.16.0"
|
|
192
192
|
},
|
|
193
193
|
"name": "@codyswann/lisa",
|
|
194
|
-
"version": "4.
|
|
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": "
|
|
353
|
-
"gitHead": "
|
|
354
|
-
"lisaReleaseTag": "v4.
|
|
352
|
+
"lisaReleaseCommit": "38d62c0a3afb979c6e82bf5ff388a86fb045d47d",
|
|
353
|
+
"gitHead": "38d62c0a3afb979c6e82bf5ff388a86fb045d47d",
|
|
354
|
+
"lisaReleaseTag": "v4.93.0"
|
|
355
355
|
}
|
|
@@ -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
|
|
1363
|
-
|
|
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
|
|
@@ -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
|
|
1361
|
-
|
|
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
|
|
@@ -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
|
|
1361
|
-
|
|
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
|
|
@@ -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
|
|
1361
|
-
|
|
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
|