@codyswann/lisa 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/scripts/lib/private-key-redaction.d.mts +4 -0
- package/all/copy-overwrite/scripts/lib/private-key-redaction.mjs +59 -0
- package/all/copy-overwrite/scripts/lisa-gates.mjs +1 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +4 -1
- package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +56 -1
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +17 -14
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
- package/cdk/package-lisa/package.lisa.json +1 -1
- package/dist/cli/confined-project-read.d.ts +2 -1
- package/dist/cli/confined-project-read.d.ts.map +1 -1
- package/dist/cli/confined-project-read.js +22 -5
- package/dist/cli/confined-project-read.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -1
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +5 -3
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/github-read-issue-cmd.d.ts +62 -0
- package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
- package/dist/cli/github-read-issue-cmd.js +121 -0
- package/dist/cli/github-read-issue-cmd.js.map +1 -0
- package/dist/cli/github-reader-relationships.d.ts +41 -0
- package/dist/cli/github-reader-relationships.d.ts.map +1 -0
- package/dist/cli/github-reader-relationships.js +218 -0
- package/dist/cli/github-reader-relationships.js.map +1 -0
- package/dist/cli/github-reader-target.d.ts +24 -0
- package/dist/cli/github-reader-target.d.ts.map +1 -0
- package/dist/cli/github-reader-target.js +95 -0
- package/dist/cli/github-reader-target.js.map +1 -0
- package/dist/cli/github-reader-wire.d.ts +72 -0
- package/dist/cli/github-reader-wire.d.ts.map +1 -0
- package/dist/cli/github-reader-wire.js +125 -0
- package/dist/cli/github-reader-wire.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/controls/carrier-edits.d.ts +1 -1
- package/dist/controls/carrier-edits.d.ts.map +1 -1
- package/dist/controls/carrier-edits.js +13 -3
- package/dist/controls/carrier-edits.js.map +1 -1
- package/dist/controls/carriers.d.ts.map +1 -1
- package/dist/controls/carriers.js +7 -2
- package/dist/controls/carriers.js.map +1 -1
- package/dist/controls/checks-binding.d.ts.map +1 -1
- package/dist/controls/checks-binding.js +13 -7
- package/dist/controls/checks-binding.js.map +1 -1
- package/dist/controls/commands/attest-before-enforce.d.ts.map +1 -1
- package/dist/controls/commands/attest-before-enforce.js +4 -5
- package/dist/controls/commands/attest-before-enforce.js.map +1 -1
- package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
- package/dist/controls/commands/attest-workspace.js +3 -1
- package/dist/controls/commands/attest-workspace.js.map +1 -1
- package/dist/controls/commands/declaration-check.d.ts.map +1 -1
- package/dist/controls/commands/declaration-check.js +7 -4
- package/dist/controls/commands/declaration-check.js.map +1 -1
- package/dist/controls/commands/proof-check.js +1 -1
- package/dist/controls/commands/proof-check.js.map +1 -1
- package/dist/controls/commands/seed.d.ts +1 -9
- package/dist/controls/commands/seed.d.ts.map +1 -1
- package/dist/controls/commands/seed.js +72 -65
- package/dist/controls/commands/seed.js.map +1 -1
- package/dist/controls/configure-road.d.ts +2 -0
- package/dist/controls/configure-road.d.ts.map +1 -1
- package/dist/controls/configure-road.js +18 -14
- package/dist/controls/configure-road.js.map +1 -1
- package/dist/controls/enforce-entry-outcome.d.ts +2 -1
- package/dist/controls/enforce-entry-outcome.d.ts.map +1 -1
- package/dist/controls/enforce-entry-outcome.js +17 -15
- package/dist/controls/enforce-entry-outcome.js.map +1 -1
- package/dist/controls/enforce-points.d.ts +2 -0
- package/dist/controls/enforce-points.d.ts.map +1 -1
- package/dist/controls/enforce-points.js +4 -1
- package/dist/controls/enforce-points.js.map +1 -1
- package/dist/controls/enforce-report.d.ts.map +1 -1
- package/dist/controls/enforce-report.js +6 -1
- package/dist/controls/enforce-report.js.map +1 -1
- package/dist/controls/evidence-redact.d.ts.map +1 -1
- package/dist/controls/evidence-redact.js +11 -6
- package/dist/controls/evidence-redact.js.map +1 -1
- package/dist/controls/gates-declaration.d.ts.map +1 -1
- package/dist/controls/gates-declaration.js +6 -1
- package/dist/controls/gates-declaration.js.map +1 -1
- package/dist/controls/proof-copy-preparation.d.ts +33 -0
- package/dist/controls/proof-copy-preparation.d.ts.map +1 -0
- package/dist/controls/proof-copy-preparation.js +159 -0
- package/dist/controls/proof-copy-preparation.js.map +1 -0
- package/dist/controls/proof-copy-prepared-state.d.ts +33 -0
- package/dist/controls/proof-copy-prepared-state.d.ts.map +1 -0
- package/dist/controls/proof-copy-prepared-state.js +117 -0
- package/dist/controls/proof-copy-prepared-state.js.map +1 -0
- package/dist/controls/proof-copy-workspace.d.ts.map +1 -1
- package/dist/controls/proof-copy-workspace.js +17 -4
- package/dist/controls/proof-copy-workspace.js.map +1 -1
- package/dist/controls/proof-copy.d.ts +5 -0
- package/dist/controls/proof-copy.d.ts.map +1 -1
- package/dist/controls/proof-copy.js +17 -15
- package/dist/controls/proof-copy.js.map +1 -1
- package/dist/controls/proof-patch.d.ts +12 -0
- package/dist/controls/proof-patch.d.ts.map +1 -1
- package/dist/controls/proof-patch.js +28 -0
- package/dist/controls/proof-patch.js.map +1 -1
- package/dist/controls/proof-preparation-declaration.d.ts +15 -0
- package/dist/controls/proof-preparation-declaration.d.ts.map +1 -0
- package/dist/controls/proof-preparation-declaration.js +57 -0
- package/dist/controls/proof-preparation-declaration.js.map +1 -0
- package/dist/controls/proof-tools.d.ts +7 -4
- package/dist/controls/proof-tools.d.ts.map +1 -1
- package/dist/controls/proof-tools.js +1 -1
- package/dist/controls/proof-tools.js.map +1 -1
- package/dist/controls/register-drift.d.ts.map +1 -1
- package/dist/controls/register-drift.js +4 -3
- package/dist/controls/register-drift.js.map +1 -1
- package/dist/controls/register-evidence-rule.d.ts +2 -0
- package/dist/controls/register-evidence-rule.d.ts.map +1 -1
- package/dist/controls/register-evidence-rule.js +8 -7
- package/dist/controls/register-evidence-rule.js.map +1 -1
- package/dist/controls/register-rules.d.ts +2 -0
- package/dist/controls/register-rules.d.ts.map +1 -1
- package/dist/controls/register-rules.js.map +1 -1
- package/dist/controls/register-types.d.ts +2 -4
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/register.d.ts +2 -0
- package/dist/controls/register.d.ts.map +1 -1
- package/dist/controls/register.js +3 -1
- package/dist/controls/register.js.map +1 -1
- package/dist/controls/secret-scan.d.ts.map +1 -1
- package/dist/controls/secret-scan.js +7 -5
- package/dist/controls/secret-scan.js.map +1 -1
- package/dist/controls/secret-shapes.d.ts +7 -7
- package/dist/controls/secret-shapes.d.ts.map +1 -1
- package/dist/controls/secret-shapes.js +7 -18
- package/dist/controls/secret-shapes.js.map +1 -1
- package/dist/controls/shipped-parts.d.ts +89 -0
- package/dist/controls/shipped-parts.d.ts.map +1 -0
- package/dist/controls/shipped-parts.js +233 -0
- package/dist/controls/shipped-parts.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.json +38 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +90 -23
- package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
- package/dist/strategies/package-lisa-host-pins.js +29 -30
- package/dist/strategies/package-lisa-host-pins.js.map +1 -1
- package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
- package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
- package/dist/strategies/package-lisa-range-intersection.js +73 -0
- package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
- package/harper-fabric/package-lisa/package.lisa.json +3 -2
- package/package.json +4 -4
- package/phaser/package-lisa/package.lisa.json +3 -2
- 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-attest/SKILL.md +12 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-devin/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/src/base/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/src/base/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/src/base/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
- package/scripts/check-derived-artifacts.mjs +1 -0
- package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
- package/scripts/lib/phrase-tests/redact.mjs +3 -8
- package/scripts/two-channel-couplings.json +5 -3
- package/typescript/copy-overwrite/.prettierignore +2 -0
- package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
- package/typescript/package-lisa/package.lisa.json +3 -2
|
@@ -14,20 +14,23 @@ Repository name for scoped comments and logs: `basename $(git rev-parse --show-t
|
|
|
14
14
|
|
|
15
15
|
## Phase 1 — Resolve Context
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
2. Parse `$ARGUMENTS`. Accept either:
|
|
19
|
-
- `<org>/<repo>#<number>` token, OR
|
|
20
|
-
- `https://github.com/<org>/<repo>/issues/<number>` URL.
|
|
21
|
-
|
|
22
|
-
If `$ARGUMENTS` is just `#<number>` or `<number>`, resolve `<org>/<repo>` from `.lisa.config.json` (`github.org` / `github.repo`).
|
|
23
|
-
3. If the input doesn't parse cleanly, stop and report. Do NOT guess.
|
|
17
|
+
Pass the issue number, `<org>/<repo>#<number>`, or GitHub issue URL to the reader from the Lisa checkout. The reader resolves `.lisa.config.local.json` over `.lisa.config.json` before any GitHub request. A bare number uses `github.org` and `github.repo`. Configuration or syntax failure stops the read.
|
|
24
18
|
|
|
25
19
|
## Phase 2 — Fetch Primary Issue
|
|
26
20
|
|
|
27
21
|
```bash
|
|
28
|
-
|
|
22
|
+
lisa --no-update-check github-read-issue '<issue-ref>'
|
|
29
23
|
```
|
|
30
24
|
|
|
25
|
+
Use `issue`, `comments`, `graph`, `timeline`, and `pullRequests` from the returned JSON. The reader checks the native GitHub session and requests repository data on its existing identity. A failed required read stops the operation. Report the exact diagnostic before work.
|
|
26
|
+
|
|
27
|
+
`project` describes only the repository's configured coordination service:
|
|
28
|
+
|
|
29
|
+
- `unconfigured` means repository reads ran without Projects requests or scope requirements.
|
|
30
|
+
- `verified` supplies metadata for the one configured Project. It establishes the Project's identity, with issue membership still unknown.
|
|
31
|
+
- `unverified` carries the exact warning for an unavailable best-effort Project. Preserve the warning and continue with verified repository data.
|
|
32
|
+
- A failure of a required Project read exits with its exact diagnostic. Stop before claiming work or returning a complete context bundle.
|
|
33
|
+
|
|
31
34
|
Extract and preserve:
|
|
32
35
|
|
|
33
36
|
### Metadata
|
|
@@ -63,46 +66,11 @@ Any other `##` section: capture under `extra_sections` so callers can see PRDs t
|
|
|
63
66
|
|
|
64
67
|
### Comments
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
- Credentials, reproduction steps
|
|
68
|
-
- Status updates from stakeholders
|
|
69
|
-
- Decisions
|
|
70
|
-
- Triage headers like `[<repo>]`
|
|
71
|
-
|
|
72
|
-
Pagination is unconditional — never skip `--paginate` because an issue looks short.
|
|
69
|
+
Use every comment returned in `comments`, including author, body, and creation time. The reader flattens native pages and verifies the count against the issue before it returns a bundle. Flag reproduction details, status updates, decisions, and scoped triage headers. Handle credential-shaped text according to the existing privacy rules.
|
|
73
70
|
|
|
74
71
|
## Phase 3 — Fetch Sub-issue Graph (Parent + Children)
|
|
75
72
|
|
|
76
|
-
GitHub native sub-
|
|
77
|
-
|
|
78
|
-
```graphql
|
|
79
|
-
query($org:String!,$repo:String!,$number:Int!){
|
|
80
|
-
repository(owner:$org,name:$repo){
|
|
81
|
-
issue(number:$number){
|
|
82
|
-
id
|
|
83
|
-
parent { number title state url repository { nameWithOwner } }
|
|
84
|
-
subIssues(first: 100) {
|
|
85
|
-
nodes {
|
|
86
|
-
number title state url
|
|
87
|
-
repository { nameWithOwner }
|
|
88
|
-
labels(first: 50) { nodes { name } }
|
|
89
|
-
assignees(first: 5) { nodes { login } }
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
gh api graphql -f query='<above>' -F org=<org> -F repo=<repo> -F number=<number>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Capture:
|
|
102
|
-
- **Parent sub-issue**: number, title, state, url, repo.
|
|
103
|
-
- **Child sub-issues**: list with number, title, state, url, repo, labels (especially `type:` and `status:`), assignees.
|
|
104
|
-
|
|
105
|
-
If the GraphQL `parent` / `subIssues` fields aren't available (older GHES), fall back to parsing `Parent: #<n>` text in the body and recording sub-issue text references — note "GraphQL sub-issues unavailable" in the bundle so callers know parent-link is text-based.
|
|
73
|
+
Use `graph.parent` and every item in `graph.children`, with repository, number, title, state, URL, labels, and assignees where returned. When the GitHub Enterprise schema lacks native parent or sub-issue support, `graph.warning` preserves the provider message. In that case parse the body's `Parent: #<n>` and sub-issue text references and label them as text-based.
|
|
106
74
|
|
|
107
75
|
## Phase 4 — Parse Issue Links from Body
|
|
108
76
|
|
|
@@ -121,7 +89,7 @@ For each parsed reference, fetch the linked issue/PR:
|
|
|
121
89
|
|
|
122
90
|
```bash
|
|
123
91
|
gh issue view <link-number> --repo <link-org>/<link-repo> --json number,title,state,labels,assignees,url
|
|
124
|
-
gh pr view <link-number> --repo <link-org>/<link-repo> --json number,title,state,reviewDecision,
|
|
92
|
+
gh pr view <link-number> --repo <link-org>/<link-repo> --json number,title,state,reviewDecision,mergedAt,url,reviewRequests,reviews,comments
|
|
125
93
|
```
|
|
126
94
|
|
|
127
95
|
For each linked **issue**, capture: number, title, state, type (from labels), status (from labels), assignees, url.
|
|
@@ -134,72 +102,17 @@ For each linked **PR**, capture: number, title, state, mergedAt, reviewDecision,
|
|
|
134
102
|
|
|
135
103
|
If the primary issue has a parent sub-issue (i.e., is a Story / Task / Sub-task / Improvement under an Epic):
|
|
136
104
|
|
|
137
|
-
1.
|
|
138
|
-
2.
|
|
105
|
+
1. Read the parent Epic with the Phase 2 command for its native reference. Preserve the full body, all comments, and Validation Journey when present.
|
|
106
|
+
2. Use `graph.children` from the parent's response to identify siblings. Filter out the primary issue itself.
|
|
139
107
|
3. For each sibling, capture: number, title, type label, status label, assignee, url. Read the first paragraph of each sibling's body for context. If a sibling has `status:in-progress` with an assignee different from the primary issue's assignee, **flag prominently** so the caller can avoid duplicate work.
|
|
140
108
|
|
|
141
109
|
If the primary issue IS an Epic, capture all children via Phase 3's `subIssues` traversal (already done).
|
|
142
110
|
|
|
143
111
|
## Phase 6 — Fetch Linked PRs and Label-Event History
|
|
144
112
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
query='query($org:String!,$repo:String!,$number:Int!,$cursor:String){
|
|
149
|
-
repository(owner:$org,name:$repo){
|
|
150
|
-
issue(number:$number){
|
|
151
|
-
closedByPullRequestsReferences(first:50){
|
|
152
|
-
nodes{number title state merged mergedAt url repository{nameWithOwner}}
|
|
153
|
-
}
|
|
154
|
-
timelineItems(
|
|
155
|
-
first:100
|
|
156
|
-
after:$cursor
|
|
157
|
-
itemTypes:[CROSS_REFERENCED_EVENT,LABELED_EVENT,UNLABELED_EVENT]
|
|
158
|
-
){
|
|
159
|
-
pageInfo{hasNextPage endCursor}
|
|
160
|
-
nodes{
|
|
161
|
-
...on CrossReferencedEvent{
|
|
162
|
-
createdAt
|
|
163
|
-
actor{login}
|
|
164
|
-
source{...on PullRequest{number title state url repository{nameWithOwner}}}
|
|
165
|
-
}
|
|
166
|
-
...on LabeledEvent{
|
|
167
|
-
createdAt
|
|
168
|
-
actor{login}
|
|
169
|
-
label{name}
|
|
170
|
-
}
|
|
171
|
-
...on UnlabeledEvent{
|
|
172
|
-
createdAt
|
|
173
|
-
actor{login}
|
|
174
|
-
label{name}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}'
|
|
181
|
-
|
|
182
|
-
cursor=null
|
|
183
|
-
while :; do
|
|
184
|
-
if [ "$cursor" = null ]; then
|
|
185
|
-
page=$(gh api graphql -f query="$query" -F org=<org> -F repo=<repo> -F number=<number>)
|
|
186
|
-
else
|
|
187
|
-
page=$(gh api graphql -f query="$query" -F org=<org> -F repo=<repo> -F number=<number> -f cursor="$cursor")
|
|
188
|
-
fi
|
|
189
|
-
printf '%s\n' "$page"
|
|
190
|
-
has_next=$(printf '%s\n' "$page" | jq -r '.data.repository.issue.timelineItems.pageInfo.hasNextPage')
|
|
191
|
-
cursor=$(printf '%s\n' "$page" | jq -r '.data.repository.issue.timelineItems.pageInfo.endCursor')
|
|
192
|
-
[ "$has_next" = true ] || break
|
|
193
|
-
done
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Capture:
|
|
197
|
-
- **Linked PRs**: PR number, title, state, mergedAt, repo, url. Dedupe with PRs found in Phase 4. Preserve the existing `CrossReferencedEvent` behavior for PR linkage; widening the query must not change that consumer shape.
|
|
198
|
-
- **Label-event history**: chronological `LabeledEvent` and `UnlabeledEvent` entries with event kind, label name, actor login, and `createdAt`. Preserve oldest→newest order across all pages. Status labels (`status:*`) are the GitHub transition history that downstream rejection detection consumes, but keep non-status label events too so callers can audit the full label stream.
|
|
113
|
+
Use the native `pullRequests` list from the Phase 2 command and deduplicate it against body references. Include each PR's actual base, head, review status, reviews, and unresolved threads. Surface any warning on a linked PR as incomplete access to that PR.
|
|
199
114
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
For each PR, fetch unresolved review comments via `gh pr view <num> --repo <org>/<repo> --json reviews,reviewThreads`.
|
|
115
|
+
Use `timeline.events` for the label-event history, preserving oldest-to-newest ordering and the label, actor, and time on each event. Status labels remain the transition history and other label events stay available for audit. If `timeline.warning` is present, record the history as unknown with the provider error. A missing history does not remove separately verified PR links or stop the build.
|
|
203
116
|
|
|
204
117
|
## Phase 7 — Assemble Context Bundle
|
|
205
118
|
|
|
@@ -278,6 +191,9 @@ Produce a single structured output that the caller can pass verbatim to downstre
|
|
|
278
191
|
### Body-referenced (`Resolves #<n>`)
|
|
279
192
|
<per-PR block>
|
|
280
193
|
|
|
194
|
+
## Project coordination
|
|
195
|
+
<status and configured Project metadata or exact warning from the reader>
|
|
196
|
+
|
|
281
197
|
## Label-Event History
|
|
282
198
|
- Status: <known|unknown>
|
|
283
199
|
- Events:
|
|
@@ -298,7 +214,7 @@ Produce a single structured output that the caller can pass verbatim to downstre
|
|
|
298
214
|
|
|
299
215
|
- Never summarize or truncate the primary issue's body or Validation Journey section.
|
|
300
216
|
- Never skip a link type, even if it seems unrelated — the agent downstream decides relevance.
|
|
301
|
-
-
|
|
217
|
+
- For an additional linked issue or PR read, capture any access error and carry it with that link. If the Phase 2 command stopped, report its diagnostic before proceeding with work.
|
|
302
218
|
- Flag in-flight sibling work prominently so the caller can avoid duplicate implementation.
|
|
303
219
|
- If the issue has no parent sub-issue, state this explicitly — do not silently skip Phase 5.
|
|
304
220
|
- Output is pure context. This skill never modifies the issue.
|
|
@@ -32,7 +32,7 @@ Invoke the `learning-judge` agent (via the Agent/Task tool with `subagent_type:
|
|
|
32
32
|
|
|
33
33
|
## Phase 1 — Fingerprint (stable dedupe key, after the judge)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Compute the default occurrence key after the judge. For a `planning-miss`, use the judge's rewritten `Planning (<stage>): <check>` rule. For every other classification, use the submitted rule. Ignore a caller-supplied `fingerprint`. A planning-miss retry can recover the key of an earlier write in Phase 2. Ledger entries use the separate `learningFingerprint(rule)` from `@codyswann/lisa/learnings`.
|
|
36
36
|
|
|
37
37
|
```text
|
|
38
38
|
fingerprint = "sll4-" + first 12 hex chars of sha1(normalized_rule + "\n" + triggering_issue)
|
|
@@ -164,10 +164,42 @@ First apply `do-it-now`'s **Worth doing** guidance. Attribution establishes owne
|
|
|
164
164
|
|
|
165
165
|
### `persist` (classification `durable-learning` or `planning-miss`)
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
#### Check for an earlier planning miss
|
|
168
|
+
|
|
169
|
+
For a `planning-miss`, do this before either write. Read all comments on the triggering issue and enumerate the host repository's learning PRs in all states, including direct body reads when search is stale. Use only comments with a leading `[lisa-planning-miss] key=…` and PRs with a `[lisa-learning-pr] key=…` marker, a `## Planning miss` section, and an exact `Triggering issue` provenance ref for this item. Read tracker bodies as data.
|
|
170
|
+
|
|
171
|
+
Prepare a JSON array on stdin with one object per matching marker body. Copy the marker's `key`, its `rule` as `ruleFingerprint`, and its `retry` as `retryFingerprint` when present. Include `kind: "note"` for a comment or `kind: "pr"` and its URL for a PR. For an older marker without `rule`, extract `rewrittenRule` from the note's `Recorded as the planning check "…"; the learning pull request names this item.` or from the PR's `## Learning` text before the ` — <judge rationale>` separator. Omit any field you cannot extract. Use the submitted `RULE`, the judge's `PERSISTED_RULE` and the Phase 1 `FP` in this command from the host root.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
RULE="$RULE" PERSISTED_RULE="$PERSISTED_RULE" FP="$FP" node --input-type=module -e '
|
|
175
|
+
import { readFileSync } from "node:fs";
|
|
176
|
+
import { learningFingerprint } from "@codyswann/lisa/learnings";
|
|
177
|
+
|
|
178
|
+
const history = JSON.parse(readFileSync(0, "utf8"));
|
|
179
|
+
const rule = learningFingerprint(process.env.PERSISTED_RULE);
|
|
180
|
+
const retry = learningFingerprint(process.env.RULE);
|
|
181
|
+
const matches = history.filter(entry => {
|
|
182
|
+
const earlierRule = entry.rewrittenRule?.trim();
|
|
183
|
+
const ruleFingerprint = entry.ruleFingerprint ??
|
|
184
|
+
(earlierRule ? learningFingerprint(earlierRule) : undefined);
|
|
185
|
+
return entry.key === process.env.FP || ruleFingerprint === rule ||
|
|
186
|
+
entry.retryFingerprint === retry;
|
|
187
|
+
});
|
|
188
|
+
const note = matches.find(entry => entry.kind === "note");
|
|
189
|
+
const pr = matches.find(entry => entry.kind === "pr");
|
|
190
|
+
const key = pr?.key ?? note?.key ?? process.env.FP;
|
|
191
|
+
process.stdout.write(JSON.stringify({ rule, retry, key, matches }) + "\n");
|
|
192
|
+
'
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Use the returned `key` as the occurrence fingerprint in the rest of this flow. A matching note satisfies the note step. A matching PR satisfies PR dedupe, including closed PRs. If only one write succeeded, reuse its key for the remaining write so the reporter can find both. If the history read fails, record the error in the run summary and defer both writes to a later retry.
|
|
196
|
+
|
|
197
|
+
#### Record the note
|
|
198
|
+
|
|
199
|
+
For a `planning-miss` with no matched note, post one visible marker on the triggering issue so `lisa-delivery-effectiveness` can count it. Use `rule` and `retry` returned by the command for marker metadata. The `retry` fingerprint ties a rejudged candidate to its earlier occurrence on this item even when the new check has different wording.
|
|
168
200
|
|
|
169
201
|
```markdown
|
|
170
|
-
[lisa-planning-miss] key=<fingerprint> Planning miss (<planning_stage>): <what the worker could not find>. Recorded as the planning check "<rewritten rule>"; the learning pull request names this item.
|
|
202
|
+
[lisa-planning-miss] key=<fingerprint> rule=<rule> retry=<retry> Planning miss (<planning_stage>): <what the worker could not find>. Recorded as the planning check "<rewritten rule>"; the learning pull request names this item.
|
|
171
203
|
```
|
|
172
204
|
|
|
173
205
|
Post it even when Phase 3 then finds the rule already captured, or fails: the occurrence is still a miss, and the rate counts occurrences, not new rules. The `[lisa-planning-miss]` marker sits outside the `[lisa-learning-*]` namespace on purpose: it is a measurement of planning, and must not make the item look like learning machinery to `rejection-detection` or the judge's Step 0 guard.
|
|
@@ -178,7 +210,7 @@ Then continue to Phase 3.
|
|
|
178
210
|
|
|
179
211
|
No learning content is ever committed without a PR — there is no other write path, and the PR must touch **only** the learnings surface (any other changed file is a bug).
|
|
180
212
|
|
|
181
|
-
1. **PR dedupe.**
|
|
213
|
+
1. **PR dedupe.** When Phase 2 found a matching learning PR, reference it and stop. Otherwise search all PRs for the marker `[lisa-learning-pr] key=<fingerprint>` in the body (`gh pr list --state all --search '"<marker>" in:body' --json number,url`), with the stale-index guard above. If one exists, reference it and stop — never open a duplicate.
|
|
182
214
|
Then create (or reuse) branch `learning/<fingerprint>` in an **isolated worktree** off the default branch, never the caller's checkout, and run every step below from that worktree's root — `projectRoot` in each writer call is that root. A caller such as the session manager or an implement worker has its own branch and files in flight in its checkout; a writer run there would put the ledger change on the wrong branch and leave the learning branch empty.
|
|
183
215
|
2. **Resolve the learnings surface path — never hardcode it.** The canonical path is `resolveProjectLearningsFile` from `@codyswann/lisa/learnings`: the machine-managed ledger resolved from `.lisa.config.json` (the `learnings.file` override, else the default `.lisa/PROJECT_LEARNINGS.md` — a cold path, never an auto-loaded rules tree):
|
|
184
216
|
|
|
@@ -228,7 +260,7 @@ No learning content is ever committed without a PR — there is no other write p
|
|
|
228
260
|
<"Superseded entry id(s) X, Y: <why they merged>" | "Appended: no related entry exists — <one-line search summary>">
|
|
229
261
|
```
|
|
230
262
|
|
|
231
|
-
For a **planning-miss** PR,
|
|
263
|
+
For a **planning-miss** PR, extend the one marker with the Phase 2 metadata (`<!-- [lisa-learning-pr] key=<fingerprint> rule=<rule> retry=<retry> -->`). Add one section after `## Learning` to show the reviewer which stage let the gap through and the check applied there:
|
|
232
264
|
|
|
233
265
|
```markdown
|
|
234
266
|
## Planning miss
|
|
@@ -304,15 +304,14 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
|
|
|
304
304
|
- `worker-question` or `decision` whose worker already reported `DONE` or `FAILED` (the
|
|
305
305
|
question outlives the worker in the ledger, so its marker can still be removed): do not
|
|
306
306
|
resume the finished worker. Record the answer on the item (below); the next attempt reads it
|
|
307
|
-
there. A worker's `FAILED`
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
left where it is. `resume` refuses a finished
|
|
307
|
+
there. A worker's `FAILED` may leave the item in `claimed` with a human-needed label or
|
|
308
|
+
move it to the `blocked` role. First read the item with `lisa-tracker-read`. When `answer-plan`
|
|
309
|
+
returns `requeue: true` for an item in the `claimed` or `blocked` role, move it to the `ready`
|
|
310
|
+
role in the step 2 update, so the next dispatch starts a fresh attempt that reads
|
|
311
|
+
the answer. A `FAILED` attempt with the reason `left the claimed role outside the manager`
|
|
312
|
+
returns `requeue: false` to preserve the human's move into the `blocked` role.
|
|
313
|
+
Leave items in any other role where they are. A `DONE` worker's item is left where it is.
|
|
314
|
+
`resume` refuses a finished
|
|
316
315
|
worker (exit 2), and `spawn` refuses a ref while its question is pending, so finish this
|
|
317
316
|
clearing first.
|
|
318
317
|
|
|
@@ -337,7 +336,7 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
|
|
|
337
336
|
`lisa-tracker-write`, with a short comment: `[lisa-session-manager] Answer delivered; removed the
|
|
338
337
|
hold.` when a worker received the answer (`SendMessage` or `resume`), else
|
|
339
338
|
`[lisa-session-manager] Answer recorded on the item; removed the hold.` When `answer-plan`
|
|
340
|
-
returned `requeue: true` and the read-back shows the item in the `blocked` role, the same
|
|
339
|
+
returned `requeue: true` and the read-back shows the item in the `claimed` or `blocked` role, the same
|
|
341
340
|
update also moves it to the `ready` role; in any other role, leave the item where it is. Read
|
|
342
341
|
it back with `lisa-tracker-read`.
|
|
343
342
|
3. `ledger clear-question <ref>` (`--reset-attempts` for an `exhausted` item). After "Record the
|
|
@@ -23,6 +23,9 @@ import {
|
|
|
23
23
|
/** Worker statuses after which no worker receives an answer. */
|
|
24
24
|
const FINISHED = new Set(["DONE", "FAILED"]);
|
|
25
25
|
|
|
26
|
+
/** The stall pass observed a tracker move made outside the manager. */
|
|
27
|
+
const EXTERNAL_MOVE_REASON = "left the claimed role outside the manager";
|
|
28
|
+
|
|
26
29
|
/** How each answer source is named in the comment. */
|
|
27
30
|
const SOURCE_NAMES = { cli: "answer", channel: "Telegram" };
|
|
28
31
|
|
|
@@ -63,41 +66,42 @@ function skipReason(status, worker, pending) {
|
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* this move the "next attempt" that reads the recorded answer is never
|
|
70
|
-
* dispatched (CodySwannGT/lisa#4643). It holds whether the answer still has
|
|
71
|
-
* to be posted or is already on the item. A `DONE` worker's item and a
|
|
72
|
-
* repo-routing answer (carried by its `repo:<name>` stamp) are not moved.
|
|
69
|
+
* Ask the manager to requeue a FAILED worker's item from claimed or blocked
|
|
70
|
+
* once its answer is recorded, including an answer already on the item.
|
|
71
|
+
* An observed external move explicitly keeps the item's tracker status.
|
|
73
72
|
* @param {string | undefined} status - The ledger item's status
|
|
73
|
+
* @param {string | null | undefined} finishReason - Why the attempt finished
|
|
74
74
|
* @param {{kind?: string, answer?: object | null} | null} pending - The
|
|
75
75
|
* pending question
|
|
76
|
-
* @returns {{requeue?:
|
|
76
|
+
* @returns {{requeue?: boolean}} The flag, only when it applies
|
|
77
77
|
*/
|
|
78
|
-
function requeueOf(status, pending) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
pending?.kind !== "repo-route";
|
|
83
|
-
return due ? { requeue: true } : {};
|
|
78
|
+
function requeueOf(status, finishReason, pending) {
|
|
79
|
+
if (status !== "FAILED" || !pending?.answer || pending.kind === "repo-route")
|
|
80
|
+
return {};
|
|
81
|
+
return { requeue: finishReason !== EXTERNAL_MOVE_REASON };
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
/**
|
|
87
85
|
* Plan recording a queued answer on the item. Throws when the answer looks
|
|
88
86
|
* like it holds a credential: it would be posted on the item.
|
|
89
87
|
* @param {{ref: string, status?: string, worker?: string | null,
|
|
90
|
-
* pending: object | null}} input - The item's
|
|
91
|
-
* worker, and
|
|
92
|
-
* @returns {{ref: string, record: false, reason: string, requeue?:
|
|
88
|
+
* pending: object | null, finishReason?: string | null}} input - The item's
|
|
89
|
+
* ref, ledger status, worker, pending question, and attempt finish reason
|
|
90
|
+
* @returns {{ref: string, record: false, reason: string, requeue?: boolean} |
|
|
93
91
|
* {ref: string, record: true, source: string, answerAt: string | null,
|
|
94
|
-
* comment: string, requeue?:
|
|
92
|
+
* comment: string, requeue?: boolean}} Plan; answerAt is the queued answer's
|
|
95
93
|
* `at`, which `ledger clear-question --expect-answer-at` checks before
|
|
96
94
|
* clearing; `requeue: true` means also move the item to the `ready` role
|
|
97
95
|
*/
|
|
98
|
-
export function planAnswerRecord({
|
|
96
|
+
export function planAnswerRecord({
|
|
97
|
+
ref,
|
|
98
|
+
status,
|
|
99
|
+
finishReason,
|
|
100
|
+
worker,
|
|
101
|
+
pending,
|
|
102
|
+
}) {
|
|
99
103
|
const reason = skipReason(status, worker, pending);
|
|
100
|
-
const requeue = requeueOf(status, pending);
|
|
104
|
+
const requeue = requeueOf(status, finishReason, pending);
|
|
101
105
|
if (reason) return { ref, record: false, reason, ...requeue };
|
|
102
106
|
const { source, text, at } = pending.answer;
|
|
103
107
|
const shape = findCredentialShape(text);
|
|
@@ -49,7 +49,8 @@ export async function channelAnswer(ctx) {
|
|
|
49
49
|
* @param {object} ctx - CLI context
|
|
50
50
|
* @returns {Promise<{ json: object }>} `{ref,record:false,reason}` or
|
|
51
51
|
* `{ref,record:true,source,comment}`, either with `requeue: true` when a
|
|
52
|
-
* FAILED worker's item must also move to the `ready` role
|
|
52
|
+
* FAILED worker's item must also move to the `ready` role, or false when
|
|
53
|
+
* the ledger records an external tracker move
|
|
53
54
|
*/
|
|
54
55
|
export async function answerPlan(ctx) {
|
|
55
56
|
const ref = requirePositional(ctx, "ref");
|
|
@@ -64,6 +65,7 @@ export async function answerPlan(ctx) {
|
|
|
64
65
|
planAnswerRecord({
|
|
65
66
|
ref,
|
|
66
67
|
status: entry?.status,
|
|
68
|
+
finishReason: entry?.reason,
|
|
67
69
|
worker: entry?.worker ?? null,
|
|
68
70
|
pending,
|
|
69
71
|
})
|
|
@@ -729,11 +729,14 @@ HTTP_CLIS = {"curl", "http", "httpie", "wget"}
|
|
|
729
729
|
# and permitting something we demonstrably cannot read. Deliberately narrower
|
|
730
730
|
# than "mentions a tracker CLI" so an ordinary unparseable command
|
|
731
731
|
# (`echo 'it's fine`) still passes.
|
|
732
|
+
# The GitHub collection can create an issue. A complete numeric member path
|
|
733
|
+
# identifies an existing issue. Keep the fallback for other route forms and
|
|
734
|
+
# for independent creation signatures appearing alongside a member path.
|
|
732
735
|
UNPARSEABLE_CREATION = re.compile(
|
|
733
736
|
r"\b(?:gh|jira|linear)\b[^\n]*?\bissue\b[^\n]*?\bcreate\b"
|
|
734
737
|
r"|\bacli\b[^\n]*?\b(?:workitem|issue)s?\b[^\n]*?\bcreate\b"
|
|
735
738
|
r"|\bcreateIssue\b|\bissueCreate\b"
|
|
736
|
-
r"|repos/[^/\s]+/[^/\s]+/issues"
|
|
739
|
+
r"|repos/[^/\s]+/[^/\s]+/issues\b(?!/[0-9]+(?:$|[\s'\"`.,);?#]))"
|
|
737
740
|
r"|atlassian\.net/rest/api/[^/\s]+/issue",
|
|
738
741
|
re.IGNORECASE,
|
|
739
742
|
)
|
|
@@ -442,6 +442,56 @@ function applyCd(current, target) {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
const PYTHON_STRING = String.raw`(?:"[^"\\]*"|'[^'\\]*')`;
|
|
446
|
+
const PYTHON_BYTES = `b${PYTHON_STRING}`;
|
|
447
|
+
const PYTHON_NAME = "[A-Za-z_][A-Za-z0-9_]*";
|
|
448
|
+
const PYTHON_BYTES_ASSIGNMENT = new RegExp(
|
|
449
|
+
String.raw`^(${PYTHON_NAME})[ \t]*=[ \t]*${PYTHON_BYTES}$`,
|
|
450
|
+
"u"
|
|
451
|
+
);
|
|
452
|
+
const PYTHON_BYTES_COMPARISON = new RegExp(
|
|
453
|
+
String.raw`^assert[ \t]+(${PYTHON_NAME})\.replace\([ \t]*${PYTHON_BYTES}[ \t]*,[ \t]*${PYTHON_BYTES}[ \t]*\)[ \t]*==[ \t]*(${PYTHON_NAME})$`,
|
|
454
|
+
"u"
|
|
455
|
+
);
|
|
456
|
+
const PYTHON_LITERAL_GIT_CALL = new RegExp(
|
|
457
|
+
String.raw`^subprocess\.check_output\(\[[ \t]*(?:"git"|'git')(?:[ \t]*,[ \t]*${PYTHON_STRING})*[ \t]*\](?:[ \t]*,[ \t]*cwd[ \t]*=[ \t]*b?${PYTHON_STRING})?[ \t]*\)$`,
|
|
458
|
+
"u"
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Ignore the literals of a bounded Python source-byte comparison. The script
|
|
463
|
+
* can assign two bytes values and compare one replacement with the other.
|
|
464
|
+
* Optional literal Git subprocess calls remain visible to the path scanner.
|
|
465
|
+
* Any additional Python statement keeps the full source under inspection.
|
|
466
|
+
* @param {string} text - The bounded source read from the script
|
|
467
|
+
* @returns {string} The source to inspect for directory paths
|
|
468
|
+
*/
|
|
469
|
+
function pythonSourceForPathScan(text) {
|
|
470
|
+
const lines = text
|
|
471
|
+
.split(/\r\n?|\n/u)
|
|
472
|
+
.map(line => line.trim())
|
|
473
|
+
.filter(line => line !== "" && !line.startsWith("#"));
|
|
474
|
+
const importsSubprocess = lines[0] === "import subprocess";
|
|
475
|
+
const [first, second, assertion, ...calls] = lines.slice(
|
|
476
|
+
importsSubprocess ? 1 : 0
|
|
477
|
+
);
|
|
478
|
+
const before = PYTHON_BYTES_ASSIGNMENT.exec(first ?? "")?.[1];
|
|
479
|
+
const after = PYTHON_BYTES_ASSIGNMENT.exec(second ?? "")?.[1];
|
|
480
|
+
const compared = PYTHON_BYTES_COMPARISON.exec(assertion ?? "");
|
|
481
|
+
if (
|
|
482
|
+
before === undefined ||
|
|
483
|
+
after === undefined ||
|
|
484
|
+
before === after ||
|
|
485
|
+
compared?.[1] !== before ||
|
|
486
|
+
compared[2] !== after ||
|
|
487
|
+
(calls.length > 0 && !importsSubprocess) ||
|
|
488
|
+
!calls.every(line => PYTHON_LITERAL_GIT_CALL.test(line))
|
|
489
|
+
) {
|
|
490
|
+
return text;
|
|
491
|
+
}
|
|
492
|
+
return calls.join("\n");
|
|
493
|
+
}
|
|
494
|
+
|
|
445
495
|
/**
|
|
446
496
|
* The foreign worktree an executed script reaches, or null.
|
|
447
497
|
*
|
|
@@ -532,7 +582,12 @@ function scriptReachingForeignTree(payload, bound) {
|
|
|
532
582
|
// Not a readable file: nothing was executed that this can read.
|
|
533
583
|
continue;
|
|
534
584
|
}
|
|
535
|
-
const
|
|
585
|
+
const program = tokenise(segment)[0]?.split("/").at(-1);
|
|
586
|
+
const inspected =
|
|
587
|
+
program === "python" || program === "python3"
|
|
588
|
+
? pythonSourceForPathScan(text)
|
|
589
|
+
: text;
|
|
590
|
+
const foreign = foreignTreeIn(inspected, bound, cwd);
|
|
536
591
|
if (foreign) return { script: path, foreign };
|
|
537
592
|
}
|
|
538
593
|
return null;
|
|
@@ -129,6 +129,13 @@ For a before-enforce run, go from here to "The before-enforce run".
|
|
|
129
129
|
**Needs:** the repository root. **Hands on:** one result for each declared check, and three
|
|
130
130
|
written files.
|
|
131
131
|
|
|
132
|
+
Read the committed `controls.proof_copy.prepare` in `.lisa.config.json` before
|
|
133
|
+
running a proof. If commands are declared and the operator has yet to approve
|
|
134
|
+
this repository and command list, show the exact arguments and ask once before
|
|
135
|
+
the first run. Say that the commands run in the temporary copy and can use this
|
|
136
|
+
machine's network and credentials. Reuse approval recorded by configure for the
|
|
137
|
+
same list. Apply the same rule before a `--before-enforce` run.
|
|
138
|
+
|
|
132
139
|
```bash
|
|
133
140
|
lisa controls attest --json
|
|
134
141
|
```
|
|
@@ -146,8 +153,11 @@ A proof is two test changes, kept as patch files: one that breaks the check's ru
|
|
|
146
153
|
does not. At commit and at push a check is only started when the change touches the check's own
|
|
147
154
|
folder. So each test change has to edit a file inside the check's own folder: one that edits a
|
|
148
155
|
file anywhere else never starts the check, and that half reads `unknown` (not started), never a
|
|
149
|
-
pass. When an entry is `unknown` for that reason, say so
|
|
150
|
-
|
|
156
|
+
pass. When an entry is `unknown` for that reason, say so and send it back to
|
|
157
|
+
`/lisa:configure` to correct the test change. If the reason is an unavailable
|
|
158
|
+
dependency or hook, read the detail for what is still missing after any declared
|
|
159
|
+
preparation. A preparation failure ends the command before it produces an
|
|
160
|
+
entry verdict.
|
|
151
161
|
|
|
152
162
|
An entry that is `unproved` because a test change is missing (`reason` is `half-missing`) has
|
|
153
163
|
nothing wrong with its check: the two test changes were never written for it, or only one was. The
|