@codyswann/lisa 2.352.0 → 2.353.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.
Files changed (78) hide show
  1. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  2. package/dist/core/upstream-evidence-manifest.js +9 -7
  3. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  4. package/expo/create-only/.github/workflows/maestro-e2e.yml +10 -1
  5. package/expo/create-only/.github/workflows/nightly-e2e-health.yml +5 -0
  6. package/package.json +1 -1
  7. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  9. package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/SKILL.md +34 -0
  10. package/plugins/lisa/.codex-plugin/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  11. package/plugins/lisa/rules/reference/config-resolution.md +7 -0
  12. package/plugins/lisa/scripts/queue-contract-resolution.mjs +50 -1
  13. package/plugins/lisa/skills/lisa-linear-access/SKILL.md +34 -0
  14. package/plugins/lisa/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  15. package/plugins/lisa-agy/plugin.json +1 -1
  16. package/plugins/lisa-agy/scripts/queue-contract-resolution.mjs +50 -1
  17. package/plugins/lisa-agy/skills/lisa-linear-access/SKILL.md +34 -0
  18. package/plugins/lisa-agy/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  19. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  22. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-copilot/rules/reference/config-resolution.md +7 -0
  26. package/plugins/lisa-copilot/scripts/queue-contract-resolution.mjs +50 -1
  27. package/plugins/lisa-copilot/skills/lisa-linear-access/SKILL.md +34 -0
  28. package/plugins/lisa-copilot/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  29. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +7 -0
  31. package/plugins/lisa-cursor/scripts/queue-contract-resolution.mjs +50 -1
  32. package/plugins/lisa-cursor/skills/lisa-linear-access/SKILL.md +34 -0
  33. package/plugins/lisa-cursor/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  34. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-agy/plugin.json +1 -1
  37. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  47. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  52. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  57. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-agy/plugin.json +1 -1
  62. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  67. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  72. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/src/base/rules/reference/config-resolution.md +7 -0
  75. package/plugins/src/base/scripts/queue-contract-resolution.mjs +50 -1
  76. package/plugins/src/base/skills/lisa-linear-access/SKILL.md +34 -0
  77. package/plugins/src/base/skills/lisa-validate-tracker-mapping/SKILL.md +33 -4
  78. package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +76 -10
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.352.0",
3
+ "version": "2.353.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -449,6 +449,13 @@ Every lifecycle skill operates on a fixed set of **roles** (`ready`, `claimed`,
449
449
 
450
450
  **`ready` must never resolve to the team's DEFAULT state.** `Todo` is where Linear puts a brand-new issue, so using it for `ready` inverts the gate: the lane stops meaning "a human flipped this to build-ready" and starts meaning "nobody has touched this". Measured on the first team migrated: 20 issues in the lane, only 8 ever explicitly marked ready. JIRA avoids this because `jira.workflow.ready` is a dedicated `Ready` status while a fresh ticket lands in the project default.
451
451
 
452
+ **That rule is enforced, not merely stated — a correct default is only half the fix.** The default is `Ready`, but any project can override `linear.workflow.ready`, and an override reproduces the inversion exactly. Two arms catch it, deliberately split by what each can see:
453
+
454
+ - **Static, always-on.** The queue-contract resolver refuses a `ready` naming a stock default created state (`Todo`, `To Do`, `Backlog`, `Triage`) and throws rather than resolving. It needs no network, so it runs everywhere, including offline and in CI. It cannot see a team that renamed its default.
455
+ - **Live, authoritative.** `/lisa:validate-tracker-mapping` compares the configured `ready` against the team's real `defaultIssueState` (surfaced as `isTeamDefault` on `lisa-linear-access operation: list-workflow-states`) and classifies a match as `INVERTED` — never `VALID`, and never auto-repaired, because nothing records what lane the human meant instead.
456
+
457
+ `INVERTED` is not a name-resolution failure; it is the opposite. The name resolves perfectly, which is precisely why every existence check passes while the gate runs backwards.
458
+
452
459
  **Linear state resolution is `type`-aware.** When a configured name is missing, a lifecycle skill may fall back to the team's states by `type` — `claimed`/`review` → the lowest-position `started`, `blocked` → `started` or `unstarted`, terminal `done` → `completed` — but only to *read*. **`ready` has no fallback on purpose:** every candidate would be the team's default unstarted state, which is exactly the inversion described above. A missing `ready` state is reported, never guessed; it must never invent a state to write into. Missing states are a setup defect, repaired by `/lisa:setup:linear`, not papered over at runtime.
453
460
 
454
461
  `blocked` is what every vendor agent flips to when triage finds unresolved ambiguities or the build path is blocked by something the agent can't resolve. Different from `claimed` because it explicitly signals "human attention required."
@@ -32,6 +32,24 @@ const DEFAULT_LINEAR_BUILD_DONE = {
32
32
  production: "Done",
33
33
  };
34
34
 
35
+ // The state names a stock Linear team creates brand-new Issues into. `ready`
36
+ // must name a lane a human moves an Issue INTO, so it may never be one of
37
+ // these: the claimable lane would stop meaning "a human flipped this to
38
+ // build-ready" and start meaning "nobody has touched this", and build-intake
39
+ // would dispatch work nobody approved.
40
+ //
41
+ // This list is a STATIC backstop for the stock names, which is the case that
42
+ // actually bit us. It cannot see a team that renamed its default — only the
43
+ // live `Team.defaultIssueState` can, which is why `/lisa:validate-tracker-mapping`
44
+ // carries the authoritative arm (`INVERTED`) and this one carries the arm that
45
+ // needs no network and therefore always runs.
46
+ const LINEAR_STOCK_DEFAULT_CREATED_STATES = [
47
+ "todo",
48
+ "to do",
49
+ "backlog",
50
+ "triage",
51
+ ];
52
+
35
53
  const DEFAULT_GITHUB_LINEAR_PRD_ROLES = {
36
54
  draft: "prd-draft",
37
55
  ready: "prd-ready",
@@ -272,6 +290,35 @@ export function resolvePrdLifecycleRoles(
272
290
  }
273
291
  }
274
292
 
293
+ /**
294
+ * Reject a Linear `ready` override that names a state a stock team creates
295
+ * brand-new Issues into.
296
+ *
297
+ * Failing loudly is the safe direction. An operator staring at a hard error has
298
+ * a broken queue; an operator with a silently inverted gate has agents shipping
299
+ * work no human approved, which is the failure mode that produced this guard.
300
+ *
301
+ * @param {string} configured The resolved `linear.workflow.ready` name.
302
+ * @returns {string} The same name, once it is proven not to be a default lane.
303
+ * @throws {Error} When the name is a stock default created state.
304
+ */
305
+ function assertLinearReadyIsNotDefaultState(configured) {
306
+ const normalized = configured.trim().toLowerCase();
307
+
308
+ if (!LINEAR_STOCK_DEFAULT_CREATED_STATES.includes(normalized)) {
309
+ return configured;
310
+ }
311
+
312
+ throw new Error(
313
+ `linear.workflow.ready is set to "${configured.trim()}", which is where Linear puts a ` +
314
+ "brand-new Issue. That inverts the build-ready gate: the claimable lane would mean " +
315
+ '"nobody has touched this" instead of "a human marked this ready", so intake would ' +
316
+ "claim untouched backlog items. Point linear.workflow.ready at a dedicated state a " +
317
+ "human moves Issues into (the default is `Ready`), then re-run /lisa:setup:linear to " +
318
+ "create it if the team does not have one."
319
+ );
320
+ }
321
+
275
322
  /**
276
323
  * Resolve the build lifecycle roles for the configured tracker vendor.
277
324
  *
@@ -307,7 +354,9 @@ export function resolveBuildLifecycleRoles(
307
354
  vendor: "linear",
308
355
  kind: "workflow",
309
356
  roles: {
310
- ready: config.linear?.workflow?.ready || "Ready",
357
+ ready: assertLinearReadyIsNotDefaultState(
358
+ config.linear?.workflow?.ready || "Ready"
359
+ ),
311
360
  claimed: config.linear?.workflow?.claimed || "In Progress",
312
361
  review: config.linear?.workflow?.review || "In Review",
313
362
  blocked: config.linear?.workflow?.blocked || "Blocked",
@@ -106,6 +106,40 @@ linear_graphql() {
106
106
  Map operation names to Linear GraphQL queries/mutations in this access skill.
107
107
  Consumers pass business-shaped arguments only; they do not embed GraphQL.
108
108
 
109
+ ## `list-workflow-states` — the team's states, and which one it creates into
110
+
111
+ `list-workflow-states team:<ID>` returns one node per state with `id`, `name`,
112
+ `type`, `position`, and **`isTeamDefault`**.
113
+
114
+ `isTeamDefault` is `true` for the single state named by the team's
115
+ `defaultIssueState` — where Linear puts every brand-new Issue. Callers need it to
116
+ enforce the rule that `linear.workflow.ready` must be a lane a human moves an
117
+ Issue **into**: pointing `ready` at the default inverts the gate, so the
118
+ claimable lane means "nobody has touched this" rather than "a human marked this
119
+ ready", and build-intake dispatches unapproved work. `/lisa:setup:linear` refuses
120
+ to resolve `ready` onto it, and `/lisa:validate-tracker-mapping` classifies a
121
+ config that already does as `INVERTED`.
122
+
123
+ It belongs on this operation rather than in a separate `get-team` call because
124
+ every caller that needs it is already enumerating states, and a second round trip
125
+ is a second chance for the two answers to disagree. A team with no
126
+ `defaultIssueState` set yields `isTeamDefault: false` on every node — report that
127
+ honestly; do not fall back to guessing by name or position.
128
+
129
+ ```graphql
130
+ query($teamId:String!){
131
+ team(id:$teamId){
132
+ defaultIssueState{ id }
133
+ states(first:100){ nodes{ id name type position } }
134
+ }
135
+ }
136
+ ```
137
+
138
+ Set `isTeamDefault` per node by comparing `node.id` against
139
+ `team.defaultIssueState.id`. On the MCP substrate, which exposes states without
140
+ the team's default, resolve the default through the team record and join on `id`
141
+ the same way.
142
+
109
143
  ## `history` — transition history (read-only)
110
144
 
111
145
  `history id:<ID>` returns an Issue's ordered past state changes — the raw
@@ -71,7 +71,8 @@ Resolve the **effective** role → name mapping using the same defaults `/lisa:i
71
71
  - **Missing / empty tracker**: report `UNRESOLVABLE` with setup guidance (`/lisa:setup:jira`, `/lisa:setup:github`, or `/lisa:setup:linear`). Do not default to JIRA.
72
72
  - **JIRA build workflow** (`jira.workflow`): `ready`, `claimed`, optional `review`, `blocked`, and each `done.<env>` (`dev` / `staging` / `production`). Defaults: `Ready`, `In Progress`, `Code Review`, `Blocked`, `{dev: "On Dev", staging: "On Stg", production: "Done"}`.
73
73
  - **GitHub build/prd labels** (`github.labels.build`, `github.labels.prd`): each configured label string.
74
- - **Linear build/prd labels** (`linear.labels.build`, `linear.labels.prd`): each configured label/state string.
74
+ - **Linear build workflow** (`linear.workflow`): `ready`, `claimed`, `review`, `blocked`, and each `done.<env>` — native workflow **states**, the Linear analogue of `jira.workflow`, not of `github.labels`. Defaults: `Ready`, `In Progress`, `In Review`, `Blocked`, `{dev: "On Dev", staging: "On Stg", production: "Done"}`.
75
+ - **Linear labels** (`linear.labels`): the `prd.*` map plus the one surviving build-lane key, the `human_needed` marker (`linear.labels.build.human_needed`). A config that predates the state model may still carry `ready` / `claimed` / `blocked` / `done` under `linear.labels.build`; those are **inert** — nothing reads them. Do not audit them against the live label set, and do not report them as drift. Report them once as a migration note pointing at `/lisa:setup:linear`, which removes them.
75
76
  - **Notion PRD values** (`notion.values`): each configured select-option value, validated against the `notion.statusProperty` property's options.
76
77
  - **Confluence PRD parents** (`confluence.parents`): each configured parent page id, validated by existence.
77
78
 
@@ -103,7 +104,9 @@ gh label list --repo "$REPO" --limit 200 --json name -q '.[].name'
103
104
 
104
105
  ### Linear / Notion / Confluence
105
106
 
106
- Enumerate via the corresponding access surface (Linear MCP workflow states + labels; Notion data-source select options for `notion.statusProperty`; Confluence page-exists check per parent id). Same compare-exact-case contract as JIRA.
107
+ Enumerate via the corresponding access surface (`lisa-linear-access` workflow states + labels; Notion data-source select options for `notion.statusProperty`; Confluence page-exists check per parent id). Same compare-exact-case contract as JIRA.
108
+
109
+ For Linear, `lisa-linear-access operation: list-workflow-states` returns each state's `name`, `type`, `position` and `isTeamDefault` (the access layer sets it from the team's `defaultIssueState`). **Keep `isTeamDefault`** — Step 4 needs it, and it is the only authoritative answer to "which state does this team create Issues into". Do not approximate it with a name guess: `Todo` is merely the stock name, and a team that renamed its `defaultIssueState` is exactly the case a name guess misses.
107
110
 
108
111
  ## Step 4 — Compare (exact case)
109
112
 
@@ -113,10 +116,14 @@ For each `(role, configured-name)` pair, classify against the live name set:
113
116
  - **CASE_DRIFT** — a case-insensitive match exists but no exact-case match (e.g. config `"On Stg"` vs live `"ON STG"`). Canonical = the live exact name.
114
117
  - **MISSING** — no case-insensitive match exists. The name was renamed beyond recognition or deleted.
115
118
 
119
+ One role carries a further check that name-existence cannot express:
120
+
121
+ - **INVERTED** — Linear only, `ready` only: the configured state exists, but it is the team's **default created state** (`isTeamDefault`). This is worse than a name that does not resolve. The name resolves perfectly, so every existence check passes while the gate runs backwards: `ready` is supposed to mean "a human moved this Issue here", and the team's default means "nobody has touched this". Build-intake claims from that lane, so an INVERTED mapping dispatches work no human ever approved. Measured on the first team it hit: 20 Issues in the claimable lane, 12 never marked ready — including decision tickets shaped like leaves, which the leaf-only gate cannot catch either. Report it even when every other role is VALID.
122
+
116
123
  A project's verdict:
117
124
 
118
125
  - **VALID** — every role is VALID.
119
- - **DRIFTED** — at least one CASE_DRIFT or MISSING role, none of which is UNRESOLVABLE.
126
+ - **DRIFTED** — at least one CASE_DRIFT, MISSING, or INVERTED role, none of which is UNRESOLVABLE. An INVERTED `ready` is never VALID, no matter how cleanly it resolves.
120
127
  - **UNRESOLVABLE** — the live set couldn't be enumerated (auth mismatch, missing tracker config, access failure). Distinguish this loudly from VALID — an unresolved audit is not a passing audit.
121
128
 
122
129
  ## Step 5 — Report
@@ -134,7 +141,17 @@ Per project, print a terminal-first section:
134
141
  done.production Done Done VALID
135
142
  ```
136
143
 
137
- End with a roll-up: counts of VALID / DRIFTED / UNRESOLVABLE projects and the exact next command (`… repair=true` when drift is auto-repairable; an admin note when a status is genuinely MISSING).
144
+ An INVERTED `ready` gets a full line rather than a one-word status, because the operator reading it is not necessarily an engineer and the word alone does not convey the stakes:
145
+
146
+ ```
147
+ ready Todo Todo INVERTED
148
+ "Todo" is the state this Linear team puts every NEW issue into, so the
149
+ build queue is currently claiming issues nobody marked ready. Pick or
150
+ create a state a person moves an issue into (Lisa's default is "Ready")
151
+ via /lisa:setup:linear, then set linear.workflow.ready to it.
152
+ ```
153
+
154
+ End with a roll-up: counts of VALID / DRIFTED / UNRESOLVABLE projects and the exact next command (`… repair=true` when drift is auto-repairable; an admin note when a status is genuinely MISSING; `/lisa:setup:linear` when a `ready` is INVERTED).
138
155
 
139
156
  ## Step 6 — Repair (only when `repair=true`)
140
157
 
@@ -166,6 +183,18 @@ Compute the closest live candidates (case-insensitive token/substring overlap, t
166
183
 
167
184
  Only write on an explicit pick. Never auto-select. If the user leaves it unchanged, keep the project `DRIFTED` and surface the admin remediation (add the status back, or fix it in the tracker).
168
185
 
186
+ ### INVERTED — never auto-repair
187
+
188
+ **Never auto-repair an INVERTED `ready`, even with `repair=true`.** Every other classification has one correct answer that the live tracker already knows: CASE_DRIFT has the canonical casing, MISSING has a shortlist of near-matches. INVERTED has neither. The configured name is live and correctly cased; what is wrong is which lane the project chose to mean "build-ready", and nothing in the config or the tracker records what the human intended instead. Guessing would silently repoint the queue at a lane that may hold nothing, or worse, at another lane the team fills automatically — swapping one wrong answer for a quieter one.
189
+
190
+ The team may also genuinely not have a dedicated ready lane yet, in which case the repair is to **create a state**, not to rewrite a string — `/lisa:validate-tracker-mapping` audits config, it does not mutate the tracker.
191
+
192
+ So: present the team's non-default states via `AskUserQuestion`, and write `linear.workflow.ready` only on an explicit pick. If none fits, or the user declines, leave the config untouched, keep the project `DRIFTED`, and hand off:
193
+
194
+ > Linear has no dedicated build-ready state on this team. Run `/lisa:setup:linear` — it offers to create `Ready` and records the mapping.
195
+
196
+ Until then, say plainly that the build queue is claiming unapproved work and that pausing build intake is the safe interim.
197
+
169
198
  ### Invalidate the verification cache
170
199
 
171
200
  After any JIRA repair, clear the `setup-jira` reachability cache so it re-verifies the new mapping:
@@ -6,7 +6,7 @@
6
6
  * `CodySwannGT/lisa/.github/workflows/nightly-e2e-health.yml`; the contract both
7
7
  * halves implement is `docs/nightly-e2e-gate.md` in Lisa, whose §2 truth table
8
8
  * is proven row-by-row by `tests/unit/scripts/nightly-e2e-health*.test.ts`
9
- * (rows 1-16, `-api` rows 17-20, `-bypass` rows 21-25).
9
+ * (rows 1-16, `-api` rows 17-20, `-bypass` rows 21-25, `-completeness` row 26).
10
10
  *
11
11
  * Usage:
12
12
  * node scripts/check-nightly-e2e-health.mjs # human report, exit 1 when blocked
@@ -38,6 +38,12 @@
38
38
  * An unreachable or rate-limited API is a HARD failure after a bounded retry;
39
39
  * there is no configuration that renders "we could not check" as "it is fine".
40
40
  *
41
+ * A `success` run is not automatically a fresh `success`, and since row 26 it is
42
+ * not automatically a COMPLETE one either: GitHub concludes a run `success` when
43
+ * jobs were skipped, so a suite narrowed to one platform — or one whose
44
+ * prerequisites were absent — reports green having tested nothing it was asked
45
+ * about. A run-scoped suite therefore reads the run's jobs as well.
46
+ *
41
47
  * The one forgiving state is the TIME-BOXED bootstrap window (`bootstrap_until`),
42
48
  * during which MISSING evidence is reported but does not block, always with its
43
49
  * expiry timestamp on screen. Bootstrap forgives absence of evidence, never
@@ -65,7 +71,7 @@ import { pathToFileURL } from "node:url";
65
71
  * rather than running a contract neither half agrees on. See §8 of
66
72
  * `docs/nightly-e2e-gate.md` for what counts as major / minor / patch.
67
73
  */
68
- export const NIGHTLY_E2E_CONTRACT_VERSION = "1.0.0";
74
+ export const NIGHTLY_E2E_CONTRACT_VERSION = "1.1.0";
69
75
 
70
76
  /**
71
77
  * The conclusions that constitute a verdict about the code.
@@ -565,20 +571,75 @@ export function assessSuite(suite, observation, context) {
565
571
  };
566
572
  }
567
573
 
574
+ const jobs = observation.jobs ?? [];
575
+
568
576
  if (suite.match.mode === "run") {
569
577
  const state = stateForConclusion(run.conclusion);
578
+ if (state !== SUITE_STATES.pass) {
579
+ return {
580
+ ...base,
581
+ ...seen,
582
+ state,
583
+ reason:
584
+ state === SUITE_STATES.unknown
585
+ ? "indecisive_conclusion"
586
+ : "run_conclusion",
587
+ };
588
+ }
589
+
590
+ // Row 26 — COMPLETENESS. `mode: "run"` means the whole workflow IS the
591
+ // suite, so the run's own `success` is evidence only when every job behind
592
+ // it also succeeded.
593
+ //
594
+ // GitHub concludes a run `success` when jobs were SKIPPED. That is how a
595
+ // suite reports green having tested half of itself: the shipped
596
+ // `maestro-e2e.yml` caller exposes a `platform` dispatch picker, and
597
+ // `platform: android` leaves the iOS job skipped while the run still
598
+ // concludes `success`. Read as a run conclusion alone, that filtered
599
+ // dispatch cleared a required merge gate for an arm that never executed —
600
+ // propswap's trap, a suite declaring itself green on evidence it never
601
+ // gathered. The same shape reaches the CRON path: with
602
+ // `require_prerequisites: false` and no EXPO_TOKEN, every job skips and the
603
+ // run is still `success`.
604
+ //
605
+ // The discriminator is "was this run PARTIAL?", never "was this a
606
+ // dispatch?" — twice deliberately. The runs API exposes no `inputs` field,
607
+ // so the filter itself is unreadable; and a full unfiltered dispatch is the
608
+ // documented unblock path (§7), which must keep counting or the gate stops
609
+ // being escapable by FIXING.
610
+ //
611
+ // An EMPTY job list lands here too: a completed run always has at least one
612
+ // job, so an empty list is an unread job list, and "we could not check"
613
+ // never renders as "it is fine".
614
+ const shortfall = jobs.find(job => job.conclusion !== GREEN_CONCLUSION);
615
+ if (jobs.length === 0 || shortfall) {
616
+ const conclusion = shortfall?.conclusion ?? null;
617
+ return {
618
+ ...base,
619
+ ...seen,
620
+ // The RUN's `success` must not be printed beside a blocked state — the
621
+ // same self-contradiction the job-scoped modes refuse below.
622
+ conclusion,
623
+ url: shortfall?.html_url ?? seen.url,
624
+ // A skipped arm is ABSENCE of evidence, which bootstrap may forgive; a
625
+ // job that failed under `continue-on-error` inside a green run is
626
+ // EVIDENCE OF FAILURE, which it never may.
627
+ state:
628
+ stateForConclusion(conclusion) === SUITE_STATES.fail
629
+ ? SUITE_STATES.fail
630
+ : SUITE_STATES.unknown,
631
+ reason: "incomplete_run",
632
+ };
633
+ }
634
+
570
635
  return {
571
636
  ...base,
572
637
  ...seen,
573
- state,
574
- reason:
575
- state === SUITE_STATES.unknown
576
- ? "indecisive_conclusion"
577
- : "run_conclusion",
638
+ state: SUITE_STATES.pass,
639
+ reason: "run_conclusion",
578
640
  };
579
641
  }
580
642
 
581
- const jobs = observation.jobs ?? [];
582
643
  const matches =
583
644
  suite.match.mode === "job"
584
645
  ? jobs.filter(job => job.name === suite.match.name)
@@ -903,6 +964,8 @@ const REASON_TEXT = Object.freeze({
903
964
  "the run completed without ever producing the job this gate reads. The job was renamed, which silently disarms the gate.",
904
965
  pattern_matched_nothing:
905
966
  "the job pattern matched zero jobs in the newest run. Zero matches is the signature of a renamed job.",
967
+ incomplete_run:
968
+ "the run reported `success`, but it did not run everything: at least one job was skipped, failed under `continue-on-error`, or could not be read. A run that skipped part of itself did not gather the evidence its green claims — a suite re-run for one platform only is not a verdict about the other one. Re-run the suite WITHOUT narrowing it.",
906
969
  run_conclusion: "",
907
970
  job_conclusion: "",
908
971
  });
@@ -979,7 +1042,7 @@ export function formatReport(verdict, context) {
979
1042
  lines.push(
980
1043
  `Merges into \`${context.branch}\` are blocked until the nightly e2e suites are green again. To unblock:`,
981
1044
  " 1. Fix the failure (open the run above — it names the failing spec or flow).",
982
- ` 2. Re-run the suite from the Actions tab against \`${context.branch}\`. A \`workflow_dispatch\` run counts exactly like a scheduled one, so a green dispatch clears this gate immediately — no waiting for tomorrow.`,
1045
+ ` 2. Re-run the suite from the Actions tab against \`${context.branch}\`, running the WHOLE suite. A \`workflow_dispatch\` run counts exactly like a scheduled one, so a green dispatch clears this gate immediately — no waiting for tomorrow. What does not count is a NARROWED re-run: leave any platform / tag / shard picker on its "all" default, because a run that skipped an arm says nothing about that arm.`,
983
1046
  " 3. Re-run this check on your PR.",
984
1047
  "",
985
1048
  `If the failure is in the harness rather than the app — or this IS the PR that fixes the red nightly — a maintainer (not you) can apply the \`${context.bypassLabel}\` label after you add a \`Nightly-E2E-Bypass: <TICKET> <reason>\` line to the PR body. There is no admin-merge-past-red: the audited bypass is the only sanctioned path.`
@@ -1182,7 +1245,10 @@ export async function observe(api, suites, branch, wait) {
1182
1245
  : newest,
1183
1246
  null
1184
1247
  );
1185
- if (!run || suite.match.mode === "run") {
1248
+ // Jobs are read for EVERY match mode, `run` included. A run-scoped suite
1249
+ // needs them to prove the run was complete (row 26) — a `success` run
1250
+ // that skipped half its jobs is not evidence about the half it skipped.
1251
+ if (!run) {
1186
1252
  return { workflowMissing: false, run, jobs: [] };
1187
1253
  }
1188
1254
  return {