@codyswann/lisa 5.11.0 → 5.13.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/review-evidence-event.mjs +7 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +18 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- 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 +35 -13
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/create-only/.github/required-checks.json +1 -0
- package/nestjs/create-only/.github/required-checks.json +1 -0
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa/agents/spec-conformance-specialist.md +1 -1
- package/plugins/lisa/agents/verification-specialist.md +1 -1
- package/plugins/lisa/rules/reference/base-rules.md +10 -8
- package/plugins/lisa/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa-agy/agents/spec-conformance-specialist.md +1 -1
- package/plugins/lisa-agy/agents/verification-specialist.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa-agy/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/agents/spec-conformance-specialist.agent.md +1 -1
- package/plugins/lisa-copilot/agents/verification-specialist.agent.md +1 -1
- package/plugins/lisa-copilot/rules/reference/base-rules.md +10 -8
- package/plugins/lisa-copilot/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa-copilot/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/agents/spec-conformance-specialist.md +1 -1
- package/plugins/lisa-cursor/agents/verification-specialist.md +1 -1
- package/plugins/lisa-cursor/rules/base-rules-reference.mdc +10 -8
- package/plugins/lisa-cursor/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa-cursor/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/agents/spec-conformance-specialist.md +1 -1
- package/plugins/lisa-devin/agents/verification-specialist.md +1 -1
- package/plugins/lisa-devin/rules/reference/base-rules.md +10 -8
- package/plugins/lisa-devin/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/lisa-devin/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/journey-guidance/SKILL.md +77 -0
- package/plugins/lisa-expo/.codex-plugin/skills/journey-guidance/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/journey-guidance/SKILL.md +75 -0
- package/plugins/lisa-expo/skills/journey-guidance/agents/openai.yaml +4 -0
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/journey-guidance/SKILL.md +75 -0
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/journey-guidance/SKILL.md +75 -0
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/journey-guidance/SKILL.md +75 -0
- 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-expo-devin/skills/journey-guidance/SKILL.md +75 -0
- 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/.codex-plugin/skills/journey-guidance/SKILL.md +39 -0
- package/plugins/lisa-rails/.codex-plugin/skills/journey-guidance/agents/openai.yaml +4 -0
- package/plugins/lisa-rails/skills/journey-guidance/SKILL.md +37 -0
- package/plugins/lisa-rails/skills/journey-guidance/agents/openai.yaml +4 -0
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-agy/skills/journey-guidance/SKILL.md +37 -0
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/skills/journey-guidance/SKILL.md +37 -0
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/skills/journey-guidance/SKILL.md +37 -0
- 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-rails-devin/skills/journey-guidance/SKILL.md +37 -0
- 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/agents/spec-conformance-specialist.md +1 -1
- package/plugins/src/base/agents/verification-specialist.md +1 -1
- package/plugins/src/base/rules/reference/base-rules.md +10 -8
- package/plugins/src/base/skills/lisa-ticket-triage/SKILL.md +6 -6
- package/plugins/src/base/skills/lisa-tracker-add-journey/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-tracker-create/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-tracker-evidence/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-tracker-journey/SKILL.md +1 -0
- package/plugins/src/expo/skills/journey-guidance/SKILL.md +75 -0
- package/plugins/src/rails/skills/journey-guidance/SKILL.md +37 -0
- package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +271 -8
- package/typescript/create-only/.github/required-checks.json +1 -0
|
@@ -6,7 +6,7 @@ allowed-tools: ["Read", "Glob", "Grep", "Bash"]
|
|
|
6
6
|
|
|
7
7
|
# Ticket Triage: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
Perform analytical triage on the ticket. The caller MUST have run `lisa-tracker-read` (or its vendor-specific underlying skill — `lisa-jira-read-ticket` for JIRA, `lisa-github-read-issue` for GitHub) first and provided the resulting context bundle — which includes the primary ticket, all linked tickets (blocks / is blocked by / relates to / duplicates), parent (Epic in JIRA, parent sub-issue in GitHub), siblings, sub-tasks / sub-issues, and remote PR state. Do not triage from a bare ticket summary — if the bundle is missing link or parent context, stop and instruct the caller to run `/tracker-read` first.
|
|
9
|
+
Perform analytical triage on the ticket. The caller MUST have run `lisa-tracker-read` (or its vendor-specific underlying skill — `lisa-jira-read-ticket` for JIRA, `lisa-github-read-issue` for GitHub, `lisa-linear-read-issue` for Linear) first and provided the resulting context bundle — which includes the primary ticket, all linked tickets (blocks / is blocked by / relates to / duplicates), parent (Epic in JIRA, parent sub-issue in GitHub, parent Project or parent Issue in Linear), siblings, sub-tasks / sub-issues, and remote PR state. Do not triage from a bare ticket summary — if the bundle is missing link or parent context, stop and instruct the caller to run `/tracker-read` first.
|
|
10
10
|
|
|
11
11
|
Repository name for scoped labels and comment headers: determine via `basename $(git rev-parse --show-toplevel)`.
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Repository name for scoped labels and comment headers: determine via `basename $
|
|
|
14
14
|
|
|
15
15
|
Before any analytical work, confirm the ticket carries the content an implementer needs to start. The caller should already have run `lisa-tracker-verify`; this phase consumes its output. If `lisa-tracker-verify` returned `FAIL` for any of the following, emit `BLOCKED` immediately with the missing-requirements list and skip to Phase 6:
|
|
16
16
|
|
|
17
|
-
- Parent missing (Epic parent for JIRA non-bug-non-epic; parent sub-issue for GitHub non-bug-non-epic)
|
|
17
|
+
- Parent missing (Epic parent for JIRA non-bug-non-epic; parent sub-issue for GitHub non-bug-non-epic; parent Project — or parent Issue for a sub-Issue — for Linear non-bug-non-epic)
|
|
18
18
|
- Description quality failures (no Gherkin acceptance criteria, missing audience sections)
|
|
19
19
|
- Validation Journey missing on a runtime-behavior ticket
|
|
20
20
|
- Target backend environment missing on a runtime-behavior ticket
|
|
@@ -23,7 +23,7 @@ Before any analytical work, confirm the ticket carries the content an implemente
|
|
|
23
23
|
|
|
24
24
|
Single-repo scope is handled separately — see below.
|
|
25
25
|
|
|
26
|
-
The caller (jira-agent or
|
|
26
|
+
The caller (jira-agent, github-agent, or linear-agent) is responsible for moving the ticket to the configured `blocked` lifecycle role — the `Blocked` status in JIRA, the `status:blocked` label in GitHub, the configured `blocked` workflow state in Linear — reassigning to the **Reporter / original author**, and posting a comment listing the missing requirements. This skill only emits the verdict and the missing-requirements list.
|
|
27
27
|
|
|
28
28
|
**Single-repo scope is split, not blocked.** A cross-repo leaf work unit (Bug / Task / Sub-task / Improvement spanning repos) is a decomposition error the agent owns, not a terminal BLOCKED. Do not emit BLOCKED for it. The caller runs the **work-time split procedure** in the `repo-scope-split` rule (narrow the original to one repo, spin off a sibling per additional repo, link the producer→consumer dependency), then re-runs `tracker-verify` and re-enters triage on the now single-repo ticket. Only fall back to BLOCKED if the split is ambiguous (see "When to block instead of split" in that rule).
|
|
29
29
|
|
|
@@ -170,7 +170,7 @@ Evaluate the findings and produce exactly one verdict:
|
|
|
170
170
|
|
|
171
171
|
- **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
|
|
172
172
|
- **`DUPLICATE_ALREADY_FIXED`** -- This ticket duplicates canonical work whose fix is already merged/deployed and empirically confirmed present on the relevant base branch. Work MUST NOT proceed. The caller must post the triage finding, ensure the native `duplicates <canonical>` link exists when the tracker supports one, and return the structured canonical reference/evidence to build intake for terminal duplicate closeout.
|
|
173
|
-
- **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent) MUST
|
|
173
|
+
- **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent, github-agent, or linear-agent) MUST move the ticket to the configured `blocked` lifecycle role and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
|
|
174
174
|
- **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
|
|
175
175
|
- **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
|
|
176
176
|
|
|
@@ -207,8 +207,8 @@ Structure all output with clear section headers so the caller can parse and post
|
|
|
207
207
|
```
|
|
208
208
|
|
|
209
209
|
The caller is responsible for:
|
|
210
|
-
1. Posting the findings as comments on the ticket
|
|
210
|
+
1. Posting the findings as comments on the ticket with the configured tracker's comment mechanism — the vendor agent's triage step owns it: jira-agent for JIRA, github-agent (`gh issue comment`) for GitHub, linear-agent (`lisa-linear-access`) for Linear
|
|
211
211
|
2. Adding the `claude-triaged-{repo}` label to the ticket
|
|
212
|
-
3. If `BLOCKED` due to Phase 0 (missing required description content):
|
|
212
|
+
3. If `BLOCKED` due to Phase 0 (missing required description content): moving the ticket to the configured `blocked` lifecycle role, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
|
|
213
213
|
4. If `DUPLICATE_ALREADY_FIXED`: return the canonical ticket reference and empirical base-branch evidence to build intake so it can close the ticket as a terminal duplicate without opening a PR.
|
|
214
214
|
5. If `BLOCKED` due to Phase 1.5 (open blockers, duplicate-of-open) or Phase 3 (ambiguities): stopping all work and reporting to the human; do NOT auto-transition status in these cases.
|
|
@@ -13,6 +13,7 @@ See the `config-resolution` rule for configuration and dispatch table.
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
15
15
|
1. Resolve tracker config (same logic as `lisa-tracker-write`).
|
|
16
|
+
Then, when an installed stack plugin ships a `journey-guidance` skill (the Expo and Rails plugins do), invoke it and carry its guidance — when a ticket needs a journey and how to write its steps, markers, viewports, and assertions — into the vendor skill below. It is tracker-neutral, so it applies to `jira`, `github`, and `linear` alike. When no stack plugin ships one, continue with the base behaviour; that is not an error.
|
|
16
17
|
2. Dispatch:
|
|
17
18
|
- Missing / empty → stop and report `"No tracker configured in .lisa.config.json. Run /lisa:setup:jira, /lisa:setup:github, or /lisa:setup:linear first."`
|
|
18
19
|
- `jira` → invoke `lisa-jira-add-journey` with `$ARGUMENTS` verbatim. Arg: a JIRA ticket key.
|
|
@@ -13,6 +13,7 @@ See the `config-resolution` rule for configuration and dispatch table.
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
15
15
|
1. Resolve tracker config (same logic as `lisa-tracker-write`).
|
|
16
|
+
Then, when an installed stack plugin ships a `journey-guidance` skill (the Expo and Rails plugins do), invoke it and carry its guidance — which planned tickets need a Validation Journey and how to draft it, plus stack reuse expectations — into the vendor skill below. It is tracker-neutral, so it applies to `jira`, `github`, and `linear` alike. When no stack plugin ships one, continue with the base behaviour; that is not an error.
|
|
16
17
|
2. Dispatch:
|
|
17
18
|
- Missing / empty → stop and report `"No tracker configured in .lisa.config.json. Run /lisa:setup:jira, /lisa:setup:github, or /lisa:setup:linear first."`
|
|
18
19
|
- `jira` → invoke `lisa-jira-create` with `$ARGUMENTS` verbatim.
|
|
@@ -20,6 +20,7 @@ or publishing completion proof. It ships with the skill even on runtimes that
|
|
|
20
20
|
omit the plugin rules tree; do not assume a runtime-specific rules directory.
|
|
21
21
|
|
|
22
22
|
1. Resolve tracker config (same logic as `lisa-tracker-write`).
|
|
23
|
+
Then, when an installed stack plugin ships a `journey-guidance` skill (the Expo and Rails plugins do), invoke it and carry its guidance — how the stack names its evidence files — into the vendor skill below. It is tracker-neutral, so it applies to `jira`, `github`, and `linear` alike. When no stack plugin ships one, continue with the base behaviour; that is not an error.
|
|
23
24
|
2. Missing / empty → stop and report `"No tracker configured in .lisa.config.json. Run /lisa:setup:jira, /lisa:setup:github, or /lisa:setup:linear first."`
|
|
24
25
|
3. Before dispatching, update the generated evidence artifact through `lisa-usage-accounting` so the comment body / PR evidence section carries a direct `lisa-verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item's parentage or child refs are already known, prefer `record_and_rollup` so ancestor totals refresh in the same write; otherwise still write the direct entry, and if trustworthy runtime usage is unavailable, write `source: unavailable` with nullable token/cost fields instead of skipping the row.
|
|
25
26
|
4. Dispatch:
|
|
@@ -13,6 +13,7 @@ See the `config-resolution` rule for configuration and dispatch table.
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
15
15
|
1. Resolve tracker config (same logic as `lisa-tracker-write`).
|
|
16
|
+
Then, when an installed stack plugin ships a `journey-guidance` skill (the Expo and Rails plugins do), invoke it and carry its guidance — how to satisfy prerequisites, run the steps (for example, once per viewport), and name the captured evidence — into the vendor skill below. It is tracker-neutral, so it applies to `jira`, `github`, and `linear` alike. When no stack plugin ships one, continue with the base behaviour; that is not an error.
|
|
16
17
|
2. Dispatch:
|
|
17
18
|
- Missing / empty → stop and report `"No tracker configured in .lisa.config.json. Run /lisa:setup:jira, /lisa:setup:github, or /lisa:setup:linear first."`
|
|
18
19
|
- `jira` → invoke `lisa-jira-journey` with `$ARGUMENTS` verbatim. Arg shape: `<TICKET_ID> [PR_NUMBER]`.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: journey-guidance
|
|
3
|
+
description: "Expo stack guidance for Validation Journeys on any tracker: when a ticket needs one, writing it with screenshot markers and viewports, running it in the browser, and naming screenshots. Read by the tracker journey, add-journey, create and evidence skills."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Expo Validation Journey Guidance
|
|
7
|
+
|
|
8
|
+
Stack-specific guidance for Validation Journeys in an Expo / React Native project. It applies the same way whichever tracker the project uses (`tracker` in `.lisa.config.json`: `jira`, `github`, or `linear`).
|
|
9
|
+
|
|
10
|
+
This skill adds the Expo parts only. The vendor skills still read the ticket, append the journey, and post the evidence; the tracker dispatchers (`lisa-tracker-journey`, `lisa-tracker-add-journey`, `lisa-tracker-create`, `lisa-tracker-evidence`) consult this skill before they dispatch. The Jira-only overlays in this plugin (`jira-journey`, `jira-add-journey`, `jira-create`, `jira-evidence`) carry the same guidance plus Jira mechanics; this skill is what a GitHub or Linear project reaches.
|
|
11
|
+
|
|
12
|
+
## When a ticket needs a journey
|
|
13
|
+
|
|
14
|
+
Every ticket that changes, adds, or fixes UI includes a `Validation Journey` section:
|
|
15
|
+
|
|
16
|
+
- New UI components or screens
|
|
17
|
+
- Layout or styling changes (responsive, spacing, colors)
|
|
18
|
+
- Modal, drawer, or popover behavior
|
|
19
|
+
- Form validation or user input flows
|
|
20
|
+
- Bug fixes that can be checked by looking at the screen
|
|
21
|
+
|
|
22
|
+
Skip it only for pure backend/API changes with no UI surface, config-only changes (env vars, feature flags), and test-only or documentation-only changes.
|
|
23
|
+
|
|
24
|
+
When the work touches an existing screen, walk the live product first (`lisa-product-walkthrough`) and carry the findings under `## Current Product`. A UI ticket without a current-product walkthrough is missing context the implementer needs.
|
|
25
|
+
|
|
26
|
+
## Writing the journey
|
|
27
|
+
|
|
28
|
+
Write it from the end user's point of view, in the tracker's own markup (Markdown for GitHub and Linear, wiki markup for Jira):
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## Validation Journey
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
- App running locally or on dev
|
|
35
|
+
- Authenticated as test user
|
|
36
|
+
- Required feature flags enabled (name each PostHog flag)
|
|
37
|
+
|
|
38
|
+
### Steps
|
|
39
|
+
1. Navigate to the relevant page
|
|
40
|
+
2. Perform the first action
|
|
41
|
+
3. Verify the expected state [SCREENSHOT: state-name]
|
|
42
|
+
4. Perform the next action
|
|
43
|
+
5. Verify the final state [SCREENSHOT: final-state]
|
|
44
|
+
|
|
45
|
+
### Viewports
|
|
46
|
+
| Name | Width | Height |
|
|
47
|
+
|------|-------|--------|
|
|
48
|
+
| Desktop | 1512 | 768 |
|
|
49
|
+
| Mobile | 375 | 812 |
|
|
50
|
+
|
|
51
|
+
### Assertions
|
|
52
|
+
- What must be true on screen at each viewport
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Rules:
|
|
56
|
+
|
|
57
|
+
1. **Concrete steps** — "Click the 'Add action' button", not "Interact with the controls".
|
|
58
|
+
2. **3–7 screenshot markers** at the states that prove the change works. `[SCREENSHOT: name]` is shorthand for the typed `[EVIDENCE: screenshot: name]` marker in the `verification` rule. Names are kebab-case (`modal-open`, `button-disabled`, `form-error`).
|
|
59
|
+
3. **Viewports match the change** — always Desktop (1512×768); add Mobile (375×812) for responsive changes; add Tablet (768×1024) only when relevant.
|
|
60
|
+
4. **Assertions are testable** — "Buttons stacked vertically on mobile", not "Layout looks good".
|
|
61
|
+
5. **Include sign-in** in Prerequisites when the journey needs it.
|
|
62
|
+
|
|
63
|
+
To find the flow, read the code: the components involved (search by ticket id, feature name, or paths named in the ticket), the `testID`s Playwright can target, and the Container/View structure, navigation, and modals.
|
|
64
|
+
|
|
65
|
+
## Running the journey
|
|
66
|
+
|
|
67
|
+
Requires the Playwright MCP server and a running dev server.
|
|
68
|
+
|
|
69
|
+
1. Satisfy prerequisites: check the dev server responds (`browser_navigate` to the app URL), sign in with test credentials from `.env.localhost` or `.env.local`, and go to the starting point.
|
|
70
|
+
2. Run the **full journey once per viewport**. Between viewports, `browser_resize` to the next size, navigate back to the start, and repeat every step — some modals close on resize, and each screenshot must reflect that viewport's state.
|
|
71
|
+
3. At each screenshot marker, `browser_take_screenshot`. For a conditional step, capture the state the step text describes.
|
|
72
|
+
|
|
73
|
+
## Naming the evidence
|
|
74
|
+
|
|
75
|
+
Screenshots are `NN-<marker-name>-<viewport>.png`: a zero-padded sequence number, the marker name, and the lowercase viewport name. Three markers over two viewports give `01-…-desktop.png` through `06-…-mobile.png`. What happens to them next depends on the tracker. On Jira, `lisa-jira-evidence` uploads them to the configured evidence release under a PR-scoped name, so same-named files on two pull requests never overwrite each other. The GitHub and Linear evidence skills upload text evidence only (`lisa-github-evidence` takes `NN-*.txt`/`.json`; `lisa-linear-evidence` takes text files from `evidence/files/`), so on those trackers attach image evidence to the pull request yourself, and record the text form of each check (for example the command output) under the same `NN-` name so the vendor skill carries it.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: journey-guidance
|
|
3
|
+
description: "Rails stack guidance for Validation Journeys on any tracker: picking the check for UI, API and background-job changes, reusing partials and ViewComponents, and naming evidence. Read by the tracker journey, add-journey, create and evidence skills."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rails Validation Journey Guidance
|
|
7
|
+
|
|
8
|
+
Stack-specific guidance for Validation Journeys in a Rails project. It applies the same way whichever tracker the project uses (`tracker` in `.lisa.config.json`: `jira`, `github`, or `linear`).
|
|
9
|
+
|
|
10
|
+
This skill adds the Rails parts only. The vendor skills still read the ticket, append the journey, and post the evidence; the tracker dispatchers (`lisa-tracker-journey`, `lisa-tracker-add-journey`, `lisa-tracker-create`, `lisa-tracker-evidence`) consult this skill before they dispatch. The Jira-only overlays in this plugin (`jira-journey`, `jira-add-journey`, `jira-create`, `jira-evidence`) carry the same guidance plus Jira mechanics; this skill is what a GitHub or Linear project reaches.
|
|
11
|
+
|
|
12
|
+
## Writing the journey
|
|
13
|
+
|
|
14
|
+
Compose Prerequisites, Steps with typed evidence markers (`[EVIDENCE: <artifact-type>: <name>]` per the `verification` rule), and Assertions. Pick the marker type from what the change touches:
|
|
15
|
+
|
|
16
|
+
| Change touches | Verify with | Marker type |
|
|
17
|
+
|----------------|-------------|-------------|
|
|
18
|
+
| Views, partials, ViewComponents, Hotwire | Playwright MCP browser tools at each viewport | `screenshot` |
|
|
19
|
+
| Controllers / JSON API | `curl` (or a request spec) against the running app | `http-transcript` |
|
|
20
|
+
| Background jobs (Solid Queue) | `ops-verify-jobs` — worker health, queue depth, failed and retried jobs | `state-dump` or `cli-output` |
|
|
21
|
+
| Tracing, metrics, logs | `ops-verify-telemetry`, `ops-check-logs` | `log-snippet` |
|
|
22
|
+
| Model / library code with no runtime surface | the test suite | `test-run-log` |
|
|
23
|
+
|
|
24
|
+
Start the app with `ops-run-local` when a step needs it.
|
|
25
|
+
|
|
26
|
+
When drafting tickets for UI work, prefer reusing the closest existing partial or ViewComponent over pixel-matching a mock from scratch, and say which one in the ticket.
|
|
27
|
+
|
|
28
|
+
## Running the journey
|
|
29
|
+
|
|
30
|
+
Run each step in order and capture an artifact of the declared type at every marker. For UI steps, run the full journey once per viewport. For API and job steps, keep the raw request/response or command output — a prose summary satisfies no marker.
|
|
31
|
+
|
|
32
|
+
## Naming the evidence
|
|
33
|
+
|
|
34
|
+
- Image evidence: `NN-name-viewport.png` (for example `01-search-step-desktop.png`).
|
|
35
|
+
- Text evidence: `NN-name.txt` or `NN-name.json` (for example `01-health-check.json`).
|
|
36
|
+
|
|
37
|
+
What happens to them next depends on the tracker. On Jira, `lisa-jira-evidence` uploads them to the configured evidence release under a PR-scoped name, so same-named files on two pull requests never overwrite each other. The GitHub and Linear evidence skills upload text evidence only (`lisa-github-evidence` takes `NN-*.txt`/`.json`; `lisa-linear-evidence` takes text files from `evidence/files/`), so on those trackers attach image evidence to the pull request yourself, and record the text form of each check (for example the command output) under the same `NN-` name so the vendor skill carries it.
|
|
@@ -1039,7 +1039,10 @@ export function loadDeclaration(rootDir) {
|
|
|
1039
1039
|
`check-skipped-required-checks: ${DECLARATION_PATH} does not exist. This guard rests on two REVIEWED SNAPSHOTS that cannot be derived from the repository — the ruleset's required contexts, and what each \`skip_jobs\` token silences. Create it (Lisa ships a seed) rather than deleting the guard.`
|
|
1040
1040
|
);
|
|
1041
1041
|
}
|
|
1042
|
-
const declaration =
|
|
1042
|
+
const declaration = withGateReviewers(
|
|
1043
|
+
JSON.parse(readFileSync(path, "utf8")),
|
|
1044
|
+
gateReviewers(rootDir)
|
|
1045
|
+
);
|
|
1043
1046
|
assertRequiredDeclarationKeys(declaration);
|
|
1044
1047
|
assertDeclarationCollections(declaration);
|
|
1045
1048
|
assertRequiredContextsByBranch(declaration);
|
|
@@ -1052,6 +1055,226 @@ export function loadDeclaration(rootDir) {
|
|
|
1052
1055
|
return declaration;
|
|
1053
1056
|
}
|
|
1054
1057
|
|
|
1058
|
+
/** Repo-relative path of the project's Lisa config, which holds the gates. */
|
|
1059
|
+
const LISA_CONFIG_PATH = ".lisa.config.json";
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* @typedef {Record<string, {proof?: string[], no_work?: string[]}>} GateVocabularies
|
|
1063
|
+
* Description vocabulary per reviewer context, as read from the gates config.
|
|
1064
|
+
*/
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* The third-party reviewers `.lisa.config.json` declares, as description
|
|
1068
|
+
* vocabularies keyed by the awaited context (CodySwannGT/lisa#4914).
|
|
1069
|
+
*
|
|
1070
|
+
* A reviewer is a gate whose pull-request entry awaits a context and marks it
|
|
1071
|
+
* `evidence.reviewer: true` — the same reading as `configuredReviewers` in
|
|
1072
|
+
* `check-third-party-review-evidence.mjs`. That script ships from the `all/`
|
|
1073
|
+
* template and this one from `typescript/`, so a host can carry either without
|
|
1074
|
+
* the other; the reading is repeated here rather than imported, and a unit test
|
|
1075
|
+
* holds the two to the same answer.
|
|
1076
|
+
*
|
|
1077
|
+
* Reviewers come back in two sets. `checks` must post a check, so they are
|
|
1078
|
+
* evidence-bearing. `reviewBy` are proven by `evidence.review_by`: the prover
|
|
1079
|
+
* reads their `await` check first and falls back to their submitted review only
|
|
1080
|
+
* when they posted none, so a check they DO post is still examined for a hollow
|
|
1081
|
+
* green — but one that never posted is not a finding, because a review is
|
|
1082
|
+
* that reviewer's evidence.
|
|
1083
|
+
*
|
|
1084
|
+
* No config means no reviewers. A config that does not parse, or a reviewer
|
|
1085
|
+
* gate whose phrases are malformed, is refused: this guard would otherwise
|
|
1086
|
+
* examine fewer reviewers, or other words, than the project declared and say
|
|
1087
|
+
* nothing.
|
|
1088
|
+
* @param {string} rootDir - Repository root
|
|
1089
|
+
* @returns {{checks: GateVocabularies, reviewBy: GateVocabularies}} Vocabulary per reviewer context
|
|
1090
|
+
* @throws {Error} When `.lisa.config.json` does not parse or a reviewer gate's phrases are malformed
|
|
1091
|
+
*/
|
|
1092
|
+
function gateReviewers(rootDir) {
|
|
1093
|
+
const path = resolveWithinRoot(rootDir, LISA_CONFIG_PATH, "the Lisa config");
|
|
1094
|
+
/** @type {{checks: GateVocabularies, reviewBy: GateVocabularies}} */
|
|
1095
|
+
const reviewers = { checks: {}, reviewBy: {} };
|
|
1096
|
+
if (!existsSync(path)) return reviewers;
|
|
1097
|
+
let config;
|
|
1098
|
+
try {
|
|
1099
|
+
config = JSON.parse(readFileSync(path, "utf8"));
|
|
1100
|
+
} catch (error) {
|
|
1101
|
+
throw new Error(
|
|
1102
|
+
`check-skipped-required-checks: ${LISA_CONFIG_PATH} is not readable (${/** @type {Error} */ (error).message}). Its gates declare the third-party reviewers this guard examines, so it refuses rather than examining none of them.`
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
for (const [gateId, gate] of Object.entries(config?.gates ?? {})) {
|
|
1106
|
+
if (!isPlainObject(gate)) continue;
|
|
1107
|
+
const entry = gate["pull-request"];
|
|
1108
|
+
if (!isPlainObject(entry)) continue;
|
|
1109
|
+
const evidence = entry.evidence;
|
|
1110
|
+
if (evidence?.reviewer !== true) continue;
|
|
1111
|
+
if (typeof entry.await !== "string" || entry.await.trim() === "") continue;
|
|
1112
|
+
const vocabulary = {};
|
|
1113
|
+
for (const list of ["proof", "no_work"]) {
|
|
1114
|
+
if (evidence[list] === undefined) continue;
|
|
1115
|
+
assertGatePhrases(gateId, list, evidence[list]);
|
|
1116
|
+
vocabulary[list] = evidence[list];
|
|
1117
|
+
}
|
|
1118
|
+
// A gate pinned by `posted_by` never takes the review route (#4916), so it
|
|
1119
|
+
// must post its check: evidence-bearing, as the prover reads it.
|
|
1120
|
+
const set =
|
|
1121
|
+
entry.posted_by === undefined &&
|
|
1122
|
+
typeof evidence.review_by === "string" &&
|
|
1123
|
+
evidence.review_by.trim() !== ""
|
|
1124
|
+
? reviewers.reviewBy
|
|
1125
|
+
: reviewers.checks;
|
|
1126
|
+
set[entry.await] = mergeVocabulary(set[entry.await] ?? {}, vocabulary);
|
|
1127
|
+
}
|
|
1128
|
+
// A context another gate requires to post a check is evidence-bearing, and
|
|
1129
|
+
// judging it twice would report one hollow green as two. It is judged once,
|
|
1130
|
+
// reading both gates' phrases.
|
|
1131
|
+
for (const name of Object.keys(reviewers.checks)) {
|
|
1132
|
+
if (!Object.hasOwn(reviewers.reviewBy, name)) continue;
|
|
1133
|
+
reviewers.checks[name] = mergeVocabulary(
|
|
1134
|
+
reviewers.checks[name],
|
|
1135
|
+
reviewers.reviewBy[name]
|
|
1136
|
+
);
|
|
1137
|
+
delete reviewers.reviewBy[name];
|
|
1138
|
+
}
|
|
1139
|
+
return reviewers;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* Whether a value is a non-null, non-array object.
|
|
1144
|
+
* @param {unknown} value - Any value
|
|
1145
|
+
* @returns {boolean} True for a plain object
|
|
1146
|
+
*/
|
|
1147
|
+
function isPlainObject(value) {
|
|
1148
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Refuses a reviewer gate's phrase list unless it is an array of non-blank
|
|
1153
|
+
* strings, naming the gate it came from so the fix lands in the right file.
|
|
1154
|
+
* @param {string} gateId - The gate's id in `.lisa.config.json`
|
|
1155
|
+
* @param {string} list - `proof` or `no_work`
|
|
1156
|
+
* @param {unknown} phrases - The declared value
|
|
1157
|
+
* @returns {void}
|
|
1158
|
+
* @throws {Error} When the list is malformed
|
|
1159
|
+
*/
|
|
1160
|
+
function assertGatePhrases(gateId, list, phrases) {
|
|
1161
|
+
if (
|
|
1162
|
+
!Array.isArray(phrases) ||
|
|
1163
|
+
phrases.some(
|
|
1164
|
+
phrase =>
|
|
1165
|
+
typeof phrase !== "string" || normalizeDescription(phrase) === ""
|
|
1166
|
+
)
|
|
1167
|
+
) {
|
|
1168
|
+
throw new Error(
|
|
1169
|
+
`check-skipped-required-checks: ${LISA_CONFIG_PATH} \`gates.${gateId}.pull-request.evidence.${list}\` must be an array of non-empty description strings.`
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Two vocabularies for one check, as one: each phrase list is the union of
|
|
1176
|
+
* both, in order, without repeats. Phrases only ever ADD to the shipped
|
|
1177
|
+
* defaults, so a union is the reading that keeps both declarations' meaning.
|
|
1178
|
+
*
|
|
1179
|
+
* A list `left` holds that is not an array is kept as it is, so
|
|
1180
|
+
* `assertEvidenceBearingChecks` still refuses it rather than seeing the other
|
|
1181
|
+
* declaration's valid list in its place.
|
|
1182
|
+
* @param {Record<string, unknown>} left - One vocabulary
|
|
1183
|
+
* @param {Record<string, unknown>} right - The other
|
|
1184
|
+
* @returns {Record<string, unknown>} The combined vocabulary
|
|
1185
|
+
*/
|
|
1186
|
+
function mergeVocabulary(left, right) {
|
|
1187
|
+
const merged = { ...left };
|
|
1188
|
+
for (const list of ["proof", "no_work"]) {
|
|
1189
|
+
if (right[list] === undefined) continue;
|
|
1190
|
+
if (left[list] === undefined) merged[list] = right[list];
|
|
1191
|
+
else if (Array.isArray(left[list]) && Array.isArray(right[list]))
|
|
1192
|
+
merged[list] = [...new Set([...left[list], ...right[list]])];
|
|
1193
|
+
}
|
|
1194
|
+
return merged;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* The phrases each check run is decoded with: the evidence-bearing checks'
|
|
1199
|
+
* and the review_by checks', unioned per name (#4914). A review_by run decoded
|
|
1200
|
+
* without its gate's phrases would miss a declared no-work title and read as
|
|
1201
|
+
* proved.
|
|
1202
|
+
* @param {object} declaration - The loaded declaration.
|
|
1203
|
+
* @returns {Record<string, object>} Phrases by check name.
|
|
1204
|
+
*/
|
|
1205
|
+
export function decodingVocabulary(declaration) {
|
|
1206
|
+
const evidence =
|
|
1207
|
+
/** @type {{evidence_bearing_checks?: Record<string, object>|null, review_by_checks?: Record<string, object>|null}} */ (
|
|
1208
|
+
declaration
|
|
1209
|
+
);
|
|
1210
|
+
const merged = { ...evidence.evidence_bearing_checks };
|
|
1211
|
+
for (const [name, vocabulary] of Object.entries(
|
|
1212
|
+
evidence.review_by_checks ?? {}
|
|
1213
|
+
)) {
|
|
1214
|
+
const existing = merged[name];
|
|
1215
|
+
merged[name] =
|
|
1216
|
+
existing && typeof existing === "object"
|
|
1217
|
+
? mergeVocabulary(existing, vocabulary ?? {})
|
|
1218
|
+
: (vocabulary ?? {});
|
|
1219
|
+
}
|
|
1220
|
+
return merged;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* The declaration with the gates config's reviewers added
|
|
1225
|
+
* (CodySwannGT/lisa#4914).
|
|
1226
|
+
*
|
|
1227
|
+
* The gates config is where a project names its reviewer; a project switching
|
|
1228
|
+
* vendors edits it and this guard follows. Reviewers that must post a check
|
|
1229
|
+
* join `evidence_bearing_checks`; names already there keep working, and a name
|
|
1230
|
+
* declared in both reads both vocabularies. Reviewers proven by
|
|
1231
|
+
* `evidence.review_by` go to `review_by_checks`, which only the vacuity arm
|
|
1232
|
+
* reads and only for a check they actually posted — see
|
|
1233
|
+
* {@link evaluateVacuousChecks}. With no reviewer gate the declaration is
|
|
1234
|
+
* returned as is.
|
|
1235
|
+
* @param {object} declaration - Parsed `.github/required-checks.json`
|
|
1236
|
+
* @param {{checks: GateVocabularies, reviewBy: GateVocabularies}} reviewers - From {@link gateReviewers}
|
|
1237
|
+
* @returns {object} The declaration to validate and judge
|
|
1238
|
+
*/
|
|
1239
|
+
function withGateReviewers(declaration, reviewers) {
|
|
1240
|
+
const declared = declaration.evidence_bearing_checks;
|
|
1241
|
+
// A malformed declared value is left for `assertEvidenceBearingChecks` to
|
|
1242
|
+
// refuse, instead of being papered over by the gates' entries.
|
|
1243
|
+
if (declared !== undefined && declared !== null && !isPlainObject(declared))
|
|
1244
|
+
return declaration;
|
|
1245
|
+
const checks = { ...declared };
|
|
1246
|
+
for (const [name, vocabulary] of Object.entries(reviewers.checks)) {
|
|
1247
|
+
if (!Object.hasOwn(checks, name)) checks[name] = vocabulary;
|
|
1248
|
+
// Likewise a malformed declared entry, `null` included, stays as written.
|
|
1249
|
+
else if (isPlainObject(checks[name]))
|
|
1250
|
+
checks[name] = mergeVocabulary(checks[name], vocabulary);
|
|
1251
|
+
}
|
|
1252
|
+
/** @type {GateVocabularies} */
|
|
1253
|
+
const reviewBy = {};
|
|
1254
|
+
for (const [name, vocabulary] of Object.entries(reviewers.reviewBy)) {
|
|
1255
|
+
// A name `evidence_bearing_checks` declares must post a check; it is
|
|
1256
|
+
// judged there, reading the review_by gate's phrases too.
|
|
1257
|
+
if (!Object.hasOwn(checks, name)) reviewBy[name] = vocabulary;
|
|
1258
|
+
else if (isPlainObject(checks[name]))
|
|
1259
|
+
checks[name] = mergeVocabulary(checks[name], vocabulary);
|
|
1260
|
+
}
|
|
1261
|
+
// `review_by_checks` is derived from the gates and nowhere else, so a copy
|
|
1262
|
+
// written into the declaration by hand is not read.
|
|
1263
|
+
const base = Object.fromEntries(
|
|
1264
|
+
Object.entries(declaration).filter(([key]) => key !== "review_by_checks")
|
|
1265
|
+
);
|
|
1266
|
+
return {
|
|
1267
|
+
...base,
|
|
1268
|
+
...((declared === undefined || declared === null) &&
|
|
1269
|
+
Object.keys(checks).length === 0
|
|
1270
|
+
? {}
|
|
1271
|
+
: { evidence_bearing_checks: checks }),
|
|
1272
|
+
...(Object.keys(reviewBy).length === 0
|
|
1273
|
+
? {}
|
|
1274
|
+
: { review_by_checks: reviewBy }),
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1055
1278
|
/**
|
|
1056
1279
|
* Validate reasoned registration deferrals against the set actually judged.
|
|
1057
1280
|
* This only removes absence/registration observations. GitHub still requires
|
|
@@ -1698,8 +1921,20 @@ export function evaluateVacuousChecks(declaration, checks, options = {}) {
|
|
|
1698
1921
|
});
|
|
1699
1922
|
if (violation !== null) violations.push(violation);
|
|
1700
1923
|
}
|
|
1924
|
+
// A reviewer proven by its submitted review (`evidence.review_by`, #4914) is
|
|
1925
|
+
// judged only on a check it actually posted: a hollow green from it is as
|
|
1926
|
+
// hollow as anyone's, but posting nothing is how that reviewer works.
|
|
1927
|
+
const reviewedBy = reportedReviewByChecks(declaration, checks);
|
|
1928
|
+
for (const [name, entry] of reviewedBy) {
|
|
1929
|
+
const violation = evaluateEvidenceBearingCheck(name, entry, checks, {
|
|
1930
|
+
at,
|
|
1931
|
+
required,
|
|
1932
|
+
trustRequired,
|
|
1933
|
+
});
|
|
1934
|
+
if (violation !== null) violations.push(violation);
|
|
1935
|
+
}
|
|
1701
1936
|
|
|
1702
|
-
return { violations, checked: entries.length };
|
|
1937
|
+
return { violations, checked: entries.length + reviewedBy.length };
|
|
1703
1938
|
}
|
|
1704
1939
|
|
|
1705
1940
|
/**
|
|
@@ -4500,8 +4735,28 @@ export function declaredEvidenceChecks(declaration) {
|
|
|
4500
4735
|
* @returns {boolean} True when nothing declared is still in flight
|
|
4501
4736
|
*/
|
|
4502
4737
|
export function checksSettled(declaration, checks) {
|
|
4503
|
-
return
|
|
4504
|
-
|
|
4738
|
+
return (
|
|
4739
|
+
declaredEvidenceChecks(declaration).every(name =>
|
|
4740
|
+
checkSettled(checks.find(check => check.name === name))
|
|
4741
|
+
) &&
|
|
4742
|
+
reportedReviewByChecks(declaration, checks).every(([name]) =>
|
|
4743
|
+
checkSettled(checks.find(check => check.name === name))
|
|
4744
|
+
)
|
|
4745
|
+
);
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
/**
|
|
4749
|
+
* The `review_by_checks` entries whose context posted a row (#4914). One that
|
|
4750
|
+
* posted nothing is neither a finding nor still in flight: that reviewer's
|
|
4751
|
+
* evidence is its submitted review, which the review-evidence prover reads.
|
|
4752
|
+
*
|
|
4753
|
+
* @param {object} declaration - The per-repo declaration
|
|
4754
|
+
* @param {ReadonlyArray<{name: string}>} checks - Rows
|
|
4755
|
+
* @returns {Array<[string, object]>} Name and vocabulary of each reported one
|
|
4756
|
+
*/
|
|
4757
|
+
function reportedReviewByChecks(declaration, checks) {
|
|
4758
|
+
return Object.entries(declaration.review_by_checks ?? {}).filter(([name]) =>
|
|
4759
|
+
checks.some(check => check.name === name)
|
|
4505
4760
|
);
|
|
4506
4761
|
}
|
|
4507
4762
|
|
|
@@ -4565,8 +4820,7 @@ export function fetchSettledChecks(declaration, pr, repo, options = {}) {
|
|
|
4565
4820
|
return fetchChecksForCommit(
|
|
4566
4821
|
headSha,
|
|
4567
4822
|
slug,
|
|
4568
|
-
|
|
4569
|
-
(declaration).evidence_bearing_checks ?? {}
|
|
4823
|
+
decodingVocabulary(declaration)
|
|
4570
4824
|
);
|
|
4571
4825
|
});
|
|
4572
4826
|
const resolveHead = options.headSha ?? resolveHeadSha;
|
|
@@ -4587,6 +4841,9 @@ export function fetchSettledChecks(declaration, pr, repo, options = {}) {
|
|
|
4587
4841
|
);
|
|
4588
4842
|
// A substitute is useful only at the head it was actually read for. Pending
|
|
4589
4843
|
// rows still wait, and a missing required reviewer still needs a real row.
|
|
4844
|
+
// A review_by reviewer's check that posted is waited for like any other
|
|
4845
|
+
// (#4914); one that posted nothing is not in flight — see
|
|
4846
|
+
// {@link reportedReviewByChecks}.
|
|
4590
4847
|
const evidenceReady = observed =>
|
|
4591
4848
|
declaredEvidenceChecks(declaration).every(name => {
|
|
4592
4849
|
const found = observed.checks.find(check => check.name === name);
|
|
@@ -4596,7 +4853,10 @@ export function fetchSettledChecks(declaration, pr, repo, options = {}) {
|
|
|
4596
4853
|
observed.headSha === options.substituteHead &&
|
|
4597
4854
|
options.substitutes?.has(name))
|
|
4598
4855
|
);
|
|
4599
|
-
})
|
|
4856
|
+
}) &&
|
|
4857
|
+
reportedReviewByChecks(declaration, observed.checks).every(([name]) =>
|
|
4858
|
+
checkSettled(observed.checks.find(check => check.name === name))
|
|
4859
|
+
);
|
|
4600
4860
|
|
|
4601
4861
|
// Bracket checks with coherent head/base observations. The early substitute
|
|
4602
4862
|
// read can supply the first observation without another metadata request.
|
|
@@ -4828,7 +5088,10 @@ export function vacuityRefusal(input) {
|
|
|
4828
5088
|
reason: `PR #${pr} reported ZERO checks of any kind. A pull request with no checks and a pull request whose checks are all honest produce the same silence from this arm, so it refuses rather than picking one. Confirm the token can read checks (\`actions: read\` for the \`gh pr checks\` rollup, or \`checks: read\` + \`statuses: read\` for the fallback) before believing this.`,
|
|
4829
5089
|
};
|
|
4830
5090
|
}
|
|
4831
|
-
if (
|
|
5091
|
+
if (
|
|
5092
|
+
declaredEvidenceChecks(declaration).length === 0 &&
|
|
5093
|
+
Object.keys(declaration.review_by_checks ?? {}).length === 0
|
|
5094
|
+
) {
|
|
4832
5095
|
return {
|
|
4833
5096
|
kind: VACUITY_REFUSALS.noneDeclared,
|
|
4834
5097
|
reason: `\`evidence_bearing_checks\` in ${DECLARATION_PATH} is empty, so this repository has declared that NO check's green means anything reviewed the code — and the vacuity arm examined nothing on PR #${pr}. If that is true, say so by removing the arm from your workflow. If it is not, name the checks by their exact check names: \`"evidence_bearing_checks": { "<reviewer check name>": {} }\`.`,
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"It reads `gh pr checks --json name,state,bucket,description`, the only route that carries the description for a legacy commit status like CodeRabbit's, and falls back to the commit-status API when the token lacks `actions: read` (`gh pr checks` resolves the rollup through `checkSuite.workflowRun`, and without that scope it exits non-zero with EMPTY STDOUT — a failure shaped like a content problem that never says the word \"permission\").",
|
|
19
19
|
"IT REFUSES RATHER THAN REPORTING AN EMPTY INSPECTION. An unresolvable pull request, a `gh` it could not read, a roster with no checks in it, or an empty `evidence_bearing_checks` all print the same \"nothing vacuous here\" that a genuinely clean run prints — so the guard fails instead and names which of the four it hit (`vacuity_pr_unresolved`, `vacuity_checks_unreadable`, `vacuity_no_checks_reported`, `vacuity_none_declared`). A refusal is NOT a finding: NOBODY LOOKED and THE REVIEW WAS FAKE are opposite facts, and a single red job would otherwise report them identically.",
|
|
20
20
|
"`evidence_bearing_checks` names the checks whose GREEN is supposed to mean something reviewed the code. Use `{}` to accept the shipped description vocabulary, or add `proof` / `no_work` arrays to extend it — extensions ADD to the defaults, they do not replace them. Undeclared checks are never examined, because most CI jobs ship an empty description and flagging them all would bury the one finding that matters.",
|
|
21
|
+
"A THIRD-PARTY REVIEWER DECLARED IN `.lisa.config.json` IS EVIDENCE-BEARING TOO (CodySwannGT/lisa#4914): every `gates.<id>.pull-request` with `evidence.reviewer: true` adds its `await` context here at load time, with that gate's `evidence.proof` / `evidence.no_work` phrases (a name in both reads both). So the gates config is where the reviewer is named, and the review-evidence prover reads the same gates. `CodeRabbit` stays below because Lisa seeds no reviewer gate for a new project. To switch vendors, declare the new reviewer gate in `.lisa.config.json` and delete `CodeRabbit` from this list once, so it is not reported as never having reported. A gate proven by `evidence.review_by` and not pinned by `posted_by` (its reviewer may answer with a pull-request review instead of a check) is not added here unless this list already names it: its `await` check is examined for a hollow green whenever it reports, and one that never reports is not a finding, because the review-evidence prover then reads the submitted review.",
|
|
21
22
|
"This arm REPORTS AND NEVER BLOCKS, in every enforcement mode. A review bot can go hollow because an org-wide SPENDING CAP was hit, and a gate that reddens every PR on a billing state is worse than the one it criticises. What it changes is what you may CLAIM: a PR carrying a `vacuous_required_check` finding has not been shown to be reviewed, so do not record it as reviewed. Once you have made the governance call, `--fail-on-vacuous` is the supported way to ask for an exit code — add it to the command in `review-evidence.yml`, instead of writing a wrapper that reads `--json`.",
|
|
22
23
|
"PER-BRANCH SETS (CodySwannGT/lisa#4484). `required_contexts` is the UNION across every protected branch, which is the wrong set for judging which required contexts did NOT REPORT on one pull request: a context only `dev` requires was reported absent on every staging-base pull request. Optionally add `required_contexts_by_branch: { \"<branch>\": [ ...contexts ] }`, each set transcribed byte for byte from `gh api repos/OWNER/NAME/rules/branches/<branch> --jq '.[] | select(.type==\"required_status_checks\") | .parameters.required_status_checks[].context'` (read access only). The absent arm judges the PR against its current base (`--base`, else current metadata from the existing PR head read). If current metadata is unreadable it uses only a matching PR/repository event (`GITHUB_BASE_REF`, else `pull_request.base.ref`). A rerun replays the old event, so matching identity alone does not establish the current base. Head/base observations bracket each check read; a retarget retries within the same settlement deadline, and registration and absence share the resulting selection. Without a set for that base it falls back to the union — same findings as before — and says so as `required_contexts_branch_fallback`; every run prints which set it used. Every per-branch context must also appear in `required_contexts`, and the one `baseline_fetched_at` stamp covers both."
|
|
23
24
|
],
|