@codyswann/lisa 4.99.8 → 4.99.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/all/copy-overwrite/scripts/lib/usage-effectiveness.d.mts +4 -3
  2. package/cdk/copy-overwrite/vitest.config.ts +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  4. package/dist/core/lisa-owned-hash-ledger.js +2 -0
  5. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  6. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  7. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  8. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  9. package/dist/core/upstream-evidence-manifest.js +29 -16
  10. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  11. package/harper-fabric/copy-overwrite/vitest.config.ts +1 -1
  12. package/nestjs/copy-overwrite/vitest.config.ts +1 -1
  13. package/package.json +5 -4
  14. package/phaser/copy-overwrite/vitest.config.ts +1 -1
  15. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  17. package/plugins/lisa/.codex-plugin/skills/lisa-jira-evidence/SKILL.md +3 -1
  18. package/plugins/lisa/.codex-plugin/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  19. package/plugins/lisa/.codex-plugin/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  20. package/plugins/lisa/skills/lisa-jira-evidence/SKILL.md +3 -1
  21. package/plugins/lisa/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  22. package/plugins/lisa/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  23. package/plugins/lisa-agy/plugin.json +1 -1
  24. package/plugins/lisa-agy/skills/lisa-jira-evidence/SKILL.md +3 -1
  25. package/plugins/lisa-agy/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  26. package/plugins/lisa-agy/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  27. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  30. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  34. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-copilot/skills/lisa-jira-evidence/SKILL.md +3 -1
  36. package/plugins/lisa-copilot/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  37. package/plugins/lisa-copilot/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  38. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-cursor/skills/lisa-jira-evidence/SKILL.md +3 -1
  40. package/plugins/lisa-cursor/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  41. package/plugins/lisa-cursor/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  42. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  44. package/plugins/lisa-devin/skills/lisa-jira-evidence/SKILL.md +3 -1
  45. package/plugins/lisa-devin/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  46. package/plugins/lisa-devin/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  47. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/SKILL.md +3 -1
  50. package/plugins/lisa-expo/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  51. package/plugins/lisa-expo/.codex-plugin/skills/jira-journey/scripts/generate-templates.py +11 -5
  52. package/plugins/lisa-expo/skills/jira-evidence/SKILL.md +3 -1
  53. package/plugins/lisa-expo/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  54. package/plugins/lisa-expo/skills/jira-journey/scripts/generate-templates.py +11 -5
  55. package/plugins/lisa-expo-agy/plugin.json +1 -1
  56. package/plugins/lisa-expo-agy/skills/jira-evidence/SKILL.md +3 -1
  57. package/plugins/lisa-expo-agy/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  58. package/plugins/lisa-expo-agy/skills/jira-journey/scripts/generate-templates.py +11 -5
  59. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-expo-copilot/skills/jira-evidence/SKILL.md +3 -1
  61. package/plugins/lisa-expo-copilot/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  62. package/plugins/lisa-expo-copilot/skills/jira-journey/scripts/generate-templates.py +11 -5
  63. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-expo-cursor/skills/jira-evidence/SKILL.md +3 -1
  65. package/plugins/lisa-expo-cursor/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  66. package/plugins/lisa-expo-cursor/skills/jira-journey/scripts/generate-templates.py +11 -5
  67. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  69. package/plugins/lisa-expo-devin/skills/jira-evidence/SKILL.md +3 -1
  70. package/plugins/lisa-expo-devin/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  71. package/plugins/lisa-expo-devin/skills/jira-journey/scripts/generate-templates.py +11 -5
  72. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  74. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  75. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  79. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  82. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  86. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  88. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  89. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  93. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  95. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  96. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  100. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  102. package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/SKILL.md +2 -1
  103. package/plugins/lisa-rails/.codex-plugin/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  104. package/plugins/lisa-rails/skills/jira-evidence/SKILL.md +2 -1
  105. package/plugins/lisa-rails/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  106. package/plugins/lisa-rails-agy/plugin.json +1 -1
  107. package/plugins/lisa-rails-agy/skills/jira-evidence/SKILL.md +2 -1
  108. package/plugins/lisa-rails-agy/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  109. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-rails-copilot/skills/jira-evidence/SKILL.md +2 -1
  111. package/plugins/lisa-rails-copilot/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  112. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-rails-cursor/skills/jira-evidence/SKILL.md +2 -1
  114. package/plugins/lisa-rails-cursor/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  115. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  117. package/plugins/lisa-rails-devin/skills/jira-evidence/SKILL.md +2 -1
  118. package/plugins/lisa-rails-devin/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  119. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  121. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  122. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  126. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  128. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  129. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  133. package/plugins/src/base/skills/lisa-jira-evidence/SKILL.md +3 -1
  134. package/plugins/src/base/skills/lisa-jira-evidence/scripts/post-evidence.sh +87 -8
  135. package/plugins/src/base/skills/lisa-jira-journey/scripts/generate-templates.py +4 -1
  136. package/plugins/src/expo/skills/jira-evidence/SKILL.md +3 -1
  137. package/plugins/src/expo/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  138. package/plugins/src/expo/skills/jira-journey/scripts/generate-templates.py +11 -5
  139. package/plugins/src/rails/skills/jira-evidence/SKILL.md +2 -1
  140. package/plugins/src/rails/skills/jira-evidence/scripts/post-evidence.sh +87 -8
  141. package/scripts/check-security-floors.mjs +24 -6
  142. package/typescript/copy-overwrite/.lintstagedrc.json +1 -1
  143. package/typescript/copy-overwrite/vitest.config.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -81,7 +81,7 @@ export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release
81
81
  ## What It Does
82
82
 
83
83
  1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
84
- 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Uploads evidence files via `gh release upload --clobber`
84
+ 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Validates `PR_NUMBER` as a positive integer, uploads each evidence file as `pr-<PR_NUMBER>-<file>` via `gh release upload --clobber`, then lists the release and exits 1 naming any uploaded asset that is missing. Before uploading it refuses an evidence name outside `NN-name.(png|txt|json)` with letters, digits, `.`, `_` and `-` only (GitHub rewrites other characters in asset names), and before editing the description it exits 1 naming any Markdown link or image target in `comment.md` (inline, titled, `<url>`-bracketed or a reference definition such as `[ref]: url`) that points into that release but is not `pr-<PR_NUMBER>-…` or was not uploaded by this run (a stale asset from an earlier run does not count; release URLs quoted as plain text in inlined evidence are ignored). `--clobber` therefore only ever replaces this pull request's own earlier upload.
85
85
  3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body
86
86
  4. **Post JIRA comment** — Posts `comment.txt` as a new comment (wiki markup with code blocks)
87
87
  5. **Move ticket to the configured review status** — Transitions the JIRA ticket to `$REVIEW` (default: `Code Review`).
@@ -99,6 +99,8 @@ evidence/
99
99
  comment.md used for PR description
100
100
  ```
101
101
 
102
+ Local evidence files keep their `NN-` names. In the shared evidence release each one is stored as `pr-<number>-<file>` (for PR 42, `01-health-check.json` becomes `pr-42-01-health-check.json`), so two pull requests with a same-named file never overwrite each other's evidence. `generate-templates.py` links that scoped name.
103
+
102
104
  ## Troubleshooting
103
105
 
104
106
  ### Evidence not appearing in GitHub PR
@@ -15,7 +15,8 @@
15
15
  #
16
16
  # What it does:
17
17
  # 1. Uploads evidence files to the configured GitHub evidence release
18
- # (default 'pr-assets'; see verification.completion.evidenceRelease)
18
+ # (default 'pr-assets'; see verification.completion.evidenceRelease) as
19
+ # pr-<PR_NUMBER>-<file>, then confirms every one is listed there
19
20
  # 2. Updates the GitHub PR description with evidence/comment.md
20
21
  # 3. Uploads image evidence as JIRA attachments
21
22
  # 4. Posts/updates the JIRA comment with evidence/comment.txt
@@ -28,6 +29,14 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
28
29
  EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
29
30
  PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
30
31
 
32
+ # Every release asset is named pr-${PR_NUMBER}-<file>, so the number must be a
33
+ # canonical positive integer before anything is uploaded: an empty, signed or
34
+ # padded value would produce a name another pull request could also produce.
35
+ if [[ ! "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
36
+ echo "ERROR: PR_NUMBER must be a positive integer, got '$PR_NUMBER'" >&2
37
+ exit 1
38
+ fi
39
+
31
40
  # ─────────────────────────────────────────────────────────────────────────────
32
41
  # CONFIG RESOLUTION
33
42
  #
@@ -153,6 +162,26 @@ fi
153
162
 
154
163
  echo "Found ${#SCREENSHOTS[@]} screenshots and ${#TEXT_EVIDENCE[@]} text evidence files to upload"
155
164
 
165
+ # GitHub rewrites special characters (spaces, brackets, non-ASCII) in release
166
+ # asset names, so a link built from the local name would point at an asset that
167
+ # does not exist under that name. Refuse such names before anything is uploaded.
168
+ for FILE in "${ALL_EVIDENCE[@]}"; do
169
+ if [[ ! "$(basename "$FILE")" =~ ^[0-9]{2}-[A-Za-z0-9._-]+\.(png|txt|json)$ ]]; then
170
+ echo "ERROR: evidence file name '$(basename "$FILE")' is not release-safe." >&2
171
+ echo " Rename it to NN-name.ext using only letters, digits, '.', '_' and '-'" >&2
172
+ echo " (e.g. '01-search step.png' -> '01-search-step.png'), then re-run generate-templates.py." >&2
173
+ exit 1
174
+ fi
175
+ done
176
+
177
+ # The description is checked against the release after uploading, so it must
178
+ # exist before anything is uploaded.
179
+ COMMENT_MD="$EVIDENCE_DIR/comment.md"
180
+ if [[ ! -f "$COMMENT_MD" ]]; then
181
+ echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
182
+ exit 1
183
+ fi
184
+
156
185
  # Compute JIRA auth early (used in steps 3 and 4)
157
186
  JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
158
187
 
@@ -160,21 +189,71 @@ JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
160
189
  echo ""
161
190
  echo "==> Uploading to GitHub release '$RELEASE_TAG'..."
162
191
 
192
+ # Every pull request shares this one release, and --clobber deletes a
193
+ # same-named asset before uploading. Bare NN- names collided across pull
194
+ # requests, so a later upload destroyed an earlier one's evidence
195
+ # (CodySwannGT/lisa#4639). Each asset is therefore uploaded as
196
+ # pr-${PR_NUMBER}-<file>: --clobber can then replace only this pull request's
197
+ # own earlier upload. Local evidence files keep their NN- names; the scoped
198
+ # copies live in a private directory removed on exit.
199
+ UPLOAD_DIR=$(mktemp -d)
200
+ trap 'rm -rf "$UPLOAD_DIR"' EXIT
201
+ UPLOADED_ASSETS=()
163
202
  for FILE in "${ALL_EVIDENCE[@]}"; do
164
- FILENAME=$(basename "$FILE")
165
- echo " ↑ $FILENAME"
166
- gh release upload "$RELEASE_TAG" "$FILE" --repo "$GH_REPO" --clobber
203
+ ASSET_NAME="pr-${PR_NUMBER}-$(basename "$FILE")"
204
+ cp "$FILE" "$UPLOAD_DIR/$ASSET_NAME"
205
+ echo " ↑ $ASSET_NAME"
206
+ gh release upload "$RELEASE_TAG" "$UPLOAD_DIR/$ASSET_NAME" --repo "$GH_REPO" --clobber
207
+ UPLOADED_ASSETS+=("$ASSET_NAME")
167
208
  done
168
209
 
210
+ # The description links these names, so confirm each one is really in the
211
+ # release before pointing anything at it.
212
+ RELEASE_ASSETS=$(gh release view "$RELEASE_TAG" --repo "$GH_REPO" --json assets --jq '.assets[].name')
213
+ MISSING_ASSETS=0
214
+ for ASSET_NAME in "${UPLOADED_ASSETS[@]}"; do
215
+ if ! grep -qxF "$ASSET_NAME" <<< "$RELEASE_ASSETS"; then
216
+ echo "ERROR: $ASSET_NAME is missing from release '$RELEASE_TAG' after upload" >&2
217
+ MISSING_ASSETS=1
218
+ fi
219
+ done
220
+ if [[ $MISSING_ASSETS -ne 0 ]]; then
221
+ exit 1
222
+ fi
223
+
169
224
  echo " ✓ GitHub release assets uploaded"
170
225
 
171
- # ── Step 2: Update GitHub PR description with evidence ──────────────────────
172
- COMMENT_MD="$EVIDENCE_DIR/comment.md"
173
- if [[ ! -f "$COMMENT_MD" ]]; then
174
- echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
226
+ # Every Markdown link or image target that points into the release must name
227
+ # an asset THIS run uploaded, and therefore one the check above just found in
228
+ # the release. A bare or other-PR name would show some other pull request's
229
+ # evidence, and a pr-<n>- asset left over from an earlier run would show
230
+ # evidence this run did not produce. Every Markdown target form counts:
231
+ # inline ](url) ](url "title") ](<url>) ](<url> "title")
232
+ # reference [ref]: url [ref]: <url> "title" (up to 3 leading spaces)
233
+ # Only link targets count: text evidence inlined into comment.md may quote a
234
+ # release URL as plain text, and that must not fail the run.
235
+ THIS_RUN_ASSETS=$(printf '%s\n' "${UPLOADED_ASSETS[@]}")
236
+ BAD_LINKS=0
237
+ while IFS= read -r LINK; do
238
+ [[ "$LINK" == *"releases/download/${RELEASE_TAG}/"* ]] || continue
239
+ LINK_NAME="${LINK##*/}"
240
+ if [[ "$LINK_NAME" != "pr-${PR_NUMBER}-"* ]]; then
241
+ echo "ERROR: $COMMENT_MD links $LINK, which is not scoped to PR #$PR_NUMBER (expected pr-${PR_NUMBER}-<file>)" >&2
242
+ BAD_LINKS=1
243
+ elif ! grep -qxF "$LINK_NAME" <<< "$THIS_RUN_ASSETS"; then
244
+ echo "ERROR: $COMMENT_MD links $LINK, which this run did not upload to release '$RELEASE_TAG'" >&2
245
+ BAD_LINKS=1
246
+ fi
247
+ done < <(
248
+ { grep -oE '\]\(<?[^)<>[:space:]]+' "$COMMENT_MD" || true; } | sed -E 's/^\]\(<?//'
249
+ { grep -oE '^ {0,3}\[[^]]+\]:[[:space:]]*<?[^<>[:space:]]+' "$COMMENT_MD" || true; } |
250
+ sed -E 's/^ {0,3}\[[^]]+\]:[[:space:]]*<?//'
251
+ )
252
+ if [[ $BAD_LINKS -ne 0 ]]; then
175
253
  exit 1
176
254
  fi
177
255
 
256
+ # ── Step 2: Update GitHub PR description with evidence ──────────────────────
178
257
  echo ""
179
258
  echo "==> Updating GitHub PR #$PR_NUMBER description..."
180
259
 
@@ -194,7 +194,10 @@ def generate_github_md(ticket_id, pr_number, branch, evidence_files, journey, gh
194
194
  if filename.endswith(".png"):
195
195
  lines.append(f"**{label}:**")
196
196
  lines.append("")
197
- lines.append(f"![{label}]({release_base}/{filename})")
197
+ # post-evidence.sh stores the asset as pr-<number>-<file> so pull
198
+ # requests sharing the release never overwrite each other's
199
+ # evidence (CodySwannGT/lisa#4639); link exactly that name.
200
+ lines.append(f"![{label}]({release_base}/pr-{pr_number}-{filename})")
198
201
  lines.append("")
199
202
  else:
200
203
  content = evidence_path.read_text().strip()
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -81,7 +81,7 @@ export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release
81
81
  ## What It Does
82
82
 
83
83
  1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
84
- 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Uploads evidence files via `gh release upload --clobber`
84
+ 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Validates `PR_NUMBER` as a positive integer, uploads each evidence file as `pr-<PR_NUMBER>-<file>` via `gh release upload --clobber`, then lists the release and exits 1 naming any uploaded asset that is missing. Before uploading it refuses an evidence name outside `NN-name.(png|txt|json)` with letters, digits, `.`, `_` and `-` only (GitHub rewrites other characters in asset names), and before editing the description it exits 1 naming any Markdown link or image target in `comment.md` (inline, titled, `<url>`-bracketed or a reference definition such as `[ref]: url`) that points into that release but is not `pr-<PR_NUMBER>-…` or was not uploaded by this run (a stale asset from an earlier run does not count; release URLs quoted as plain text in inlined evidence are ignored). `--clobber` therefore only ever replaces this pull request's own earlier upload.
85
85
  3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body
86
86
  4. **Post JIRA comment** — Posts `comment.txt` as a new comment (wiki markup with code blocks)
87
87
  5. **Move ticket to the configured review status** — Transitions the JIRA ticket to `$REVIEW` (default: `Code Review`).
@@ -99,6 +99,8 @@ evidence/
99
99
  comment.md used for PR description
100
100
  ```
101
101
 
102
+ Local evidence files keep their `NN-` names. In the shared evidence release each one is stored as `pr-<number>-<file>` (for PR 42, `01-health-check.json` becomes `pr-42-01-health-check.json`), so two pull requests with a same-named file never overwrite each other's evidence. `generate-templates.py` links that scoped name.
103
+
102
104
  ## Troubleshooting
103
105
 
104
106
  ### Evidence not appearing in GitHub PR
@@ -15,7 +15,8 @@
15
15
  #
16
16
  # What it does:
17
17
  # 1. Uploads evidence files to the configured GitHub evidence release
18
- # (default 'pr-assets'; see verification.completion.evidenceRelease)
18
+ # (default 'pr-assets'; see verification.completion.evidenceRelease) as
19
+ # pr-<PR_NUMBER>-<file>, then confirms every one is listed there
19
20
  # 2. Updates the GitHub PR description with evidence/comment.md
20
21
  # 3. Uploads image evidence as JIRA attachments
21
22
  # 4. Posts/updates the JIRA comment with evidence/comment.txt
@@ -28,6 +29,14 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
28
29
  EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
29
30
  PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
30
31
 
32
+ # Every release asset is named pr-${PR_NUMBER}-<file>, so the number must be a
33
+ # canonical positive integer before anything is uploaded: an empty, signed or
34
+ # padded value would produce a name another pull request could also produce.
35
+ if [[ ! "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
36
+ echo "ERROR: PR_NUMBER must be a positive integer, got '$PR_NUMBER'" >&2
37
+ exit 1
38
+ fi
39
+
31
40
  # ─────────────────────────────────────────────────────────────────────────────
32
41
  # CONFIG RESOLUTION
33
42
  #
@@ -153,6 +162,26 @@ fi
153
162
 
154
163
  echo "Found ${#SCREENSHOTS[@]} screenshots and ${#TEXT_EVIDENCE[@]} text evidence files to upload"
155
164
 
165
+ # GitHub rewrites special characters (spaces, brackets, non-ASCII) in release
166
+ # asset names, so a link built from the local name would point at an asset that
167
+ # does not exist under that name. Refuse such names before anything is uploaded.
168
+ for FILE in "${ALL_EVIDENCE[@]}"; do
169
+ if [[ ! "$(basename "$FILE")" =~ ^[0-9]{2}-[A-Za-z0-9._-]+\.(png|txt|json)$ ]]; then
170
+ echo "ERROR: evidence file name '$(basename "$FILE")' is not release-safe." >&2
171
+ echo " Rename it to NN-name.ext using only letters, digits, '.', '_' and '-'" >&2
172
+ echo " (e.g. '01-search step.png' -> '01-search-step.png'), then re-run generate-templates.py." >&2
173
+ exit 1
174
+ fi
175
+ done
176
+
177
+ # The description is checked against the release after uploading, so it must
178
+ # exist before anything is uploaded.
179
+ COMMENT_MD="$EVIDENCE_DIR/comment.md"
180
+ if [[ ! -f "$COMMENT_MD" ]]; then
181
+ echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
182
+ exit 1
183
+ fi
184
+
156
185
  # Compute JIRA auth early (used in steps 3 and 4)
157
186
  JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
158
187
 
@@ -160,21 +189,71 @@ JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
160
189
  echo ""
161
190
  echo "==> Uploading to GitHub release '$RELEASE_TAG'..."
162
191
 
192
+ # Every pull request shares this one release, and --clobber deletes a
193
+ # same-named asset before uploading. Bare NN- names collided across pull
194
+ # requests, so a later upload destroyed an earlier one's evidence
195
+ # (CodySwannGT/lisa#4639). Each asset is therefore uploaded as
196
+ # pr-${PR_NUMBER}-<file>: --clobber can then replace only this pull request's
197
+ # own earlier upload. Local evidence files keep their NN- names; the scoped
198
+ # copies live in a private directory removed on exit.
199
+ UPLOAD_DIR=$(mktemp -d)
200
+ trap 'rm -rf "$UPLOAD_DIR"' EXIT
201
+ UPLOADED_ASSETS=()
163
202
  for FILE in "${ALL_EVIDENCE[@]}"; do
164
- FILENAME=$(basename "$FILE")
165
- echo " ↑ $FILENAME"
166
- gh release upload "$RELEASE_TAG" "$FILE" --repo "$GH_REPO" --clobber
203
+ ASSET_NAME="pr-${PR_NUMBER}-$(basename "$FILE")"
204
+ cp "$FILE" "$UPLOAD_DIR/$ASSET_NAME"
205
+ echo " ↑ $ASSET_NAME"
206
+ gh release upload "$RELEASE_TAG" "$UPLOAD_DIR/$ASSET_NAME" --repo "$GH_REPO" --clobber
207
+ UPLOADED_ASSETS+=("$ASSET_NAME")
167
208
  done
168
209
 
210
+ # The description links these names, so confirm each one is really in the
211
+ # release before pointing anything at it.
212
+ RELEASE_ASSETS=$(gh release view "$RELEASE_TAG" --repo "$GH_REPO" --json assets --jq '.assets[].name')
213
+ MISSING_ASSETS=0
214
+ for ASSET_NAME in "${UPLOADED_ASSETS[@]}"; do
215
+ if ! grep -qxF "$ASSET_NAME" <<< "$RELEASE_ASSETS"; then
216
+ echo "ERROR: $ASSET_NAME is missing from release '$RELEASE_TAG' after upload" >&2
217
+ MISSING_ASSETS=1
218
+ fi
219
+ done
220
+ if [[ $MISSING_ASSETS -ne 0 ]]; then
221
+ exit 1
222
+ fi
223
+
169
224
  echo " ✓ GitHub release assets uploaded"
170
225
 
171
- # ── Step 2: Update GitHub PR description with evidence ──────────────────────
172
- COMMENT_MD="$EVIDENCE_DIR/comment.md"
173
- if [[ ! -f "$COMMENT_MD" ]]; then
174
- echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
226
+ # Every Markdown link or image target that points into the release must name
227
+ # an asset THIS run uploaded, and therefore one the check above just found in
228
+ # the release. A bare or other-PR name would show some other pull request's
229
+ # evidence, and a pr-<n>- asset left over from an earlier run would show
230
+ # evidence this run did not produce. Every Markdown target form counts:
231
+ # inline ](url) ](url "title") ](<url>) ](<url> "title")
232
+ # reference [ref]: url [ref]: <url> "title" (up to 3 leading spaces)
233
+ # Only link targets count: text evidence inlined into comment.md may quote a
234
+ # release URL as plain text, and that must not fail the run.
235
+ THIS_RUN_ASSETS=$(printf '%s\n' "${UPLOADED_ASSETS[@]}")
236
+ BAD_LINKS=0
237
+ while IFS= read -r LINK; do
238
+ [[ "$LINK" == *"releases/download/${RELEASE_TAG}/"* ]] || continue
239
+ LINK_NAME="${LINK##*/}"
240
+ if [[ "$LINK_NAME" != "pr-${PR_NUMBER}-"* ]]; then
241
+ echo "ERROR: $COMMENT_MD links $LINK, which is not scoped to PR #$PR_NUMBER (expected pr-${PR_NUMBER}-<file>)" >&2
242
+ BAD_LINKS=1
243
+ elif ! grep -qxF "$LINK_NAME" <<< "$THIS_RUN_ASSETS"; then
244
+ echo "ERROR: $COMMENT_MD links $LINK, which this run did not upload to release '$RELEASE_TAG'" >&2
245
+ BAD_LINKS=1
246
+ fi
247
+ done < <(
248
+ { grep -oE '\]\(<?[^)<>[:space:]]+' "$COMMENT_MD" || true; } | sed -E 's/^\]\(<?//'
249
+ { grep -oE '^ {0,3}\[[^]]+\]:[[:space:]]*<?[^<>[:space:]]+' "$COMMENT_MD" || true; } |
250
+ sed -E 's/^ {0,3}\[[^]]+\]:[[:space:]]*<?//'
251
+ )
252
+ if [[ $BAD_LINKS -ne 0 ]]; then
175
253
  exit 1
176
254
  fi
177
255
 
256
+ # ── Step 2: Update GitHub PR description with evidence ──────────────────────
178
257
  echo ""
179
258
  echo "==> Updating GitHub PR #$PR_NUMBER description..."
180
259
 
@@ -194,7 +194,10 @@ def generate_github_md(ticket_id, pr_number, branch, evidence_files, journey, gh
194
194
  if filename.endswith(".png"):
195
195
  lines.append(f"**{label}:**")
196
196
  lines.append("")
197
- lines.append(f"![{label}]({release_base}/{filename})")
197
+ # post-evidence.sh stores the asset as pr-<number>-<file> so pull
198
+ # requests sharing the release never overwrite each other's
199
+ # evidence (CodySwannGT/lisa#4639); link exactly that name.
200
+ lines.append(f"![{label}]({release_base}/pr-{pr_number}-{filename})")
198
201
  lines.append("")
199
202
  else:
200
203
  content = evidence_path.read_text().strip()
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -81,7 +81,7 @@ export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release
81
81
  ## What It Does
82
82
 
83
83
  1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
84
- 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Uploads evidence files via `gh release upload --clobber`
84
+ 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Validates `PR_NUMBER` as a positive integer, uploads each evidence file as `pr-<PR_NUMBER>-<file>` via `gh release upload --clobber`, then lists the release and exits 1 naming any uploaded asset that is missing. Before uploading it refuses an evidence name outside `NN-name.(png|txt|json)` with letters, digits, `.`, `_` and `-` only (GitHub rewrites other characters in asset names), and before editing the description it exits 1 naming any Markdown link or image target in `comment.md` (inline, titled, `<url>`-bracketed or a reference definition such as `[ref]: url`) that points into that release but is not `pr-<PR_NUMBER>-…` or was not uploaded by this run (a stale asset from an earlier run does not count; release URLs quoted as plain text in inlined evidence are ignored). `--clobber` therefore only ever replaces this pull request's own earlier upload.
85
85
  3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body
86
86
  4. **Post JIRA comment** — Posts `comment.txt` as a new comment (wiki markup with code blocks)
87
87
  5. **Move ticket to the configured review status** — Transitions the JIRA ticket to `$REVIEW` (default: `Code Review`).
@@ -99,6 +99,8 @@ evidence/
99
99
  comment.md used for PR description
100
100
  ```
101
101
 
102
+ Local evidence files keep their `NN-` names. In the shared evidence release each one is stored as `pr-<number>-<file>` (for PR 42, `01-health-check.json` becomes `pr-42-01-health-check.json`), so two pull requests with a same-named file never overwrite each other's evidence. `generate-templates.py` links that scoped name.
103
+
102
104
  ## Troubleshooting
103
105
 
104
106
  ### Evidence not appearing in GitHub PR
@@ -15,7 +15,8 @@
15
15
  #
16
16
  # What it does:
17
17
  # 1. Uploads evidence files to the configured GitHub evidence release
18
- # (default 'pr-assets'; see verification.completion.evidenceRelease)
18
+ # (default 'pr-assets'; see verification.completion.evidenceRelease) as
19
+ # pr-<PR_NUMBER>-<file>, then confirms every one is listed there
19
20
  # 2. Updates the GitHub PR description with evidence/comment.md
20
21
  # 3. Uploads image evidence as JIRA attachments
21
22
  # 4. Posts/updates the JIRA comment with evidence/comment.txt
@@ -28,6 +29,14 @@ TICKET_ID="${1:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
28
29
  EVIDENCE_DIR="${2:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
29
30
  PR_NUMBER="${3:?Usage: post-evidence.sh <TICKET_ID> <EVIDENCE_DIR> <PR_NUMBER>}"
30
31
 
32
+ # Every release asset is named pr-${PR_NUMBER}-<file>, so the number must be a
33
+ # canonical positive integer before anything is uploaded: an empty, signed or
34
+ # padded value would produce a name another pull request could also produce.
35
+ if [[ ! "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
36
+ echo "ERROR: PR_NUMBER must be a positive integer, got '$PR_NUMBER'" >&2
37
+ exit 1
38
+ fi
39
+
31
40
  # ─────────────────────────────────────────────────────────────────────────────
32
41
  # CONFIG RESOLUTION
33
42
  #
@@ -153,6 +162,26 @@ fi
153
162
 
154
163
  echo "Found ${#SCREENSHOTS[@]} screenshots and ${#TEXT_EVIDENCE[@]} text evidence files to upload"
155
164
 
165
+ # GitHub rewrites special characters (spaces, brackets, non-ASCII) in release
166
+ # asset names, so a link built from the local name would point at an asset that
167
+ # does not exist under that name. Refuse such names before anything is uploaded.
168
+ for FILE in "${ALL_EVIDENCE[@]}"; do
169
+ if [[ ! "$(basename "$FILE")" =~ ^[0-9]{2}-[A-Za-z0-9._-]+\.(png|txt|json)$ ]]; then
170
+ echo "ERROR: evidence file name '$(basename "$FILE")' is not release-safe." >&2
171
+ echo " Rename it to NN-name.ext using only letters, digits, '.', '_' and '-'" >&2
172
+ echo " (e.g. '01-search step.png' -> '01-search-step.png'), then re-run generate-templates.py." >&2
173
+ exit 1
174
+ fi
175
+ done
176
+
177
+ # The description is checked against the release after uploading, so it must
178
+ # exist before anything is uploaded.
179
+ COMMENT_MD="$EVIDENCE_DIR/comment.md"
180
+ if [[ ! -f "$COMMENT_MD" ]]; then
181
+ echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
182
+ exit 1
183
+ fi
184
+
156
185
  # Compute JIRA auth early (used in steps 3 and 4)
157
186
  JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
158
187
 
@@ -160,21 +189,71 @@ JIRA_AUTH=$(printf '%s' "$JIRA_USER:$JIRA_API_TOKEN" | base64 | tr -d '\n')
160
189
  echo ""
161
190
  echo "==> Uploading to GitHub release '$RELEASE_TAG'..."
162
191
 
192
+ # Every pull request shares this one release, and --clobber deletes a
193
+ # same-named asset before uploading. Bare NN- names collided across pull
194
+ # requests, so a later upload destroyed an earlier one's evidence
195
+ # (CodySwannGT/lisa#4639). Each asset is therefore uploaded as
196
+ # pr-${PR_NUMBER}-<file>: --clobber can then replace only this pull request's
197
+ # own earlier upload. Local evidence files keep their NN- names; the scoped
198
+ # copies live in a private directory removed on exit.
199
+ UPLOAD_DIR=$(mktemp -d)
200
+ trap 'rm -rf "$UPLOAD_DIR"' EXIT
201
+ UPLOADED_ASSETS=()
163
202
  for FILE in "${ALL_EVIDENCE[@]}"; do
164
- FILENAME=$(basename "$FILE")
165
- echo " ↑ $FILENAME"
166
- gh release upload "$RELEASE_TAG" "$FILE" --repo "$GH_REPO" --clobber
203
+ ASSET_NAME="pr-${PR_NUMBER}-$(basename "$FILE")"
204
+ cp "$FILE" "$UPLOAD_DIR/$ASSET_NAME"
205
+ echo " ↑ $ASSET_NAME"
206
+ gh release upload "$RELEASE_TAG" "$UPLOAD_DIR/$ASSET_NAME" --repo "$GH_REPO" --clobber
207
+ UPLOADED_ASSETS+=("$ASSET_NAME")
167
208
  done
168
209
 
210
+ # The description links these names, so confirm each one is really in the
211
+ # release before pointing anything at it.
212
+ RELEASE_ASSETS=$(gh release view "$RELEASE_TAG" --repo "$GH_REPO" --json assets --jq '.assets[].name')
213
+ MISSING_ASSETS=0
214
+ for ASSET_NAME in "${UPLOADED_ASSETS[@]}"; do
215
+ if ! grep -qxF "$ASSET_NAME" <<< "$RELEASE_ASSETS"; then
216
+ echo "ERROR: $ASSET_NAME is missing from release '$RELEASE_TAG' after upload" >&2
217
+ MISSING_ASSETS=1
218
+ fi
219
+ done
220
+ if [[ $MISSING_ASSETS -ne 0 ]]; then
221
+ exit 1
222
+ fi
223
+
169
224
  echo " ✓ GitHub release assets uploaded"
170
225
 
171
- # ── Step 2: Update GitHub PR description with evidence ──────────────────────
172
- COMMENT_MD="$EVIDENCE_DIR/comment.md"
173
- if [[ ! -f "$COMMENT_MD" ]]; then
174
- echo "ERROR: $COMMENT_MD not found — run generate-templates.py first" >&2
226
+ # Every Markdown link or image target that points into the release must name
227
+ # an asset THIS run uploaded, and therefore one the check above just found in
228
+ # the release. A bare or other-PR name would show some other pull request's
229
+ # evidence, and a pr-<n>- asset left over from an earlier run would show
230
+ # evidence this run did not produce. Every Markdown target form counts:
231
+ # inline ](url) ](url "title") ](<url>) ](<url> "title")
232
+ # reference [ref]: url [ref]: <url> "title" (up to 3 leading spaces)
233
+ # Only link targets count: text evidence inlined into comment.md may quote a
234
+ # release URL as plain text, and that must not fail the run.
235
+ THIS_RUN_ASSETS=$(printf '%s\n' "${UPLOADED_ASSETS[@]}")
236
+ BAD_LINKS=0
237
+ while IFS= read -r LINK; do
238
+ [[ "$LINK" == *"releases/download/${RELEASE_TAG}/"* ]] || continue
239
+ LINK_NAME="${LINK##*/}"
240
+ if [[ "$LINK_NAME" != "pr-${PR_NUMBER}-"* ]]; then
241
+ echo "ERROR: $COMMENT_MD links $LINK, which is not scoped to PR #$PR_NUMBER (expected pr-${PR_NUMBER}-<file>)" >&2
242
+ BAD_LINKS=1
243
+ elif ! grep -qxF "$LINK_NAME" <<< "$THIS_RUN_ASSETS"; then
244
+ echo "ERROR: $COMMENT_MD links $LINK, which this run did not upload to release '$RELEASE_TAG'" >&2
245
+ BAD_LINKS=1
246
+ fi
247
+ done < <(
248
+ { grep -oE '\]\(<?[^)<>[:space:]]+' "$COMMENT_MD" || true; } | sed -E 's/^\]\(<?//'
249
+ { grep -oE '^ {0,3}\[[^]]+\]:[[:space:]]*<?[^<>[:space:]]+' "$COMMENT_MD" || true; } |
250
+ sed -E 's/^ {0,3}\[[^]]+\]:[[:space:]]*<?//'
251
+ )
252
+ if [[ $BAD_LINKS -ne 0 ]]; then
175
253
  exit 1
176
254
  fi
177
255
 
256
+ # ── Step 2: Update GitHub PR description with evidence ──────────────────────
178
257
  echo ""
179
258
  echo "==> Updating GitHub PR #$PR_NUMBER description..."
180
259
 
@@ -194,7 +194,10 @@ def generate_github_md(ticket_id, pr_number, branch, evidence_files, journey, gh
194
194
  if filename.endswith(".png"):
195
195
  lines.append(f"**{label}:**")
196
196
  lines.append("")
197
- lines.append(f"![{label}]({release_base}/{filename})")
197
+ # post-evidence.sh stores the asset as pr-<number>-<file> so pull
198
+ # requests sharing the release never overwrite each other's
199
+ # evidence (CodySwannGT/lisa#4639); link exactly that name.
200
+ lines.append(f"![{label}]({release_base}/pr-{pr_number}-{filename})")
198
201
  lines.append("")
199
202
  else:
200
203
  content = evidence_path.read_text().strip()
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.99.8",
3
+ "version": "4.99.10",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -56,7 +56,7 @@ export LISA_EVIDENCE_RELEASE=$(node scripts/lisa-work-item.mjs evidence-release
56
56
  ## What It Does
57
57
 
58
58
  1. **Read JIRA config** — Resolves the jira-cli config (`$PROJECT_DIR/.lisa/jira-cli/.config.yml` first, then `~/.config/.jira/.config.yml`, announcing the fallback) and reads `server` and `login` from it dynamically — no hardcoded values. Exits 1 naming both paths when neither exists. The same resolved path is then passed to `jira issue move` as `--config`, so the CLI cannot end up on a different config than the one this script parsed.
59
- 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Uploads `NN-name-viewport.png` screenshots via `gh release upload --clobber`, creating CDN URLs that render in GitHub markdown
59
+ 2. **Upload to the configured evidence release (`node scripts/lisa-work-item.mjs evidence-release --ensure` prints it; default `pr-assets`)** — Validates `PR_NUMBER` as a positive integer, uploads each `NN-name-viewport.png` screenshot as `pr-<PR_NUMBER>-<file>` via `gh release upload --clobber`, creating CDN URLs that render in GitHub markdown, then lists the release and exits 1 naming any uploaded asset that is missing. Before uploading it refuses an evidence name outside `NN-name.(png|txt|json)` with letters, digits, `.`, `_` and `-` only (GitHub rewrites other characters in asset names), and before editing the description it exits 1 naming any Markdown link or image target in `comment.md` (inline, titled, `<url>`-bracketed or a reference definition such as `[ref]: url`) that points into that release but is not `pr-<PR_NUMBER>-…` or was not uploaded by this run (a stale asset from an earlier run does not count; release URLs quoted as plain text in inlined evidence are ignored). `--clobber` therefore only ever replaces this pull request's own earlier upload.
60
60
  3. **Update PR description** — Replaces or appends the `## Evidence` section in the PR body using `gh pr edit`
61
61
  4. **Upload JIRA attachments** — Uploads screenshots via REST API v3 so `!filename.png!` wiki markup renders inline
62
62
  5. **Post JIRA comment** — Posts `comment.txt` as a new comment via REST API v2 (wiki markup with embedded images)
@@ -75,6 +75,8 @@ evidence/
75
75
  comment.md used for PR description
76
76
  ```
77
77
 
78
+ Local screenshots keep their `NN-` names. In the shared evidence release each one is stored as `pr-<number>-<file>` (for PR 42, `01-search-step-desktop.png` becomes `pr-42-01-search-step-desktop.png`), so two pull requests with a same-named screenshot never overwrite each other's evidence. `generate-templates.py` links that scoped name; JIRA attachments keep the local name.
79
+
78
80
  ## Troubleshooting
79
81
 
80
82
  ### Images not rendering in GitHub PR