@juangcarmona/lighthouse-sdlc 0.13.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.
- package/README.md +61 -12
- package/completion.md +6 -4
- package/execution-environments.md +43 -0
- package/package.json +2 -1
- package/schemas/execution-environment.schema.json +12 -0
- package/skills/implement/SKILL.md +9 -8
- package/src/actions-artifact.mjs +17 -0
- package/src/completion-actions.mjs +30 -10
- package/src/completion.mjs +19 -0
- package/src/delivery-events.mjs +42 -0
- package/src/execution-environment.mjs +78 -0
- package/src/implementation-runtime.mjs +56 -32
- package/src/implementation.mjs +31 -19
- package/src/install-workflows.mjs +10 -7
- package/src/integration-evidence.mjs +25 -1
- package/src/issue-actions.mjs +260 -38
- package/src/opencode-execute.mjs +20 -10
- package/src/process-publication.mjs +1 -1
- package/src/proposal-review.mjs +91 -0
- package/src/proposal.mjs +22 -8
- package/src/stage-dispatch.mjs +148 -0
- package/src/stage-transition.mjs +25 -0
- package/src/worker-maintenance.mjs +83 -0
- package/src/worker-recovery.mjs +106 -0
- package/src/worker-reports.mjs +150 -0
- package/workflows/lighthouse-sdlc-apply-review.lock.yml +1335 -0
- package/workflows/lighthouse-sdlc-apply-review.md +205 -0
- package/workflows/lighthouse-sdlc-implement.lock.yml +51 -90
- package/workflows/lighthouse-sdlc-implement.md +40 -11
- package/workflows/lighthouse-sdlc-integrate.lock.yml +36 -83
- package/workflows/lighthouse-sdlc-integrate.md +25 -2
- package/workflows/lighthouse-sdlc-propose.lock.yml +44 -83
- package/workflows/lighthouse-sdlc-propose.md +33 -4
- package/workflows/lighthouse-sdlc-refine.lock.yml +45 -83
- package/workflows/lighthouse-sdlc-refine.md +32 -2
- package/workflows/lighthouse-sdlc-review.lock.yml +36 -83
- package/workflows/lighthouse-sdlc-review.md +25 -2
- package/workflows/lighthouse-sdlc-router.yml +70 -62
- package/workflows/lighthouse-worker-maintenance.yml +126 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Owned by lighthouse-sdlc. Regenerate the lock with gh aw v0.93.2.
|
|
3
|
+
name: Lighthouse SDLC apply-review
|
|
4
|
+
description: Apply authorized feedback to the existing proposal or implementation PR.
|
|
5
|
+
run-name: "apply-review #${{ inputs.issue }} · request ${{ inputs.dispatch-request }}"
|
|
6
|
+
concurrency:
|
|
7
|
+
group: lighthouse-issue-${{ inputs.issue }}
|
|
8
|
+
cancel-in-progress: false
|
|
9
|
+
queue: max
|
|
10
|
+
job-discriminator: ${{ github.run_id }}
|
|
11
|
+
on:
|
|
12
|
+
# The required preparation job authenticates the originating owner request.
|
|
13
|
+
roles: all
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
inputs:
|
|
16
|
+
issue:
|
|
17
|
+
description: Source issue
|
|
18
|
+
required: true
|
|
19
|
+
type: string
|
|
20
|
+
dispatch-request:
|
|
21
|
+
description: Authenticated router receipt comment ID
|
|
22
|
+
required: true
|
|
23
|
+
type: string
|
|
24
|
+
needs: [prepare]
|
|
25
|
+
if: needs.prepare.outputs.eligible == 'true'
|
|
26
|
+
runs-on: [self-hosted, linux, lighthouse-workflow]
|
|
27
|
+
runs-on-slim: ubuntu-24.04
|
|
28
|
+
timeout-minutes: 55
|
|
29
|
+
env:
|
|
30
|
+
LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
|
|
31
|
+
LIGHTHOUSE_WORKER: apply-review
|
|
32
|
+
LIGHTHOUSE_DISPATCH_REQUIRED: "true"
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
engine:
|
|
36
|
+
id: opencode
|
|
37
|
+
command: node
|
|
38
|
+
imports:
|
|
39
|
+
- shared/lighthouse-opencode.md
|
|
40
|
+
# Subscription authentication runs inside the operator's Docker engine sandbox.
|
|
41
|
+
# This profile does not claim AWF network isolation or API-proxy credential isolation.
|
|
42
|
+
strict: false
|
|
43
|
+
features:
|
|
44
|
+
dangerously-disable-sandbox-agent: true
|
|
45
|
+
sandbox:
|
|
46
|
+
agent: false
|
|
47
|
+
tools:
|
|
48
|
+
github: false
|
|
49
|
+
safe-outputs:
|
|
50
|
+
create-issue: false
|
|
51
|
+
report-incomplete: false
|
|
52
|
+
threat-detection: false
|
|
53
|
+
report-failure-as-issue: false
|
|
54
|
+
report-missing-tool: false
|
|
55
|
+
report-missing-data: false
|
|
56
|
+
noop:
|
|
57
|
+
report-as-issue: false
|
|
58
|
+
network:
|
|
59
|
+
allowed: []
|
|
60
|
+
steps:
|
|
61
|
+
- name: Check out the authorized product revision
|
|
62
|
+
uses: actions/checkout@v5
|
|
63
|
+
with:
|
|
64
|
+
persist-credentials: false
|
|
65
|
+
ref: ${{ needs.prepare.outputs.source_revision }}
|
|
66
|
+
- name: Load the pinned harness package
|
|
67
|
+
uses: actions/checkout@v5
|
|
68
|
+
with:
|
|
69
|
+
repository: juangcarmona/lighthouse
|
|
70
|
+
ref: __LIGHTHOUSE_REF__
|
|
71
|
+
path: tools
|
|
72
|
+
persist-credentials: false
|
|
73
|
+
- name: Load the authorized issue context
|
|
74
|
+
uses: actions/download-artifact@v8
|
|
75
|
+
with:
|
|
76
|
+
name: lighthouse-${{ needs.prepare.outputs.artifact_prefix }}input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
77
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
78
|
+
post-steps:
|
|
79
|
+
- name: Validate the Lighthouse result
|
|
80
|
+
run: node tools/src/packages/sdlc/src/issue-actions.mjs validate
|
|
81
|
+
- name: Preserve the result and runtime receipt
|
|
82
|
+
if: always()
|
|
83
|
+
uses: actions/upload-artifact@v7
|
|
84
|
+
with:
|
|
85
|
+
name: lighthouse-${{ needs.prepare.outputs.artifact_prefix }}result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
86
|
+
path: |
|
|
87
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/envelope.json
|
|
88
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/runtime.json
|
|
89
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/changes.json
|
|
90
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/checks.json
|
|
91
|
+
if-no-files-found: error
|
|
92
|
+
retention-days: 14
|
|
93
|
+
- name: Preserve implementation evidence
|
|
94
|
+
if: always()
|
|
95
|
+
uses: actions/upload-artifact@v7
|
|
96
|
+
with:
|
|
97
|
+
name: implementation-evidence-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
98
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/evidence/
|
|
99
|
+
if-no-files-found: ignore
|
|
100
|
+
retention-days: 30
|
|
101
|
+
- name: Preserve OpenCode diagnostic events
|
|
102
|
+
if: always()
|
|
103
|
+
uses: actions/upload-artifact@v7
|
|
104
|
+
with:
|
|
105
|
+
name: opencode-implement-events-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
106
|
+
path: ${{ runner.temp }}/gh-aw/opencode-events-${{ github.run_id }}-${{ github.run_attempt }}.jsonl
|
|
107
|
+
if-no-files-found: ignore
|
|
108
|
+
retention-days: 14
|
|
109
|
+
jobs:
|
|
110
|
+
prepare:
|
|
111
|
+
outputs:
|
|
112
|
+
eligible: ${{ steps.prepare.outputs.eligible }}
|
|
113
|
+
source_revision: ${{ steps.prepare.outputs.source_revision }}
|
|
114
|
+
artifact_prefix: ${{ steps.prepare.outputs.artifact_prefix }}
|
|
115
|
+
name: Authorize and reserve issue
|
|
116
|
+
runs-on: ubuntu-24.04
|
|
117
|
+
permissions:
|
|
118
|
+
actions: read
|
|
119
|
+
contents: read
|
|
120
|
+
issues: write
|
|
121
|
+
env:
|
|
122
|
+
LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@v5
|
|
125
|
+
with:
|
|
126
|
+
repository: juangcarmona/lighthouse
|
|
127
|
+
ref: __LIGHTHOUSE_REF__
|
|
128
|
+
persist-credentials: false
|
|
129
|
+
- uses: actions/setup-node@v5
|
|
130
|
+
with:
|
|
131
|
+
node-version: 24
|
|
132
|
+
- name: Collect verified owner intent and reserve the issue
|
|
133
|
+
id: prepare
|
|
134
|
+
env:
|
|
135
|
+
GH_TOKEN: ${{ github.token }}
|
|
136
|
+
run: node src/packages/sdlc/src/issue-actions.mjs prepare
|
|
137
|
+
- name: Preserve the execution request
|
|
138
|
+
if: steps.prepare.outputs.eligible == 'true'
|
|
139
|
+
uses: actions/upload-artifact@v7
|
|
140
|
+
with:
|
|
141
|
+
name: lighthouse-${{ steps.prepare.outputs.artifact_prefix }}input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
142
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/
|
|
143
|
+
if-no-files-found: error
|
|
144
|
+
retention-days: 14
|
|
145
|
+
- name: Release reservation if preparation failed
|
|
146
|
+
if: failure()
|
|
147
|
+
env:
|
|
148
|
+
GH_TOKEN: ${{ github.token }}
|
|
149
|
+
run: node src/packages/sdlc/src/issue-actions.mjs cleanup
|
|
150
|
+
publish:
|
|
151
|
+
name: Validate, publish and release
|
|
152
|
+
needs: [prepare, agent]
|
|
153
|
+
if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
|
|
154
|
+
runs-on: ubuntu-24.04
|
|
155
|
+
permissions:
|
|
156
|
+
actions: write
|
|
157
|
+
contents: write
|
|
158
|
+
issues: write
|
|
159
|
+
pull-requests: write
|
|
160
|
+
env:
|
|
161
|
+
LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
|
|
162
|
+
steps:
|
|
163
|
+
- uses: actions/checkout@v5
|
|
164
|
+
with:
|
|
165
|
+
repository: juangcarmona/lighthouse
|
|
166
|
+
ref: __LIGHTHOUSE_REF__
|
|
167
|
+
persist-credentials: false
|
|
168
|
+
- uses: actions/setup-node@v5
|
|
169
|
+
with:
|
|
170
|
+
node-version: 24
|
|
171
|
+
- name: Load the execution request
|
|
172
|
+
uses: actions/download-artifact@v8
|
|
173
|
+
with:
|
|
174
|
+
name: lighthouse-${{ needs.prepare.outputs.artifact_prefix }}input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
175
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
176
|
+
- name: Load the candidate result
|
|
177
|
+
if: needs.agent.result == 'success'
|
|
178
|
+
uses: actions/download-artifact@v8
|
|
179
|
+
with:
|
|
180
|
+
name: lighthouse-${{ needs.prepare.outputs.artifact_prefix }}result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
181
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
182
|
+
- name: Require an executed agent
|
|
183
|
+
if: needs.agent.result != 'success'
|
|
184
|
+
run: |
|
|
185
|
+
echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
|
|
186
|
+
exit 1
|
|
187
|
+
- name: Recheck authority and publish the validated result
|
|
188
|
+
if: needs.agent.result == 'success'
|
|
189
|
+
env:
|
|
190
|
+
GH_TOKEN: ${{ github.token }}
|
|
191
|
+
run: node src/packages/sdlc/src/issue-actions.mjs publish
|
|
192
|
+
- name: Release the issue reservation
|
|
193
|
+
if: always()
|
|
194
|
+
env:
|
|
195
|
+
GH_TOKEN: ${{ github.token }}
|
|
196
|
+
run: node src/packages/sdlc/src/issue-actions.mjs cleanup
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
# Apply the owner feedback
|
|
200
|
+
|
|
201
|
+
Read `/input/context.json` and execute its supplied lifecycle skill and envelope contract. The stage remains `propose` or `implement`; this worker performs only the authorized correction on the existing PR. Read the full bounded conversation in `context.proposalReview` or `context.review`. Distinguish already-satisfied feedback from outstanding requests and preserve unrelated work. Ambiguous or conflicting requests require a precise question and a blocked result.
|
|
202
|
+
|
|
203
|
+
For a proposal, return the complete revised OpenSpec artifacts using the supplied provider instructions and keep implementation tasks pending. For implementation, update only the configured paths in the disposable workspace, run the configured checks, and retain evidence under `/output/evidence/`. The host independently verifies the candidate and rechecks the PR head and discussion before updating the same branch. It cannot merge through this worker.
|
|
204
|
+
|
|
205
|
+
Write `/output/envelope.json` with the supplied stage and identity. Report successful correction only when the required checks and decisions are satisfied. Stop after producing the candidate; publication belongs to the trusted host.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"
|
|
1
|
+
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"5b33eab666192fe853eab020086bd3a0627a76b26028f1f73e78827b26609240","body_hash":"260db41beef59e0a150c7e0ed9fed84f0f724b5aeba94e5d2576d4b203a9d663","compiler_version":"v0.93.2","agent_id":"opencode","engine_versions":{"opencode":"2.1.0"},"agent_image_runner":"[\"self-hosted\",\"linux\",\"lighthouse-workflow\"]"}
|
|
2
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
|
#
|
|
@@ -23,12 +23,17 @@
|
|
|
23
23
|
#
|
|
24
24
|
# For more information: https://github.github.com/gh-aw/introduction/overview/
|
|
25
25
|
#
|
|
26
|
-
#
|
|
26
|
+
# Plan and implement an authorized issue in an isolated workspace and deliver a reviewable PR.
|
|
27
27
|
#
|
|
28
28
|
# Resolved workflow manifest:
|
|
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
|
|
@@ -52,38 +57,37 @@
|
|
|
52
57
|
|
|
53
58
|
name: "Lighthouse SDLC implement"
|
|
54
59
|
on:
|
|
55
|
-
|
|
60
|
+
# roles: all # Roles processed as role check in pre-activation job
|
|
61
|
+
workflow_dispatch:
|
|
56
62
|
inputs:
|
|
57
63
|
aw_context:
|
|
58
64
|
default: ""
|
|
59
65
|
description: "Agent caller context (Reserved for Agentic Workflows)."
|
|
60
66
|
required: false
|
|
61
67
|
type: string
|
|
68
|
+
dispatch-request:
|
|
69
|
+
description: Authenticated router receipt comment ID
|
|
70
|
+
required: true
|
|
71
|
+
type: string
|
|
62
72
|
issue:
|
|
73
|
+
description: Source issue
|
|
63
74
|
required: true
|
|
64
75
|
type: string
|
|
65
|
-
secrets:
|
|
66
|
-
COPILOT_GITHUB_TOKEN:
|
|
67
|
-
required: false
|
|
68
|
-
GH_AW_DEFAULT_OTLP_ENDPOINT:
|
|
69
|
-
required: false
|
|
70
|
-
GH_AW_DEFAULT_OTLP_HEADERS:
|
|
71
|
-
required: false
|
|
72
|
-
GH_AW_GITHUB_MCP_SERVER_TOKEN:
|
|
73
|
-
required: false
|
|
74
|
-
GH_AW_GITHUB_TOKEN:
|
|
75
|
-
required: false
|
|
76
76
|
|
|
77
77
|
# Jobs receive only their explicitly declared permissions.
|
|
78
78
|
permissions: {}
|
|
79
79
|
|
|
80
80
|
concurrency:
|
|
81
|
-
|
|
81
|
+
cancel-in-progress: false
|
|
82
|
+
group: lighthouse-issue-${{ inputs.issue }}
|
|
82
83
|
queue: max
|
|
83
84
|
|
|
84
|
-
run-name: "
|
|
85
|
+
run-name: "implement #${{ inputs.issue }} · request ${{ inputs.dispatch-request }}"
|
|
85
86
|
|
|
86
87
|
env:
|
|
88
|
+
LIGHTHOUSE_DISPATCH_REQUIRED: "true"
|
|
89
|
+
LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
|
|
90
|
+
LIGHTHOUSE_STAGE: implement
|
|
87
91
|
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_DEFAULT_OTLP_ENDPOINT || vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}
|
|
88
92
|
OTEL_SERVICE_NAME: gh-aw.lighthouse-sdlc-implement
|
|
89
93
|
OTEL_RESOURCE_ATTRIBUTES: 'gh-aw.workflow.name=Lighthouse%20SDLC%20implement,gh-aw.repository=${{ github.repository }},gh-aw.run.id=${{ github.run_id }},github.run_id=${{ github.run_id }},gh-aw.engine.id=opencode'
|
|
@@ -97,7 +101,7 @@ jobs:
|
|
|
97
101
|
needs:
|
|
98
102
|
- pre_activation
|
|
99
103
|
- prepare
|
|
100
|
-
if: needs.pre_activation.outputs.activated == 'true'
|
|
104
|
+
if: needs.pre_activation.outputs.activated == 'true' && (needs.prepare.outputs.eligible == 'true')
|
|
101
105
|
runs-on: ubuntu-24.04
|
|
102
106
|
# Permissions for the activation job (workflow permissions default to none).
|
|
103
107
|
permissions:
|
|
@@ -107,7 +111,6 @@ jobs:
|
|
|
107
111
|
GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
|
|
108
112
|
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
|
|
109
113
|
outputs:
|
|
110
|
-
artifact_prefix: ${{ steps.artifact-prefix.outputs.prefix }}
|
|
111
114
|
aw_context: ${{ steps.generate_aw_info.outputs.aw_context }}
|
|
112
115
|
comment_id: ""
|
|
113
116
|
comment_repo: ""
|
|
@@ -125,10 +128,6 @@ jobs:
|
|
|
125
128
|
setup-span-id: ${{ steps.setup.outputs.span-id }}
|
|
126
129
|
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
|
|
127
130
|
stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
|
|
128
|
-
target_checkout_ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
|
|
129
|
-
target_ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
|
|
130
|
-
target_repo: ${{ steps.resolve-host-repo.outputs.target_repo }}
|
|
131
|
-
target_repo_name: ${{ steps.resolve-host-repo.outputs.target_repo_name }}
|
|
132
131
|
steps:
|
|
133
132
|
- name: Setup Scripts
|
|
134
133
|
id: setup
|
|
@@ -147,27 +146,6 @@ jobs:
|
|
|
147
146
|
GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
|
|
148
147
|
- name: Mask OTLP telemetry headers
|
|
149
148
|
run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
|
|
150
|
-
- name: Resolve host repo for activation checkout
|
|
151
|
-
id: resolve-host-repo
|
|
152
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
153
|
-
env:
|
|
154
|
-
JOB_WORKFLOW_REPOSITORY: ${{ job.workflow_repository }}
|
|
155
|
-
JOB_WORKFLOW_SHA: ${{ job.workflow_sha }}
|
|
156
|
-
JOB_WORKFLOW_REF: ${{ job.workflow_ref }}
|
|
157
|
-
JOB_WORKFLOW_FILE_PATH: ${{ job.workflow_file_path }}
|
|
158
|
-
with:
|
|
159
|
-
script: |
|
|
160
|
-
const path = require('path');
|
|
161
|
-
const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
|
|
162
|
-
const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
|
|
163
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
164
|
-
const { main } = require(path.join(actionsDir, 'resolve_host_repo.cjs'));
|
|
165
|
-
await main();
|
|
166
|
-
- name: Compute artifact prefix
|
|
167
|
-
id: artifact-prefix
|
|
168
|
-
env:
|
|
169
|
-
INPUTS_JSON: ${{ toJSON(inputs) }}
|
|
170
|
-
run: bash "${RUNNER_TEMP}/gh-aw/actions/compute_artifact_prefix.sh"
|
|
171
149
|
- name: Generate agentic run info
|
|
172
150
|
id: generate_aw_info
|
|
173
151
|
env:
|
|
@@ -190,7 +168,6 @@ jobs:
|
|
|
190
168
|
GH_AW_INFO_AGENT_RUNTIME: ""
|
|
191
169
|
GH_AW_INFO_MODEL_CONFIG: '{"routing":{"enabled":false}}'
|
|
192
170
|
GH_AW_COMPILED_STRICT: "false"
|
|
193
|
-
GH_AW_INFO_TARGET_REPO: ${{ steps.resolve-host-repo.outputs.target_repo }}
|
|
194
171
|
GH_AW_INFO_FEATURES: '{"dangerously-disable-sandbox-agent":true}'
|
|
195
172
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
196
173
|
with:
|
|
@@ -262,19 +239,10 @@ jobs:
|
|
|
262
239
|
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
|
263
240
|
GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
|
|
264
241
|
GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
|
|
265
|
-
- name: Print cross-repo setup guidance
|
|
266
|
-
if: failure() && steps.resolve-host-repo.outputs.target_repo != github.repository
|
|
267
|
-
run: |
|
|
268
|
-
echo "::error::COPILOT_GITHUB_TOKEN must be configured in the CALLER repository's secrets."
|
|
269
|
-
echo "::error::For cross-repo workflow_call, secrets must be set in the repository that triggers the workflow."
|
|
270
|
-
echo "::error::See: https://github.github.com/gh-aw/patterns/central-repo-ops/#cross-repo-setup"
|
|
271
242
|
- name: Checkout .github and .agents folders
|
|
272
|
-
if: steps.resolve-host-repo.outputs.target_repo == github.repository
|
|
273
243
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
274
244
|
with:
|
|
275
245
|
persist-credentials: false
|
|
276
|
-
repository: ${{ steps.resolve-host-repo.outputs.target_repo }}
|
|
277
|
-
ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
|
|
278
246
|
sparse-checkout: |
|
|
279
247
|
.github
|
|
280
248
|
.agents
|
|
@@ -408,7 +376,7 @@ jobs:
|
|
|
408
376
|
if: success() || failure()
|
|
409
377
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
410
378
|
with:
|
|
411
|
-
name:
|
|
379
|
+
name: info
|
|
412
380
|
path: /tmp/gh-aw/aw_info.json
|
|
413
381
|
if-no-files-found: ignore
|
|
414
382
|
retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '0' }}
|
|
@@ -420,7 +388,7 @@ jobs:
|
|
|
420
388
|
if: success() || failure()
|
|
421
389
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
422
390
|
with:
|
|
423
|
-
name:
|
|
391
|
+
name: activation
|
|
424
392
|
include-hidden-files: true
|
|
425
393
|
path: |
|
|
426
394
|
/tmp/gh-aw/aw_info.json
|
|
@@ -443,7 +411,7 @@ jobs:
|
|
|
443
411
|
needs:
|
|
444
412
|
- activation
|
|
445
413
|
- prepare
|
|
446
|
-
if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
|
|
414
|
+
if: (needs.prepare.outputs.eligible == 'true') && (needs.activation.outputs.daily_ai_credits_exceeded != 'true')
|
|
447
415
|
runs-on:
|
|
448
416
|
- self-hosted
|
|
449
417
|
- linux
|
|
@@ -451,9 +419,6 @@ jobs:
|
|
|
451
419
|
# Permissions for the agent job (workflow permissions default to none).
|
|
452
420
|
permissions:
|
|
453
421
|
contents: read
|
|
454
|
-
concurrency:
|
|
455
|
-
group: "gh-aw-opencode-lighthouse-sdlc-implement"
|
|
456
|
-
queue: max
|
|
457
422
|
timeout-minutes: 60
|
|
458
423
|
env:
|
|
459
424
|
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
@@ -475,7 +440,6 @@ jobs:
|
|
|
475
440
|
ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
|
|
476
441
|
aic: ${{ steps.parse-mcp-gateway.outputs.aic }}
|
|
477
442
|
ambient_context: ${{ steps.parse-mcp-gateway.outputs.ambient_context }}
|
|
478
|
-
artifact_prefix: ${{ needs.activation.outputs.artifact_prefix }}
|
|
479
443
|
has_patch: ${{ steps.collect_output.outputs.has_patch }}
|
|
480
444
|
model: ${{ needs.activation.outputs.model }}
|
|
481
445
|
output: ${{ steps.collect_output.outputs.output }}
|
|
@@ -531,12 +495,13 @@ jobs:
|
|
|
531
495
|
- name: Download activation artifact
|
|
532
496
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
533
497
|
with:
|
|
534
|
-
name:
|
|
498
|
+
name: activation
|
|
535
499
|
path: /tmp/gh-aw
|
|
536
500
|
- name: Check out the authorized product revision
|
|
537
501
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
538
502
|
with:
|
|
539
503
|
persist-credentials: false
|
|
504
|
+
ref: ${{ needs.prepare.outputs.source_revision }}
|
|
540
505
|
- name: Setup Node.js
|
|
541
506
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
542
507
|
with:
|
|
@@ -552,7 +517,7 @@ jobs:
|
|
|
552
517
|
- name: Load the authorized issue context
|
|
553
518
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
554
519
|
with:
|
|
555
|
-
name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
520
|
+
name: lighthouse-implement-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
556
521
|
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
557
522
|
|
|
558
523
|
- name: Configure Git credentials
|
|
@@ -903,7 +868,7 @@ jobs:
|
|
|
903
868
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
904
869
|
with:
|
|
905
870
|
if-no-files-found: error
|
|
906
|
-
name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
871
|
+
name: lighthouse-implement-result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
907
872
|
path: |
|
|
908
873
|
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/envelope.json
|
|
909
874
|
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/runtime.json
|
|
@@ -923,7 +888,7 @@ jobs:
|
|
|
923
888
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
924
889
|
with:
|
|
925
890
|
if-no-files-found: ignore
|
|
926
|
-
name: opencode-events-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
891
|
+
name: opencode-implement-events-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
927
892
|
path: ${{ runner.temp }}/gh-aw/opencode-events-${{ github.run_id }}-${{ github.run_attempt }}.jsonl
|
|
928
893
|
retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '14' }}
|
|
929
894
|
|
|
@@ -934,7 +899,7 @@ jobs:
|
|
|
934
899
|
continue-on-error: true
|
|
935
900
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
936
901
|
with:
|
|
937
|
-
name:
|
|
902
|
+
name: agent-output-fallback
|
|
938
903
|
path: |
|
|
939
904
|
/tmp/gh-aw/agent_output.json
|
|
940
905
|
/tmp/gh-aw/safeoutputs.jsonl
|
|
@@ -956,7 +921,7 @@ jobs:
|
|
|
956
921
|
continue-on-error: true
|
|
957
922
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
958
923
|
with:
|
|
959
|
-
name:
|
|
924
|
+
name: agent
|
|
960
925
|
path: |
|
|
961
926
|
/tmp/gh-aw/aw-prompts/prompt.txt
|
|
962
927
|
/tmp/gh-aw/agent_execution.json
|
|
@@ -995,7 +960,7 @@ jobs:
|
|
|
995
960
|
actions: read
|
|
996
961
|
issues: write
|
|
997
962
|
concurrency:
|
|
998
|
-
group: "gh-aw-conclusion-lighthouse-sdlc-implement"
|
|
963
|
+
group: "gh-aw-conclusion-lighthouse-sdlc-implement-${{ github.run_id }}"
|
|
999
964
|
cancel-in-progress: false
|
|
1000
965
|
queue: max
|
|
1001
966
|
env:
|
|
@@ -1026,7 +991,7 @@ jobs:
|
|
|
1026
991
|
continue-on-error: true
|
|
1027
992
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
1028
993
|
with:
|
|
1029
|
-
pattern: "{
|
|
994
|
+
pattern: "{agent,agent-output-fallback}"
|
|
1030
995
|
merge-multiple: true
|
|
1031
996
|
path: /tmp/gh-aw/
|
|
1032
997
|
- name: Setup agent output environment variable
|
|
@@ -1044,7 +1009,7 @@ jobs:
|
|
|
1044
1009
|
continue-on-error: true
|
|
1045
1010
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
1046
1011
|
with:
|
|
1047
|
-
pattern:
|
|
1012
|
+
pattern: safe-outputs-items
|
|
1048
1013
|
merge-multiple: true
|
|
1049
1014
|
path: /tmp/gh-aw/
|
|
1050
1015
|
- name: Process no-op messages
|
|
@@ -1169,7 +1134,7 @@ jobs:
|
|
|
1169
1134
|
continue-on-error: true
|
|
1170
1135
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
1171
1136
|
with:
|
|
1172
|
-
name:
|
|
1137
|
+
name: usage
|
|
1173
1138
|
path: |
|
|
1174
1139
|
/tmp/gh-aw/usage/aw_session.jsonl
|
|
1175
1140
|
/tmp/gh-aw/usage/aw_info.json
|
|
@@ -1204,7 +1169,7 @@ jobs:
|
|
|
1204
1169
|
continue-on-error: true
|
|
1205
1170
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
1206
1171
|
with:
|
|
1207
|
-
name:
|
|
1172
|
+
name: usage
|
|
1208
1173
|
path: |
|
|
1209
1174
|
/tmp/gh-aw/usage/aw_session.jsonl
|
|
1210
1175
|
/tmp/gh-aw/usage/aw_info.json
|
|
@@ -1239,7 +1204,7 @@ jobs:
|
|
|
1239
1204
|
env:
|
|
1240
1205
|
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
|
|
1241
1206
|
outputs:
|
|
1242
|
-
activated: ${{
|
|
1207
|
+
activated: ${{ 'true' }}
|
|
1243
1208
|
matched_command: ''
|
|
1244
1209
|
setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
|
|
1245
1210
|
setup-span-id: ${{ steps.setup.outputs.span-id }}
|
|
@@ -1257,20 +1222,6 @@ jobs:
|
|
|
1257
1222
|
GH_AW_INFO_VERSION: "2.1.0"
|
|
1258
1223
|
GH_AW_INFO_ENGINE_ID: "opencode"
|
|
1259
1224
|
GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
|
|
1260
|
-
- name: Check team membership for workflow
|
|
1261
|
-
id: check_membership
|
|
1262
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
1263
|
-
env:
|
|
1264
|
-
GH_AW_REQUIRED_ROLES: "admin,maintainer,write"
|
|
1265
|
-
with:
|
|
1266
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
1267
|
-
script: |
|
|
1268
|
-
const path = require('path');
|
|
1269
|
-
const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
|
|
1270
|
-
const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
|
|
1271
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
1272
|
-
const { main } = require(path.join(actionsDir, 'check_membership.cjs'));
|
|
1273
|
-
await main();
|
|
1274
1225
|
|
|
1275
1226
|
prepare:
|
|
1276
1227
|
name: Authorize and reserve issue
|
|
@@ -1282,6 +1233,9 @@ jobs:
|
|
|
1282
1233
|
issues: write
|
|
1283
1234
|
env:
|
|
1284
1235
|
LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
|
|
1236
|
+
outputs:
|
|
1237
|
+
eligible: ${{ steps.prepare.outputs.eligible }}
|
|
1238
|
+
source_revision: ${{ steps.prepare.outputs.source_revision }}
|
|
1285
1239
|
steps:
|
|
1286
1240
|
- name: Configure GH_HOST for enterprise compatibility
|
|
1287
1241
|
id: ghes-host-config
|
|
@@ -1306,10 +1260,11 @@ jobs:
|
|
|
1306
1260
|
env:
|
|
1307
1261
|
GH_TOKEN: ${{ github.token }}
|
|
1308
1262
|
- name: Preserve the execution request
|
|
1263
|
+
if: steps.prepare.outputs.eligible == 'true'
|
|
1309
1264
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
1310
1265
|
with:
|
|
1311
1266
|
if-no-files-found: error
|
|
1312
|
-
name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1267
|
+
name: lighthouse-implement-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1313
1268
|
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/
|
|
1314
1269
|
retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '14' }}
|
|
1315
1270
|
- name: Release reservation if preparation failed
|
|
@@ -1323,10 +1278,11 @@ jobs:
|
|
|
1323
1278
|
needs:
|
|
1324
1279
|
- agent
|
|
1325
1280
|
- prepare
|
|
1326
|
-
if: always() && needs.prepare.result == 'success'
|
|
1281
|
+
if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
|
|
1327
1282
|
runs-on: ubuntu-24.04
|
|
1328
1283
|
# Permissions for the publish job (workflow permissions default to none).
|
|
1329
1284
|
permissions:
|
|
1285
|
+
actions: write
|
|
1330
1286
|
contents: write
|
|
1331
1287
|
issues: write
|
|
1332
1288
|
pull-requests: write
|
|
@@ -1353,14 +1309,19 @@ jobs:
|
|
|
1353
1309
|
- name: Load the execution request
|
|
1354
1310
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
1355
1311
|
with:
|
|
1356
|
-
name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1312
|
+
name: lighthouse-implement-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1357
1313
|
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
1358
1314
|
- name: Load the candidate result
|
|
1359
1315
|
if: needs.agent.result == 'success'
|
|
1360
1316
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
1361
1317
|
with:
|
|
1362
|
-
name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1318
|
+
name: lighthouse-implement-result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
1363
1319
|
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
1320
|
+
- name: Require an executed agent
|
|
1321
|
+
if: needs.agent.result != 'success'
|
|
1322
|
+
run: |
|
|
1323
|
+
echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
|
|
1324
|
+
exit 1
|
|
1364
1325
|
- name: Recheck authority and publish the validated result
|
|
1365
1326
|
if: needs.agent.result == 'success'
|
|
1366
1327
|
run: node src/packages/sdlc/src/issue-actions.mjs publish
|