@codyswann/lisa 8.6.1 → 8.7.1

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 (298) hide show
  1. package/README.md +9 -0
  2. package/all/copy-overwrite/scripts/lib/changed-paths.mjs +146 -0
  3. package/all/copy-overwrite/scripts/lib/completion-proof-content.mjs +6 -2
  4. package/all/copy-overwrite/scripts/lisa-gates.mjs +16 -1
  5. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +297 -177
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +24 -0
  7. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +7 -6
  8. package/all/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
  9. package/dist/cli/apply-cmd.d.ts +10 -0
  10. package/dist/cli/apply-cmd.d.ts.map +1 -0
  11. package/dist/cli/apply-cmd.js +28 -0
  12. package/dist/cli/apply-cmd.js.map +1 -0
  13. package/dist/cli/index.d.ts.map +1 -1
  14. package/dist/cli/index.js +3 -12
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/controls/attest-check.d.ts.map +1 -1
  17. package/dist/controls/attest-check.js +31 -18
  18. package/dist/controls/attest-check.js.map +1 -1
  19. package/dist/controls/attest-record.d.ts +3 -0
  20. package/dist/controls/attest-record.d.ts.map +1 -1
  21. package/dist/controls/attest-record.js +28 -5
  22. package/dist/controls/attest-record.js.map +1 -1
  23. package/dist/controls/checks-binding.d.ts.map +1 -1
  24. package/dist/controls/checks-binding.js +28 -1
  25. package/dist/controls/checks-binding.js.map +1 -1
  26. package/dist/controls/commands/attest-host-proof.d.ts +18 -0
  27. package/dist/controls/commands/attest-host-proof.d.ts.map +1 -0
  28. package/dist/controls/commands/attest-host-proof.js +168 -0
  29. package/dist/controls/commands/attest-host-proof.js.map +1 -0
  30. package/dist/controls/commands/attest-options.d.ts +4 -0
  31. package/dist/controls/commands/attest-options.d.ts.map +1 -1
  32. package/dist/controls/commands/attest.d.ts.map +1 -1
  33. package/dist/controls/commands/attest.js +52 -0
  34. package/dist/controls/commands/attest.js.map +1 -1
  35. package/dist/controls/commands/declaration-check.d.ts.map +1 -1
  36. package/dist/controls/commands/declaration-check.js +19 -5
  37. package/dist/controls/commands/declaration-check.js.map +1 -1
  38. package/dist/controls/commands/register.d.ts.map +1 -1
  39. package/dist/controls/commands/register.js +4 -1
  40. package/dist/controls/commands/register.js.map +1 -1
  41. package/dist/controls/evidence-document.d.ts.map +1 -1
  42. package/dist/controls/evidence-document.js +12 -0
  43. package/dist/controls/evidence-document.js.map +1 -1
  44. package/dist/controls/evidence-gather.d.ts +1 -0
  45. package/dist/controls/evidence-gather.d.ts.map +1 -1
  46. package/dist/controls/evidence-gather.js +5 -2
  47. package/dist/controls/evidence-gather.js.map +1 -1
  48. package/dist/controls/evidence-types.d.ts +19 -1
  49. package/dist/controls/evidence-types.d.ts.map +1 -1
  50. package/dist/controls/evidence-types.js +11 -0
  51. package/dist/controls/evidence-types.js.map +1 -1
  52. package/dist/controls/evidence-write.d.ts.map +1 -1
  53. package/dist/controls/evidence-write.js +7 -1
  54. package/dist/controls/evidence-write.js.map +1 -1
  55. package/dist/controls/exercise-declaration.d.ts +58 -0
  56. package/dist/controls/exercise-declaration.d.ts.map +1 -0
  57. package/dist/controls/exercise-declaration.js +138 -0
  58. package/dist/controls/exercise-declaration.js.map +1 -0
  59. package/dist/controls/exercise-observations.d.ts +32 -0
  60. package/dist/controls/exercise-observations.d.ts.map +1 -0
  61. package/dist/controls/exercise-observations.js +141 -0
  62. package/dist/controls/exercise-observations.js.map +1 -0
  63. package/dist/controls/exercise-record-shape.d.ts +10 -0
  64. package/dist/controls/exercise-record-shape.d.ts.map +1 -0
  65. package/dist/controls/exercise-record-shape.js +29 -0
  66. package/dist/controls/exercise-record-shape.js.map +1 -0
  67. package/dist/controls/exercise-records.d.ts +28 -0
  68. package/dist/controls/exercise-records.d.ts.map +1 -0
  69. package/dist/controls/exercise-records.js +113 -0
  70. package/dist/controls/exercise-records.js.map +1 -0
  71. package/dist/controls/exercise-result.d.ts +23 -0
  72. package/dist/controls/exercise-result.d.ts.map +1 -0
  73. package/dist/controls/exercise-result.js +186 -0
  74. package/dist/controls/exercise-result.js.map +1 -0
  75. package/dist/controls/host-proof-input.d.ts +53 -0
  76. package/dist/controls/host-proof-input.d.ts.map +1 -0
  77. package/dist/controls/host-proof-input.js +129 -0
  78. package/dist/controls/host-proof-input.js.map +1 -0
  79. package/dist/controls/host-proof-receipt.d.ts +47 -0
  80. package/dist/controls/host-proof-receipt.d.ts.map +1 -0
  81. package/dist/controls/host-proof-receipt.js +132 -0
  82. package/dist/controls/host-proof-receipt.js.map +1 -0
  83. package/dist/controls/host-proof-register.d.ts +37 -0
  84. package/dist/controls/host-proof-register.d.ts.map +1 -0
  85. package/dist/controls/host-proof-register.js +153 -0
  86. package/dist/controls/host-proof-register.js.map +1 -0
  87. package/dist/controls/host-proof-signature.d.ts +30 -0
  88. package/dist/controls/host-proof-signature.d.ts.map +1 -0
  89. package/dist/controls/host-proof-signature.js +49 -0
  90. package/dist/controls/host-proof-signature.js.map +1 -0
  91. package/dist/controls/host-proof-trust.d.ts +33 -0
  92. package/dist/controls/host-proof-trust.d.ts.map +1 -0
  93. package/dist/controls/host-proof-trust.js +124 -0
  94. package/dist/controls/host-proof-trust.js.map +1 -0
  95. package/dist/controls/pull-request-executor.d.ts +18 -6
  96. package/dist/controls/pull-request-executor.d.ts.map +1 -1
  97. package/dist/controls/pull-request-executor.js +19 -24
  98. package/dist/controls/pull-request-executor.js.map +1 -1
  99. package/dist/controls/register-types.d.ts +3 -4
  100. package/dist/controls/register-types.d.ts.map +1 -1
  101. package/dist/controls/register-types.js +3 -4
  102. package/dist/controls/register-types.js.map +1 -1
  103. package/dist/controls/register.d.ts +4 -7
  104. package/dist/controls/register.d.ts.map +1 -1
  105. package/dist/controls/register.js +17 -6
  106. package/dist/controls/register.js.map +1 -1
  107. package/dist/controls/verdict-answers.d.ts.map +1 -1
  108. package/dist/controls/verdict-answers.js +6 -2
  109. package/dist/controls/verdict-answers.js.map +1 -1
  110. package/dist/controls/verdict-types.d.ts +1 -1
  111. package/dist/controls/verdict-types.d.ts.map +1 -1
  112. package/dist/controls/verdict-types.js +2 -0
  113. package/dist/controls/verdict-types.js.map +1 -1
  114. package/dist/controls/verdict-wording.d.ts +2 -0
  115. package/dist/controls/verdict-wording.d.ts.map +1 -1
  116. package/dist/controls/verdict-wording.js +7 -0
  117. package/dist/controls/verdict-wording.js.map +1 -1
  118. package/dist/controls/verdict.d.ts +2 -0
  119. package/dist/controls/verdict.d.ts.map +1 -1
  120. package/dist/controls/verdict.js +17 -2
  121. package/dist/controls/verdict.js.map +1 -1
  122. package/dist/core/lisa-owned-hash-ledger.json +56 -4
  123. package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -5
  124. package/dist/core/nightly-e2e-guard-behavior-certificate.js +7 -7
  125. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  126. package/dist/core/upstream-evidence-manifest.json +99 -27
  127. package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +4 -1
  128. package/expo/create-only/tsconfig.local.json +6 -1
  129. package/package.json +4 -4
  130. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  132. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +43 -18
  133. package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +1 -1
  134. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +3 -2
  135. package/plugins/lisa/.codex-plugin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  136. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  137. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  138. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +6 -1
  139. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -2
  140. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  141. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  142. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  143. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  144. package/plugins/lisa/hooks/block-direct-issue-create.sh +297 -177
  145. package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +18 -12
  146. package/plugins/lisa/rules/reference/config-resolution.md +2 -2
  147. package/plugins/lisa/scripts/ready-queue-order.mjs +43 -18
  148. package/plugins/lisa/skills/lisa-attest/SKILL.md +1 -1
  149. package/plugins/lisa/skills/lisa-configure/SKILL.md +3 -2
  150. package/plugins/lisa/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  151. package/plugins/lisa/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  152. package/plugins/lisa/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  153. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +6 -1
  154. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -2
  155. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  156. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  157. package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  158. package/plugins/lisa/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  159. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +297 -177
  160. package/plugins/lisa-agy/plugin.json +1 -1
  161. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +43 -18
  162. package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +1 -1
  163. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +3 -2
  164. package/plugins/lisa-agy/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  165. package/plugins/lisa-agy/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  166. package/plugins/lisa-agy/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  167. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +6 -1
  168. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -2
  169. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  170. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  171. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  172. package/plugins/lisa-agy/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  173. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  174. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  175. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  176. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  178. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  180. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  181. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +297 -177
  182. package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +18 -12
  183. package/plugins/lisa-copilot/rules/reference/config-resolution.md +2 -2
  184. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +43 -18
  185. package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +1 -1
  186. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +3 -2
  187. package/plugins/lisa-copilot/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  188. package/plugins/lisa-copilot/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  189. package/plugins/lisa-copilot/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  190. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +6 -1
  191. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -2
  192. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  193. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  194. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  195. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  196. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  197. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +297 -177
  198. package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +18 -12
  199. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +2 -2
  200. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +43 -18
  201. package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +1 -1
  202. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +3 -2
  203. package/plugins/lisa-cursor/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  204. package/plugins/lisa-cursor/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  205. package/plugins/lisa-cursor/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  206. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +6 -1
  207. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -2
  208. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  209. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  210. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  211. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  212. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  213. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  214. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +297 -177
  215. package/plugins/lisa-devin/hooks/threshold-ratchet-compare.mjs +18 -12
  216. package/plugins/lisa-devin/rules/reference/config-resolution.md +2 -2
  217. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +43 -18
  218. package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +1 -1
  219. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +3 -2
  220. package/plugins/lisa-devin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  221. package/plugins/lisa-devin/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  222. package/plugins/lisa-devin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  223. package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +6 -1
  224. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -2
  225. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  226. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  227. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  228. package/plugins/lisa-devin/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  229. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  230. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  231. package/plugins/lisa-expo-agy/plugin.json +1 -1
  232. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  233. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  234. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  235. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  236. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  237. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  238. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  239. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  240. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  241. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  242. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  243. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  244. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  245. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  246. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  247. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  248. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  250. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  251. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  252. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  253. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  254. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  255. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  257. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  258. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  259. package/plugins/lisa-rails-agy/plugin.json +1 -1
  260. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  261. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  262. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  264. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  265. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  266. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  267. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  268. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  269. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  270. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  271. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  272. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  273. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  274. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  275. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  276. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  277. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  278. package/plugins/src/base/hooks/block-direct-issue-create.sh +297 -177
  279. package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +18 -12
  280. package/plugins/src/base/rules/reference/config-resolution.md +2 -2
  281. package/plugins/src/base/scripts/ready-queue-order.mjs +43 -18
  282. package/plugins/src/base/skills/lisa-attest/SKILL.md +1 -1
  283. package/plugins/src/base/skills/lisa-configure/SKILL.md +3 -2
  284. package/plugins/src/base/skills/lisa-configure/references/exercised-artifacts.md +55 -0
  285. package/plugins/src/base/skills/lisa-enforce/references/missing-capability-tickets.md +44 -5
  286. package/plugins/src/base/skills/lisa-enforce/references/pull-request-executor.md +34 -10
  287. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +6 -1
  288. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -2
  289. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +32 -8
  290. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +44 -1
  291. package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-github.mjs +14 -3
  292. package/plugins/src/base/skills/lisa-tracker-evidence/references/completion-authorization.md +4 -0
  293. package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
  294. package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
  295. package/schemas/control-evidence.schema.json +39 -1
  296. package/schemas/control-verdict.schema.json +1 -0
  297. package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +28 -2
  298. package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +18 -12
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -464,6 +464,43 @@ function isTrustedAuthor(item, context) {
464
464
  return context.trusted.some(entry => entryMatches(entry, fields));
465
465
  }
466
466
 
467
+ /**
468
+ * @typedef {object} OrderingOptions
469
+ * @property {string | null} [me] - Current tracker identity
470
+ * @property {readonly unknown[]} [operators] - Configured operator identities
471
+ * @property {readonly unknown[]} [trustedAuthorIds] - Configured issue authors
472
+ * @property {readonly string[]} [trustedHumanActorIds] - Configured hold releasers
473
+ * @property {(ref: string) => unknown} [commentsFor] - Current provider comments
474
+ * @property {string} [humanNeededLabel] - Human-needed label
475
+ * @property {unknown} [humanOnly] - Human-only reasons
476
+ * @property {unknown} [humanGateMode] - Human-gate mode
477
+ */
478
+
479
+ /**
480
+ * Read comments only when a hold is still active and the policy can honor a release.
481
+ * @param {Record<string, any>} item - Normalized issue
482
+ * @param {ReturnType<typeof orderingContext>} context - Queue policy
483
+ * @returns {boolean} Whether a hold still bars dispatch
484
+ */
485
+ function hasUnreleasedHold(item, context) {
486
+ const hold = {
487
+ labels: item.labels,
488
+ body: item.body,
489
+ comments: item.comments,
490
+ trustedHumanActorIds:
491
+ context.trustedHumanActorIds ?? item.trustedHumanActorIds,
492
+ humanNeededLabel: context.humanNeededLabel,
493
+ humanOnly: context.humanOnly,
494
+ humanGateMode: context.humanGateMode,
495
+ };
496
+ return (
497
+ isHumanGated(hold) &&
498
+ (!context.commentsFor ||
499
+ !hold.trustedHumanActorIds?.length ||
500
+ isHumanGated({ ...hold, comments: context.commentsFor(item.ref) }))
501
+ );
502
+ }
503
+
467
504
  /**
468
505
  * Why an item may not be dispatched, or null when it may.
469
506
  *
@@ -483,21 +520,7 @@ function exclusionReason(item, context) {
483
520
  return "assigned-to-other";
484
521
  }
485
522
  if (item.isContainer === true) return "container";
486
- if (
487
- isHumanGated({
488
- labels: item.labels,
489
- body: item.body,
490
- comments: item.comments,
491
- trustedHumanActorIds: item.trustedHumanActorIds,
492
- humanNeededLabel: context.humanNeededLabel,
493
- // The project's policy decides whether a lifted hold is valid again
494
- // (CodySwannGT/lisa#4687): omitted, strict holds read as access-only.
495
- humanOnly: context.humanOnly,
496
- humanGateMode: context.humanGateMode,
497
- })
498
- ) {
499
- return "human-gated";
500
- }
523
+ if (hasUnreleasedHold(item, context)) return "human-gated";
501
524
  if (context.trusted.length > 0 && !isTrustedAuthor(item, context)) {
502
525
  return "untrusted-author";
503
526
  }
@@ -536,7 +559,7 @@ function compareWithinGroup(left, right) {
536
559
  * `blockers-unreadable` (CodySwannGT/lisa#5065); every other item is still
537
560
  * offered.
538
561
  * @param {readonly Record<string, any>[]} items - Normalized items
539
- * @param {{ me?: string | null, operators?: readonly unknown[], trustedAuthorIds?: readonly unknown[], humanNeededLabel?: string, humanOnly?: unknown, humanGateMode?: unknown }} [options]
562
+ * @param {OrderingOptions} [options]
540
563
  * @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
541
564
  */
542
565
  export function orderReadyQueue(items, options = {}) {
@@ -572,7 +595,7 @@ function unreadableBlockers(item) {
572
595
  * again, so it waits until someone edits it. Grouping and ordering match
573
596
  * {@link orderReadyQueue}.
574
597
  * @param {readonly Record<string, any>[]} items - Normalized items
575
- * @param {{ me?: string | null, operators?: readonly unknown[], trustedAuthorIds?: readonly unknown[], humanNeededLabel?: string, humanOnly?: unknown, humanGateMode?: unknown, validationFailures?: Readonly<Record<string, { updatedAt?: string }>> }} [options]
598
+ * @param {OrderingOptions & { validationFailures?: Readonly<Record<string, { updatedAt?: string }>> }} [options]
576
599
  * @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
577
600
  */
578
601
  export function orderBacklogQueue(items, options = {}) {
@@ -614,13 +637,15 @@ function configuredEntries(entries) {
614
637
 
615
638
  /**
616
639
  * The identities and policy every ordering judges against.
617
- * @param {{ me?: string | null, operators?: readonly unknown[], trustedAuthorIds?: readonly unknown[], humanNeededLabel?: string, humanOnly?: unknown, humanGateMode?: unknown }} options
640
+ * @param {OrderingOptions} options
618
641
  */
619
642
  function orderingContext(options) {
620
643
  return {
621
644
  me: idOrNull(options.me),
622
645
  operators: configuredEntries(options.operators),
623
646
  trusted: configuredEntries(options.trustedAuthorIds),
647
+ trustedHumanActorIds: options.trustedHumanActorIds,
648
+ commentsFor: options.commentsFor,
624
649
  humanNeededLabel: options.humanNeededLabel ?? DEFAULT_HUMAN_NEEDED_LABEL,
625
650
  humanOnly: options.humanOnly,
626
651
  humanGateMode: options.humanGateMode,
@@ -351,7 +351,7 @@ verdict.
351
351
 
352
352
  | `rung` | Say it as |
353
353
  | --- | --- |
354
- | `exercised` | Proved: a bad change was really tried, and the check stopped it. |
354
+ | `exercised` | Proved by a real exercise. A check rejected a controlled violation, or a verified artifact exercise recorded its result. |
355
355
  | `observed` | Observed: a document was found where it should be, or a platform setting was read. Nothing was tried. |
356
356
  | `asserted` | A person's answer: someone answered the audit's question. Nothing was checked by code. |
357
357
 
@@ -189,7 +189,7 @@ Sort the findings:
189
189
  | `question` | **Still open.** Declare nothing for that requirement in that part. List it for the closing message. |
190
190
  | `missing` | Nothing to declare. The enforce step files a ticket for it. |
191
191
  | `unknown` or `not-applicable` | Nothing to declare. |
192
- | any state, for a requirement whose `kind` is `artifact` or `human-attested` | Nothing to declare here: it is a record or a person's word, not a check that can refuse a change. |
192
+ | any state, for a requirement whose `kind` is `artifact` or `human-attested` | Record the artifact or the person's evidence through audit. For AC5.5, AC6.4, AC7.2, and AC8.9, configure the required exercises before attest. See [Exercised artifacts](references/exercised-artifacts.md). |
193
193
 
194
194
  **What a person answered.** The report's `answers` list holds what people have answered. Each
195
195
  entry has the `id` of the question, the `question` as it was asked, and the `answer`. A question
@@ -325,7 +325,8 @@ lisa controls declaration-check
325
325
  ```
326
326
 
327
327
  - **Exit 0.** Lisa reproduced the shipped folder checks from the local task manifests and
328
- confirmed audit support for any parts declared from findings.
328
+ confirmed audit support for any parts declared from findings. It also checked the fields in the
329
+ exercise plan when the repository has one.
329
330
  - **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
330
331
  names a place the audit did not report, rests on a question nobody answered or on an answer
331
332
  about something else, or serves a requirement the audit still asks about is refused. Correct the
@@ -0,0 +1,55 @@
1
+ # Exercised artifacts
2
+
3
+ Record the required exercises in `.lisa/controls/exercises.json`. Use one environment per plan.
4
+ A scope is `.` for the whole repository or a folder from its root. Give every target its own id.
5
+ Include each authoritative gate and scope for AC5.5, and each applicable connection and execution
6
+ surface for AC6.4. For rollback and staff qualification, include every release path and role
7
+ that the audit identifies as applicable.
8
+
9
+ ```json
10
+ {
11
+ "schema_version": 1,
12
+ "environment": "production-representative",
13
+ "targets": [
14
+ { "id": "lint", "criterion": "AC5.5", "scope": ".", "producer": "gate-owner", "adjudicator": "independent-reviewer", "gate": "code-style", "moment": "pull-request" },
15
+ { "id": "registry-worker", "criterion": "AC6.4", "scope": "api", "producer": "connection-owner", "adjudicator": "independent-reviewer", "connection": "registry", "surface": "worker" },
16
+ { "id": "rollback", "criterion": "AC7.2", "scope": ".", "producer": "release-owner", "adjudicator": "independent-reviewer", "release_track": "production-representative" },
17
+ { "id": "release-qualification", "criterion": "AC8.9", "scope": ".", "producer": "staff-owner", "adjudicator": "independent-reviewer", "role": "release-operator", "minimum_shadow_seconds": 86400 }
18
+ ]
19
+ }
20
+ ```
21
+
22
+ Check the plan with `lisa controls declaration-check`, then commit it before collecting evidence.
23
+ Run `lisa controls attest` to get the current
24
+ `checks.digest` in `.lisa/controls/evidence.json`. Give the producer the current digest and scope
25
+ so the independent reviewer can link each result to that plan and those checks.
26
+
27
+ The externally administered `LISA_HOST_PROOF_TRUST_FILE` authorizes the reviewer for the exact
28
+ repository origin and environment. Keep it outside the checkout. Its JSON contains
29
+ `schema_version: 1`, `repository`, `environment`, and distinct `adjudicator` and `attestor`
30
+ objects with `id` and an Ed25519 `public_key` in PEM form. Each exercise's producer and reviewer
31
+ must also be distinct. The producer runs the exercise. The reviewer independently checks the
32
+ result, its scope and the source artifact before signing it.
33
+
34
+ Each signed body contains `schema_version: 1`, `repository`, `environment`, `checks_digest`,
35
+ `target_id`, `criterion`, `scope`, `producer`, `adjudicator`, `artifact`, `completed_at`, and
36
+ `outcome`. Set `artifact` to an object containing `sha256`, or an immutable `locator` in the
37
+ form `git:<full-object-id>:<path>`. Set `completed_at` and the other time fields to UTC with
38
+ milliseconds. These are the required outcome fields.
39
+
40
+ | Criterion | Outcome fields |
41
+ | --- | --- |
42
+ | AC5.5 Gate exercise | `gate`, `moment`, `violation_exit`, `violation_output`, and `clean_exit` when a clean companion is required. Use the authoritative moment. Capture the nonzero refusal and its declared failure text. |
43
+ | AC6.4 Credential paths | `connection`, `surface`, `principal`, and `identity_verified: true` after an identity check on that surface. Record the public principal name. Keep credential values out of the result and its source artifact. |
44
+ | AC7.2 Rollback | `release_track`, `incident`, `actor`, `finding`, `previous_generation`, `rolled_back_from`, `restored_generation`, `detected_at`, `rolled_back_at`, `verified_at`, and `recovery_verified: true`. Confirm the previous generation was restored and is serving. |
45
+ | AC8.9 Staff qualification | `role`, `actor`, `roster_sha256`, `shadow_started_at`, `shadow_completed_at`, `comparisons`, `shadow_agreed: true`, `adversarial_passed: true`, and `qualification: "qualified"`. Observe the planned shadow period and record both checks. |
46
+
47
+ Sign the compact canonical JSON of `{"purpose":"artifact-exercise","body":…}` using the authorized
48
+ reviewer's Ed25519 key. Canonical JSON sorts object keys by code unit at every depth and keeps array
49
+ order. Add the unpadded Base64url `signature` to the envelope. Put one envelope per target in an
50
+ array at `.lisa/controls/exercise-results.json`.
51
+
52
+ Run `lisa controls attest`, then `lisa controls attest --check`. Attest records exercised evidence
53
+ for a criterion after each applicable target has a current, verified result. The check authenticates
54
+ the signed results again and compares them with the saved evidence. When a target is missing or
55
+ unusable, the command names the evidence that remains due.
@@ -19,8 +19,7 @@ file in.
19
19
 
20
20
  Two things follow, and both are rules:
21
21
 
22
- - **Never work out a key or a marker yourself.** Copy them from the command's output. A key worked
23
- out by an agent can differ between two runs, and then the second run files a duplicate.
22
+ - **Copy each gap's key and marker exactly as printed.** A key worked out by an agent can differ between two runs, and then the second run files a duplicate.
24
23
  - **Never create a ticket any other way.** No direct tracker command, no vendor-specific writer.
25
24
  Every ticket goes through `lisa-tracker-write`.
26
25
 
@@ -124,7 +123,8 @@ the tickets with their descriptions and look through them for the key before dec
124
123
  **A ticket is this gap's ticket only when its description contains both `lisa-control-gap` and
125
124
  `key=<key>`.** Match on those two pieces of text and nothing else: never on the title, and never on
126
125
  `criterion=` or `scope=` alone. A tracker may show the brackets escaped, or change the spacing; the
127
- tag and the key come back unchanged.
126
+ tag and the key come back unchanged. Skip a parent marker when matching a gap, even if the
127
+ parent's description happens to mention the gap's key.
128
128
 
129
129
  If the search cannot be run (the tracker cannot be reached, or the credentials were refused), do
130
130
  not create anything for that entry. Its result is `blocked`, with a reason that says the tracker
@@ -151,10 +151,49 @@ first.
151
151
  **An existing ticket is never changed by this flow.** In particular, `build_ready=true` does not
152
152
  move a ticket that an earlier run filed on hold. It applies only to tickets this run creates.
153
153
 
154
+ ## Choose the parent
155
+
156
+ Do this once, just before the first new gap ticket. If all gaps already have tickets, there is
157
+ nothing to create. Use the canonical repository slug associated with the audit for
158
+ `<owner>/<repo>`, even when a JIRA project or Linear team tracks several repositories.
159
+
160
+ ~~~text
161
+ [lisa-control-gap-parent] repository=<owner>/<repo>
162
+ ~~~
163
+
164
+ 1. For Linear, use `lisa-linear-access operation: list-projects team:<team>` and read each open
165
+ Project with `get-project id:<ID>` to get its description and creation time. Use `list-issues`
166
+ only to match individual gap tickets in step 4.
167
+ - On GitHub, list repository issues labeled `type:Epic` through the REST endpoint
168
+ `repos/<owner>/<repo>/issues?state=open&labels=type%3AEpic&per_page=100`. Read through the
169
+ final page using `gh api --paginate --slurp` or the same endpoint's `Link` headers. Exclude
170
+ pull requests and read `body` and `created_at` from every issue.
171
+ - On Jira, use `lisa-atlassian-access operation: search-issues` with
172
+ `project = <project> AND issuetype = Epic AND statusCategory != Done`. Use an adapter that
173
+ exposes pagination and request `description` and `created`. Follow each `nextPageToken`
174
+ through the final page and read the marker from the description text.
175
+
176
+ For every tracker, finish reading the full list before selecting the parent. Check that each
177
+ candidate includes its description field and creation time. An explicit empty description has
178
+ no marker. If a read fails, a required field is absent, or a page repeats without advancing,
179
+ report the new gap tickets as blocked and file nothing. Match the full marker with the
180
+ repository slug. Use the oldest open match if there are several, and mention the others in the
181
+ summary.
182
+ 2. When there is no match, call `lisa-tracker-write` once to create an Epic (a Project in Linear)
183
+ titled **Missing capabilities found by the audit**. Say that it groups work found by the audit
184
+ for this repository. Include the parent marker as its own visible line. Give the writer the
185
+ container declaration `None — container: state rolls up from children` for the Target Backend
186
+ Environment section and leave the parent out of the build-ready queue. Read back the parent
187
+ through `lisa-tracker-read` and confirm the marker is present before filing children. If the
188
+ writer cannot create or verify it, report the new gap tickets as blocked and file no children.
189
+ 3. For each new gap ticket in step 5, pass the same reference as `parent_ref`. Later runs reuse the
190
+ open parent. Count only the gap tickets in step 7. Keep the gap marker and gap keys out of the
191
+ parent description so searches for a gap cannot mistake the parent for the ticket.
192
+
154
193
  ## Step 5: create the ticket
155
194
 
156
- Call `lisa-tracker-write` once for each entry that needs a ticket, with the content below. The
157
- writer lays the description out in its own sections and checks it. If it asks for more, give it
195
+ Call `lisa-tracker-write` once for each entry that needs a ticket, with the chosen `parent_ref` and the
196
+ content below. The writer lays the description out in its own sections and checks it. If it asks for more, give it
158
197
  what it asks for and call it again. Never file by another path because the writer refused.
159
198
 
160
199
  **Issue type:** `Task`.
@@ -262,7 +262,7 @@ lisa controls register
262
262
  The command names the rules that read unproved, for example:
263
263
 
264
264
  ```text
265
- register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write, and .lisa/controls/evidence.json holds no record that both halves of their proof held yet. They stay unproved until the attest step records that both held.
265
+ register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write. Authenticating both halves of their proof in .lisa/controls/evidence.json requires a trusted, current receipt. They stay unproved until the attest step records that both held.
266
266
  ```
267
267
 
268
268
  Each of those entries now carries `"status": "unproved"` in `.lisa/controls/register.json`. That is
@@ -271,16 +271,40 @@ together in one change.
271
271
 
272
272
  ## How a rule stops being unproved
273
273
 
274
- Only one thing clears the mark: `.lisa/controls/evidence.json` holding a record of **both** halves
275
- of that entry's proof, the change that breaks the rule (`violation`) and the change that does not
276
- (`clean`), each saying the half held. A half that was run and did not hold leaves the mark in
277
- place. The attest step writes those records. When it has, `lisa controls register` writes the
278
- register again without the mark.
274
+ A trusted, current attest receipt clears the mark. It binds **both** held halves in
275
+ `.lisa/controls/evidence.json`, the deliberate violation (`violation`) and the accepted change
276
+ (`clean`), to the current check definitions. `lisa controls register --check` says when the status
277
+ is what differs. The same verification applies to host-authored workflows on GitHub.
278
+
279
+ The protected attest process needs `LISA_HOST_PROOF_TRUST_FILE` set to an absolute JSON file
280
+ outside the checkout. Set `schema_version` to `1`, `repository` to the checkout's exact
281
+ `remote.origin.url`, and `environment` to the environment the checks ran against. Give
282
+ `adjudicator` and `attestor` separate objects, each with `id` and an Ed25519 PEM `public_key`.
283
+ Keep the corresponding private keys under their distinct authorized roles.
284
+
285
+ The independent reviewer verifies both platform runs and their artifact hashes. Their signed
286
+ `host-proof-import` body has `schema_version: 1`, the common `subject`, distinct `producer` and
287
+ `adjudicator` ids, and the `clean` and `violation` runs. The `subject` names `repository`,
288
+ `environment`, `work_item`, `entry_id`, `platform`, `executor_path`, and `checks_digest`. Read
289
+ `checks.digest` from a fresh attest evidence document for the current check definitions.
290
+
291
+ Each run records `run_id`, `run_url`, `commit`, `artifact_sha256`, `started_at`, `completed_at`,
292
+ `exit_status`, and `output_excerpt`. Use immutable run ids, HTTPS run URLs without credentials or
293
+ query parameters, and UTC timestamps. The clean run must exit zero. The violating run must exit
294
+ nonzero and include the declared failure text. Sign the canonical JSON object containing `purpose`
295
+ and `body` with the adjudicator's Ed25519 key. Attach the unpadded Base64url `signature` to that
296
+ object. The protected attestor verifies this signature before issuing its own signed receipt.
279
297
 
280
- The register is generated from the declaration and the evidence file together. So after either one
281
- changes, `lisa controls register --check` fails until the register is written again, and it says
282
- when the status is what differs. The mark applies to host-written workflows on GitHub as well.
283
- Use the verdict to see what was proved.
298
+ ```bash
299
+ lisa controls attest --import-host-proof reviewed-pair.json --host-proof-signing-key /protected/attestor.pem
300
+ lisa controls register --check
301
+ lisa controls attest --check
302
+ ```
303
+
304
+ The import uses the protected key to write `.lisa/controls/host-proof-receipts.json` with the
305
+ exact records it wrote. Both check commands read the same trust file. Changed check definitions,
306
+ expired records, or an unverifiable receipt leave the hosted entry unproved. The check commands
307
+ report why they could not use the receipt.
284
308
 
285
309
  ## Step 4: return the result
286
310
 
@@ -203,7 +203,12 @@ If the item is **not an Epic** and **not a top-level Bug/Spike**, it MUST have a
203
203
  - **Story / Task / Improvement** → must have a `projectId` (the Epic Project) set.
204
204
  - **Sub-task** → must have a `parentId` (the Story Issue) set.
205
205
 
206
- If the parent is explicitly provided, use it. Otherwise:
206
+ For a Story, Task, Bug, Spike or Improvement, a caller's `parent_ref` names the
207
+ explicit Linear Project. Resolve it through `get-project` and pass the returned
208
+ ID as `projectId` to `save-issue`. If that Project cannot be resolved, stop
209
+ before saving. For a Sub-task, `parent_ref` names the parent Issue instead.
210
+
211
+ When there is no explicit parent, discover it:
207
212
 
208
213
  1. Search active Projects in the team:
209
214
  ```text
@@ -148,9 +148,12 @@ the manager.
148
148
  who filed the item, not what it says: an alarm or error ticket can quote text an outsider
149
149
  controls (an error message, a request path), and that text reaches the worker too.
150
150
  - **Who may release a hold is a separate list.** `sessionManager.trustedReleaseIds` names who may
151
- release a human hold in `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
151
+ release a human hold in `queue`, `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
152
152
  it falls back to `trustedAuthorIds`. It takes the same `id:` / `login:` / plain entries, never
153
- `integration:`, because an integration is not a person. With neither set, no hold is released.
153
+ `integration:`, because an integration is not a person. The GitHub `queue` resolves each `login:`
154
+ entry to an account ID before comparing comments. Use `id:` for the same identity across the
155
+ release commands and to keep trusting the account after a GitHub rename. With neither list set,
156
+ no hold is released.
154
157
  Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
155
158
  releaser; add `integration:<service>` instead.
156
159
 
@@ -784,6 +787,10 @@ Skip while `capacity` reports `paused`. Otherwise:
784
787
  `externalUserCreator { id }` and children with their state type. Ask for both author fields:
785
788
  without `externalUserCreator` an integration-filed item is never trusted by an
786
789
  `integration:` entry, because an outside user may have filed it.
790
+ Fetch every page of comments for held items in both tiers. Include Linear comment `body`,
791
+ `user { id }`, and provider bot metadata in `comments.nodes`. For Jira include each comment's
792
+ body and `author` with its `accountId` and `accountType` in `fields.comment.comments`. The
793
+ queue checks release markers against the configured hold releasers and excludes bot comments.
787
794
  - `ordered` is the dispatch order: assigned to an operator, then to "me", then unassigned; each
788
795
  group by priority, then age. `excluded` needs no action. `setupGaps` lists each repo the
789
796
  manager will not dispatch to until the operator fixes it (`kind`, `detail`, and `clear`, the
@@ -30,6 +30,7 @@
30
30
  * @module session-manager/cli-queue
31
31
  */
32
32
  import {
33
+ adfText,
33
34
  assertPagedToCompletion,
34
35
  normalizeJiraIssue,
35
36
  normalizeLinearIssue,
@@ -44,14 +45,22 @@ import {
44
45
  validOrAbsent,
45
46
  } from "./cli-runtime.mjs";
46
47
  import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
48
+ import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
49
+ import { commentsOf } from "../../../scripts/stale-blocker-comment.mjs";
47
50
  import {
48
51
  landedDoneRoles,
49
52
  terminalDoneRoles,
50
53
  } from "../../../scripts/stale-blocker-edges.mjs";
54
+ import { trustedReleaseEntries } from "./config.mjs";
51
55
  import { readJsonFile } from "./json-input.mjs";
52
56
  import { readLedger } from "./ledger.mjs";
53
57
  import { blockingGapRepo, listSetupGaps } from "./ledger-setup-gaps.mjs";
54
- import { fetchGithubBacklog, fetchGithubQueue } from "./queue-github.mjs";
58
+ import {
59
+ fetchGithubBacklog,
60
+ fetchGithubQueue,
61
+ githubReleaserIds,
62
+ } from "./queue-github.mjs";
63
+ import { readIssueComments } from "./stale-links-github.mjs";
55
64
  import { readInFlight, readRestores } from "./stale-links-state.mjs";
56
65
 
57
66
  export { parseJson, readJsonFile } from "./json-input.mjs";
@@ -65,17 +74,20 @@ const NORMALIZERS = { jira: normalizeJiraIssue, linear: normalizeLinearIssue };
65
74
  * @param {"jira"|"linear"} tracker - Vendor
66
75
  * @param {readonly string[]} doneRoles - Configured terminal done names, so
67
76
  * a blocker there counts as finished (#5065)
68
- * @returns {{ items: object[], pages: unknown }} Normalized items
77
+ * @returns {{ items: object[], pages: unknown, rawByRef: Map<string, object> }} Normalized items
69
78
  */
70
79
  function normalizeEnvelope(envelope, where, tracker, judging) {
71
80
  asSetupError(() => assertPagedToCompletion(envelope));
72
81
  if (!Array.isArray(envelope.items)) {
73
82
  throw new CliError(`${where}: items must be an array.`, 2);
74
83
  }
75
- return {
76
- items: envelope.items.map(item => NORMALIZERS[tracker](item, judging)),
77
- pages: envelope.pages ?? null,
78
- };
84
+ const rawByRef = new Map();
85
+ const items = envelope.items.map(raw => {
86
+ const item = NORMALIZERS[tracker](raw, judging);
87
+ rawByRef.set(item.ref, raw);
88
+ return item;
89
+ });
90
+ return { items, pages: envelope.pages ?? null, rawByRef };
79
91
  }
80
92
 
81
93
  /**
@@ -86,7 +98,7 @@ function normalizeEnvelope(envelope, where, tracker, judging) {
86
98
  * @param {"jira"|"linear"} tracker - Vendor
87
99
  * @param {boolean} withBacklog - Whether the backlog tier is required
88
100
  * @param {ReturnType<typeof loadProject>} project - Loaded project
89
- * @returns {{ items: object[], pages: unknown, backlog: { items: object[], pages: unknown } | null }} Normalized items
101
+ * @returns {ReturnType<typeof normalizeEnvelope> & { backlog: ReturnType<typeof normalizeEnvelope> | null }} Normalized items
90
102
  */
91
103
  function readEnvelopeQueue(ctx, tracker, withBacklog, project) {
92
104
  const file = ctx.values.input;
@@ -239,7 +251,7 @@ export async function queue(ctx) {
239
251
  const project = loadProject(ctx.root);
240
252
  const config = validOrAbsent(project);
241
253
  const backlogPickup = config?.backlogPickup === true;
242
- const { items, pages, backlog } =
254
+ const { items, pages, backlog, rawByRef } =
243
255
  tracker === "github"
244
256
  ? {
245
257
  ...fetchGithubQueue(ctx, project),
@@ -252,10 +264,22 @@ export async function queue(ctx) {
252
264
  // Resolved local-then-global like `human-gate-act.mjs policy`, so a hold
253
265
  // the project's mode keeps is never dispatched as Ready work (#4687).
254
266
  const gatePolicy = resolveHumanGatePolicy(project.local, project.global);
267
+ const releasers = trustedReleaseEntries(config);
255
268
  const policy = {
256
269
  me,
257
270
  operators,
258
271
  trustedAuthorIds: config?.trustedAuthorIds ?? undefined,
272
+ trustedHumanActorIds:
273
+ tracker === "github"
274
+ ? githubReleaserIds(ctx, releasers)
275
+ : idComparableValues(releasers),
276
+ commentsFor:
277
+ tracker === "github"
278
+ ? ref => readIssueComments(ctx, ref)
279
+ : ref =>
280
+ commentsOf(rawByRef?.get(ref) ?? backlog?.rawByRef?.get(ref)).map(
281
+ comment => ({ ...comment, body: adfText(comment.body) })
282
+ ),
259
283
  humanNeededLabel: humanNeededLabel(project, tracker),
260
284
  humanOnly: gatePolicy.humanOnly,
261
285
  humanGateMode: gatePolicy.mode,
@@ -10,12 +10,16 @@ import {
10
10
  labelNames,
11
11
  normalizeGithubIssue,
12
12
  } from "../../../scripts/ready-queue-order.mjs";
13
+ import {
14
+ idComparableValues,
15
+ parseIdEntries,
16
+ } from "../../../scripts/operator-id-kinds.mjs";
13
17
  import { resolveRole } from "../../../scripts/resolve-lifecycle-role.mjs";
14
18
  import {
15
19
  landedDoneRoles,
16
20
  terminalDoneRoles,
17
21
  } from "../../../scripts/stale-blocker-edges.mjs";
18
- import { CliError, mustRun } from "./cli-runtime.mjs";
22
+ import { CliError, mustRun, run } from "./cli-runtime.mjs";
19
23
  import { parseJson } from "./json-input.mjs";
20
24
  import {
21
25
  blockerReader,
@@ -26,6 +30,45 @@ import { scrubWorkerEnv } from "./workers.mjs";
26
30
 
27
31
  const OWNER_REPO = /^[\w.-]+\/[\w.-]+$/;
28
32
 
33
+ /**
34
+ * Resolve configured GitHub logins to provider account IDs for hold releases.
35
+ * A failed or mismatched lookup authorizes nobody for that entry.
36
+ * @param {object} ctx - CLI context
37
+ * @param {unknown} entries - Configured release identities
38
+ * @returns {string[]} Account IDs to compare with native comment authorship
39
+ */
40
+ export function githubReleaserIds(ctx, entries) {
41
+ const logins = new Set(
42
+ parseIdEntries(entries)
43
+ .filter(
44
+ entry => entry.kind === "login" && /^[A-Za-z0-9_-]+$/u.test(entry.value)
45
+ )
46
+ .map(entry => entry.value.toLowerCase())
47
+ );
48
+ const ids = idComparableValues(entries);
49
+ const env = scrubWorkerEnv(ctx.env);
50
+ for (const login of logins) {
51
+ const endpoint = `users/${login}`;
52
+ const result = run("gh", ["api", endpoint], { env });
53
+ if (result.status !== 0) continue;
54
+ try {
55
+ const account = parseJson(result.stdout, endpoint);
56
+ if (
57
+ account?.type === "User" &&
58
+ typeof account.login === "string" &&
59
+ account.login.toLowerCase() === login &&
60
+ Number.isSafeInteger(account.id) &&
61
+ account.id > 0
62
+ ) {
63
+ ids.push(String(account.id));
64
+ }
65
+ } catch {
66
+ // An unreadable account does not authorize a release.
67
+ }
68
+ }
69
+ return ids;
70
+ }
71
+
29
72
  /**
30
73
  * The GitHub repo to read: `--github-repo`, else github.org/github.repo.
31
74
  * @param {object} ctx - CLI context
@@ -107,6 +107,19 @@ export function withBlockers(ctx, repo, row, blocker) {
107
107
  return { ...row, nativeBlockers, bodyBlockers };
108
108
  }
109
109
 
110
+ /**
111
+ * Read all native issue comments with GitHub's author metadata.
112
+ * @param {object} ctx - CLI context
113
+ * @param {string} ref - GitHub issue reference
114
+ * @returns {object[] | null} Comments, or null when the read fails
115
+ */
116
+ export function readIssueComments(ctx, ref) {
117
+ const [repo, number] = ref.split("#");
118
+ return readOrUnreadable(() =>
119
+ listAll(ctx, `repos/${repo}/issues/${number}/comments?per_page=100`)
120
+ );
121
+ }
122
+
110
123
  /**
111
124
  * One issue with its blockers and comments, as the plan reads it.
112
125
  * @param {object} ctx - CLI context
@@ -119,9 +132,7 @@ function staleLinkItem(ctx, repo, row, blocker) {
119
132
  const enriched = readOrUnreadable(() =>
120
133
  withBlockers(ctx, repo, row, blocker)
121
134
  );
122
- const comments = readOrUnreadable(() =>
123
- listAll(ctx, `repos/${repo}/issues/${row.number}/comments?per_page=100`)
124
- );
135
+ const comments = readIssueComments(ctx, `${repo}#${row.number}`);
125
136
  // probe-direction: fail-closed — a candidate whose dependency list or
126
137
  // comments could not be read gets `nativeBlockers: null`, which the plan
127
138
  // reads as "blocker list not read": it is reported and nothing of it is
@@ -170,6 +170,10 @@ things somewhere in the file:
170
170
  `test_name`, `fullName`, or ` > ` (space, greater-than, space, as in
171
171
  `file > suite > test`).
172
172
 
173
+ RSpec console logs can also provide a full summary line such as `38 examples, 0 failures, 9 pending`.
174
+ The example count must be positive. Capture RSpec with a console formatter such as
175
+ `--format documentation`.
176
+
173
177
  A log snippet needs a timestamp whose date is written `YYYY-MM-DD`, followed by
174
178
  `T` or a space and the time, for example `2026-11-13T08:00:01` or
175
179
  `2026-11-13 08:00:01`. Syslog-style dates (`Nov 13 08:00:01`) and epoch numbers
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
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-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
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-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
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-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
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-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
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-cdk",
3
- "version": "8.6.1",
3
+ "version": "8.7.1",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"