@codyswann/lisa 8.7.0 → 8.7.1
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/README.md +9 -0
- package/all/copy-overwrite/scripts/lib/changed-paths.mjs +146 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-content.mjs +6 -2
- package/all/copy-overwrite/scripts/lisa-gates.mjs +16 -1
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +297 -177
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +24 -0
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +7 -6
- package/all/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
- package/dist/cli/apply-cmd.d.ts +10 -0
- package/dist/cli/apply-cmd.d.ts.map +1 -0
- package/dist/cli/apply-cmd.js +28 -0
- package/dist/cli/apply-cmd.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +56 -4
- package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -5
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +7 -7
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +65 -24
- package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +4 -1
- package/expo/create-only/tsconfig.local.json +6 -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/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
- package/plugins/lisa/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +18 -12
- package/plugins/lisa/rules/reference/config-resolution.md +2 -2
- package/plugins/lisa/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa-agy/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa-agy/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -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/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +18 -12
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +2 -2
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa-copilot/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa-copilot/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +18 -12
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +2 -2
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa-cursor/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa-cursor/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -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/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/lisa-devin/hooks/threshold-ratchet-compare.mjs +18 -12
- package/plugins/lisa-devin/rules/reference/config-resolution.md +2 -2
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +43 -18
- package/plugins/lisa-devin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/lisa-devin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -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/hooks/block-direct-issue-create.sh +297 -177
- package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +18 -12
- package/plugins/src/base/rules/reference/config-resolution.md +2 -2
- package/plugins/src/base/scripts/ready-queue-order.mjs +43 -18
- package/plugins/src/base/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +6 -1
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -2
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
- package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
- package/plugins/src/base/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
- package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
- package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
- package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
- package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"zod": "^4.6.7"
|
|
200
200
|
},
|
|
201
201
|
"name": "@codyswann/lisa",
|
|
202
|
-
"version": "8.7.
|
|
202
|
+
"version": "8.7.1",
|
|
203
203
|
"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",
|
|
204
204
|
"main": "dist/index.js",
|
|
205
205
|
"exports": {
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"optional": true
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
"lisaReleaseCommit": "
|
|
374
|
-
"gitHead": "
|
|
375
|
-
"lisaReleaseTag": "v8.7.
|
|
373
|
+
"lisaReleaseCommit": "8c415f1760f8bfed7d9ca3925fa1f8b85ec70fd5",
|
|
374
|
+
"gitHead": "8c415f1760f8bfed7d9ca3925fa1f8b85ec70fd5",
|
|
375
|
+
"lisaReleaseTag": "v8.7.1"
|
|
376
376
|
}
|
|
@@ -464,6 +464,43 @@ function isTrustedAuthor(item, context) {
|
|
|
464
464
|
return context.trusted.some(entry => entryMatches(entry, fields));
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
+
/**
|
|
468
|
+
* @typedef {object} OrderingOptions
|
|
469
|
+
* @property {string | null} [me] - Current tracker identity
|
|
470
|
+
* @property {readonly unknown[]} [operators] - Configured operator identities
|
|
471
|
+
* @property {readonly unknown[]} [trustedAuthorIds] - Configured issue authors
|
|
472
|
+
* @property {readonly string[]} [trustedHumanActorIds] - Configured hold releasers
|
|
473
|
+
* @property {(ref: string) => unknown} [commentsFor] - Current provider comments
|
|
474
|
+
* @property {string} [humanNeededLabel] - Human-needed label
|
|
475
|
+
* @property {unknown} [humanOnly] - Human-only reasons
|
|
476
|
+
* @property {unknown} [humanGateMode] - Human-gate mode
|
|
477
|
+
*/
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Read comments only when a hold is still active and the policy can honor a release.
|
|
481
|
+
* @param {Record<string, any>} item - Normalized issue
|
|
482
|
+
* @param {ReturnType<typeof orderingContext>} context - Queue policy
|
|
483
|
+
* @returns {boolean} Whether a hold still bars dispatch
|
|
484
|
+
*/
|
|
485
|
+
function hasUnreleasedHold(item, context) {
|
|
486
|
+
const hold = {
|
|
487
|
+
labels: item.labels,
|
|
488
|
+
body: item.body,
|
|
489
|
+
comments: item.comments,
|
|
490
|
+
trustedHumanActorIds:
|
|
491
|
+
context.trustedHumanActorIds ?? item.trustedHumanActorIds,
|
|
492
|
+
humanNeededLabel: context.humanNeededLabel,
|
|
493
|
+
humanOnly: context.humanOnly,
|
|
494
|
+
humanGateMode: context.humanGateMode,
|
|
495
|
+
};
|
|
496
|
+
return (
|
|
497
|
+
isHumanGated(hold) &&
|
|
498
|
+
(!context.commentsFor ||
|
|
499
|
+
!hold.trustedHumanActorIds?.length ||
|
|
500
|
+
isHumanGated({ ...hold, comments: context.commentsFor(item.ref) }))
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
|
|
467
504
|
/**
|
|
468
505
|
* Why an item may not be dispatched, or null when it may.
|
|
469
506
|
*
|
|
@@ -483,21 +520,7 @@ function exclusionReason(item, context) {
|
|
|
483
520
|
return "assigned-to-other";
|
|
484
521
|
}
|
|
485
522
|
if (item.isContainer === true) return "container";
|
|
486
|
-
if (
|
|
487
|
-
isHumanGated({
|
|
488
|
-
labels: item.labels,
|
|
489
|
-
body: item.body,
|
|
490
|
-
comments: item.comments,
|
|
491
|
-
trustedHumanActorIds: item.trustedHumanActorIds,
|
|
492
|
-
humanNeededLabel: context.humanNeededLabel,
|
|
493
|
-
// The project's policy decides whether a lifted hold is valid again
|
|
494
|
-
// (CodySwannGT/lisa#4687): omitted, strict holds read as access-only.
|
|
495
|
-
humanOnly: context.humanOnly,
|
|
496
|
-
humanGateMode: context.humanGateMode,
|
|
497
|
-
})
|
|
498
|
-
) {
|
|
499
|
-
return "human-gated";
|
|
500
|
-
}
|
|
523
|
+
if (hasUnreleasedHold(item, context)) return "human-gated";
|
|
501
524
|
if (context.trusted.length > 0 && !isTrustedAuthor(item, context)) {
|
|
502
525
|
return "untrusted-author";
|
|
503
526
|
}
|
|
@@ -536,7 +559,7 @@ function compareWithinGroup(left, right) {
|
|
|
536
559
|
* `blockers-unreadable` (CodySwannGT/lisa#5065); every other item is still
|
|
537
560
|
* offered.
|
|
538
561
|
* @param {readonly Record<string, any>[]} items - Normalized items
|
|
539
|
-
* @param {
|
|
562
|
+
* @param {OrderingOptions} [options]
|
|
540
563
|
* @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
|
|
541
564
|
*/
|
|
542
565
|
export function orderReadyQueue(items, options = {}) {
|
|
@@ -572,7 +595,7 @@ function unreadableBlockers(item) {
|
|
|
572
595
|
* again, so it waits until someone edits it. Grouping and ordering match
|
|
573
596
|
* {@link orderReadyQueue}.
|
|
574
597
|
* @param {readonly Record<string, any>[]} items - Normalized items
|
|
575
|
-
* @param {
|
|
598
|
+
* @param {OrderingOptions & { validationFailures?: Readonly<Record<string, { updatedAt?: string }>> }} [options]
|
|
576
599
|
* @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
|
|
577
600
|
*/
|
|
578
601
|
export function orderBacklogQueue(items, options = {}) {
|
|
@@ -614,13 +637,15 @@ function configuredEntries(entries) {
|
|
|
614
637
|
|
|
615
638
|
/**
|
|
616
639
|
* The identities and policy every ordering judges against.
|
|
617
|
-
* @param {
|
|
640
|
+
* @param {OrderingOptions} options
|
|
618
641
|
*/
|
|
619
642
|
function orderingContext(options) {
|
|
620
643
|
return {
|
|
621
644
|
me: idOrNull(options.me),
|
|
622
645
|
operators: configuredEntries(options.operators),
|
|
623
646
|
trusted: configuredEntries(options.trustedAuthorIds),
|
|
647
|
+
trustedHumanActorIds: options.trustedHumanActorIds,
|
|
648
|
+
commentsFor: options.commentsFor,
|
|
624
649
|
humanNeededLabel: options.humanNeededLabel ?? DEFAULT_HUMAN_NEEDED_LABEL,
|
|
625
650
|
humanOnly: options.humanOnly,
|
|
626
651
|
humanGateMode: options.humanGateMode,
|
package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/missing-capability-tickets.md
CHANGED
|
@@ -19,8 +19,7 @@ file in.
|
|
|
19
19
|
|
|
20
20
|
Two things follow, and both are rules:
|
|
21
21
|
|
|
22
|
-
- **
|
|
23
|
-
out by an agent can differ between two runs, and then the second run files a duplicate.
|
|
22
|
+
- **Copy each gap's key and marker exactly as printed.** A key worked out by an agent can differ between two runs, and then the second run files a duplicate.
|
|
24
23
|
- **Never create a ticket any other way.** No direct tracker command, no vendor-specific writer.
|
|
25
24
|
Every ticket goes through `lisa-tracker-write`.
|
|
26
25
|
|
|
@@ -124,7 +123,8 @@ the tickets with their descriptions and look through them for the key before dec
|
|
|
124
123
|
**A ticket is this gap's ticket only when its description contains both `lisa-control-gap` and
|
|
125
124
|
`key=<key>`.** Match on those two pieces of text and nothing else: never on the title, and never on
|
|
126
125
|
`criterion=` or `scope=` alone. A tracker may show the brackets escaped, or change the spacing; the
|
|
127
|
-
tag and the key come back unchanged.
|
|
126
|
+
tag and the key come back unchanged. Skip a parent marker when matching a gap, even if the
|
|
127
|
+
parent's description happens to mention the gap's key.
|
|
128
128
|
|
|
129
129
|
If the search cannot be run (the tracker cannot be reached, or the credentials were refused), do
|
|
130
130
|
not create anything for that entry. Its result is `blocked`, with a reason that says the tracker
|
|
@@ -151,10 +151,49 @@ first.
|
|
|
151
151
|
**An existing ticket is never changed by this flow.** In particular, `build_ready=true` does not
|
|
152
152
|
move a ticket that an earlier run filed on hold. It applies only to tickets this run creates.
|
|
153
153
|
|
|
154
|
+
## Choose the parent
|
|
155
|
+
|
|
156
|
+
Do this once, just before the first new gap ticket. If all gaps already have tickets, there is
|
|
157
|
+
nothing to create. Use the canonical repository slug associated with the audit for
|
|
158
|
+
`<owner>/<repo>`, even when a JIRA project or Linear team tracks several repositories.
|
|
159
|
+
|
|
160
|
+
~~~text
|
|
161
|
+
[lisa-control-gap-parent] repository=<owner>/<repo>
|
|
162
|
+
~~~
|
|
163
|
+
|
|
164
|
+
1. For Linear, use `lisa-linear-access operation: list-projects team:<team>` and read each open
|
|
165
|
+
Project with `get-project id:<ID>` to get its description and creation time. Use `list-issues`
|
|
166
|
+
only to match individual gap tickets in step 4.
|
|
167
|
+
- On GitHub, list repository issues labeled `type:Epic` through the REST endpoint
|
|
168
|
+
`repos/<owner>/<repo>/issues?state=open&labels=type%3AEpic&per_page=100`. Read through the
|
|
169
|
+
final page using `gh api --paginate --slurp` or the same endpoint's `Link` headers. Exclude
|
|
170
|
+
pull requests and read `body` and `created_at` from every issue.
|
|
171
|
+
- On Jira, use `lisa-atlassian-access operation: search-issues` with
|
|
172
|
+
`project = <project> AND issuetype = Epic AND statusCategory != Done`. Use an adapter that
|
|
173
|
+
exposes pagination and request `description` and `created`. Follow each `nextPageToken`
|
|
174
|
+
through the final page and read the marker from the description text.
|
|
175
|
+
|
|
176
|
+
For every tracker, finish reading the full list before selecting the parent. Check that each
|
|
177
|
+
candidate includes its description field and creation time. An explicit empty description has
|
|
178
|
+
no marker. If a read fails, a required field is absent, or a page repeats without advancing,
|
|
179
|
+
report the new gap tickets as blocked and file nothing. Match the full marker with the
|
|
180
|
+
repository slug. Use the oldest open match if there are several, and mention the others in the
|
|
181
|
+
summary.
|
|
182
|
+
2. When there is no match, call `lisa-tracker-write` once to create an Epic (a Project in Linear)
|
|
183
|
+
titled **Missing capabilities found by the audit**. Say that it groups work found by the audit
|
|
184
|
+
for this repository. Include the parent marker as its own visible line. Give the writer the
|
|
185
|
+
container declaration `None — container: state rolls up from children` for the Target Backend
|
|
186
|
+
Environment section and leave the parent out of the build-ready queue. Read back the parent
|
|
187
|
+
through `lisa-tracker-read` and confirm the marker is present before filing children. If the
|
|
188
|
+
writer cannot create or verify it, report the new gap tickets as blocked and file no children.
|
|
189
|
+
3. For each new gap ticket in step 5, pass the same reference as `parent_ref`. Later runs reuse the
|
|
190
|
+
open parent. Count only the gap tickets in step 7. Keep the gap marker and gap keys out of the
|
|
191
|
+
parent description so searches for a gap cannot mistake the parent for the ticket.
|
|
192
|
+
|
|
154
193
|
## Step 5: create the ticket
|
|
155
194
|
|
|
156
|
-
Call `lisa-tracker-write` once for each entry that needs a ticket, with the
|
|
157
|
-
writer lays the description out in its own sections and checks it. If it asks for more, give it
|
|
195
|
+
Call `lisa-tracker-write` once for each entry that needs a ticket, with the chosen `parent_ref` and the
|
|
196
|
+
content below. The writer lays the description out in its own sections and checks it. If it asks for more, give it
|
|
158
197
|
what it asks for and call it again. Never file by another path because the writer refused.
|
|
159
198
|
|
|
160
199
|
**Issue type:** `Task`.
|
|
@@ -205,7 +205,12 @@ If the item is **not an Epic** and **not a top-level Bug/Spike**, it MUST have a
|
|
|
205
205
|
- **Story / Task / Improvement** → must have a `projectId` (the Epic Project) set.
|
|
206
206
|
- **Sub-task** → must have a `parentId` (the Story Issue) set.
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
For a Story, Task, Bug, Spike or Improvement, a caller's `parent_ref` names the
|
|
209
|
+
explicit Linear Project. Resolve it through `get-project` and pass the returned
|
|
210
|
+
ID as `projectId` to `save-issue`. If that Project cannot be resolved, stop
|
|
211
|
+
before saving. For a Sub-task, `parent_ref` names the parent Issue instead.
|
|
212
|
+
|
|
213
|
+
When there is no explicit parent, discover it:
|
|
209
214
|
|
|
210
215
|
1. Search active Projects in the team:
|
|
211
216
|
```text
|
|
@@ -150,9 +150,12 @@ the manager.
|
|
|
150
150
|
who filed the item, not what it says: an alarm or error ticket can quote text an outsider
|
|
151
151
|
controls (an error message, a request path), and that text reaches the worker too.
|
|
152
152
|
- **Who may release a hold is a separate list.** `sessionManager.trustedReleaseIds` names who may
|
|
153
|
-
release a human hold in `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
|
|
153
|
+
release a human hold in `queue`, `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
|
|
154
154
|
it falls back to `trustedAuthorIds`. It takes the same `id:` / `login:` / plain entries, never
|
|
155
|
-
`integration:`, because an integration is not a person.
|
|
155
|
+
`integration:`, because an integration is not a person. The GitHub `queue` resolves each `login:`
|
|
156
|
+
entry to an account ID before comparing comments. Use `id:` for the same identity across the
|
|
157
|
+
release commands and to keep trusting the account after a GitHub rename. With neither list set,
|
|
158
|
+
no hold is released.
|
|
156
159
|
Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
|
|
157
160
|
releaser; add `integration:<service>` instead.
|
|
158
161
|
|
|
@@ -786,6 +789,10 @@ Skip while `capacity` reports `paused`. Otherwise:
|
|
|
786
789
|
`externalUserCreator { id }` and children with their state type. Ask for both author fields:
|
|
787
790
|
without `externalUserCreator` an integration-filed item is never trusted by an
|
|
788
791
|
`integration:` entry, because an outside user may have filed it.
|
|
792
|
+
Fetch every page of comments for held items in both tiers. Include Linear comment `body`,
|
|
793
|
+
`user { id }`, and provider bot metadata in `comments.nodes`. For Jira include each comment's
|
|
794
|
+
body and `author` with its `accountId` and `accountType` in `fields.comment.comments`. The
|
|
795
|
+
queue checks release markers against the configured hold releasers and excludes bot comments.
|
|
789
796
|
- `ordered` is the dispatch order: assigned to an operator, then to "me", then unassigned; each
|
|
790
797
|
group by priority, then age. `excluded` needs no action. `setupGaps` lists each repo the
|
|
791
798
|
manager will not dispatch to until the operator fixes it (`kind`, `detail`, and `clear`, the
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
* @module session-manager/cli-queue
|
|
31
31
|
*/
|
|
32
32
|
import {
|
|
33
|
+
adfText,
|
|
33
34
|
assertPagedToCompletion,
|
|
34
35
|
normalizeJiraIssue,
|
|
35
36
|
normalizeLinearIssue,
|
|
@@ -44,14 +45,22 @@ import {
|
|
|
44
45
|
validOrAbsent,
|
|
45
46
|
} from "./cli-runtime.mjs";
|
|
46
47
|
import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
|
|
48
|
+
import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
|
|
49
|
+
import { commentsOf } from "../../../scripts/stale-blocker-comment.mjs";
|
|
47
50
|
import {
|
|
48
51
|
landedDoneRoles,
|
|
49
52
|
terminalDoneRoles,
|
|
50
53
|
} from "../../../scripts/stale-blocker-edges.mjs";
|
|
54
|
+
import { trustedReleaseEntries } from "./config.mjs";
|
|
51
55
|
import { readJsonFile } from "./json-input.mjs";
|
|
52
56
|
import { readLedger } from "./ledger.mjs";
|
|
53
57
|
import { blockingGapRepo, listSetupGaps } from "./ledger-setup-gaps.mjs";
|
|
54
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
fetchGithubBacklog,
|
|
60
|
+
fetchGithubQueue,
|
|
61
|
+
githubReleaserIds,
|
|
62
|
+
} from "./queue-github.mjs";
|
|
63
|
+
import { readIssueComments } from "./stale-links-github.mjs";
|
|
55
64
|
import { readInFlight, readRestores } from "./stale-links-state.mjs";
|
|
56
65
|
|
|
57
66
|
export { parseJson, readJsonFile } from "./json-input.mjs";
|
|
@@ -65,17 +74,20 @@ const NORMALIZERS = { jira: normalizeJiraIssue, linear: normalizeLinearIssue };
|
|
|
65
74
|
* @param {"jira"|"linear"} tracker - Vendor
|
|
66
75
|
* @param {readonly string[]} doneRoles - Configured terminal done names, so
|
|
67
76
|
* a blocker there counts as finished (#5065)
|
|
68
|
-
* @returns {{ items: object[], pages: unknown }} Normalized items
|
|
77
|
+
* @returns {{ items: object[], pages: unknown, rawByRef: Map<string, object> }} Normalized items
|
|
69
78
|
*/
|
|
70
79
|
function normalizeEnvelope(envelope, where, tracker, judging) {
|
|
71
80
|
asSetupError(() => assertPagedToCompletion(envelope));
|
|
72
81
|
if (!Array.isArray(envelope.items)) {
|
|
73
82
|
throw new CliError(`${where}: items must be an array.`, 2);
|
|
74
83
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
const rawByRef = new Map();
|
|
85
|
+
const items = envelope.items.map(raw => {
|
|
86
|
+
const item = NORMALIZERS[tracker](raw, judging);
|
|
87
|
+
rawByRef.set(item.ref, raw);
|
|
88
|
+
return item;
|
|
89
|
+
});
|
|
90
|
+
return { items, pages: envelope.pages ?? null, rawByRef };
|
|
79
91
|
}
|
|
80
92
|
|
|
81
93
|
/**
|
|
@@ -86,7 +98,7 @@ function normalizeEnvelope(envelope, where, tracker, judging) {
|
|
|
86
98
|
* @param {"jira"|"linear"} tracker - Vendor
|
|
87
99
|
* @param {boolean} withBacklog - Whether the backlog tier is required
|
|
88
100
|
* @param {ReturnType<typeof loadProject>} project - Loaded project
|
|
89
|
-
* @returns {
|
|
101
|
+
* @returns {ReturnType<typeof normalizeEnvelope> & { backlog: ReturnType<typeof normalizeEnvelope> | null }} Normalized items
|
|
90
102
|
*/
|
|
91
103
|
function readEnvelopeQueue(ctx, tracker, withBacklog, project) {
|
|
92
104
|
const file = ctx.values.input;
|
|
@@ -239,7 +251,7 @@ export async function queue(ctx) {
|
|
|
239
251
|
const project = loadProject(ctx.root);
|
|
240
252
|
const config = validOrAbsent(project);
|
|
241
253
|
const backlogPickup = config?.backlogPickup === true;
|
|
242
|
-
const { items, pages, backlog } =
|
|
254
|
+
const { items, pages, backlog, rawByRef } =
|
|
243
255
|
tracker === "github"
|
|
244
256
|
? {
|
|
245
257
|
...fetchGithubQueue(ctx, project),
|
|
@@ -252,10 +264,22 @@ export async function queue(ctx) {
|
|
|
252
264
|
// Resolved local-then-global like `human-gate-act.mjs policy`, so a hold
|
|
253
265
|
// the project's mode keeps is never dispatched as Ready work (#4687).
|
|
254
266
|
const gatePolicy = resolveHumanGatePolicy(project.local, project.global);
|
|
267
|
+
const releasers = trustedReleaseEntries(config);
|
|
255
268
|
const policy = {
|
|
256
269
|
me,
|
|
257
270
|
operators,
|
|
258
271
|
trustedAuthorIds: config?.trustedAuthorIds ?? undefined,
|
|
272
|
+
trustedHumanActorIds:
|
|
273
|
+
tracker === "github"
|
|
274
|
+
? githubReleaserIds(ctx, releasers)
|
|
275
|
+
: idComparableValues(releasers),
|
|
276
|
+
commentsFor:
|
|
277
|
+
tracker === "github"
|
|
278
|
+
? ref => readIssueComments(ctx, ref)
|
|
279
|
+
: ref =>
|
|
280
|
+
commentsOf(rawByRef?.get(ref) ?? backlog?.rawByRef?.get(ref)).map(
|
|
281
|
+
comment => ({ ...comment, body: adfText(comment.body) })
|
|
282
|
+
),
|
|
259
283
|
humanNeededLabel: humanNeededLabel(project, tracker),
|
|
260
284
|
humanOnly: gatePolicy.humanOnly,
|
|
261
285
|
humanGateMode: gatePolicy.mode,
|
|
@@ -10,12 +10,16 @@ import {
|
|
|
10
10
|
labelNames,
|
|
11
11
|
normalizeGithubIssue,
|
|
12
12
|
} from "../../../scripts/ready-queue-order.mjs";
|
|
13
|
+
import {
|
|
14
|
+
idComparableValues,
|
|
15
|
+
parseIdEntries,
|
|
16
|
+
} from "../../../scripts/operator-id-kinds.mjs";
|
|
13
17
|
import { resolveRole } from "../../../scripts/resolve-lifecycle-role.mjs";
|
|
14
18
|
import {
|
|
15
19
|
landedDoneRoles,
|
|
16
20
|
terminalDoneRoles,
|
|
17
21
|
} from "../../../scripts/stale-blocker-edges.mjs";
|
|
18
|
-
import { CliError, mustRun } from "./cli-runtime.mjs";
|
|
22
|
+
import { CliError, mustRun, run } from "./cli-runtime.mjs";
|
|
19
23
|
import { parseJson } from "./json-input.mjs";
|
|
20
24
|
import {
|
|
21
25
|
blockerReader,
|
|
@@ -26,6 +30,45 @@ import { scrubWorkerEnv } from "./workers.mjs";
|
|
|
26
30
|
|
|
27
31
|
const OWNER_REPO = /^[\w.-]+\/[\w.-]+$/;
|
|
28
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Resolve configured GitHub logins to provider account IDs for hold releases.
|
|
35
|
+
* A failed or mismatched lookup authorizes nobody for that entry.
|
|
36
|
+
* @param {object} ctx - CLI context
|
|
37
|
+
* @param {unknown} entries - Configured release identities
|
|
38
|
+
* @returns {string[]} Account IDs to compare with native comment authorship
|
|
39
|
+
*/
|
|
40
|
+
export function githubReleaserIds(ctx, entries) {
|
|
41
|
+
const logins = new Set(
|
|
42
|
+
parseIdEntries(entries)
|
|
43
|
+
.filter(
|
|
44
|
+
entry => entry.kind === "login" && /^[A-Za-z0-9_-]+$/u.test(entry.value)
|
|
45
|
+
)
|
|
46
|
+
.map(entry => entry.value.toLowerCase())
|
|
47
|
+
);
|
|
48
|
+
const ids = idComparableValues(entries);
|
|
49
|
+
const env = scrubWorkerEnv(ctx.env);
|
|
50
|
+
for (const login of logins) {
|
|
51
|
+
const endpoint = `users/${login}`;
|
|
52
|
+
const result = run("gh", ["api", endpoint], { env });
|
|
53
|
+
if (result.status !== 0) continue;
|
|
54
|
+
try {
|
|
55
|
+
const account = parseJson(result.stdout, endpoint);
|
|
56
|
+
if (
|
|
57
|
+
account?.type === "User" &&
|
|
58
|
+
typeof account.login === "string" &&
|
|
59
|
+
account.login.toLowerCase() === login &&
|
|
60
|
+
Number.isSafeInteger(account.id) &&
|
|
61
|
+
account.id > 0
|
|
62
|
+
) {
|
|
63
|
+
ids.push(String(account.id));
|
|
64
|
+
}
|
|
65
|
+
} catch {
|
|
66
|
+
// An unreadable account does not authorize a release.
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return ids;
|
|
70
|
+
}
|
|
71
|
+
|
|
29
72
|
/**
|
|
30
73
|
* The GitHub repo to read: `--github-repo`, else github.org/github.repo.
|
|
31
74
|
* @param {object} ctx - CLI context
|
package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs
CHANGED
|
@@ -107,6 +107,19 @@ export function withBlockers(ctx, repo, row, blocker) {
|
|
|
107
107
|
return { ...row, nativeBlockers, bodyBlockers };
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Read all native issue comments with GitHub's author metadata.
|
|
112
|
+
* @param {object} ctx - CLI context
|
|
113
|
+
* @param {string} ref - GitHub issue reference
|
|
114
|
+
* @returns {object[] | null} Comments, or null when the read fails
|
|
115
|
+
*/
|
|
116
|
+
export function readIssueComments(ctx, ref) {
|
|
117
|
+
const [repo, number] = ref.split("#");
|
|
118
|
+
return readOrUnreadable(() =>
|
|
119
|
+
listAll(ctx, `repos/${repo}/issues/${number}/comments?per_page=100`)
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
110
123
|
/**
|
|
111
124
|
* One issue with its blockers and comments, as the plan reads it.
|
|
112
125
|
* @param {object} ctx - CLI context
|
|
@@ -119,9 +132,7 @@ function staleLinkItem(ctx, repo, row, blocker) {
|
|
|
119
132
|
const enriched = readOrUnreadable(() =>
|
|
120
133
|
withBlockers(ctx, repo, row, blocker)
|
|
121
134
|
);
|
|
122
|
-
const comments =
|
|
123
|
-
listAll(ctx, `repos/${repo}/issues/${row.number}/comments?per_page=100`)
|
|
124
|
-
);
|
|
135
|
+
const comments = readIssueComments(ctx, `${repo}#${row.number}`);
|
|
125
136
|
// probe-direction: fail-closed — a candidate whose dependency list or
|
|
126
137
|
// comments could not be read gets `nativeBlockers: null`, which the plan
|
|
127
138
|
// reads as "blocker list not read": it is reported and nothing of it is
|
|
@@ -170,6 +170,10 @@ things somewhere in the file:
|
|
|
170
170
|
`test_name`, `fullName`, or ` > ` (space, greater-than, space, as in
|
|
171
171
|
`file > suite > test`).
|
|
172
172
|
|
|
173
|
+
RSpec console logs can also provide a full summary line such as `38 examples, 0 failures, 9 pending`.
|
|
174
|
+
The example count must be positive. Capture RSpec with a console formatter such as
|
|
175
|
+
`--format documentation`.
|
|
176
|
+
|
|
173
177
|
A log snippet needs a timestamp whose date is written `YYYY-MM-DD`, followed by
|
|
174
178
|
`T` or a space and the time, for example `2026-11-13T08:00:01` or
|
|
175
179
|
`2026-11-13 08:00:01`. Syslog-style dates (`Nov 13 08:00:01`) and epoch numbers
|