@juangcarmona/lighthouse-sdlc 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +86 -3
  2. package/completion.md +50 -0
  3. package/execution-environments.md +43 -0
  4. package/package.json +3 -1
  5. package/schemas/execution-environment.schema.json +12 -0
  6. package/skills/implement/SKILL.md +9 -8
  7. package/skills/integrate/SKILL.md +7 -1
  8. package/skills/propose/SKILL.md +1 -1
  9. package/skills/review/SKILL.md +7 -1
  10. package/src/actions-artifact.mjs +17 -0
  11. package/src/completion-actions.mjs +134 -0
  12. package/src/completion.mjs +188 -0
  13. package/src/delivery-events.mjs +42 -0
  14. package/src/execution-environment.mjs +78 -0
  15. package/src/github-profile.mjs +9 -1
  16. package/src/host-contract.mjs +7 -3
  17. package/src/implementation-runtime.mjs +90 -0
  18. package/src/implementation.mjs +155 -0
  19. package/src/install-workflows.mjs +14 -5
  20. package/src/integration-evidence.mjs +80 -0
  21. package/src/issue-actions.mjs +325 -38
  22. package/src/observe-protection.mjs +24 -0
  23. package/src/opencode-execute.mjs +128 -20
  24. package/src/opencode-progress.mjs +48 -0
  25. package/src/process-publication.mjs +90 -0
  26. package/src/proposal-review.mjs +91 -0
  27. package/src/proposal.mjs +110 -0
  28. package/src/stage-dispatch.mjs +148 -0
  29. package/src/stage-transition.mjs +25 -0
  30. package/src/worker-maintenance.mjs +83 -0
  31. package/src/worker-recovery.mjs +106 -0
  32. package/src/worker-reports.mjs +150 -0
  33. package/workflows/lighthouse-sdlc-apply-review.lock.yml +1335 -0
  34. package/workflows/lighthouse-sdlc-apply-review.md +205 -0
  35. package/workflows/lighthouse-sdlc-implement.lock.yml +285 -1158
  36. package/workflows/lighthouse-sdlc-implement.md +193 -28
  37. package/workflows/lighthouse-sdlc-integrate.lock.yml +288 -1154
  38. package/workflows/lighthouse-sdlc-integrate.md +197 -28
  39. package/workflows/lighthouse-sdlc-propose.lock.yml +274 -1157
  40. package/workflows/lighthouse-sdlc-propose.md +183 -28
  41. package/workflows/lighthouse-sdlc-refine.lock.yml +263 -90
  42. package/workflows/lighthouse-sdlc-refine.md +45 -4
  43. package/workflows/lighthouse-sdlc-review.lock.yml +288 -1154
  44. package/workflows/lighthouse-sdlc-review.md +197 -28
  45. package/workflows/lighthouse-sdlc-router.yml +91 -17
  46. package/workflows/lighthouse-worker-maintenance.yml +126 -0
  47. package/workflows/shared/lighthouse-opencode.md +4 -2
@@ -1,5 +1,5 @@
1
- # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"c2d46a609abe68ae8883e069cd886268717d2b691c2e9d5111f49b35a47ac98b","body_hash":"75843d473d92221a1696d21424dad22c79a230f0395722f7957b30fc24ffad58","compiler_version":"v0.93.2","agent_id":"opencode","engine_versions":{"opencode":"2.1.0"},"agent_image_runner":"[\"self-hosted\",\"linux\",\"lighthouse-workflow\"]"}
2
- # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/checkout","sha":"fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09","version":"v5"},{"repo":"actions/download-artifact","sha":"9000827ccba6bdab643e8b6fd33ac0654aef8333","version":"v8.0.2"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"949feb2413d6458794dcd2491c4babbbce0c15c1","version":"v7.1.0"},{"repo":"actions/setup-node","sha":"a0853c24544627f65ddf259abe73b1d18a591444","version":"v5"},{"repo":"actions/upload-artifact","sha":"cf430e030ddbb5b0abf93d22962f4752f3646cd9","version":"v7.0.2"},{"repo":"github/gh-aw-actions/setup","sha":"d9128eb3ea40c18b77c76184eda03c0ff2608d79","version":"v0.93.2"}],"mcp_servers":[],"threat_detection":{"mode":"disabled"},"admission":false}
1
+ # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"3c4a41e5a1caead0b090acda2424ef53490e5b024a6cba1b25cf5c3a08331cb4","body_hash":"00aaac0798637a281758028c249e7c1086c7ca9e32ea9cb2ef51af769c3e2586","compiler_version":"v0.93.2","agent_id":"opencode","engine_versions":{"opencode":"2.1.0"},"agent_image_runner":"[\"self-hosted\",\"linux\",\"lighthouse-workflow\"]"}
2
+ # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/checkout","sha":"fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09","version":"v5"},{"repo":"actions/download-artifact","sha":"9000827ccba6bdab643e8b6fd33ac0654aef8333","version":"v8.0.2"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"949feb2413d6458794dcd2491c4babbbce0c15c1","version":"v7.1.0"},{"repo":"actions/setup-node","sha":"a0853c24544627f65ddf259abe73b1d18a591444","version":"v5"},{"repo":"actions/upload-artifact","sha":"cf430e030ddbb5b0abf93d22962f4752f3646cd9","version":"v7.0.2"},{"repo":"github/gh-aw-actions/setup","sha":"d9128eb3ea40c18b77c76184eda03c0ff2608d79","version":"v0.93.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382","pinned_image":"ghcr.io/github/gh-aw-node@sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382"}],"mcp_servers":[{"name":"safeoutputs","tools":["noop"]}],"threat_detection":{"mode":"disabled"},"admission":false}
3
3
  # This file was automatically generated by gh-aw (v0.93.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
4
4
  #
5
5
  # ___ _ _
@@ -29,6 +29,11 @@
29
29
  # Imports:
30
30
  # - shared/lighthouse-opencode.md
31
31
  #
32
+ # Frontmatter env variables:
33
+ # - LIGHTHOUSE_DISPATCH_REQUIRED: (main workflow)
34
+ # - LIGHTHOUSE_RECOVERY_ENABLED: (main workflow)
35
+ # - LIGHTHOUSE_STAGE: (main workflow)
36
+ #
32
37
  # Secrets used:
33
38
  # - COPILOT_GITHUB_TOKEN
34
39
  # - GH_AW_DEFAULT_OTLP_ENDPOINT
@@ -46,41 +51,43 @@
46
51
  # - actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
47
52
  # - actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
48
53
  # - github/gh-aw-actions/setup@d9128eb3ea40c18b77c76184eda03c0ff2608d79 # v0.93.2
54
+ #
55
+ # Container images used:
56
+ # - ghcr.io/github/gh-aw-node@sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382
49
57
 
50
58
  name: "Lighthouse SDLC refine"
51
59
  on:
52
- workflow_call:
60
+ # roles: all # Roles processed as role check in pre-activation job
61
+ workflow_dispatch:
53
62
  inputs:
54
63
  aw_context:
55
64
  default: ""
56
65
  description: "Agent caller context (Reserved for Agentic Workflows)."
57
66
  required: false
58
67
  type: string
68
+ dispatch-request:
69
+ description: Authenticated router receipt comment ID
70
+ required: true
71
+ type: string
59
72
  issue:
73
+ description: Source issue
60
74
  required: true
61
75
  type: string
62
- secrets:
63
- COPILOT_GITHUB_TOKEN:
64
- required: false
65
- GH_AW_DEFAULT_OTLP_ENDPOINT:
66
- required: false
67
- GH_AW_DEFAULT_OTLP_HEADERS:
68
- required: false
69
- GH_AW_GITHUB_MCP_SERVER_TOKEN:
70
- required: false
71
- GH_AW_GITHUB_TOKEN:
72
- required: false
73
76
 
74
77
  # Jobs receive only their explicitly declared permissions.
75
78
  permissions: {}
76
79
 
77
80
  concurrency:
78
- group: "gh-aw-lighthouse-sdlc-refine-${{ github.run_id }}"
81
+ cancel-in-progress: false
82
+ group: lighthouse-issue-${{ inputs.issue }}
79
83
  queue: max
80
84
 
81
- run-name: "Lighthouse SDLC refine"
85
+ run-name: "refine #${{ inputs.issue }} · request ${{ inputs.dispatch-request }}"
82
86
 
83
87
  env:
88
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
89
+ LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
90
+ LIGHTHOUSE_STAGE: refine
84
91
  OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_DEFAULT_OTLP_ENDPOINT || vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}
85
92
  OTEL_SERVICE_NAME: gh-aw.lighthouse-sdlc-refine
86
93
  OTEL_RESOURCE_ATTRIBUTES: 'gh-aw.workflow.name=Lighthouse%20SDLC%20refine,gh-aw.repository=${{ github.repository }},gh-aw.run.id=${{ github.run_id }},github.run_id=${{ github.run_id }},gh-aw.engine.id=opencode'
@@ -94,7 +101,7 @@ jobs:
94
101
  needs:
95
102
  - pre_activation
96
103
  - prepare
97
- if: needs.pre_activation.outputs.activated == 'true'
104
+ if: needs.pre_activation.outputs.activated == 'true' && (needs.prepare.outputs.eligible == 'true')
98
105
  runs-on: ubuntu-24.04
99
106
  # Permissions for the activation job (workflow permissions default to none).
100
107
  permissions:
@@ -104,7 +111,6 @@ jobs:
104
111
  GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
105
112
  GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
106
113
  outputs:
107
- artifact_prefix: ${{ steps.artifact-prefix.outputs.prefix }}
108
114
  aw_context: ${{ steps.generate_aw_info.outputs.aw_context }}
109
115
  comment_id: ""
110
116
  comment_repo: ""
@@ -122,10 +128,6 @@ jobs:
122
128
  setup-span-id: ${{ steps.setup.outputs.span-id }}
123
129
  setup-trace-id: ${{ steps.setup.outputs.trace-id }}
124
130
  stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
125
- target_checkout_ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
126
- target_ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
127
- target_repo: ${{ steps.resolve-host-repo.outputs.target_repo }}
128
- target_repo_name: ${{ steps.resolve-host-repo.outputs.target_repo_name }}
129
131
  steps:
130
132
  - name: Setup Scripts
131
133
  id: setup
@@ -144,27 +146,6 @@ jobs:
144
146
  GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
145
147
  - name: Mask OTLP telemetry headers
146
148
  run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
147
- - name: Resolve host repo for activation checkout
148
- id: resolve-host-repo
149
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
150
- env:
151
- JOB_WORKFLOW_REPOSITORY: ${{ job.workflow_repository }}
152
- JOB_WORKFLOW_SHA: ${{ job.workflow_sha }}
153
- JOB_WORKFLOW_REF: ${{ job.workflow_ref }}
154
- JOB_WORKFLOW_FILE_PATH: ${{ job.workflow_file_path }}
155
- with:
156
- script: |
157
- const path = require('path');
158
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
159
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
160
- setupGlobals(core, github, context, exec, io, getOctokit);
161
- const { main } = require(path.join(actionsDir, 'resolve_host_repo.cjs'));
162
- await main();
163
- - name: Compute artifact prefix
164
- id: artifact-prefix
165
- env:
166
- INPUTS_JSON: ${{ toJSON(inputs) }}
167
- run: bash "${RUNNER_TEMP}/gh-aw/actions/compute_artifact_prefix.sh"
168
149
  - name: Generate agentic run info
169
150
  id: generate_aw_info
170
151
  env:
@@ -187,7 +168,6 @@ jobs:
187
168
  GH_AW_INFO_AGENT_RUNTIME: ""
188
169
  GH_AW_INFO_MODEL_CONFIG: '{"routing":{"enabled":false}}'
189
170
  GH_AW_COMPILED_STRICT: "false"
190
- GH_AW_INFO_TARGET_REPO: ${{ steps.resolve-host-repo.outputs.target_repo }}
191
171
  GH_AW_INFO_FEATURES: '{"dangerously-disable-sandbox-agent":true}'
192
172
  uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
193
173
  with:
@@ -259,19 +239,10 @@ jobs:
259
239
  COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
260
240
  GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
261
241
  GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
262
- - name: Print cross-repo setup guidance
263
- if: failure() && steps.resolve-host-repo.outputs.target_repo != github.repository
264
- run: |
265
- echo "::error::COPILOT_GITHUB_TOKEN must be configured in the CALLER repository's secrets."
266
- echo "::error::For cross-repo workflow_call, secrets must be set in the repository that triggers the workflow."
267
- echo "::error::See: https://github.github.com/gh-aw/patterns/central-repo-ops/#cross-repo-setup"
268
242
  - name: Checkout .github and .agents folders
269
- if: steps.resolve-host-repo.outputs.target_repo == github.repository
270
243
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
271
244
  with:
272
245
  persist-credentials: false
273
- repository: ${{ steps.resolve-host-repo.outputs.target_repo }}
274
- ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
275
246
  sparse-checkout: |
276
247
  .github
277
248
  .agents
@@ -325,11 +296,13 @@ jobs:
325
296
  GH_AW_ACTIONS_DIR: ${{ runner.temp }}/gh-aw/actions
326
297
  GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
327
298
  GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
328
- GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"}],\"system_item_count\":5}"
299
+ GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"file\":\"safe_outputs_mcp_transport_prompt.md\"},{\"file\":\"safe_outputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"file\":\"mcp_cli_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0004\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0005\"}],\"system_item_count\":10}"
329
300
  GH_AW_PROMPT_CONTENT_0000: "<system>\n"
330
- GH_AW_PROMPT_CONTENT_0001: "</system>\n"
331
- GH_AW_PROMPT_CONTENT_0002: "{{#runtime-import .github/workflows/shared/lighthouse-opencode.md}}\n"
332
- GH_AW_PROMPT_CONTENT_0003: "{{#runtime-import .github/workflows/lighthouse-sdlc-refine.md}}\n"
301
+ GH_AW_PROMPT_CONTENT_0001: "<safe-output-tools>\nTools: noop(max:2)\n"
302
+ GH_AW_PROMPT_CONTENT_0002: "</safe-output-tools>\n"
303
+ GH_AW_PROMPT_CONTENT_0003: "</system>\n"
304
+ GH_AW_PROMPT_CONTENT_0004: "{{#runtime-import .github/workflows/shared/lighthouse-opencode.md}}\n"
305
+ GH_AW_PROMPT_CONTENT_0005: "{{#runtime-import .github/workflows/lighthouse-sdlc-refine.md}}\n"
333
306
  with:
334
307
  script: |
335
308
  const { setupGlobals } = require(process.env.GH_AW_ACTIONS_DIR + '/setup_globals.cjs');
@@ -357,6 +330,7 @@ jobs:
357
330
  uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
358
331
  env:
359
332
  GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
333
+ GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools'
360
334
  GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
361
335
  with:
362
336
  script: |
@@ -371,6 +345,7 @@ jobs:
371
345
  return await substitutePlaceholders({
372
346
  file: process.env.GH_AW_PROMPT,
373
347
  substitutions: {
348
+ GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST,
374
349
  GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
375
350
  }
376
351
  });
@@ -401,7 +376,7 @@ jobs:
401
376
  if: success() || failure()
402
377
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
403
378
  with:
404
- name: ${{ steps.artifact-prefix.outputs.prefix }}info
379
+ name: info
405
380
  path: /tmp/gh-aw/aw_info.json
406
381
  if-no-files-found: ignore
407
382
  retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '0' }}
@@ -413,7 +388,7 @@ jobs:
413
388
  if: success() || failure()
414
389
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
415
390
  with:
416
- name: ${{ steps.artifact-prefix.outputs.prefix }}activation
391
+ name: activation
417
392
  include-hidden-files: true
418
393
  path: |
419
394
  /tmp/gh-aw/aw_info.json
@@ -436,7 +411,7 @@ jobs:
436
411
  needs:
437
412
  - activation
438
413
  - prepare
439
- if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
414
+ if: (needs.prepare.outputs.eligible == 'true') && (needs.activation.outputs.daily_ai_credits_exceeded != 'true')
440
415
  runs-on:
441
416
  - self-hosted
442
417
  - linux
@@ -444,9 +419,6 @@ jobs:
444
419
  # Permissions for the agent job (workflow permissions default to none).
445
420
  permissions:
446
421
  contents: read
447
- concurrency:
448
- group: "gh-aw-opencode-lighthouse-sdlc-refine"
449
- queue: max
450
422
  timeout-minutes: 60
451
423
  env:
452
424
  DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
@@ -468,7 +440,6 @@ jobs:
468
440
  ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
469
441
  aic: ${{ steps.parse-mcp-gateway.outputs.aic }}
470
442
  ambient_context: ${{ steps.parse-mcp-gateway.outputs.ambient_context }}
471
- artifact_prefix: ${{ needs.activation.outputs.artifact_prefix }}
472
443
  has_patch: ${{ steps.collect_output.outputs.has_patch }}
473
444
  model: ${{ needs.activation.outputs.model }}
474
445
  output: ${{ steps.collect_output.outputs.output }}
@@ -524,12 +495,13 @@ jobs:
524
495
  - name: Download activation artifact
525
496
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
526
497
  with:
527
- name: ${{ needs.activation.outputs.artifact_prefix }}activation
498
+ name: activation
528
499
  path: /tmp/gh-aw
529
500
  - name: Check out the authorized product revision
530
501
  uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
531
502
  with:
532
503
  persist-credentials: false
504
+ ref: ${{ needs.prepare.outputs.source_revision }}
533
505
  - name: Setup Node.js
534
506
  uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
535
507
  with:
@@ -563,6 +535,168 @@ jobs:
563
535
  env:
564
536
  GH_AW_SKILL_DIR: ".github/skills"
565
537
  run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh"
538
+ - name: Download container images
539
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-node@sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382
540
+ - name: Prepare Safe Outputs Directories
541
+ run: |
542
+ mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
543
+ mkdir -p /tmp/gh-aw/safeoutputs
544
+ mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
545
+ - name: Generate Safe Outputs Config
546
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
547
+ env:
548
+ GH_AW_FILE_ROOT: "${{ runner.temp }}/gh-aw"
549
+ GH_AW_FILE_CONFIG: "{\"files\":[{\"path\":\"safeoutputs/config.json\",\"content_env\":\"GH_AW_SAFE_OUTPUTS_CONFIG\"}]}"
550
+ GH_AW_SAFE_OUTPUTS_CONFIG: "{\"noop\":{\"max\":2,\"report-as-issue\":\"false\"}}"
551
+ with:
552
+ script: |
553
+ const path = require('path');
554
+ const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
555
+ const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
556
+ setupGlobals(core, github, context, exec, io, getOctokit);
557
+ const { main } = require(path.join(actionsDir, 'create_files.cjs'));
558
+ await main();
559
+ - name: Generate Safe Outputs Tools
560
+ env:
561
+ GH_AW_TOOLS_META_JSON: |
562
+ {
563
+ "description_suffixes": {},
564
+ "repo_params": {},
565
+ "dynamic_tools": []
566
+ }
567
+ GH_AW_VALIDATION_JSON: |
568
+ {
569
+ "noop": {
570
+ "defaultMax": 2,
571
+ "fields": {
572
+ "message": {
573
+ "required": true,
574
+ "type": "string",
575
+ "sanitize": true,
576
+ "maxLength": 65000
577
+ }
578
+ }
579
+ }
580
+ }
581
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
582
+ with:
583
+ script: |
584
+ const path = require('path');
585
+ const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
586
+ const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
587
+ setupGlobals(core, github, context, exec, io, getOctokit);
588
+ const { main } = require(path.join(actionsDir, 'generate_safe_outputs_tools.cjs'));
589
+ await main();
590
+ - name: Start MCP Gateway
591
+ id: start-mcp-gateway
592
+ env:
593
+ DEBUG: ${{ env.DEBUG || runner.debug == '1' && '*' || '' }}
594
+ GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST: ${{ vars.GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST || 'true' }}
595
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
596
+ GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_CONFIG_PATH }}
597
+ GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_TOOLS_PATH }}
598
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
599
+ run: |
600
+ set -eo pipefail
601
+ mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config"
602
+ if [ -n "${GITHUB_EVENT_PATH:-}" ] && [ -r "${GITHUB_EVENT_PATH}" ]; then
603
+ GH_AW_SAFEOUTPUTS_EVENT_PATH="${RUNNER_TEMP}/gh-aw/safeoutputs/github_event.json"
604
+ cp "${GITHUB_EVENT_PATH}" "${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
605
+ export GITHUB_EVENT_PATH="${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
606
+ fi
607
+
608
+ # Export gateway environment variables for MCP config and gateway script
609
+ export MCP_GATEWAY_PORT="8080"
610
+ export MCP_GATEWAY_DOMAIN="localhost"
611
+ export MCP_GATEWAY_HOST_DOMAIN="localhost"
612
+ MCP_GATEWAY_AGENT_ID=$(openssl rand -base64 45 | tr -d '/+=')
613
+ echo "::add-mask::${MCP_GATEWAY_AGENT_ID}"
614
+ export MCP_GATEWAY_AGENT_ID
615
+ export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
616
+ mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
617
+ export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
618
+ export MCP_GATEWAY_ALLOWED_MOUNT_ROOTS="${GITHUB_WORKSPACE}:rw,${RUNNER_TEMP}/gh-aw:ro,${RUNNER_TEMP}/gh-aw/safeoutputs:rw,/opt:ro,/tmp:rw,/usr/bin/gh:ro"
619
+ export GH_AW_PR_HEAD_BASE_BRANCH="${GH_AW_PR_HEAD_BASE_BRANCH:-}"
620
+ export GH_AW_PR_HEAD_BASE_SHA="${GH_AW_PR_HEAD_BASE_SHA:-}"
621
+ export GH_AW_PR_HEAD_BASE_REPO="${GH_AW_PR_HEAD_BASE_REPO:-}"
622
+ export GH_AW_PR_HEAD_BASE_PR_NUMBER="${GH_AW_PR_HEAD_BASE_PR_NUMBER:-}"
623
+ export GH_AW_PR_HEAD_BASE_REF="${GH_AW_PR_HEAD_BASE_REF:-}"
624
+ export GH_AW_PR_HEAD_REPO="${GH_AW_PR_HEAD_REPO:-}"
625
+ export GH_AW_TARGET_REPO_SLUG="${GH_AW_TARGET_REPO_SLUG:-}"
626
+ export GH_AW_ENGINE="opencode"
627
+ MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0')
628
+ MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0')
629
+ source "${RUNNER_TEMP}/gh-aw/actions/resolve_docker_socket_gid.sh"
630
+ export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --name awmg-mcpg --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_AGENT_ID -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_TARGET_REPO_SLUG -e GH_AW_PR_HEAD_BASE_BRANCH -e GH_AW_PR_HEAD_BASE_SHA -e GH_AW_PR_HEAD_BASE_REPO -e GH_AW_PR_HEAD_BASE_PR_NUMBER -e GH_AW_PR_HEAD_BASE_REF -e GH_AW_PR_HEAD_REPO -e GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GH_AW_SINK_VISIBILITY -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e RUNNER_TEMP -e RUNNER_TOOL_CACHE -e MCP_GATEWAY_ALLOWED_MOUNT_ROOTS -e GITHUB_AW_OTEL_TRACE_ID -e GITHUB_AW_OTEL_PARENT_SPAN_ID -e OTEL_EXPORTER_OTLP_HEADERS -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw -v '"${RUNNER_TEMP}"'/gh-aw/safeoutputs:'"${RUNNER_TEMP}"'/gh-aw/safeoutputs:rw ghcr.io/github/gh-aw-mcpg:v0.4.37@sha256:9c7f242f6dec2d7d7b55d4c9e07872d59b85377c6cb3de46c915a5d1ffb91442'
631
+
632
+ GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
633
+ cat << GH_AW_MCP_CONFIG_6001799711bbe943_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
634
+ {
635
+ "mcpServers": {
636
+ "safeoutputs": {
637
+ "container": "ghcr.io/github/gh-aw-node@sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382",
638
+ "mounts": ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"],
639
+ "args": ["-w", "\${GITHUB_WORKSPACE}"],
640
+ "entrypoint": "sh",
641
+ "entrypointArgs": ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"],
642
+ "env": {
643
+ "DEBUG": "\${DEBUG}",
644
+ "DEFAULT_BRANCH": "\${DEFAULT_BRANCH}",
645
+ "GH_AW_ASSETS_ALLOWED_EXTS": "\${GH_AW_ASSETS_ALLOWED_EXTS}",
646
+ "GH_AW_ASSETS_BRANCH": "\${GH_AW_ASSETS_BRANCH}",
647
+ "GH_AW_ASSETS_MAX_SIZE_KB": "\${GH_AW_ASSETS_MAX_SIZE_KB}",
648
+ "GH_AW_MCP_LOG_DIR": "\${GH_AW_MCP_LOG_DIR}",
649
+ "GH_AW_SAFE_OUTPUTS": "\${GH_AW_SAFE_OUTPUTS}",
650
+ "GH_AW_SAFE_OUTPUTS_CONFIG_PATH": "\${GH_AW_SAFE_OUTPUTS_CONFIG_PATH}",
651
+ "GH_AW_SAFE_OUTPUTS_TOOLS_PATH": "\${GH_AW_SAFE_OUTPUTS_TOOLS_PATH}",
652
+ "GH_AW_TARGET_REPO_SLUG": "\${GH_AW_TARGET_REPO_SLUG}",
653
+ "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST": "\${GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST}",
654
+ "GH_AW_PR_HEAD_BASE_BRANCH": "\${GH_AW_PR_HEAD_BASE_BRANCH}",
655
+ "GH_AW_PR_HEAD_BASE_SHA": "\${GH_AW_PR_HEAD_BASE_SHA}",
656
+ "GH_AW_PR_HEAD_BASE_REPO": "\${GH_AW_PR_HEAD_BASE_REPO}",
657
+ "GH_AW_PR_HEAD_BASE_PR_NUMBER": "\${GH_AW_PR_HEAD_BASE_PR_NUMBER}",
658
+ "GH_AW_PR_HEAD_BASE_REF": "\${GH_AW_PR_HEAD_BASE_REF}",
659
+ "GH_AW_PR_HEAD_REPO": "\${GH_AW_PR_HEAD_REPO}",
660
+ "GITHUB_EVENT_NAME": "\${GITHUB_EVENT_NAME}",
661
+ "GITHUB_EVENT_PATH": "\${GITHUB_EVENT_PATH}",
662
+ "GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}",
663
+ "GITHUB_SHA": "\${GITHUB_SHA}",
664
+ "GITHUB_TOKEN": "\${GITHUB_TOKEN}",
665
+ "GITHUB_WORKSPACE": "\${GITHUB_WORKSPACE}",
666
+ "RUNNER_TEMP": "\${RUNNER_TEMP}"
667
+ }
668
+ }
669
+ },
670
+ "gateway": {
671
+ "port": $MCP_GATEWAY_PORT,
672
+ "domain": "${MCP_GATEWAY_DOMAIN}",
673
+ "agentId": "${MCP_GATEWAY_AGENT_ID}",
674
+ "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}",
675
+ "startupTimeout": 120,
676
+ "opentelemetry": {
677
+ "endpoint": "${OTEL_EXPORTER_OTLP_ENDPOINT}",
678
+ "traceId": "${GITHUB_AW_OTEL_TRACE_ID}",
679
+ "spanId": "${GITHUB_AW_OTEL_PARENT_SPAN_ID}"
680
+ }
681
+ }
682
+ }
683
+ GH_AW_MCP_CONFIG_6001799711bbe943_EOF
684
+ - name: Mount MCP servers as CLIs
685
+ id: mount-mcp-clis
686
+ continue-on-error: true
687
+ env:
688
+ MCP_GATEWAY_AGENT_ID: ${{ steps.start-mcp-gateway.outputs.gateway-agent-id }}
689
+ MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }}
690
+ MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
691
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
692
+ with:
693
+ script: |
694
+ const path = require('path');
695
+ const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
696
+ const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
697
+ setupGlobals(core, github, context, exec, io);
698
+ const { main } = require(path.join(actionsDir, 'mount_mcp_as_cli.cjs'));
699
+ await main();
566
700
  - name: Clean credentials
567
701
  run: |
568
702
  bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh"
@@ -582,7 +716,9 @@ jobs:
582
716
 
583
717
  // --- begin engine-provided parse function ---
584
718
  function parseLog(logContent) {
585
- return require("./parse_opencode_log.cjs").parseOpenCodeLog(logContent);
719
+ const fs = require("fs");
720
+ const events = require("path").join(process.env.RUNNER_TEMP, "gh-aw", `opencode-events-${process.env.GITHUB_RUN_ID}-${process.env.GITHUB_RUN_ATTEMPT}.jsonl`);
721
+ return require("./parse_opencode_log.cjs").parseOpenCodeLog(fs.existsSync(events) ? fs.readFileSync(events, "utf8") : logContent);
586
722
  }
587
723
 
588
724
  // --- end engine-provided parse function ---
@@ -598,7 +734,7 @@ jobs:
598
734
  }
599
735
  GHAW_LOG_PARSER_SCRIPT_5d2e8b3f_EOF
600
736
  chmod 755 "${RUNNER_TEMP}/gh-aw/actions/opencode_log_parser.cjs"
601
- - name: Execute OpenCode CLI
737
+ - name: OpenCode progress and result
602
738
  id: agentic_execution
603
739
  timeout-minutes: 15
604
740
  run: |
@@ -653,6 +789,9 @@ jobs:
653
789
  setupGlobals(core, github, context, exec, io, getOctokit);
654
790
  const { main } = require(path.join(actionsDir, 'redact_secrets.cjs'));
655
791
  await main();
792
+ env:
793
+ GH_AW_SECRET_NAMES: 'GITHUB_TOKEN'
794
+ SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
656
795
  - name: Append agent step summary
657
796
  if: always()
658
797
  run: bash "${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh"
@@ -734,6 +873,14 @@ jobs:
734
873
  ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/envelope.json
735
874
  ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/runtime.json
736
875
  retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '14' }}
876
+ - if: always()
877
+ name: Preserve OpenCode diagnostic events
878
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
879
+ with:
880
+ if-no-files-found: ignore
881
+ name: opencode-events-${{ inputs.issue }}-${{ github.run_attempt }}
882
+ path: ${{ runner.temp }}/gh-aw/opencode-events-${{ github.run_id }}-${{ github.run_attempt }}.jsonl
883
+ retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '14' }}
737
884
 
738
885
  # Small dedicated copy of the agent output so safe-output processing
739
886
  # survives a failed or timed-out upload of the larger agent artifact
@@ -742,7 +889,7 @@ jobs:
742
889
  continue-on-error: true
743
890
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
744
891
  with:
745
- name: ${{ needs.activation.outputs.artifact_prefix }}agent-output-fallback
892
+ name: agent-output-fallback
746
893
  path: |
747
894
  /tmp/gh-aw/agent_output.json
748
895
  /tmp/gh-aw/safeoutputs.jsonl
@@ -764,7 +911,7 @@ jobs:
764
911
  continue-on-error: true
765
912
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
766
913
  with:
767
- name: ${{ needs.activation.outputs.artifact_prefix }}agent
914
+ name: agent
768
915
  path: |
769
916
  /tmp/gh-aw/aw-prompts/prompt.txt
770
917
  /tmp/gh-aw/agent_execution.json
@@ -803,7 +950,7 @@ jobs:
803
950
  actions: read
804
951
  issues: write
805
952
  concurrency:
806
- group: "gh-aw-conclusion-lighthouse-sdlc-refine"
953
+ group: "gh-aw-conclusion-lighthouse-sdlc-refine-${{ github.run_id }}"
807
954
  cancel-in-progress: false
808
955
  queue: max
809
956
  env:
@@ -811,6 +958,9 @@ jobs:
811
958
  GH_AW_JOB_RESULTS: "{\"activation\":{\"result\":\"${{ needs.activation.result }}\"},\"agent\":{\"result\":\"${{ needs.agent.result }}\"},\"prepare\":{\"result\":\"${{ needs.prepare.result }}\"},\"publish\":{\"result\":\"${{ needs.publish.result }}\"}}"
812
959
  GH_AW_JOB_TIMING_ELIGIBLE: "{\"activation\":true,\"agent\":true,\"conclusion\":true,\"pre_activation\":true,\"prepare\":true,\"publish\":true}"
813
960
  GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
961
+ outputs:
962
+ noop_comment_body: ${{ steps.noop.outputs.noop_comment_body }}
963
+ noop_message: ${{ steps.noop.outputs.noop_message }}
814
964
  steps:
815
965
  - name: Setup Scripts
816
966
  id: setup
@@ -831,7 +981,7 @@ jobs:
831
981
  continue-on-error: true
832
982
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
833
983
  with:
834
- pattern: "{${{ needs.activation.outputs.artifact_prefix }}agent,${{ needs.activation.outputs.artifact_prefix }}agent-output-fallback}"
984
+ pattern: "{agent,agent-output-fallback}"
835
985
  merge-multiple: true
836
986
  path: /tmp/gh-aw/
837
987
  - name: Setup agent output environment variable
@@ -849,9 +999,35 @@ jobs:
849
999
  continue-on-error: true
850
1000
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
851
1001
  with:
852
- pattern: ${{ needs.activation.outputs.artifact_prefix }}safe-outputs-items
1002
+ pattern: safe-outputs-items
853
1003
  merge-multiple: true
854
1004
  path: /tmp/gh-aw/
1005
+ - name: Process no-op messages
1006
+ id: noop
1007
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1008
+ env:
1009
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1010
+ GH_AW_NOOP_MAX: "2"
1011
+ GH_AW_WORKFLOW_NAME: "Lighthouse SDLC refine"
1012
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/lighthouse-sdlc-refine.md"
1013
+ GH_AW_ENGINE_ID: "opencode"
1014
+ GH_AW_ENGINE_VERSION: "2.1.0"
1015
+ GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }}
1016
+ GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1017
+ GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
1018
+ GH_AW_NOOP_REPORT_AS_ISSUE: "false"
1019
+ GH_AW_AIC: ${{ needs.agent.outputs.aic }}
1020
+ GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
1021
+ GH_AW_WORKFLOW_ID: "lighthouse-sdlc-refine"
1022
+ with:
1023
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1024
+ script: |
1025
+ const path = require('path');
1026
+ const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
1027
+ const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
1028
+ setupGlobals(core, github, context, exec, io, getOctokit);
1029
+ const { main } = require(path.join(actionsDir, 'handle_noop_message.cjs'));
1030
+ await main();
855
1031
  - name: Handle agent failure
856
1032
  id: handle_agent_failure
857
1033
  if: always()
@@ -948,7 +1124,7 @@ jobs:
948
1124
  continue-on-error: true
949
1125
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
950
1126
  with:
951
- name: ${{ needs.activation.outputs.artifact_prefix }}usage
1127
+ name: usage
952
1128
  path: |
953
1129
  /tmp/gh-aw/usage/aw_session.jsonl
954
1130
  /tmp/gh-aw/usage/aw_info.json
@@ -983,7 +1159,7 @@ jobs:
983
1159
  continue-on-error: true
984
1160
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
985
1161
  with:
986
- name: ${{ needs.activation.outputs.artifact_prefix }}usage
1162
+ name: usage
987
1163
  path: |
988
1164
  /tmp/gh-aw/usage/aw_session.jsonl
989
1165
  /tmp/gh-aw/usage/aw_info.json
@@ -1018,7 +1194,7 @@ jobs:
1018
1194
  env:
1019
1195
  GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1020
1196
  outputs:
1021
- activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }}
1197
+ activated: ${{ 'true' }}
1022
1198
  matched_command: ''
1023
1199
  setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
1024
1200
  setup-span-id: ${{ steps.setup.outputs.span-id }}
@@ -1036,30 +1212,20 @@ jobs:
1036
1212
  GH_AW_INFO_VERSION: "2.1.0"
1037
1213
  GH_AW_INFO_ENGINE_ID: "opencode"
1038
1214
  GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
1039
- - name: Check team membership for workflow
1040
- id: check_membership
1041
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1042
- env:
1043
- GH_AW_REQUIRED_ROLES: "admin,maintainer,write"
1044
- with:
1045
- github-token: ${{ secrets.GITHUB_TOKEN }}
1046
- script: |
1047
- const path = require('path');
1048
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
1049
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
1050
- setupGlobals(core, github, context, exec, io, getOctokit);
1051
- const { main } = require(path.join(actionsDir, 'check_membership.cjs'));
1052
- await main();
1053
1215
 
1054
1216
  prepare:
1055
1217
  name: Authorize and reserve issue
1056
1218
  runs-on: ubuntu-24.04
1057
1219
  # Permissions for the prepare job (workflow permissions default to none).
1058
1220
  permissions:
1221
+ actions: read
1059
1222
  contents: read
1060
1223
  issues: write
1061
1224
  env:
1062
1225
  LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
1226
+ outputs:
1227
+ eligible: ${{ steps.prepare.outputs.eligible }}
1228
+ source_revision: ${{ steps.prepare.outputs.source_revision }}
1063
1229
  steps:
1064
1230
  - name: Configure GH_HOST for enterprise compatibility
1065
1231
  id: ghes-host-config
@@ -1084,6 +1250,7 @@ jobs:
1084
1250
  env:
1085
1251
  GH_TOKEN: ${{ github.token }}
1086
1252
  - name: Preserve the execution request
1253
+ if: steps.prepare.outputs.eligible == 'true'
1087
1254
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
1088
1255
  with:
1089
1256
  if-no-files-found: error
@@ -1101,7 +1268,7 @@ jobs:
1101
1268
  needs:
1102
1269
  - agent
1103
1270
  - prepare
1104
- if: always() && needs.prepare.result == 'success'
1271
+ if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
1105
1272
  runs-on: ubuntu-24.04
1106
1273
  # Permissions for the publish job (workflow permissions default to none).
1107
1274
  permissions:
@@ -1138,7 +1305,13 @@ jobs:
1138
1305
  with:
1139
1306
  name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
1140
1307
  path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
1308
+ - name: Require an executed agent
1309
+ if: needs.agent.result != 'success'
1310
+ run: |
1311
+ echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
1312
+ exit 1
1141
1313
  - name: Recheck authority and publish the validated result
1314
+ id: publish
1142
1315
  if: needs.agent.result == 'success'
1143
1316
  run: node src/packages/sdlc/src/issue-actions.mjs publish
1144
1317
  env: