@codyswann/lisa 5.6.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +51 -14
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +7 -3
- 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/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -2
- package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- 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/rules/reference/config-resolution.md +3 -2
- package/plugins/src/base/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/src/base/scripts/ready-queue-order.mjs +62 -5
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +7 -3
|
@@ -84,6 +84,7 @@ export function notifyProvider(config) {
|
|
|
84
84
|
* stall: StallBlock,
|
|
85
85
|
* notify: NotifyBlock,
|
|
86
86
|
* trustedAuthorIds: string[] | null,
|
|
87
|
+
* trustedReleaseIds?: string[] | null,
|
|
87
88
|
* operatorIds?: string[] | null,
|
|
88
89
|
* backlogPickup?: boolean,
|
|
89
90
|
* }} SessionManagerConfig
|
|
@@ -140,12 +141,37 @@ export function resolveSessionManagerConfig(globalConfig, localConfig) {
|
|
|
140
141
|
...merged,
|
|
141
142
|
repos,
|
|
142
143
|
trustedAuthorIds: merged.trustedAuthorIds ?? null,
|
|
144
|
+
// Left as declared, like operatorIds: an explicit null must reach the
|
|
145
|
+
// validator and be refused, never read as "unset" and fall back (#4895).
|
|
146
|
+
trustedReleaseIds: merged.trustedReleaseIds,
|
|
143
147
|
// Left as declared: absent stays undefined and an explicit null stays null,
|
|
144
148
|
// so validation can refuse the null instead of reading it as "no operators".
|
|
145
149
|
operatorIds: merged.operatorIds,
|
|
146
150
|
};
|
|
147
151
|
}
|
|
148
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Who may discharge a human gate: release a hold, or answer the manager's
|
|
155
|
+
* question on the item (CodySwannGT/lisa#4895).
|
|
156
|
+
*
|
|
157
|
+
* `trustedAuthorIds` answers a different question — whose item text may reach
|
|
158
|
+
* a bypass-permissions worker — and may name integrations, which are never a
|
|
159
|
+
* person. `trustedReleaseIds` separates the two; unset, it falls back to
|
|
160
|
+
* `trustedAuthorIds`, so a project that never declared it behaves exactly as
|
|
161
|
+
* before. Neither set means nobody, and a hold fails closed. A declared
|
|
162
|
+
* value that is not a list (an explicit null) also means nobody: it never
|
|
163
|
+
* falls back, so a malformed release list cannot widen who may release.
|
|
164
|
+
* @param {{ trustedAuthorIds?: string[] | null, trustedReleaseIds?: string[] | null } | null | undefined} config
|
|
165
|
+
* - Resolved block (only its two trust lists are read)
|
|
166
|
+
* @returns {string[]} The configured release entries (unparsed)
|
|
167
|
+
*/
|
|
168
|
+
export function trustedReleaseEntries(config) {
|
|
169
|
+
const release = config?.trustedReleaseIds;
|
|
170
|
+
if (release !== undefined) return Array.isArray(release) ? release : [];
|
|
171
|
+
const authors = config?.trustedAuthorIds;
|
|
172
|
+
return Array.isArray(authors) ? authors : [];
|
|
173
|
+
}
|
|
174
|
+
|
|
149
175
|
/**
|
|
150
176
|
* Turn a project name into a slug the validator accepts.
|
|
151
177
|
* @param {string} projectSlug Project name, possibly with dots or capitals.
|
|
@@ -296,7 +296,7 @@ function chooseMarker(label, blocked) {
|
|
|
296
296
|
* overruled?: boolean}}
|
|
297
297
|
* input - The item, why, the question, the configured human-needed label
|
|
298
298
|
* and `blocked` role value, whether a notification channel exists, whether
|
|
299
|
-
* anyone (operatorIds / trustedAuthorIds) may answer on the item, and the
|
|
299
|
+
* anyone (operatorIds / trustedReleaseIds / trustedAuthorIds) may answer on the item, and the
|
|
300
300
|
* cause the planning-miss signal needs (default `planning`), and whether
|
|
301
301
|
* the item carries the wrongly-escalated label (`overruled`)
|
|
302
302
|
* @returns {{ref: string, kind: string, marker: {type: string, value: string},
|
|
@@ -68,7 +68,11 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
|
|
|
68
68
|
`AWS CDK`, ...). Ask the operator to correct them and add the areas that identify the repo
|
|
69
69
|
(e.g. `api`: `["NestJS","migrations"]`, `web`: `["Expo","screens"]`), and whether to
|
|
70
70
|
set `sessionManager.trustedAuthorIds`. Without it, any author's Ready item reaches a
|
|
71
|
-
bypass-permissions worker; say so plainly.
|
|
71
|
+
bypass-permissions worker; say so plainly. If an integration files Ready items with no person
|
|
72
|
+
behind them (Linear's Sentry integration does), add `integration:<service>` (the value `queue`
|
|
73
|
+
prints as `authorIntegration`) rather than dropping the key, which would also drop every hold
|
|
74
|
+
releaser. To let different people release holds than author work, set
|
|
75
|
+
`sessionManager.trustedReleaseIds` (people only; it defaults to `trustedAuthorIds`). The list holds stable tracker user ids as strings,
|
|
72
76
|
never logins: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira
|
|
73
77
|
`accountId`, or the Linear user id. A plain login matches no one in the queue and silently
|
|
74
78
|
excludes every item; to trust a GitHub login on purpose write it as `login:<login>`, and to say
|
|
@@ -94,8 +98,8 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
|
|
|
94
98
|
warns about it (in `warnings`, never failing) and names both forms. An unknown prefix
|
|
95
99
|
(`user:octocat`) or an empty value (`login:`) fails `validate`, naming the entry.
|
|
96
100
|
**Recommend setting it in every setup**, even a single-user one: it is also who may answer a
|
|
97
|
-
human-needed question by replying on the item. With
|
|
98
|
-
`trustedAuthorIds` set, the manager reads no answer off the item at all, because the tracker
|
|
101
|
+
human-needed question by replying on the item. With none of `operatorIds`,
|
|
102
|
+
`trustedReleaseIds` and `trustedAuthorIds` set, the manager reads no answer off the item at all, because the tracker
|
|
99
103
|
credential's identity is the one the workers and the manager post as, so its comments cannot be
|
|
100
104
|
told apart from a human's answer. The operator then answers only at the terminal, with the
|
|
101
105
|
`answerCommand` that `status` lists. Say so plainly.
|
|
@@ -721,7 +721,8 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
721
721
|
| `sessionManager.stall.requestionHours` | no | `4` | How long an unanswered worker question waits before the manager asks again (zero or positive). |
|
|
722
722
|
| `sessionManager.notify.provider` | no | `none` | `none` (no notification channel) or `telegram`. Absent, like an absent `notify` block, means `none`. Any other value fails validation. |
|
|
723
723
|
| `sessionManager.notify.stateDir` | **yes** with `telegram`; must be absent otherwise | — | This project's own Telegram state dir. A `stateDir` without the `telegram` provider fails validation, because no bot would use it. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
|
|
724
|
-
| `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the hold-release check compares ids only and ignores it). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people. |
|
|
724
|
+
| `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the hold-release check compares ids only and ignores it). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. `integration:<service>` trusts items an integration files with no person behind them (Linear's `botActor`, by `subType` such as `sentry`, else its bot `id`, never its self-chosen display name; never an item a person or an outside user filed; it trusts who filed the item, not text an outsider can get into it, such as a quoted error message); GitHub Apps and Jira automation file as an account, so trust them by `id:`. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people or integrations. It is also who may release a human hold, unless `trustedReleaseIds` is set — so removing it removes every hold releaser too. |
|
|
725
|
+
| `sessionManager.trustedReleaseIds` | no | `trustedAuthorIds` | Optional, non-empty list of the **people** who may release a human hold (`blocked-plan`, the orphan sweep) and answer a question on the item. Same entry grammar as `trustedAuthorIds` minus `integration:`, which is refused: an integration is not a person. Unset, it falls back to `trustedAuthorIds`, so existing projects are unaffected; with neither set, no hold is released. |
|
|
725
726
|
| `sessionManager.operatorIds` | no | — | Optional, non-empty list of the people the manager works for, as tracker user ids matched against the **assignee** the same way "me" is: the GitHub **login**, the Jira `accountId`, or the Linear user id, spelled exactly as the tracker API returns it (matching is case-sensitive, so look the OPERATOR up rather than typing from memory: `gh api users/<operator-login> --jq .login` returns the canonical GitHub spelling. Do not use `gh api user`, which returns whoever the credential belongs to — the agent account, when that is the case this key exists for). Dispatch order is assigned to an operator, then to "me" (the tracker credential's identity), then unassigned; items assigned to anyone else are skipped. Set it whenever the tracker credential is not the operator's own (an agent account), or the operator's Ready items are never dispatched. Prefer the kind-keyed form, which the queue, the claim and on-item answers all match the same way: `login:<GitHub login>` matches only a GitHub login, `id:<v>` only an account id (GitHub numeric id, Jira `accountId`, Linear user id). A plain entry keeps its meaning, but a plain all-digit entry is a login to the queue and the claim and a numeric id to on-item answers, so validation warns about it (without failing) and names both forms. An unknown prefix or an empty value fails validation. A Jira accountId holding a colon (`557058:…`, `qm:…`) is still plain. |
|
|
726
727
|
| `sessionManager.backlogPickup` | no | `false` | Opt-in lowest dispatch tier. When the Ready queue is exhausted and capacity remains, the manager considers backlog items (open leaves in no lifecycle role) with the Ready exclusions plus any unfinished blocker; each one that passes the tracker validator (all gates, including the stateless-pickup dry-run) is assigned to the first `operatorIds` entry (without its `login:` / `id:` prefix), moved to Ready in one write, read back and dispatched. A failed validation is cached against the item's `updatedAt`, so it is re-judged only after the item changes. Requires `operatorIds`. |
|
|
727
728
|
|
|
@@ -748,7 +749,7 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
748
749
|
no label resolves, and moves an `exhausted` item to the `blocked` role; `mark-plan` resolves
|
|
749
750
|
both, so neither name is ever hard-coded.
|
|
750
751
|
- **Who may answer on the item.** A reply on a human-needed item is taken as the answer only from
|
|
751
|
-
`sessionManager.operatorIds` or `trustedAuthorIds
|
|
752
|
+
`sessionManager.operatorIds` or `trustedReleaseIds` (else `trustedAuthorIds`), matched on stable ids (GitHub login or
|
|
752
753
|
numeric id, Jira `accountId`, Linear user id; never a display name or email; a plain all-digit
|
|
753
754
|
entry is a numeric id only, `login:<v>` only a login, `id:<v>` only an id), and never from a
|
|
754
755
|
machine comment, which is excluded first, whoever wrote it: one starting with a Lisa or Claude
|
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
* - `login:<v>` is a GitHub login and matches only a `login` field.
|
|
17
17
|
* - `id:<v>` is an account id (a GitHub numeric id, a Jira accountId, a
|
|
18
18
|
* Linear user id) and matches only an id field.
|
|
19
|
+
* - `integration:<service>` names an integration that files items with no
|
|
20
|
+
* person behind them (CodySwannGT/lisa#4895), and is meaningful only in
|
|
21
|
+
* `trustedAuthorIds`. Linear's Sentry integration creates issues whose
|
|
22
|
+
* `creator` is null, so there is no person id to trust; the entry matches
|
|
23
|
+
* such an item by the integration Linear records on it instead (`botActor`:
|
|
24
|
+
* its service, else its bot id, never its self-chosen display name).
|
|
25
|
+
* It never matches an item a person authored, never an item a non-Linear
|
|
26
|
+
* user filed through an integration (`externalUserCreator`), and never a
|
|
27
|
+
* person, so it cannot answer a question or release a human hold: those
|
|
28
|
+
* readers drop it (`idComparableValues`, the answer matcher), and the
|
|
29
|
+
* validator refuses it in `operatorIds` and `trustedReleaseIds`.
|
|
19
30
|
* - A plain entry (no prefix) keeps exactly the meaning each reader gave it
|
|
20
31
|
* before kind-keyed entries existed. Changing that is a later, breaking
|
|
21
32
|
* change.
|
|
@@ -38,7 +49,7 @@
|
|
|
38
49
|
*/
|
|
39
50
|
|
|
40
51
|
/** The kinds a prefixed entry may name. */
|
|
41
|
-
export const ID_ENTRY_KINDS = Object.freeze(["login", "id"]);
|
|
52
|
+
export const ID_ENTRY_KINDS = Object.freeze(["login", "id", "integration"]);
|
|
42
53
|
|
|
43
54
|
/** A letters-only prefix at the start of an entry. */
|
|
44
55
|
const PREFIX = /^([A-Za-z]+):/;
|
|
@@ -50,7 +61,7 @@ const PREFIX = /^([A-Za-z]+):/;
|
|
|
50
61
|
const PLAIN_ID_STARTS = new Set(["qm"]);
|
|
51
62
|
|
|
52
63
|
/**
|
|
53
|
-
* @typedef {{ kind: "login" | "id" | "plain", value: string }
|
|
64
|
+
* @typedef {{ kind: "login" | "id" | "integration" | "plain", value: string }
|
|
54
65
|
* | { kind: "invalid", problem: "unknown-prefix" | "empty-value", prefix: string }} IdEntry
|
|
55
66
|
*/
|
|
56
67
|
|
|
@@ -93,9 +104,11 @@ export function parseIdEntries(entries) {
|
|
|
93
104
|
* Whether one parsed entry names the identity whose fields are given. Each
|
|
94
105
|
* field is the reader's value for that kind: `plain` is what a plain entry
|
|
95
106
|
* has always been compared with there, `login` the GitHub login (null when
|
|
96
|
-
* the tracker has none), `id` the account id
|
|
107
|
+
* the tracker has none), `id` the account id, `integration` the integration
|
|
108
|
+
* that filed an item with no person author (null otherwise, and absent for
|
|
109
|
+
* every reader that matches people). A missing field never matches.
|
|
97
110
|
* @param {IdEntry} entry - Parsed entry
|
|
98
|
-
* @param {{ plain?: string | null, login?: string | null, id?: string | null }} fields
|
|
111
|
+
* @param {{ plain?: string | null, login?: string | null, id?: string | null, integration?: string | null }} fields
|
|
99
112
|
* @returns {boolean} Whether it matches
|
|
100
113
|
*/
|
|
101
114
|
export function entryMatches(entry, fields) {
|
|
@@ -32,7 +32,10 @@
|
|
|
32
32
|
* is compared exactly as before (with the normalized assignee id, or the
|
|
33
33
|
* normalized author id). Each normalizer therefore also carries the login and
|
|
34
34
|
* the account id of the assignee and the login of the author, where its
|
|
35
|
-
* tracker has them, so the kinds never have to be guessed.
|
|
35
|
+
* tracker has them, so the kinds never have to be guessed. A trusted-author
|
|
36
|
+
* entry may also be `integration:<service>` (#4895): it matches an item no
|
|
37
|
+
* person authored, by the integration the tracker records as its filer
|
|
38
|
+
* (`authorIntegration`, today only Linear's `botActor`).
|
|
36
39
|
*
|
|
37
40
|
* Held items are judged by {@link isHumanGated}, the one shared answer to "is
|
|
38
41
|
* a person holding this?", rather than by a local label check (#3805).
|
|
@@ -207,6 +210,9 @@ export function normalizeGithubIssue(issue, options = {}) {
|
|
|
207
210
|
// explicitly, knowing a freed login can be re-registered (#4623).
|
|
208
211
|
authorId: idOrNull(issue.user?.id),
|
|
209
212
|
authorLogin: idOrNull(issue.user?.login),
|
|
213
|
+
// A GitHub App files as its own bot user, which has an id: trust it with
|
|
214
|
+
// `id:` like any author. No integration-only authorship exists here.
|
|
215
|
+
authorIntegration: null,
|
|
210
216
|
isContainer: Number(summary?.total ?? 0) > Number(summary?.completed ?? 0),
|
|
211
217
|
// `blocked_by` in the dependency summary counts only OPEN blockers.
|
|
212
218
|
openBlockers: count(issue.issue_dependencies_summary?.blocked_by),
|
|
@@ -247,6 +253,9 @@ export function normalizeJiraIssue(issue) {
|
|
|
247
253
|
body: adfText(fields.description),
|
|
248
254
|
authorId: idOrNull(fields.reporter?.accountId ?? fields.creator?.accountId),
|
|
249
255
|
authorLogin: null,
|
|
256
|
+
// Jira automation and integrations file as an account (the reporter), so
|
|
257
|
+
// they are trusted by accountId; no integration-only authorship exists.
|
|
258
|
+
authorIntegration: null,
|
|
250
259
|
isContainer:
|
|
251
260
|
Number(type.hierarchyLevel ?? 0) > 0 ||
|
|
252
261
|
text(type.name).toLowerCase() === "epic" ||
|
|
@@ -255,6 +264,37 @@ export function normalizeJiraIssue(issue) {
|
|
|
255
264
|
});
|
|
256
265
|
}
|
|
257
266
|
|
|
267
|
+
/**
|
|
268
|
+
* The integration that filed a Linear issue no person authored, or null
|
|
269
|
+
* (CodySwannGT/lisa#4895).
|
|
270
|
+
*
|
|
271
|
+
* Linear leaves `creator` null for an issue an integration or OAuth app
|
|
272
|
+
* created, and records the filer on `botActor`: `subType` names the
|
|
273
|
+
* integration service (`sentry`, `github`), set by Linear itself. With no
|
|
274
|
+
* service, the bot's `id` identifies its source record instead. The bot's
|
|
275
|
+
* `name` is never used: an app's display name is chosen by whoever registers
|
|
276
|
+
* it, so trusting it would let any app installed in the workspace take over an
|
|
277
|
+
* entry by naming itself after a trusted integration (the risk #4715 recorded
|
|
278
|
+
* for `login:`). `creator` is also null for a deleted account, and an
|
|
279
|
+
* integration can file on behalf of a non-Linear user (`externalUserCreator`,
|
|
280
|
+
* set by Slack or Intercom intake). Neither of those is the integration's own
|
|
281
|
+
* authorship, so both yield null. The fetch must have asked for
|
|
282
|
+
* `externalUserCreator`: when the key is missing, whether an outside person
|
|
283
|
+
* filed the item is unknown, and unknown is never trusted.
|
|
284
|
+
* @param {Record<string, any>} issue - Issue node
|
|
285
|
+
* @returns {string | null} The integration's service, else its bot id
|
|
286
|
+
*/
|
|
287
|
+
function linearIntegrationAuthor(issue) {
|
|
288
|
+
// Both author fields must be read and explicitly null: a missing key, or a
|
|
289
|
+
// creator object without an id, says nothing about who filed the item.
|
|
290
|
+
if (!issue || !Object.hasOwn(issue, "creator")) return null;
|
|
291
|
+
if (issue.creator !== null) return null;
|
|
292
|
+
if (!Object.hasOwn(issue, "externalUserCreator")) return null;
|
|
293
|
+
if (issue.externalUserCreator !== null) return null;
|
|
294
|
+
const bot = issue.botActor;
|
|
295
|
+
return idOrNull(bot?.subType) ?? idOrNull(bot?.id);
|
|
296
|
+
}
|
|
297
|
+
|
|
258
298
|
/**
|
|
259
299
|
* Normalize one Linear GraphQL issue. An issue with any child not completed
|
|
260
300
|
* or canceled is a container.
|
|
@@ -293,6 +333,7 @@ export function normalizeLinearIssue(issue) {
|
|
|
293
333
|
body: text(issue?.description),
|
|
294
334
|
authorId: idOrNull(issue?.creator?.id),
|
|
295
335
|
authorLogin: null,
|
|
336
|
+
authorIntegration: linearIntegrationAuthor(issue),
|
|
296
337
|
isContainer: children.some(
|
|
297
338
|
child => !LINEAR_FINISHED_STATE_TYPES.has(child?.state?.type)
|
|
298
339
|
),
|
|
@@ -306,8 +347,9 @@ export function normalizeLinearIssue(issue) {
|
|
|
306
347
|
* dependencies whose blocker is not finished. The Ready tier ignores both.
|
|
307
348
|
* `assigneeLogin` / `authorLogin` are GitHub logins (null on trackers with
|
|
308
349
|
* none) and `assigneeAccountId` the assignee's account id, for kind-keyed
|
|
309
|
-
* entries (#4623).
|
|
310
|
-
*
|
|
350
|
+
* entries (#4623). `authorIntegration` names the integration that filed an
|
|
351
|
+
* 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
|
|
311
353
|
*/
|
|
312
354
|
function shape(input) {
|
|
313
355
|
return {
|
|
@@ -323,6 +365,7 @@ function shape(input) {
|
|
|
323
365
|
body: input.body,
|
|
324
366
|
authorId: input.authorId,
|
|
325
367
|
authorLogin: input.authorLogin,
|
|
368
|
+
authorIntegration: input.authorIntegration,
|
|
326
369
|
isContainer: input.isContainer,
|
|
327
370
|
openBlockers: input.openBlockers,
|
|
328
371
|
repoLabels: repoLabelsOf(input.labels),
|
|
@@ -349,7 +392,10 @@ function isOperatorItem(item, context) {
|
|
|
349
392
|
/**
|
|
350
393
|
* Whether a trusted-author entry names the item's author: a plain entry by
|
|
351
394
|
* the normalized author id, as before; `login:` by the author's GitHub login;
|
|
352
|
-
* `id:` by the author id (a GitHub numeric id, Jira accountId, Linear id)
|
|
395
|
+
* `id:` by the author id (a GitHub numeric id, Jira accountId, Linear id);
|
|
396
|
+
* `integration:` by the integration that filed an item with no person author
|
|
397
|
+
* (#4895). An item a person authored has no integration to match, so an
|
|
398
|
+
* `integration:` entry can never vouch for a person.
|
|
353
399
|
* @param {Record<string, any>} item
|
|
354
400
|
* @param {ReturnType<typeof orderingContext>} context
|
|
355
401
|
* @returns {boolean}
|
|
@@ -360,6 +406,7 @@ function isTrustedAuthor(item, context) {
|
|
|
360
406
|
plain: author,
|
|
361
407
|
login: idOrNull(item.authorLogin),
|
|
362
408
|
id: author,
|
|
409
|
+
integration: author === null ? idOrNull(item.authorIntegration) : null,
|
|
363
410
|
};
|
|
364
411
|
return context.trusted.some(entry => entryMatches(entry, fields));
|
|
365
412
|
}
|
|
@@ -531,7 +578,17 @@ function rank(items, judge, context) {
|
|
|
531
578
|
),
|
|
532
579
|
excluded: judged
|
|
533
580
|
.filter(one => one.reason !== null)
|
|
534
|
-
.map(one => ({
|
|
581
|
+
.map(one => ({
|
|
582
|
+
ref: one.item.ref,
|
|
583
|
+
reason: one.reason,
|
|
584
|
+
// The value an `integration:` entry would need, so the operator can
|
|
585
|
+
// read it off the queue instead of the tracker's API (#4895).
|
|
586
|
+
...(one.reason === "untrusted-author" &&
|
|
587
|
+
idOrNull(one.item.authorId) === null &&
|
|
588
|
+
idOrNull(one.item.authorIntegration) !== null
|
|
589
|
+
? { authorIntegration: one.item.authorIntegration }
|
|
590
|
+
: {}),
|
|
591
|
+
})),
|
|
535
592
|
};
|
|
536
593
|
}
|
|
537
594
|
|
|
@@ -520,7 +520,7 @@ const TOKEN_VALUE = /^\d{5,}:[A-Za-z0-9_-]{30,}$/;
|
|
|
520
520
|
* A legacy Jira Cloud accountId (`557058:<uuid>`), which `TOKEN_VALUE` also
|
|
521
521
|
* matches (CodySwannGT/lisa#4719).
|
|
522
522
|
*
|
|
523
|
-
* Exempted only for `operatorIds` / `trustedAuthorIds` entries, where a Jira
|
|
523
|
+
* Exempted only for `operatorIds` / `trustedAuthorIds` / `trustedReleaseIds` entries, where a Jira
|
|
524
524
|
* project puts exactly this id. A Telegram token's secret half is never in
|
|
525
525
|
* canonical UUID form, so the exemption lets no token through.
|
|
526
526
|
*/
|
|
@@ -528,7 +528,11 @@ const JIRA_LEGACY_ACCOUNT_ID =
|
|
|
528
528
|
/^\d+:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
529
529
|
|
|
530
530
|
/** The block's id lists, whose entries the credential scan reads by kind. */
|
|
531
|
-
const ID_LIST_KEYS = new Set([
|
|
531
|
+
const ID_LIST_KEYS = new Set([
|
|
532
|
+
"operatorIds",
|
|
533
|
+
"trustedAuthorIds",
|
|
534
|
+
"trustedReleaseIds",
|
|
535
|
+
]);
|
|
532
536
|
|
|
533
537
|
/** Key names that only ever hold a credential. */
|
|
534
538
|
const CREDENTIAL_KEY = /token|secret|password|passwd|api[-_]?key|credential/i;
|
|
@@ -803,7 +807,14 @@ function findCredentials(value, path, segments = []) {
|
|
|
803
807
|
const ID_ENTRY_PREFIX = /^([A-Za-z]+):/;
|
|
804
808
|
|
|
805
809
|
/** The kinds an id entry's prefix may name. */
|
|
806
|
-
const ID_ENTRY_KINDS = new Set(["login", "id"]);
|
|
810
|
+
const ID_ENTRY_KINDS = new Set(["login", "id", "integration"]);
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* The one list an `integration:` entry belongs in (CodySwannGT/lisa#4895): an
|
|
814
|
+
* integration may author dispatched work, but it is not a person, so it can
|
|
815
|
+
* never be an operator or release a human hold.
|
|
816
|
+
*/
|
|
817
|
+
const INTEGRATION_LIST_KEYS = new Set(["trustedAuthorIds"]);
|
|
807
818
|
|
|
808
819
|
/** Letters-and-colon starts of real tracker ids (JSM customers' `qm:`). */
|
|
809
820
|
const PLAIN_ID_STARTS = new Set(["qm"]);
|
|
@@ -817,10 +828,11 @@ const ALL_DIGIT_ENTRY = /^\d+$/;
|
|
|
817
828
|
* A local copy of the grammar in `scripts/operator-id-kinds.mjs`, because
|
|
818
829
|
* plugin payload scripts ship standalone; `operator-id-kinds.test.ts` pins
|
|
819
830
|
* the two together. `login:<v>` is a GitHub login, `id:<v>` an account id,
|
|
820
|
-
*
|
|
831
|
+
* `integration:<service>` an integration that files items no person authored
|
|
832
|
+
* (CodySwannGT/lisa#4895), and an entry with no letters-only prefix is plain (a Jira accountId such as
|
|
821
833
|
* `557058:<uuid>` or `qm:<id>` included).
|
|
822
834
|
* @param {string} entry One entry.
|
|
823
|
-
* @returns {"login" | "id" | "plain" | "unknown-prefix" | "empty-value"} Kind.
|
|
835
|
+
* @returns {"login" | "id" | "integration" | "plain" | "unknown-prefix" | "empty-value"} Kind.
|
|
824
836
|
*/
|
|
825
837
|
export function classifyIdEntry(entry) {
|
|
826
838
|
const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
|
|
@@ -844,7 +856,7 @@ function botTokenProblem(path) {
|
|
|
844
856
|
}
|
|
845
857
|
|
|
846
858
|
/**
|
|
847
|
-
* Strip every leading `login:` / `id:` prefix from an entry, so a value
|
|
859
|
+
* Strip every leading `login:` / `id:` / `integration:` prefix from an entry, so a value
|
|
848
860
|
* stacked behind several (`login:id:<v>`) is reached (CodySwannGT/lisa#4754).
|
|
849
861
|
* @param {string} entry One entry, already trimmed.
|
|
850
862
|
* @returns {string} The value after the last known prefix, trimmed.
|
|
@@ -857,10 +869,10 @@ function stripIdEntryPrefixes(entry) {
|
|
|
857
869
|
}
|
|
858
870
|
|
|
859
871
|
/**
|
|
860
|
-
* Scan one `operatorIds` / `trustedAuthorIds` entry for a bot token
|
|
872
|
+
* Scan one `operatorIds` / `trustedAuthorIds` / `trustedReleaseIds` entry for a bot token
|
|
861
873
|
* (CodySwannGT/lisa#4719).
|
|
862
874
|
*
|
|
863
|
-
* The value after one or more `login:` / `id:` prefixes is what gets tested,
|
|
875
|
+
* The value after one or more `login:` / `id:` / `integration:` prefixes is what gets tested,
|
|
864
876
|
* since a token pasted behind a prefix (or a stack of them, such as
|
|
865
877
|
* `login:id:<token>`; CodySwannGT/lisa#4754) is as leaked as a bare one. A
|
|
866
878
|
* legacy Jira accountId (`557058:<uuid>`) is token-shaped but is a real id,
|
|
@@ -882,7 +894,7 @@ function idEntryCredentials(entry, path) {
|
|
|
882
894
|
* drop a person. The refusal never repeats the entry's value: a token pasted
|
|
883
895
|
* behind an unknown prefix (`ID:<token>`) would otherwise land in terminals,
|
|
884
896
|
* CI logs and transcripts (CodySwannGT/lisa#4754).
|
|
885
|
-
* @param {string} key `operatorIds` or `
|
|
897
|
+
* @param {string} key `operatorIds`, `trustedAuthorIds` or `trustedReleaseIds`.
|
|
886
898
|
* @param {readonly string[]} ids Entries, already known to be strings.
|
|
887
899
|
* @returns {string[]} Problems found.
|
|
888
900
|
*/
|
|
@@ -896,9 +908,18 @@ function idEntryProblems(key, ids) {
|
|
|
896
908
|
return [
|
|
897
909
|
`${path} has an ` +
|
|
898
910
|
`unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
|
|
899
|
-
`login>, id:<numeric or tracker account id>,
|
|
900
|
-
`
|
|
901
|
-
`id
|
|
911
|
+
`login>, id:<numeric or tracker account id>, ` +
|
|
912
|
+
`integration:<service> (trustedAuthorIds only), or a plain id; ` +
|
|
913
|
+
`write a tracker id that itself starts with letters and a colon ` +
|
|
914
|
+
`as id:<that id>.`,
|
|
915
|
+
];
|
|
916
|
+
}
|
|
917
|
+
if (kind === "integration" && !INTEGRATION_LIST_KEYS.has(key)) {
|
|
918
|
+
return [
|
|
919
|
+
`${path} is an integration: entry, which belongs only in ` +
|
|
920
|
+
`sessionManager.trustedAuthorIds. An integration can author ` +
|
|
921
|
+
`dispatched work but is not a person, so it can never be an ` +
|
|
922
|
+
`operator, answer a question, or release a human hold.`,
|
|
902
923
|
];
|
|
903
924
|
}
|
|
904
925
|
return kind === "empty-value"
|
|
@@ -980,6 +1001,31 @@ function validateOperatorIds(ids) {
|
|
|
980
1001
|
: idEntryProblems("operatorIds", ids);
|
|
981
1002
|
}
|
|
982
1003
|
|
|
1004
|
+
/**
|
|
1005
|
+
* Validate one trust list: `trustedAuthorIds` (whose items may be dispatched)
|
|
1006
|
+
* or `trustedReleaseIds` (who may release a human hold; CodySwannGT/lisa#4895).
|
|
1007
|
+
* Both take stable ids, never logins or display names, and both refuse an
|
|
1008
|
+
* empty list, which reads as set while trusting no one or everyone.
|
|
1009
|
+
* @param {"trustedAuthorIds" | "trustedReleaseIds"} key The list's key.
|
|
1010
|
+
* @param {unknown} ids The value, if present.
|
|
1011
|
+
* @param {string} emptyProblem The refusal for an empty list.
|
|
1012
|
+
* @returns {string[]} Problems found.
|
|
1013
|
+
*/
|
|
1014
|
+
function validateTrustList(key, ids, emptyProblem) {
|
|
1015
|
+
if (ids === undefined) return [];
|
|
1016
|
+
if (
|
|
1017
|
+
!Array.isArray(ids) ||
|
|
1018
|
+
!ids.every(id => typeof id === "string" && id !== "")
|
|
1019
|
+
) {
|
|
1020
|
+
return [
|
|
1021
|
+
`sessionManager.${key} must be an array of stable ` +
|
|
1022
|
+
`tracker user ids (GitHub numeric user id, Jira accountId, ` +
|
|
1023
|
+
`Linear user id), not logins or display names.`,
|
|
1024
|
+
];
|
|
1025
|
+
}
|
|
1026
|
+
return ids.length === 0 ? [emptyProblem] : idEntryProblems(key, ids);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
983
1029
|
/**
|
|
984
1030
|
* Validate the opt-in `sessionManager` block.
|
|
985
1031
|
*
|
|
@@ -998,11 +1044,6 @@ export function validateSessionManager(block) {
|
|
|
998
1044
|
typeof block.name === "string" && SESSION_MANAGER_NAME.test(block.name);
|
|
999
1045
|
const intervalOk =
|
|
1000
1046
|
block.interval === undefined || parseLoopInterval(block.interval) !== null;
|
|
1001
|
-
const trustedOk =
|
|
1002
|
-
block.trustedAuthorIds === undefined ||
|
|
1003
|
-
(Array.isArray(block.trustedAuthorIds) &&
|
|
1004
|
-
block.trustedAuthorIds.every(id => typeof id === "string" && id !== ""));
|
|
1005
|
-
|
|
1006
1047
|
return [
|
|
1007
1048
|
...(nameOk
|
|
1008
1049
|
? []
|
|
@@ -1021,27 +1062,23 @@ export function validateSessionManager(block) {
|
|
|
1021
1062
|
...validateNumberBlock("capacity", block.capacity, CAPACITY_RULES),
|
|
1022
1063
|
...validateNumberBlock("stall", block.stall, STALL_RULES),
|
|
1023
1064
|
...validateNotify(block.notify),
|
|
1024
|
-
...(
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
`An empty list filters no author at all; remove the key instead ` +
|
|
1042
|
-
`if every author's item may be dispatched.`,
|
|
1043
|
-
]
|
|
1044
|
-
: []),
|
|
1065
|
+
...validateTrustList(
|
|
1066
|
+
"trustedAuthorIds",
|
|
1067
|
+
block.trustedAuthorIds,
|
|
1068
|
+
`sessionManager.trustedAuthorIds must name at least one author id. ` +
|
|
1069
|
+
`An empty list filters no author at all; remove the key instead ` +
|
|
1070
|
+
`if every author's item may be dispatched. Removing it also ` +
|
|
1071
|
+
`removes who may release a human hold, unless ` +
|
|
1072
|
+
`sessionManager.trustedReleaseIds names them; to dispatch items an ` +
|
|
1073
|
+
`integration files, add integration:<service> instead.`
|
|
1074
|
+
),
|
|
1075
|
+
...validateTrustList(
|
|
1076
|
+
"trustedReleaseIds",
|
|
1077
|
+
block.trustedReleaseIds,
|
|
1078
|
+
`sessionManager.trustedReleaseIds must name at least one person. ` +
|
|
1079
|
+
`An empty list releases no hold at all; remove the key instead to ` +
|
|
1080
|
+
`fall back to trustedAuthorIds.`
|
|
1081
|
+
),
|
|
1045
1082
|
...validateOperatorIds(block.operatorIds),
|
|
1046
1083
|
...validateBacklogPickup(block.backlogPickup, block.operatorIds),
|
|
1047
1084
|
...findCredentials(block, "sessionManager"),
|
|
@@ -118,11 +118,23 @@ the manager.
|
|
|
118
118
|
**which items are dispatched** to those whose author (the item's creator) is trusted; `queue`
|
|
119
119
|
enforces it. It does not vet the comments, later body edits or attachments on a dispatched item:
|
|
120
120
|
a worker under `managedBy=` treats text from anyone other than the item's author or a trusted
|
|
121
|
-
author as untrusted data (`lisa-implement`).
|
|
122
|
-
|
|
123
|
-
entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
|
|
121
|
+
author as untrusted data (`lisa-implement`). Without it, any author's Ready item is dispatched. A
|
|
122
|
+
plain entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
|
|
124
123
|
`id:<v>` says so outright, and `login:<v>` names a GitHub login, which the queue and
|
|
125
|
-
`item-answer` match but `blocked-plan` (ids only) never does.
|
|
124
|
+
`item-answer` match but `blocked-plan` (ids only) never does. `integration:<service>` trusts the
|
|
125
|
+
items an integration files with no person behind them (Linear leaves `creator` null for those
|
|
126
|
+
and records the filer on `botActor`; the value is its `subType`, such as `sentry`, else its
|
|
127
|
+
bot `id` — never its display name, which any app can choose). It never matches an item a person or an outside user filed, and `queue` prints the value
|
|
128
|
+
beside each such `untrusted-author` exclusion (`authorIntegration`). GitHub Apps and Jira
|
|
129
|
+
automation file as an account, so trust them by `id:` instead. Trusting an integration trusts
|
|
130
|
+
who filed the item, not what it says: an alarm or error ticket can quote text an outsider
|
|
131
|
+
controls (an error message, a request path), and that text reaches the worker too.
|
|
132
|
+
- **Who may release a hold is a separate list.** `sessionManager.trustedReleaseIds` names who may
|
|
133
|
+
release a human hold in `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
|
|
134
|
+
it falls back to `trustedAuthorIds`. It takes the same `id:` / `login:` / plain entries, never
|
|
135
|
+
`integration:`, because an integration is not a person. With neither set, no hold is released.
|
|
136
|
+
Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
|
|
137
|
+
releaser; add `integration:<service>` instead.
|
|
126
138
|
|
|
127
139
|
## Questions and notifications
|
|
128
140
|
|
|
@@ -135,7 +147,7 @@ the manager.
|
|
|
135
147
|
(text on STDIN), mark the item as "Mark and move on" says, and carry on with the rest of the
|
|
136
148
|
cycle. The operator sees pending questions with `status` (`pendingQuestions`), answers with the
|
|
137
149
|
`answerCommand` that `status` lists for the item (or on the item, when
|
|
138
|
-
`sessionManager.operatorIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
|
|
150
|
+
`sessionManager.operatorIds`, `trustedReleaseIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
|
|
139
151
|
up. The cycle ends with whatever
|
|
140
152
|
outcome its work earns: having no channel never makes a cycle `recovery-required`.
|
|
141
153
|
- **Telegram configured** (`notify` is `telegram`):
|
|
@@ -441,7 +453,8 @@ shows them.
|
|
|
441
453
|
null; its text changed since it was marked, say): no reply is read, because the last recorded
|
|
442
454
|
question comment is still the old question's and a reply to it is not this question's answer.
|
|
443
455
|
Finish "Mark and move on" from step 1 for it, as for `marked: false` above.
|
|
444
|
-
`reason: "no-answerers-configured"` means
|
|
456
|
+
`reason: "no-answerers-configured"` means none of `operatorIds`, `trustedReleaseIds` and
|
|
457
|
+
`trustedAuthorIds` is set,
|
|
445
458
|
so nothing on the item is read (the tracker identity is the one workers post as); the operator
|
|
446
459
|
answers with the `answerCommand` from `status`. A reply that looks like it holds a credential is
|
|
447
460
|
never queued: it is skipped and listed in `refused`, so a later reply is still read.
|
|
@@ -605,7 +618,10 @@ Skip while `capacity` reports `paused`. Otherwise:
|
|
|
605
618
|
`complete` to `true` only when you really reached the last page; the CLI refuses anything else.
|
|
606
619
|
Raw Jira issues carry `key` and `fields` (summary, priority, assignee, created, labels,
|
|
607
620
|
description, reporter, issuetype, subtasks); raw Linear nodes carry identifier, title, priority,
|
|
608
|
-
createdAt, assignee, labels, description, creator
|
|
621
|
+
createdAt, assignee, labels, description, creator, `botActor { type subType id name }`,
|
|
622
|
+
`externalUserCreator { id }` and children with their state type. Ask for both author fields:
|
|
623
|
+
without `externalUserCreator` an integration-filed item is never trusted by an
|
|
624
|
+
`integration:` entry, because an outside user may have filed it.
|
|
609
625
|
- `ordered` is the dispatch order: assigned to an operator, then to "me", then unassigned; each
|
|
610
626
|
group by priority, then age. `excluded` needs no action. `setupGaps` lists each repo the
|
|
611
627
|
manager will not dispatch to until the operator fixes it (`kind`, `detail`, and `clear`, the
|
|
@@ -68,7 +68,7 @@ Telegram the question goes there too; `/lisa:session-manager status` lists every
|
|
|
68
68
|
The operator answers with the CLI `answer` command that `status` lists, on Telegram, or on the
|
|
69
69
|
item (a reply from an operator or trusted author, matched on stable tracker ids, each
|
|
70
70
|
`login:` / `id:` entry by its own kind; with neither
|
|
71
|
-
`operatorIds` nor `trustedAuthorIds` set, replies on the item are not read); the next cycle
|
|
71
|
+
`operatorIds` nor `trustedReleaseIds` / `trustedAuthorIds` set, replies on the item are not read); the next cycle
|
|
72
72
|
delivers the answer (or, for a finished worker or an exhausted item, records it on the item for the
|
|
73
73
|
next attempt and reads it back), removes the marker and clears the question. No question is ever asked in the
|
|
74
74
|
manager's terminal. When the manager itself cannot proceed it records `recovery-required` with a one-line
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
stdinText,
|
|
25
25
|
} from "./cli-runtime.mjs";
|
|
26
26
|
import { parseJson, readJsonFile } from "./cli-queue.mjs";
|
|
27
|
+
import { trustedReleaseEntries } from "./config.mjs";
|
|
27
28
|
import {
|
|
28
29
|
clearPendingQuestion,
|
|
29
30
|
clearValidationFailure,
|
|
@@ -251,8 +252,8 @@ export async function route(ctx) {
|
|
|
251
252
|
* its JSON (stdin, or the file). `--ref` fills in the ledger's pending
|
|
252
253
|
* question when the input does not carry one.
|
|
253
254
|
*
|
|
254
|
-
* Who may release a human hold comes from `sessionManager.
|
|
255
|
-
* only. Any `trustedHumanActorIds` in the input is discarded: the input is
|
|
255
|
+
* Who may release a human hold comes from `sessionManager.trustedReleaseIds`
|
|
256
|
+
* only, falling back to `trustedAuthorIds` when it is unset (#4895). Any `trustedHumanActorIds` in the input is discarded: the input is
|
|
256
257
|
* assembled from the item's own (untrusted) body and comments, so a list
|
|
257
258
|
* carried beside them would let the item's text vouch for itself. The
|
|
258
259
|
* release check compares account ids only, so an `id:` entry reaches it as
|
|
@@ -275,7 +276,7 @@ export async function blockedPlan(ctx) {
|
|
|
275
276
|
(ref ? (await readLedger(ctx.root)).items[ref]?.pendingQuestion : null);
|
|
276
277
|
const project = loadProject(ctx.root);
|
|
277
278
|
const trustedHumanActorIds = idComparableValues(
|
|
278
|
-
project.config
|
|
279
|
+
trustedReleaseEntries(project.config)
|
|
279
280
|
);
|
|
280
281
|
const policy = resolveHumanGatePolicy(project.local, project.global);
|
|
281
282
|
return {
|
|
@@ -26,7 +26,8 @@ import {
|
|
|
26
26
|
validOrAbsent,
|
|
27
27
|
} from "./cli-runtime.mjs";
|
|
28
28
|
import { parseJson } from "./cli-queue.mjs";
|
|
29
|
-
import {
|
|
29
|
+
import { parseIdEntry } from "../../../scripts/operator-id-kinds.mjs";
|
|
30
|
+
import { notifyProvider, trustedReleaseEntries } from "./config.mjs";
|
|
30
31
|
import { wronglyEscalatedLabel } from "./cli-overruled.mjs";
|
|
31
32
|
import {
|
|
32
33
|
carriesWronglyEscalated,
|
|
@@ -145,7 +146,8 @@ export async function answer(ctx) {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
/**
|
|
148
|
-
* Who may answer on the item: operators and trusted
|
|
149
|
+
* Who may answer on the item: operators and the people trusted to release a
|
|
150
|
+
* human gate (`trustedReleaseIds`, else `trustedAuthorIds`; #4895). There is
|
|
149
151
|
* no fallback to the tracker identity (`control.me`): workers and the
|
|
150
152
|
* manager post as that identity, so its comments cannot be told apart from
|
|
151
153
|
* an answer.
|
|
@@ -153,10 +155,11 @@ export async function answer(ctx) {
|
|
|
153
155
|
* @returns {string[]} Allowed author ids (empty: nobody may answer there)
|
|
154
156
|
*/
|
|
155
157
|
function allowedAnswerers(config) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
// An `integration:` entry names no person, so it can never answer; counting
|
|
159
|
+
// it would tell the operator to reply on the item when no reply is read.
|
|
160
|
+
return [...(config?.operatorIds ?? []), ...trustedReleaseEntries(config)]
|
|
161
|
+
.map(String)
|
|
162
|
+
.filter(entry => parseIdEntry(entry)?.kind !== "integration");
|
|
160
163
|
}
|
|
161
164
|
|
|
162
165
|
/** Why nothing is read off the item when nobody may answer there. */
|
|
@@ -176,7 +179,9 @@ const CREDENTIAL_REPLY =
|
|
|
176
179
|
"the secrets provider, and reply again without it.";
|
|
177
180
|
|
|
178
181
|
const NO_ANSWERERS =
|
|
179
|
-
"No
|
|
182
|
+
"No person who may answer is configured (sessionManager.operatorIds, " +
|
|
183
|
+
"trustedReleaseIds, or a trustedAuthorIds entry other than " +
|
|
184
|
+
"integration:<service>), so " +
|
|
180
185
|
"replies on the item are not read: the tracker identity is the one " +
|
|
181
186
|
"workers post as. Answer with the answerCommand that status lists, or " +
|
|
182
187
|
"set sessionManager.operatorIds.";
|