@codyswann/lisa 4.22.3 → 4.22.5

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 (68) hide show
  1. package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +2 -2
  2. package/all/copy-overwrite/scripts/lisa-gates.mjs +23 -2
  3. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  4. package/dist/core/lisa-owned-hash-ledger.js +4 -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/upstream-evidence-manifest.js +4 -4
  8. package/dist/health/ruleset-inspection.d.ts.map +1 -1
  9. package/dist/health/ruleset-inspection.js +77 -8
  10. package/dist/health/ruleset-inspection.js.map +1 -1
  11. package/package.json +2 -2
  12. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  15. package/plugins/lisa/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  18. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  21. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  25. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  27. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-expo-agy/plugin.json +1 -1
  30. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  40. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  45. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  50. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-rails-agy/plugin.json +1 -1
  55. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  60. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  65. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/src/base/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +8 -1
  68. package/scripts/lisa-github-rulesets.sh +68 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
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": "4.22.3",
3
+ "version": "4.22.5",
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": "4.22.3",
3
+ "version": "4.22.5",
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": "4.22.3",
3
+ "version": "4.22.5",
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": "4.22.3",
3
+ "version": "4.22.5",
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.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -374,8 +374,15 @@ export function acquirePublicationLock(cfg, target, operations = {}) {
374
374
  try {
375
375
  deleteCoordination(cfg, row, fetchRaw, remove);
376
376
  } catch (error) {
377
+ let contenderCleanup = "";
378
+ try {
379
+ deleteCoordination(cfg, contender, fetchRaw, remove);
380
+ } catch (cleanupError) {
381
+ contenderCleanup = `; contender cleanup failed: ${firstLine(cleanupError)}`;
382
+ }
377
383
  throw new Error(
378
- `expired publication lock cleanup failed: ${firstLine(error)}`
384
+ `expired publication lock cleanup failed: ${firstLine(error)}` +
385
+ contenderCleanup
379
386
  );
380
387
  }
381
388
  continue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -374,8 +374,15 @@ export function acquirePublicationLock(cfg, target, operations = {}) {
374
374
  try {
375
375
  deleteCoordination(cfg, row, fetchRaw, remove);
376
376
  } catch (error) {
377
+ let contenderCleanup = "";
378
+ try {
379
+ deleteCoordination(cfg, contender, fetchRaw, remove);
380
+ } catch (cleanupError) {
381
+ contenderCleanup = `; contender cleanup failed: ${firstLine(cleanupError)}`;
382
+ }
377
383
  throw new Error(
378
- `expired publication lock cleanup failed: ${firstLine(error)}`
384
+ `expired publication lock cleanup failed: ${firstLine(error)}` +
385
+ contenderCleanup
379
386
  );
380
387
  }
381
388
  continue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
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.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Expo and 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.22.3",
3
+ "version": "4.22.5",
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.22.3",
3
+ "version": "4.22.5",
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.22.3",
3
+ "version": "4.22.5",
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-harper-fabric",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -374,8 +374,15 @@ export function acquirePublicationLock(cfg, target, operations = {}) {
374
374
  try {
375
375
  deleteCoordination(cfg, row, fetchRaw, remove);
376
376
  } catch (error) {
377
+ let contenderCleanup = "";
378
+ try {
379
+ deleteCoordination(cfg, contender, fetchRaw, remove);
380
+ } catch (cleanupError) {
381
+ contenderCleanup = `; contender cleanup failed: ${firstLine(cleanupError)}`;
382
+ }
377
383
  throw new Error(
378
- `expired publication lock cleanup failed: ${firstLine(error)}`
384
+ `expired publication lock cleanup failed: ${firstLine(error)}` +
385
+ contenderCleanup
379
386
  );
380
387
  }
381
388
  continue;
@@ -314,6 +314,8 @@ strip_readonly_fields() {
314
314
  # actually has workflows, so requiring them on a workflow-less repo (e.g. a
315
315
  # wiki) would block every PR forever.
316
316
  ACTIONS_INTEGRATION_ID=15368
317
+ QUALITY_RULESET_NAME="quality checks"
318
+ QUALITY_WORKFLOW_NAME="🔍 Quality Checks"
317
319
 
318
320
  strip_actions_checks_if_no_workflows() {
319
321
  local json="$1"
@@ -505,6 +507,71 @@ add_config_required_checks() {
505
507
  end'
506
508
  }
507
509
 
510
+ # Required run gates are declarations of GitHub Actions contexts, just as
511
+ # awaited gates are declarations of external signals. Awaited gates are already
512
+ # emitted into the generated `base` ruleset with their declared app pin. Run
513
+ # gates are posted by the quality workflow, so derive those separately and add
514
+ # them to the quality ruleset. This keeps one gates declaration authoritative;
515
+ # projects do not have to transcribe the same context under requiredChecks.
516
+ add_derived_run_gate_checks() {
517
+ local json="$1"
518
+ local project_path="$2"
519
+ local ruleset_name="$3"
520
+
521
+ if [[ "$ruleset_name" != "$QUALITY_RULESET_NAME" ]]; then
522
+ echo "$json"
523
+ return 0
524
+ fi
525
+
526
+ local registry="$LISA_ROOT/all/copy-overwrite/scripts/lisa-gates.mjs"
527
+ if [[ ! -f "$registry" ]]; then
528
+ log_error "Required gate registry is missing at $registry — refusing to apply incomplete branch protection"
529
+ return 1
530
+ fi
531
+
532
+ local contexts
533
+ if ! contexts=$(cd "$project_path" && node "$registry" contexts \
534
+ --moment=pull-request --workflow="$QUALITY_WORKFLOW_NAME" --mode=run); then
535
+ log_error "Could not derive required run-gate contexts — refusing to apply incomplete branch protection"
536
+ return 1
537
+ fi
538
+ if ! echo "$contexts" | jq -e 'type == "array" and all(.[]; type == "string")' > /dev/null; then
539
+ log_error "Gate registry returned malformed required contexts — refusing to apply incomplete branch protection"
540
+ return 1
541
+ fi
542
+
543
+ local added
544
+ added=$(echo "$contexts" | jq --argjson actions "$ACTIONS_INTEGRATION_ID" \
545
+ 'map({ context: ., integration_id: $actions })')
546
+ if [[ "$added" == "[]" ]]; then
547
+ echo "$json"
548
+ return 0
549
+ fi
550
+
551
+ echo "$json" | jq --argjson added "$added" '
552
+ if ((.rules // []) | map(select(.type == "required_status_checks")) | length) > 0 then
553
+ .rules |= map(
554
+ if .type == "required_status_checks" then
555
+ .parameters.required_status_checks |= (
556
+ . as $existing
557
+ | . + ($added | map(
558
+ select(.context as $c | ($existing | map(.context) | index($c)) | not)
559
+ ))
560
+ )
561
+ else . end
562
+ )
563
+ else
564
+ .rules = ((.rules // []) + [{
565
+ type: "required_status_checks",
566
+ parameters: {
567
+ strict_required_status_checks_policy: false,
568
+ do_not_enforce_on_create: true,
569
+ required_status_checks: $added
570
+ }
571
+ }])
572
+ end'
573
+ }
574
+
508
575
  preserve_live_required_checks() {
509
576
  local live="$1"
510
577
  local json="$2"
@@ -671,6 +738,7 @@ apply_ruleset() {
671
738
 
672
739
  local clean_template
673
740
  clean_template=$(strip_readonly_fields "$template_content")
741
+ clean_template=$(add_derived_run_gate_checks "$clean_template" "$project_path" "$ruleset_name")
674
742
  clean_template=$(add_config_required_checks "$clean_template" "$project_path" "$ruleset_name")
675
743
  clean_template=$(strip_actions_checks_if_no_workflows "$clean_template" "$project_path")
676
744
  clean_template=$(strip_config_dropped_checks "$clean_template" "$project_path")