@codyswann/lisa 8.1.0 → 8.2.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/all/copy-overwrite/scripts/lib/npm-update-bun.mjs +8 -3
- package/all/copy-overwrite/scripts/lib/npm-update-cache-seed.mjs +145 -0
- package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +1 -0
- package/all/copy-overwrite/scripts/lib/npm-update-prepare.mjs +34 -6
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +14 -3
- package/dist/core/lisa-owned-hash-ledger.json +24 -2
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +158 -17
- 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/queue-contract-resolution.mjs +583 -0
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa/.codex-plugin/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
- package/plugins/lisa/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa-agy/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa-agy/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa-agy/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa-agy/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa-agy/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa-agy/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa-agy/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa-agy/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa-agy/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -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/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa-copilot/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa-copilot/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa-copilot/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa-cursor/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa-cursor/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa-cursor/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -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/scripts/ready-queue-order.mjs +99 -25
- package/plugins/lisa-devin/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/lisa-devin/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/lisa-devin/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/lisa-devin/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/lisa-devin/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/lisa-devin/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/lisa-devin/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/lisa-devin/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/lisa-devin/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -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/scripts/ready-queue-order.mjs +99 -25
- package/plugins/src/base/scripts/stale-blocker-comment.mjs +185 -0
- package/plugins/src/base/scripts/stale-blocker-confirm.mjs +130 -0
- package/plugins/src/base/scripts/stale-blocker-edges.mjs +466 -0
- package/plugins/src/base/scripts/stale-blocker-pending.mjs +257 -0
- package/plugins/src/base/scripts/stale-blocker-restore.mjs +180 -0
- package/plugins/src/base/scripts/stale-blocker-summary.mjs +222 -0
- package/plugins/src/base/scripts/stale-blocker-sweep.mjs +394 -0
- package/plugins/src/base/scripts/stale-blocker-verify.mjs +193 -0
- package/plugins/src/base/skills/lisa-atlassian-access/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +2 -7
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-linear-access/SKILL.md +44 -0
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +127 -2
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
- package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
- package/scripts/record-npm-update-dual-lock-seed.mjs +203 -0
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +1 -0
|
@@ -53,6 +53,12 @@ import {
|
|
|
53
53
|
isHumanGated,
|
|
54
54
|
} from "./intake-blocker-reprobe.mjs";
|
|
55
55
|
import { entryMatches, parseIdEntries } from "./operator-id-kinds.mjs";
|
|
56
|
+
import {
|
|
57
|
+
countUnresolvedBlockers,
|
|
58
|
+
githubBlockerEdges,
|
|
59
|
+
jiraBlockerEdges,
|
|
60
|
+
linearBlockerEdges,
|
|
61
|
+
} from "./stale-blocker-edges.mjs";
|
|
56
62
|
|
|
57
63
|
/** Rank for GitHub `priority:<value>` labels; no label ranks 4. */
|
|
58
64
|
const GITHUB_PRIORITY_RANKS = Object.freeze({
|
|
@@ -84,9 +90,6 @@ const LINEAR_NO_PRIORITY = 4;
|
|
|
84
90
|
/** Linear workflow state types that leave a child finished. */
|
|
85
91
|
const LINEAR_FINISHED_STATE_TYPES = new Set(["completed", "canceled"]);
|
|
86
92
|
|
|
87
|
-
/** Jira link types whose inward side reads as "this item is blocked by". */
|
|
88
|
-
const JIRA_BLOCKED_BY = /blocked by/i;
|
|
89
|
-
|
|
90
93
|
/**
|
|
91
94
|
* @param {unknown} value
|
|
92
95
|
* @returns {string}
|
|
@@ -133,7 +136,7 @@ function nodesOf(list) {
|
|
|
133
136
|
* @param {unknown} labels
|
|
134
137
|
* @returns {string[]}
|
|
135
138
|
*/
|
|
136
|
-
function labelNames(labels) {
|
|
139
|
+
export function labelNames(labels) {
|
|
137
140
|
const list = Array.isArray(labels)
|
|
138
141
|
? labels
|
|
139
142
|
: Array.isArray(labels?.nodes)
|
|
@@ -159,10 +162,11 @@ function repoLabelsOf(labels) {
|
|
|
159
162
|
/**
|
|
160
163
|
* Flatten an Atlassian Document Format node to plain text, one line per block.
|
|
161
164
|
* A string description (the Markdown some access paths return) passes through.
|
|
165
|
+
* Also reads Jira comment bodies for the stale-link marker dedupe (#5065).
|
|
162
166
|
* @param {unknown} node
|
|
163
167
|
* @returns {string}
|
|
164
168
|
*/
|
|
165
|
-
function adfText(node) {
|
|
169
|
+
export function adfText(node) {
|
|
166
170
|
if (typeof node === "string") return node;
|
|
167
171
|
if (!node || typeof node !== "object") return "";
|
|
168
172
|
if (node.type === "text") return text(node.text);
|
|
@@ -172,12 +176,45 @@ function adfText(node) {
|
|
|
172
176
|
return children.map(adfText).join(joiner);
|
|
173
177
|
}
|
|
174
178
|
|
|
179
|
+
/**
|
|
180
|
+
* How many blockers still hold a GitHub issue.
|
|
181
|
+
*
|
|
182
|
+
* When the fetch attached the blockers (`nativeBlockers`, `bodyBlockers`, as
|
|
183
|
+
* the session manager's queue does), the shared stale-link rule decides
|
|
184
|
+
* (#5065): native dependencies AND `Blocked by` body lines, a blocker in the
|
|
185
|
+
* configured terminal done label counting as finished, as intake judges it.
|
|
186
|
+
* A row fetched without them falls back to GitHub's own summary, whose
|
|
187
|
+
* `blocked_by` counts open native blockers only.
|
|
188
|
+
* @param {Record<string, any>} issue - REST issue, optionally with blockers
|
|
189
|
+
* @param {string} repo - `owner/repo`
|
|
190
|
+
* @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} options - Configured terminal and non-terminal done labels
|
|
191
|
+
* @returns {number}
|
|
192
|
+
*/
|
|
193
|
+
function githubOpenBlockers(issue, repo, options) {
|
|
194
|
+
// Blockers that could not be read hold the item: at least one.
|
|
195
|
+
if (issue.blockersUnreadable === true) {
|
|
196
|
+
return Math.max(1, count(issue.issue_dependencies_summary?.blocked_by));
|
|
197
|
+
}
|
|
198
|
+
if (!Array.isArray(issue.nativeBlockers) && !issue.bodyBlockers) {
|
|
199
|
+
return count(issue.issue_dependencies_summary?.blocked_by);
|
|
200
|
+
}
|
|
201
|
+
return countUnresolvedBlockers(
|
|
202
|
+
githubBlockerEdges({ ...issue, repo }),
|
|
203
|
+
options.doneRoles ?? [],
|
|
204
|
+
repo,
|
|
205
|
+
options.landedRoles
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
175
209
|
/**
|
|
176
210
|
* Normalize one GitHub REST issue row. Returns null for a pull-request row,
|
|
177
211
|
* which the issues endpoint returns alongside issues and which is never a
|
|
178
212
|
* dispatchable leaf.
|
|
179
213
|
* @param {Record<string, any>} issue - REST `issues` list row
|
|
180
|
-
* @param {{ repo?: string
|
|
214
|
+
* @param {{ repo?: string, doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] -
|
|
215
|
+
* `owner/repo`, else read from repository_url; the configured terminal done
|
|
216
|
+
* labels (`terminalDoneRoles`) for the blocker rule, and the intermediate
|
|
217
|
+
* ones (`landedDoneRoles`), which hold nothing
|
|
181
218
|
* @returns {ReturnType<typeof shape> | null}
|
|
182
219
|
*/
|
|
183
220
|
export function normalizeGithubIssue(issue, options = {}) {
|
|
@@ -214,8 +251,8 @@ export function normalizeGithubIssue(issue, options = {}) {
|
|
|
214
251
|
// `id:` like any author. No integration-only authorship exists here.
|
|
215
252
|
authorIntegration: null,
|
|
216
253
|
isContainer: Number(summary?.total ?? 0) > Number(summary?.completed ?? 0),
|
|
217
|
-
|
|
218
|
-
|
|
254
|
+
openBlockers: githubOpenBlockers(issue, repo, options),
|
|
255
|
+
blockersUnreadable: issue.blockersUnreadable === true,
|
|
219
256
|
});
|
|
220
257
|
}
|
|
221
258
|
|
|
@@ -223,9 +260,12 @@ export function normalizeGithubIssue(issue, options = {}) {
|
|
|
223
260
|
* Normalize one Jira REST/MCP issue. An epic (hierarchy level above 0) or an
|
|
224
261
|
* issue with any subtask not yet in the done category is a container.
|
|
225
262
|
* @param {Record<string, any>} issue - Issue with `key` and `fields`
|
|
263
|
+
* @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] - Configured terminal
|
|
264
|
+
* done names (`terminalDoneRoles`), so a blocker there is finished, and
|
|
265
|
+
* the intermediate ones (`landedDoneRoles`), so a blocker there holds nothing
|
|
226
266
|
* @returns {ReturnType<typeof shape>}
|
|
227
267
|
*/
|
|
228
|
-
export function normalizeJiraIssue(issue) {
|
|
268
|
+
export function normalizeJiraIssue(issue, options = {}) {
|
|
229
269
|
const fields = issue?.fields ?? {};
|
|
230
270
|
const labels = labelNames(fields.labels);
|
|
231
271
|
const priority = text(fields.priority?.name).trim().toLowerCase();
|
|
@@ -233,12 +273,15 @@ export function normalizeJiraIssue(issue) {
|
|
|
233
273
|
const openSubtasks = (Array.isArray(fields.subtasks) ? fields.subtasks : [])
|
|
234
274
|
.map(sub => sub?.fields?.status?.statusCategory?.key)
|
|
235
275
|
.filter(category => category !== "done");
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
276
|
+
// One rule with the stale-link sweep (#5065): a blocker in the configured
|
|
277
|
+
// done status is finished even where its status category is not `done`,
|
|
278
|
+
// but only in this item's own project, which is the one that declares it.
|
|
279
|
+
const openBlockers = countUnresolvedBlockers(
|
|
280
|
+
jiraBlockerEdges(issue),
|
|
281
|
+
options.doneRoles ?? [],
|
|
282
|
+
text(issue?.key).split("-")[0],
|
|
283
|
+
options.landedRoles
|
|
284
|
+
);
|
|
242
285
|
|
|
243
286
|
return shape({
|
|
244
287
|
ref: text(issue?.key),
|
|
@@ -299,9 +342,12 @@ function linearIntegrationAuthor(issue) {
|
|
|
299
342
|
* Normalize one Linear GraphQL issue. An issue with any child not completed
|
|
300
343
|
* or canceled is a container.
|
|
301
344
|
* @param {Record<string, any>} issue - Issue node
|
|
345
|
+
* @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] - Configured terminal
|
|
346
|
+
* done names (`terminalDoneRoles`), so a blocker there is finished, and
|
|
347
|
+
* the intermediate ones (`landedDoneRoles`), so a blocker there holds nothing
|
|
302
348
|
* @returns {ReturnType<typeof shape>}
|
|
303
349
|
*/
|
|
304
|
-
export function normalizeLinearIssue(issue) {
|
|
350
|
+
export function normalizeLinearIssue(issue, options = {}) {
|
|
305
351
|
const native = Number(issue?.priority ?? 0);
|
|
306
352
|
const children = Array.isArray(issue?.children?.nodes)
|
|
307
353
|
? issue.children.nodes
|
|
@@ -310,12 +356,16 @@ export function normalizeLinearIssue(issue) {
|
|
|
310
356
|
: [];
|
|
311
357
|
const labels = labelNames(issue?.labels);
|
|
312
358
|
// Linear has no "blocked by" relation type: B blocked by A is A's `blocks`
|
|
313
|
-
// relation, read from B as an inverse
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
359
|
+
// relation, read from B as an inverse
|
|
360
|
+
// relation. One rule with the stale-link sweep (#5065): a promotion
|
|
361
|
+
// workflow can type its configured done state `started`, so the configured
|
|
362
|
+
// name also counts as finished, in this item's own team only.
|
|
363
|
+
const openBlockers = countUnresolvedBlockers(
|
|
364
|
+
linearBlockerEdges(issue),
|
|
365
|
+
options.doneRoles ?? [],
|
|
366
|
+
text(issue?.team?.key) || text(issue?.identifier).split("-")[0],
|
|
367
|
+
options.landedRoles
|
|
368
|
+
);
|
|
319
369
|
|
|
320
370
|
return shape({
|
|
321
371
|
ref: text(issue?.identifier),
|
|
@@ -349,7 +399,7 @@ export function normalizeLinearIssue(issue) {
|
|
|
349
399
|
* none) and `assigneeAccountId` the assignee's account id, for kind-keyed
|
|
350
400
|
* entries (#4623). `authorIntegration` names the integration that filed an
|
|
351
401
|
* item no person authored, for `integration:` entries (#4895).
|
|
352
|
-
* @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, authorIntegration: string | null, isContainer: boolean, openBlockers: number }} input
|
|
402
|
+
* @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, authorIntegration: string | null, isContainer: boolean, openBlockers: number, blockersUnreadable?: boolean }} input
|
|
353
403
|
*/
|
|
354
404
|
function shape(input) {
|
|
355
405
|
return {
|
|
@@ -368,6 +418,9 @@ function shape(input) {
|
|
|
368
418
|
authorIntegration: input.authorIntegration,
|
|
369
419
|
isContainer: input.isContainer,
|
|
370
420
|
openBlockers: input.openBlockers,
|
|
421
|
+
// The item's blocker list could not be read this fetch (GitHub only;
|
|
422
|
+
// Jira and Linear fetch blockers with the item, or the envelope fails).
|
|
423
|
+
blockersUnreadable: input.blockersUnreadable === true,
|
|
371
424
|
repoLabels: repoLabelsOf(input.labels),
|
|
372
425
|
};
|
|
373
426
|
}
|
|
@@ -478,13 +531,34 @@ function compareWithinGroup(left, right) {
|
|
|
478
531
|
* normalized assignee id: GitHub login, Jira accountId, Linear user id. A
|
|
479
532
|
* `login:` entry matches only a GitHub assignee login, an `id:` entry only
|
|
480
533
|
* the assignee's account id (#4623).
|
|
534
|
+
*
|
|
535
|
+
* An item whose blocker list could not be read is excluded with reason
|
|
536
|
+
* `blockers-unreadable` (CodySwannGT/lisa#5065); every other item is still
|
|
537
|
+
* offered.
|
|
481
538
|
* @param {readonly Record<string, any>[]} items - Normalized items
|
|
482
539
|
* @param {{ me?: string | null, operators?: readonly unknown[], trustedAuthorIds?: readonly unknown[], humanNeededLabel?: string, humanOnly?: unknown, humanGateMode?: unknown }} [options]
|
|
483
540
|
* @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
|
|
484
541
|
*/
|
|
485
542
|
export function orderReadyQueue(items, options = {}) {
|
|
486
543
|
const context = orderingContext(options);
|
|
487
|
-
return rank(
|
|
544
|
+
return rank(
|
|
545
|
+
items,
|
|
546
|
+
item => exclusionReason(item, context) ?? unreadableBlockers(item),
|
|
547
|
+
context
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* An item whose blocker list could not be read is held in both tiers: it
|
|
553
|
+
* might be blocked by open work, so dispatching it is not known safe. Only
|
|
554
|
+
* that item waits; the next fetch reads it again.
|
|
555
|
+
* @param {Record<string, any>} item - Normalized item
|
|
556
|
+
* @returns {"blockers-unreadable" | null}
|
|
557
|
+
*/
|
|
558
|
+
function unreadableBlockers(item) {
|
|
559
|
+
// probe-direction: fail-closed — an unread blocker list never reads as
|
|
560
|
+
// "nothing blocks this".
|
|
561
|
+
return item.blockersUnreadable === true ? "blockers-unreadable" : null;
|
|
488
562
|
}
|
|
489
563
|
|
|
490
564
|
/**
|
|
@@ -507,7 +581,7 @@ export function orderBacklogQueue(items, options = {}) {
|
|
|
507
581
|
return rank(
|
|
508
582
|
items,
|
|
509
583
|
item => {
|
|
510
|
-
const reason = exclusionReason(item, context);
|
|
584
|
+
const reason = exclusionReason(item, context) ?? unreadableBlockers(item);
|
|
511
585
|
if (reason !== null) return reason;
|
|
512
586
|
if (count(item.openBlockers) > 0) return "blocked-by-open-item";
|
|
513
587
|
const failed = Object.hasOwn(failures, item.ref)
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* The operator comment and marker dedupe for the stale-link sweep
|
|
4
|
+
* (CodySwannGT/lisa#5065), split from `stale-blocker-sweep.mjs`.
|
|
5
|
+
*
|
|
6
|
+
* The comment is read by a non-technical operator, so it says in plain words
|
|
7
|
+
* which links went and why, which blockers still hold the item, and which
|
|
8
|
+
* could not be opened. It starts with the prefix of whoever posts it (the
|
|
9
|
+
* session manager, or build intake on a runtime without one), and ends with
|
|
10
|
+
* one `[lisa-stale-blocker-link] blocker=<ref>` marker per removed link.
|
|
11
|
+
* @module stale-blocker-comment
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { adfText } from "./ready-queue-order.mjs";
|
|
15
|
+
|
|
16
|
+
/** Visible marker, one per removed blocker, so a re-run never re-comments. */
|
|
17
|
+
export const STALE_LINK_MARKER = "[lisa-stale-blocker-link]";
|
|
18
|
+
|
|
19
|
+
/** Who may post the comment, and the prefix each one posts under. */
|
|
20
|
+
export const STALE_LINK_POSTERS = Object.freeze({
|
|
21
|
+
"session-manager": "[lisa-session-manager]",
|
|
22
|
+
"build-intake": "[claude-build-intake]",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The marker line for one blocker.
|
|
27
|
+
* @param {string} blockerRef
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
export const markerLine = blockerRef =>
|
|
31
|
+
`${STALE_LINK_MARKER} blocker=${blockerRef}`;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* An item's comments as one flat `{ body }` list, whatever envelope the
|
|
35
|
+
* vendor read used: a flat array (`comments: [{ body }]`), Linear's
|
|
36
|
+
* connection (`comments: { nodes: [...] }`), or Jira's issue field
|
|
37
|
+
* (`fields.comment.comments`). A comment given as a bare string is a body.
|
|
38
|
+
* Anything else is skipped, never thrown on, so a marker in any of these
|
|
39
|
+
* shapes is always found.
|
|
40
|
+
* @param {Record<string, any> | null | undefined} raw - The raw item
|
|
41
|
+
* @returns {{ body: unknown }[]}
|
|
42
|
+
*/
|
|
43
|
+
export function commentsOf(raw) {
|
|
44
|
+
const list = value => {
|
|
45
|
+
if (Array.isArray(value)) return value;
|
|
46
|
+
if (Array.isArray(value?.nodes)) return value.nodes;
|
|
47
|
+
if (Array.isArray(value?.comments)) return value.comments;
|
|
48
|
+
return [];
|
|
49
|
+
};
|
|
50
|
+
return [...list(raw?.comments), ...list(raw?.fields?.comment)]
|
|
51
|
+
.map(comment => (typeof comment === "string" ? { body: comment } : comment))
|
|
52
|
+
.filter(comment => comment && typeof comment === "object");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Blockers this item's comments already record as removed. A Jira comment
|
|
57
|
+
* body is Atlassian Document Format, so it is flattened to text first.
|
|
58
|
+
* @param {readonly { body?: unknown }[] | undefined} comments
|
|
59
|
+
* @returns {Set<string>}
|
|
60
|
+
*/
|
|
61
|
+
export function markedBlockers(comments) {
|
|
62
|
+
const pattern = /\[lisa-stale-blocker-link\] blocker=(\S+)/g;
|
|
63
|
+
return new Set(
|
|
64
|
+
(Array.isArray(comments) ? comments : []).flatMap(comment =>
|
|
65
|
+
[...adfText(comment?.body).matchAll(pattern)].map(match => match[1])
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A plain-English list: "A", "A and B", "A, B and C".
|
|
72
|
+
* @param {readonly string[]} refs
|
|
73
|
+
* @returns {string}
|
|
74
|
+
*/
|
|
75
|
+
const listOf = refs =>
|
|
76
|
+
refs.length < 2
|
|
77
|
+
? refs.join("")
|
|
78
|
+
: `${refs.slice(0, -1).join(", ")} and ${refs[refs.length - 1]}`;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* "is" or "are", "was" or "were", matched to how many refs there are.
|
|
82
|
+
* @param {readonly string[]} refs
|
|
83
|
+
* @param {string} one
|
|
84
|
+
* @param {string} many
|
|
85
|
+
* @returns {string}
|
|
86
|
+
*/
|
|
87
|
+
const agree = (refs, one, many) => (refs.length === 1 ? one : many);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @param {readonly { blockerRef: string }[]} edges
|
|
91
|
+
* @returns {string[]} Unique blocker refs
|
|
92
|
+
*/
|
|
93
|
+
const unique = edges => [...new Set(edges.map(edge => edge.blockerRef))];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The sentences about the links this sweep removes.
|
|
97
|
+
* @param {readonly { blockerRef: string, verdict: string }[]} stale
|
|
98
|
+
* @returns {string[]}
|
|
99
|
+
*/
|
|
100
|
+
function removedSentences(stale) {
|
|
101
|
+
const finished = unique(stale.filter(e => e.verdict !== "cancelled"));
|
|
102
|
+
const cancelled = unique(stale.filter(e => e.verdict === "cancelled"));
|
|
103
|
+
const lines = [];
|
|
104
|
+
if (finished.length > 0) {
|
|
105
|
+
lines.push(
|
|
106
|
+
`This was marked as waiting on ${listOf(finished)}, which ${agree(finished, "is", "are")} done or closed, so ${agree(finished, "it", "they")} cannot hold this up.`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
if (cancelled.length > 0) {
|
|
110
|
+
const lead = finished.length > 0 ? "It was also" : "This was";
|
|
111
|
+
lines.push(
|
|
112
|
+
`${lead} marked as waiting on ${listOf(cancelled)}, which ${agree(cancelled, "was", "were")} cancelled and will not be built, so ${agree(cancelled, "it", "they")} cannot hold this up.`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
const removed = unique(stale);
|
|
116
|
+
lines.push(
|
|
117
|
+
`I removed ${agree(removed, "the link", "those links")}. Nothing else changed.`
|
|
118
|
+
);
|
|
119
|
+
return lines;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The one comment an operator reads for this item's clean-up.
|
|
124
|
+
* @param {{ stale: object[], real: object[], crossProject: object[], inaccessible: object[] }} sorted
|
|
125
|
+
* @param {string} [poster] - A key of {@link STALE_LINK_POSTERS}
|
|
126
|
+
* @param {string} [posterName] - The configured name of who posts it (the
|
|
127
|
+
* session manager's `sessionManager.name`), so the operator sees which
|
|
128
|
+
* manager acted; the prefix stays the machine-read marker
|
|
129
|
+
* @returns {string}
|
|
130
|
+
*/
|
|
131
|
+
export function formatStaleLinkComment(
|
|
132
|
+
sorted,
|
|
133
|
+
poster = "session-manager",
|
|
134
|
+
posterName = ""
|
|
135
|
+
) {
|
|
136
|
+
if (!Object.hasOwn(STALE_LINK_POSTERS, poster)) {
|
|
137
|
+
throw new Error(
|
|
138
|
+
`Unknown stale-link poster '${poster}'. Expected one of: ${Object.keys(STALE_LINK_POSTERS).join(", ")}.`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
const lines = [
|
|
142
|
+
`${STALE_LINK_POSTERS[poster]} ${posterName.trim() ? `${posterName.trim()} cleared` : "Cleared"} waiting-on links.`,
|
|
143
|
+
...removedSentences(sorted.stale),
|
|
144
|
+
];
|
|
145
|
+
const open = unique([
|
|
146
|
+
...sorted.real,
|
|
147
|
+
...sorted.crossProject.filter(edge => edge.verdict === "open"),
|
|
148
|
+
]);
|
|
149
|
+
if (open.length > 0) {
|
|
150
|
+
lines.push(
|
|
151
|
+
`It is still waiting on ${listOf(open)}, which ${agree(open, "is", "are")} not finished yet.`
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
const unreadable = unique(sorted.inaccessible);
|
|
155
|
+
if (unreadable.length > 0) {
|
|
156
|
+
lines.push(
|
|
157
|
+
`I could not open ${listOf(unreadable)}, so I left ${agree(unreadable, "that link", "those links")} alone.`
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
return [lines.join(" "), "", ...unique(sorted.stale).map(markerLine)].join(
|
|
161
|
+
"\n"
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The comment as an Atlassian Document Format document. Jira Cloud's REST v3
|
|
167
|
+
* comment endpoint takes ADF, not a string, so a Jira plan posts this: one
|
|
168
|
+
* paragraph per non-empty line, so each marker stays on its own line and
|
|
169
|
+
* {@link markedBlockers} finds it again through `adfText`.
|
|
170
|
+
* @param {string} comment - From {@link formatStaleLinkComment}
|
|
171
|
+
* @returns {{ type: "doc", version: 1, content: object[] }}
|
|
172
|
+
*/
|
|
173
|
+
export function staleLinkCommentAdf(comment) {
|
|
174
|
+
return {
|
|
175
|
+
type: "doc",
|
|
176
|
+
version: 1,
|
|
177
|
+
content: comment
|
|
178
|
+
.split("\n")
|
|
179
|
+
.filter(line => line.trim() !== "")
|
|
180
|
+
.map(line => ({
|
|
181
|
+
type: "paragraph",
|
|
182
|
+
content: [{ type: "text", text: line }],
|
|
183
|
+
})),
|
|
184
|
+
};
|
|
185
|
+
}
|