@codyswann/lisa 5.9.0 → 5.10.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/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +3 -3
- 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-session-manager/SKILL.md +11 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +11 -4
- package/plugins/lisa/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +11 -4
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- 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-session-manager/SKILL.md +11 -4
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +11 -4
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- 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-session-manager/SKILL.md +11 -4
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
- 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-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-session-manager/SKILL.md +11 -4
- package/plugins/src/base/skills/lisa-session-manager/scripts/orphan-buckets.mjs +63 -15
- package/plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs +1 -0
|
@@ -41,9 +41,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
|
|
|
41
41
|
}),
|
|
42
42
|
d1b26caeaf65950e3b60ff41964d234c032c50470072e7643310b1f6722e34e6: Object.freeze({
|
|
43
43
|
contractVersion: "1.9.0",
|
|
44
|
-
packageVersions: Object.freeze(["5.
|
|
44
|
+
packageVersions: Object.freeze(["5.10.0"]),
|
|
45
45
|
provenances: Object.freeze([
|
|
46
|
-
"workspace package @codyswann/lisa@5.
|
|
46
|
+
"workspace package @codyswann/lisa@5.10.0 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
|
|
47
47
|
]),
|
|
48
48
|
}),
|
|
49
49
|
dfd2fef680de5ef03e63075e8a61c62ca4d95cdfdff6201939b79c748d3397f6: Object.freeze({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nightly-e2e-guard-behavior-certificate.js","sourceRoot":"","sources":["../../src/core/nightly-e2e-guard-behavior-certificate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,MAAM,CAAC,MAAM,CAAC;IACnE,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,iHAAiH;SAClH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,mHAAmH;SACpH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,iHAAiH;SAClH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,mHAAmH;SACpH,CAAC;KACH,CAAC;IACJ,gEAAgE,EAC9D,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"nightly-e2e-guard-behavior-certificate.js","sourceRoot":"","sources":["../../src/core/nightly-e2e-guard-behavior-certificate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,MAAM,CAAC,MAAM,CAAC;IACnE,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,iHAAiH;SAClH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,mHAAmH;SACpH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,iHAAiH;SAClH,CAAC;KACH,CAAC;IACJ,kEAAkE,EAChE,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,mHAAmH;SACpH,CAAC;KACH,CAAC;IACJ,gEAAgE,EAC9D,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,2GAA2G;SAC5G,CAAC;KACH,CAAC;IACJ,gEAAgE,EAC9D,MAAM,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,iHAAiH;SAClH,CAAC;KACH,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -862,7 +862,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
862
862
|
"plugins/src/base/skills/lisa-security-review/SKILL.md": "6878641d8ae3c0b1e6bab736e46dd5b0fd32a5e25ca9a0eecd1e66a5fb0bfdd2",
|
|
863
863
|
"plugins/src/base/skills/lisa-security-zap-scan/SKILL.md": "a5189442dbf970cc49fd089ab03c386c8a205b856e09501f6ad1966321e7e4b5",
|
|
864
864
|
"plugins/src/base/skills/lisa-sentry-access/SKILL.md": "2dbbccc62a0d20d691e947a2612fd5a6ac5b10bbfa8ccae59c148a1262795655",
|
|
865
|
-
"plugins/src/base/skills/lisa-session-manager/SKILL.md": "
|
|
865
|
+
"plugins/src/base/skills/lisa-session-manager/SKILL.md": "9c5489e238b6109f857439c23b14890516c508fc64d866c09346bbb328732058",
|
|
866
866
|
"plugins/src/base/skills/lisa-session-manager/references/runbook-template.md": "f77f80a5e649c57b40d87aa789b0fb2dd62870b1dee84248bfa0eaa413966e1d",
|
|
867
867
|
"plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs": "88982207f9134f63c0949ebed21d05a2bcffe1f5c774739935237d78786b1813",
|
|
868
868
|
"plugins/src/base/skills/lisa-session-manager/scripts/capacity.mjs": "ad5acc6097e375868b51eaf01b1506662505e2404b7ac1b06528679718504091",
|
|
@@ -896,9 +896,9 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
896
896
|
"plugins/src/base/skills/lisa-session-manager/scripts/ledger-questions.mjs": "eb7f845b2c0ebe3ebbd233957329833cc77d3dfce5f3e5df505e336704fb7eae",
|
|
897
897
|
"plugins/src/base/skills/lisa-session-manager/scripts/ledger-setup-gaps.mjs": "bfed7726a6129fb5681433a8287f180d513c1439f7f8ff84f6eac600117bea9e",
|
|
898
898
|
"plugins/src/base/skills/lisa-session-manager/scripts/ledger.mjs": "a28a816e749bd62d7188cc7c7cb53b9784d0c8b112201228f67b87a81ebe1ff9",
|
|
899
|
-
"plugins/src/base/skills/lisa-session-manager/scripts/orphan-buckets.mjs": "
|
|
899
|
+
"plugins/src/base/skills/lisa-session-manager/scripts/orphan-buckets.mjs": "b9780f79660bf52787ea0b44601be7a2bea3d4d80831ee122175028c6bbaad60",
|
|
900
900
|
"plugins/src/base/skills/lisa-session-manager/scripts/orphan-holds.mjs": "c13b75e56464c87e7f394061b2b1a8d55385c1a7f8ce2d7d8a79c4b9f28eca4e",
|
|
901
|
-
"plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs": "
|
|
901
|
+
"plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs": "e4f119df2902b96ad40939fc5b1cab18bc5ef1353d0091389d80e6afc2ef910d",
|
|
902
902
|
"plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs": "9af014661873a2971fbc29946739088fc3e089deb8d94e78af651647450f2999",
|
|
903
903
|
"plugins/src/base/skills/lisa-session-manager/scripts/reconcile.mjs": "adf56eb60769ffb8ace6a5aefe85e37107db1d73e4d73ab4cf29ab045ca8c76c",
|
|
904
904
|
"plugins/src/base/skills/lisa-session-manager/scripts/repo-detect.mjs": "3ce714f1934433f2bc297c0b67931a28687ccef70c01639cb8542e9bb7f0a14d",
|
package/package.json
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"qs": "^6.16.0"
|
|
189
189
|
},
|
|
190
190
|
"name": "@codyswann/lisa",
|
|
191
|
-
"version": "5.
|
|
191
|
+
"version": "5.10.0",
|
|
192
192
|
"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",
|
|
193
193
|
"main": "dist/index.js",
|
|
194
194
|
"exports": {
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"test": "tests"
|
|
352
352
|
},
|
|
353
353
|
"types": "./dist/index.d.ts",
|
|
354
|
-
"lisaReleaseCommit": "
|
|
355
|
-
"gitHead": "
|
|
356
|
-
"lisaReleaseTag": "v5.
|
|
354
|
+
"lisaReleaseCommit": "4465ea586a74c676c6f1c4aa367d4d631305439b",
|
|
355
|
+
"gitHead": "4465ea586a74c676c6f1c4aa367d4d631305439b",
|
|
356
|
+
"lisaReleaseTag": "v5.10.0"
|
|
357
357
|
}
|
|
@@ -500,7 +500,7 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
500
500
|
Write `{"complete":true,"items":[{ref,role,labels,body,comments,assignees,updatedAt}],"holds":[{ref,role,labels,body,comments,assignees,updatedAt}]}`
|
|
501
501
|
to `.lisa/session-manager/orphan-input.json`: refs canonical as dispatch uses them, comments
|
|
502
502
|
as `{id,author,body,createdAt}` with the author's stable id and the comment's own posting
|
|
503
|
-
time (a refusal comment with no `createdAt` never ages out of its 24-hour
|
|
503
|
+
time (a refusal comment with no `createdAt` never ages out of its 24-hour window), assignees as `{login,id}` objects on GitHub (the REST
|
|
504
504
|
`.assignees[].id`) and as the account or user id on Jira and Linear, and each hold's `role` as
|
|
505
505
|
the lifecycle role it is in (`ready`, `claimed`, `review`, `blocked`, `done`), so a lift never
|
|
506
506
|
moves an item that is in a lane back to the `ready` role. On Jira and Linear a hold with no
|
|
@@ -530,9 +530,16 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
530
530
|
- `doneReady`: the pull request merged. In the item's repo dir run
|
|
531
531
|
`node scripts/lisa-work-item.mjs finish --ref <ref> --pr-url <prUrl>`. If it refuses, post
|
|
532
532
|
one comment that starts `[lisa-session-manager] Cannot complete:` and says, in plain words,
|
|
533
|
-
why the item cannot complete yet.
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
why the item cannot complete yet. Then, when the entry has a `returnComment`, re-read the item
|
|
534
|
+
and leave it in place if a person now holds it; otherwise move the item to the `ready` role
|
|
535
|
+
with that comment: the code work is merged, so the next agent finishes only
|
|
536
|
+
the missing step instead of redoing it. An entry with no `returnComment` is held by a person
|
|
537
|
+
or is in the `review` role; leave it where it is. A later cycle that still sees a recent refusal puts the item
|
|
538
|
+
in `return`, or in `parked` when a person holds it or it is in the `review` role, and retries
|
|
539
|
+
finishing once the refusal is more than 24 hours old.
|
|
540
|
+
- `return`: move it to the `ready` role with the entry's `comment`. A merged item whose
|
|
541
|
+
completion was refused, and an item whose pull request was closed without merging, land here
|
|
542
|
+
with a comment that names that pull request, so the next agent builds on the earlier work.
|
|
536
543
|
- `redispatch`: an open pull request and no worker. Claim it (`reused`) and `spawn` it exactly
|
|
537
544
|
as Dispatch steps 2.3 and 2.4, ahead of new items, while `capacity` says `can_spawn`. A
|
|
538
545
|
spawn that reaches `stall.maxAttempts` follows the `exhausted` row above.
|
|
@@ -21,15 +21,16 @@ export const SWEEP_COMMENT_PREFIX = "[lisa-session-manager]";
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* How the comment the manager posts when `lisa-work-item.mjs finish`
|
|
24
|
-
* refuses an item begins. A later cycle that sees a recent one
|
|
25
|
-
*
|
|
24
|
+
* refuses an item begins. A later cycle that sees a recent one does not try
|
|
25
|
+
* to finish it again: it returns the item to Ready (or parks it, when a
|
|
26
|
+
* person holds it).
|
|
26
27
|
*/
|
|
27
28
|
export const FINISH_REFUSED_PREFIX = `${SWEEP_COMMENT_PREFIX} Cannot complete:`;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
* How long a refusal
|
|
31
|
-
* refusal's cause (a missing deploy, a slow check) is often
|
|
32
|
-
*
|
|
31
|
+
* How long a refusal stops finishing from being retried. After that it is
|
|
32
|
+
* retried: the refusal's cause (a missing deploy, a slow check) is often
|
|
33
|
+
* fixed by then.
|
|
33
34
|
*/
|
|
34
35
|
export const FINISH_RETRY_HOURS = 24;
|
|
35
36
|
|
|
@@ -164,22 +165,65 @@ function completionRefused(item, policy) {
|
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
/**
|
|
167
|
-
* The
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
168
|
+
* The note on a merged item sent back to Ready because it could not complete:
|
|
169
|
+
* the code work is done, so the next agent finishes only the missing step.
|
|
170
|
+
* @param {string | undefined} prUrl - The merged pull request
|
|
171
|
+
* @returns {string} Comment body
|
|
172
|
+
*/
|
|
173
|
+
export function mergedReturnComment(prUrl) {
|
|
174
|
+
return (
|
|
175
|
+
`${SWEEP_COMMENT_PREFIX} Returned to Ready: its pull request ${prUrl ?? ""} is merged, ` +
|
|
176
|
+
"so the code work is done, but the item could not be completed and no worker is " +
|
|
177
|
+
`finishing it. The \`${FINISH_REFUSED_PREFIX}\` comment says what is missing. ` +
|
|
178
|
+
"The next agent should finish only that step and not redo the merged work."
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The bucket for a merged item. With no recent refusal it is finished. When
|
|
184
|
+
* completion was refused (a deploy not yet verified, say), the code work is
|
|
185
|
+
* done but nobody is finishing the rest, so it goes back to the `ready` role
|
|
186
|
+
* with a note that only the missing step is left (CodySwannGT/lisa#4906). A
|
|
187
|
+
* held item stays parked: returning it would spend a person's hold. So does an
|
|
188
|
+
* item in the `review` role: it is already past the build and waiting on
|
|
189
|
+
* review, deploy or verification — often the very step completion refused on —
|
|
190
|
+
* so returning it to Ready would move it backwards.
|
|
191
|
+
* @param {{ref: string, role?: unknown, pr: {url?: string}, comments?: unknown}} item - Item
|
|
171
192
|
* @param {{now: number, finishRetryMs: number}} policy - Resolved policy
|
|
172
193
|
* @returns {{bucket: string, entry: object}} Bucket and its entry
|
|
173
194
|
*/
|
|
174
195
|
function mergedBucket(item, policy) {
|
|
175
196
|
const { ref, pr } = item;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
const held = isHeld(item, policy);
|
|
198
|
+
const inReview = item.role === "review";
|
|
199
|
+
if (!completionRefused(item, policy)) {
|
|
200
|
+
const reason = "its pull request merged; only completion is missing";
|
|
201
|
+
// When this cycle's finish is refused, the manager returns the item with
|
|
202
|
+
// `returnComment` straight away, unless a person holds it or it is in
|
|
203
|
+
// review.
|
|
204
|
+
const back =
|
|
205
|
+
held || inReview ? {} : { returnComment: mergedReturnComment(pr.url) };
|
|
206
|
+
return {
|
|
207
|
+
bucket: "doneReady",
|
|
208
|
+
entry: { ref, prUrl: pr.url, reason, ...back },
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (held || inReview) {
|
|
212
|
+
const reason = held
|
|
213
|
+
? "its pull request merged but completion was refused, and a person holds it"
|
|
214
|
+
: "in review: its pull request merged but completion was refused; the refusal on the item says why";
|
|
179
215
|
return { bucket: "parked", entry: { ref, reason, reasonOnItem: true } };
|
|
180
216
|
}
|
|
181
|
-
|
|
182
|
-
|
|
217
|
+
return {
|
|
218
|
+
bucket: "return",
|
|
219
|
+
entry: {
|
|
220
|
+
ref,
|
|
221
|
+
prUrl: pr.url,
|
|
222
|
+
reason:
|
|
223
|
+
"its pull request merged but completion was refused, and no worker is finishing it",
|
|
224
|
+
comment: mergedReturnComment(pr.url),
|
|
225
|
+
},
|
|
226
|
+
};
|
|
183
227
|
}
|
|
184
228
|
|
|
185
229
|
/**
|
|
@@ -222,12 +266,16 @@ export function classifyOrphan(item, policy) {
|
|
|
222
266
|
}
|
|
223
267
|
if (state === "open") return openBucket(item);
|
|
224
268
|
const age = ageInWords(policy.now - new Date(item.updatedAt).getTime());
|
|
269
|
+
const earlier =
|
|
270
|
+
state === "closed"
|
|
271
|
+
? ` An earlier pull request, ${pr.url ?? ""}, was closed without merging; reuse or learn from it rather than starting over.`
|
|
272
|
+
: "";
|
|
225
273
|
return {
|
|
226
274
|
bucket: "return",
|
|
227
275
|
entry: {
|
|
228
276
|
ref,
|
|
229
277
|
reason: "no live worker and no open or merged pull request",
|
|
230
|
-
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request
|
|
278
|
+
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request.${earlier}`,
|
|
231
279
|
},
|
|
232
280
|
};
|
|
233
281
|
}
|
|
@@ -498,7 +498,7 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
498
498
|
Write `{"complete":true,"items":[{ref,role,labels,body,comments,assignees,updatedAt}],"holds":[{ref,role,labels,body,comments,assignees,updatedAt}]}`
|
|
499
499
|
to `.lisa/session-manager/orphan-input.json`: refs canonical as dispatch uses them, comments
|
|
500
500
|
as `{id,author,body,createdAt}` with the author's stable id and the comment's own posting
|
|
501
|
-
time (a refusal comment with no `createdAt` never ages out of its 24-hour
|
|
501
|
+
time (a refusal comment with no `createdAt` never ages out of its 24-hour window), assignees as `{login,id}` objects on GitHub (the REST
|
|
502
502
|
`.assignees[].id`) and as the account or user id on Jira and Linear, and each hold's `role` as
|
|
503
503
|
the lifecycle role it is in (`ready`, `claimed`, `review`, `blocked`, `done`), so a lift never
|
|
504
504
|
moves an item that is in a lane back to the `ready` role. On Jira and Linear a hold with no
|
|
@@ -528,9 +528,16 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
528
528
|
- `doneReady`: the pull request merged. In the item's repo dir run
|
|
529
529
|
`node scripts/lisa-work-item.mjs finish --ref <ref> --pr-url <prUrl>`. If it refuses, post
|
|
530
530
|
one comment that starts `[lisa-session-manager] Cannot complete:` and says, in plain words,
|
|
531
|
-
why the item cannot complete yet.
|
|
532
|
-
|
|
533
|
-
|
|
531
|
+
why the item cannot complete yet. Then, when the entry has a `returnComment`, re-read the item
|
|
532
|
+
and leave it in place if a person now holds it; otherwise move the item to the `ready` role
|
|
533
|
+
with that comment: the code work is merged, so the next agent finishes only
|
|
534
|
+
the missing step instead of redoing it. An entry with no `returnComment` is held by a person
|
|
535
|
+
or is in the `review` role; leave it where it is. A later cycle that still sees a recent refusal puts the item
|
|
536
|
+
in `return`, or in `parked` when a person holds it or it is in the `review` role, and retries
|
|
537
|
+
finishing once the refusal is more than 24 hours old.
|
|
538
|
+
- `return`: move it to the `ready` role with the entry's `comment`. A merged item whose
|
|
539
|
+
completion was refused, and an item whose pull request was closed without merging, land here
|
|
540
|
+
with a comment that names that pull request, so the next agent builds on the earlier work.
|
|
534
541
|
- `redispatch`: an open pull request and no worker. Claim it (`reused`) and `spawn` it exactly
|
|
535
542
|
as Dispatch steps 2.3 and 2.4, ahead of new items, while `capacity` says `can_spawn`. A
|
|
536
543
|
spawn that reaches `stall.maxAttempts` follows the `exhausted` row above.
|
|
@@ -21,15 +21,16 @@ export const SWEEP_COMMENT_PREFIX = "[lisa-session-manager]";
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* How the comment the manager posts when `lisa-work-item.mjs finish`
|
|
24
|
-
* refuses an item begins. A later cycle that sees a recent one
|
|
25
|
-
*
|
|
24
|
+
* refuses an item begins. A later cycle that sees a recent one does not try
|
|
25
|
+
* to finish it again: it returns the item to Ready (or parks it, when a
|
|
26
|
+
* person holds it).
|
|
26
27
|
*/
|
|
27
28
|
export const FINISH_REFUSED_PREFIX = `${SWEEP_COMMENT_PREFIX} Cannot complete:`;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
* How long a refusal
|
|
31
|
-
* refusal's cause (a missing deploy, a slow check) is often
|
|
32
|
-
*
|
|
31
|
+
* How long a refusal stops finishing from being retried. After that it is
|
|
32
|
+
* retried: the refusal's cause (a missing deploy, a slow check) is often
|
|
33
|
+
* fixed by then.
|
|
33
34
|
*/
|
|
34
35
|
export const FINISH_RETRY_HOURS = 24;
|
|
35
36
|
|
|
@@ -164,22 +165,65 @@ function completionRefused(item, policy) {
|
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
/**
|
|
167
|
-
* The
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
168
|
+
* The note on a merged item sent back to Ready because it could not complete:
|
|
169
|
+
* the code work is done, so the next agent finishes only the missing step.
|
|
170
|
+
* @param {string | undefined} prUrl - The merged pull request
|
|
171
|
+
* @returns {string} Comment body
|
|
172
|
+
*/
|
|
173
|
+
export function mergedReturnComment(prUrl) {
|
|
174
|
+
return (
|
|
175
|
+
`${SWEEP_COMMENT_PREFIX} Returned to Ready: its pull request ${prUrl ?? ""} is merged, ` +
|
|
176
|
+
"so the code work is done, but the item could not be completed and no worker is " +
|
|
177
|
+
`finishing it. The \`${FINISH_REFUSED_PREFIX}\` comment says what is missing. ` +
|
|
178
|
+
"The next agent should finish only that step and not redo the merged work."
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The bucket for a merged item. With no recent refusal it is finished. When
|
|
184
|
+
* completion was refused (a deploy not yet verified, say), the code work is
|
|
185
|
+
* done but nobody is finishing the rest, so it goes back to the `ready` role
|
|
186
|
+
* with a note that only the missing step is left (CodySwannGT/lisa#4906). A
|
|
187
|
+
* held item stays parked: returning it would spend a person's hold. So does an
|
|
188
|
+
* item in the `review` role: it is already past the build and waiting on
|
|
189
|
+
* review, deploy or verification — often the very step completion refused on —
|
|
190
|
+
* so returning it to Ready would move it backwards.
|
|
191
|
+
* @param {{ref: string, role?: unknown, pr: {url?: string}, comments?: unknown}} item - Item
|
|
171
192
|
* @param {{now: number, finishRetryMs: number}} policy - Resolved policy
|
|
172
193
|
* @returns {{bucket: string, entry: object}} Bucket and its entry
|
|
173
194
|
*/
|
|
174
195
|
function mergedBucket(item, policy) {
|
|
175
196
|
const { ref, pr } = item;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
const held = isHeld(item, policy);
|
|
198
|
+
const inReview = item.role === "review";
|
|
199
|
+
if (!completionRefused(item, policy)) {
|
|
200
|
+
const reason = "its pull request merged; only completion is missing";
|
|
201
|
+
// When this cycle's finish is refused, the manager returns the item with
|
|
202
|
+
// `returnComment` straight away, unless a person holds it or it is in
|
|
203
|
+
// review.
|
|
204
|
+
const back =
|
|
205
|
+
held || inReview ? {} : { returnComment: mergedReturnComment(pr.url) };
|
|
206
|
+
return {
|
|
207
|
+
bucket: "doneReady",
|
|
208
|
+
entry: { ref, prUrl: pr.url, reason, ...back },
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (held || inReview) {
|
|
212
|
+
const reason = held
|
|
213
|
+
? "its pull request merged but completion was refused, and a person holds it"
|
|
214
|
+
: "in review: its pull request merged but completion was refused; the refusal on the item says why";
|
|
179
215
|
return { bucket: "parked", entry: { ref, reason, reasonOnItem: true } };
|
|
180
216
|
}
|
|
181
|
-
|
|
182
|
-
|
|
217
|
+
return {
|
|
218
|
+
bucket: "return",
|
|
219
|
+
entry: {
|
|
220
|
+
ref,
|
|
221
|
+
prUrl: pr.url,
|
|
222
|
+
reason:
|
|
223
|
+
"its pull request merged but completion was refused, and no worker is finishing it",
|
|
224
|
+
comment: mergedReturnComment(pr.url),
|
|
225
|
+
},
|
|
226
|
+
};
|
|
183
227
|
}
|
|
184
228
|
|
|
185
229
|
/**
|
|
@@ -222,12 +266,16 @@ export function classifyOrphan(item, policy) {
|
|
|
222
266
|
}
|
|
223
267
|
if (state === "open") return openBucket(item);
|
|
224
268
|
const age = ageInWords(policy.now - new Date(item.updatedAt).getTime());
|
|
269
|
+
const earlier =
|
|
270
|
+
state === "closed"
|
|
271
|
+
? ` An earlier pull request, ${pr.url ?? ""}, was closed without merging; reuse or learn from it rather than starting over.`
|
|
272
|
+
: "";
|
|
225
273
|
return {
|
|
226
274
|
bucket: "return",
|
|
227
275
|
entry: {
|
|
228
276
|
ref,
|
|
229
277
|
reason: "no live worker and no open or merged pull request",
|
|
230
|
-
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request
|
|
278
|
+
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request.${earlier}`,
|
|
231
279
|
},
|
|
232
280
|
};
|
|
233
281
|
}
|
|
@@ -498,7 +498,7 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
498
498
|
Write `{"complete":true,"items":[{ref,role,labels,body,comments,assignees,updatedAt}],"holds":[{ref,role,labels,body,comments,assignees,updatedAt}]}`
|
|
499
499
|
to `.lisa/session-manager/orphan-input.json`: refs canonical as dispatch uses them, comments
|
|
500
500
|
as `{id,author,body,createdAt}` with the author's stable id and the comment's own posting
|
|
501
|
-
time (a refusal comment with no `createdAt` never ages out of its 24-hour
|
|
501
|
+
time (a refusal comment with no `createdAt` never ages out of its 24-hour window), assignees as `{login,id}` objects on GitHub (the REST
|
|
502
502
|
`.assignees[].id`) and as the account or user id on Jira and Linear, and each hold's `role` as
|
|
503
503
|
the lifecycle role it is in (`ready`, `claimed`, `review`, `blocked`, `done`), so a lift never
|
|
504
504
|
moves an item that is in a lane back to the `ready` role. On Jira and Linear a hold with no
|
|
@@ -528,9 +528,16 @@ just as long. Sweep both every cycle, after `classify` and before Dispatch:
|
|
|
528
528
|
- `doneReady`: the pull request merged. In the item's repo dir run
|
|
529
529
|
`node scripts/lisa-work-item.mjs finish --ref <ref> --pr-url <prUrl>`. If it refuses, post
|
|
530
530
|
one comment that starts `[lisa-session-manager] Cannot complete:` and says, in plain words,
|
|
531
|
-
why the item cannot complete yet.
|
|
532
|
-
|
|
533
|
-
|
|
531
|
+
why the item cannot complete yet. Then, when the entry has a `returnComment`, re-read the item
|
|
532
|
+
and leave it in place if a person now holds it; otherwise move the item to the `ready` role
|
|
533
|
+
with that comment: the code work is merged, so the next agent finishes only
|
|
534
|
+
the missing step instead of redoing it. An entry with no `returnComment` is held by a person
|
|
535
|
+
or is in the `review` role; leave it where it is. A later cycle that still sees a recent refusal puts the item
|
|
536
|
+
in `return`, or in `parked` when a person holds it or it is in the `review` role, and retries
|
|
537
|
+
finishing once the refusal is more than 24 hours old.
|
|
538
|
+
- `return`: move it to the `ready` role with the entry's `comment`. A merged item whose
|
|
539
|
+
completion was refused, and an item whose pull request was closed without merging, land here
|
|
540
|
+
with a comment that names that pull request, so the next agent builds on the earlier work.
|
|
534
541
|
- `redispatch`: an open pull request and no worker. Claim it (`reused`) and `spawn` it exactly
|
|
535
542
|
as Dispatch steps 2.3 and 2.4, ahead of new items, while `capacity` says `can_spawn`. A
|
|
536
543
|
spawn that reaches `stall.maxAttempts` follows the `exhausted` row above.
|
|
@@ -21,15 +21,16 @@ export const SWEEP_COMMENT_PREFIX = "[lisa-session-manager]";
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* How the comment the manager posts when `lisa-work-item.mjs finish`
|
|
24
|
-
* refuses an item begins. A later cycle that sees a recent one
|
|
25
|
-
*
|
|
24
|
+
* refuses an item begins. A later cycle that sees a recent one does not try
|
|
25
|
+
* to finish it again: it returns the item to Ready (or parks it, when a
|
|
26
|
+
* person holds it).
|
|
26
27
|
*/
|
|
27
28
|
export const FINISH_REFUSED_PREFIX = `${SWEEP_COMMENT_PREFIX} Cannot complete:`;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
* How long a refusal
|
|
31
|
-
* refusal's cause (a missing deploy, a slow check) is often
|
|
32
|
-
*
|
|
31
|
+
* How long a refusal stops finishing from being retried. After that it is
|
|
32
|
+
* retried: the refusal's cause (a missing deploy, a slow check) is often
|
|
33
|
+
* fixed by then.
|
|
33
34
|
*/
|
|
34
35
|
export const FINISH_RETRY_HOURS = 24;
|
|
35
36
|
|
|
@@ -164,22 +165,65 @@ function completionRefused(item, policy) {
|
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
/**
|
|
167
|
-
* The
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
168
|
+
* The note on a merged item sent back to Ready because it could not complete:
|
|
169
|
+
* the code work is done, so the next agent finishes only the missing step.
|
|
170
|
+
* @param {string | undefined} prUrl - The merged pull request
|
|
171
|
+
* @returns {string} Comment body
|
|
172
|
+
*/
|
|
173
|
+
export function mergedReturnComment(prUrl) {
|
|
174
|
+
return (
|
|
175
|
+
`${SWEEP_COMMENT_PREFIX} Returned to Ready: its pull request ${prUrl ?? ""} is merged, ` +
|
|
176
|
+
"so the code work is done, but the item could not be completed and no worker is " +
|
|
177
|
+
`finishing it. The \`${FINISH_REFUSED_PREFIX}\` comment says what is missing. ` +
|
|
178
|
+
"The next agent should finish only that step and not redo the merged work."
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The bucket for a merged item. With no recent refusal it is finished. When
|
|
184
|
+
* completion was refused (a deploy not yet verified, say), the code work is
|
|
185
|
+
* done but nobody is finishing the rest, so it goes back to the `ready` role
|
|
186
|
+
* with a note that only the missing step is left (CodySwannGT/lisa#4906). A
|
|
187
|
+
* held item stays parked: returning it would spend a person's hold. So does an
|
|
188
|
+
* item in the `review` role: it is already past the build and waiting on
|
|
189
|
+
* review, deploy or verification — often the very step completion refused on —
|
|
190
|
+
* so returning it to Ready would move it backwards.
|
|
191
|
+
* @param {{ref: string, role?: unknown, pr: {url?: string}, comments?: unknown}} item - Item
|
|
171
192
|
* @param {{now: number, finishRetryMs: number}} policy - Resolved policy
|
|
172
193
|
* @returns {{bucket: string, entry: object}} Bucket and its entry
|
|
173
194
|
*/
|
|
174
195
|
function mergedBucket(item, policy) {
|
|
175
196
|
const { ref, pr } = item;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
const held = isHeld(item, policy);
|
|
198
|
+
const inReview = item.role === "review";
|
|
199
|
+
if (!completionRefused(item, policy)) {
|
|
200
|
+
const reason = "its pull request merged; only completion is missing";
|
|
201
|
+
// When this cycle's finish is refused, the manager returns the item with
|
|
202
|
+
// `returnComment` straight away, unless a person holds it or it is in
|
|
203
|
+
// review.
|
|
204
|
+
const back =
|
|
205
|
+
held || inReview ? {} : { returnComment: mergedReturnComment(pr.url) };
|
|
206
|
+
return {
|
|
207
|
+
bucket: "doneReady",
|
|
208
|
+
entry: { ref, prUrl: pr.url, reason, ...back },
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (held || inReview) {
|
|
212
|
+
const reason = held
|
|
213
|
+
? "its pull request merged but completion was refused, and a person holds it"
|
|
214
|
+
: "in review: its pull request merged but completion was refused; the refusal on the item says why";
|
|
179
215
|
return { bucket: "parked", entry: { ref, reason, reasonOnItem: true } };
|
|
180
216
|
}
|
|
181
|
-
|
|
182
|
-
|
|
217
|
+
return {
|
|
218
|
+
bucket: "return",
|
|
219
|
+
entry: {
|
|
220
|
+
ref,
|
|
221
|
+
prUrl: pr.url,
|
|
222
|
+
reason:
|
|
223
|
+
"its pull request merged but completion was refused, and no worker is finishing it",
|
|
224
|
+
comment: mergedReturnComment(pr.url),
|
|
225
|
+
},
|
|
226
|
+
};
|
|
183
227
|
}
|
|
184
228
|
|
|
185
229
|
/**
|
|
@@ -222,12 +266,16 @@ export function classifyOrphan(item, policy) {
|
|
|
222
266
|
}
|
|
223
267
|
if (state === "open") return openBucket(item);
|
|
224
268
|
const age = ageInWords(policy.now - new Date(item.updatedAt).getTime());
|
|
269
|
+
const earlier =
|
|
270
|
+
state === "closed"
|
|
271
|
+
? ` An earlier pull request, ${pr.url ?? ""}, was closed without merging; reuse or learn from it rather than starting over.`
|
|
272
|
+
: "";
|
|
225
273
|
return {
|
|
226
274
|
bucket: "return",
|
|
227
275
|
entry: {
|
|
228
276
|
ref,
|
|
229
277
|
reason: "no live worker and no open or merged pull request",
|
|
230
|
-
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request
|
|
278
|
+
comment: `${SWEEP_COMMENT_PREFIX} Returned to Ready: claimed ${age} with no live worker and no open or merged pull request.${earlier}`,
|
|
231
279
|
},
|
|
232
280
|
};
|
|
233
281
|
}
|