@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.
- package/README.md +86 -3
- package/completion.md +50 -0
- package/execution-environments.md +43 -0
- package/package.json +3 -1
- package/schemas/execution-environment.schema.json +12 -0
- package/skills/implement/SKILL.md +9 -8
- package/skills/integrate/SKILL.md +7 -1
- package/skills/propose/SKILL.md +1 -1
- package/skills/review/SKILL.md +7 -1
- package/src/actions-artifact.mjs +17 -0
- package/src/completion-actions.mjs +134 -0
- package/src/completion.mjs +188 -0
- package/src/delivery-events.mjs +42 -0
- package/src/execution-environment.mjs +78 -0
- package/src/github-profile.mjs +9 -1
- package/src/host-contract.mjs +7 -3
- package/src/implementation-runtime.mjs +90 -0
- package/src/implementation.mjs +155 -0
- package/src/install-workflows.mjs +14 -5
- package/src/integration-evidence.mjs +80 -0
- package/src/issue-actions.mjs +325 -38
- package/src/observe-protection.mjs +24 -0
- package/src/opencode-execute.mjs +128 -20
- package/src/opencode-progress.mjs +48 -0
- package/src/process-publication.mjs +90 -0
- package/src/proposal-review.mjs +91 -0
- package/src/proposal.mjs +110 -0
- 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 +285 -1158
- package/workflows/lighthouse-sdlc-implement.md +193 -28
- package/workflows/lighthouse-sdlc-integrate.lock.yml +288 -1154
- package/workflows/lighthouse-sdlc-integrate.md +197 -28
- package/workflows/lighthouse-sdlc-propose.lock.yml +274 -1157
- package/workflows/lighthouse-sdlc-propose.md +183 -28
- package/workflows/lighthouse-sdlc-refine.lock.yml +263 -90
- package/workflows/lighthouse-sdlc-refine.md +45 -4
- package/workflows/lighthouse-sdlc-review.lock.yml +288 -1154
- package/workflows/lighthouse-sdlc-review.md +197 -28
- package/workflows/lighthouse-sdlc-router.yml +91 -17
- package/workflows/lighthouse-worker-maintenance.yml +126 -0
- package/workflows/shared/lighthouse-opencode.md +4 -2
|
@@ -1,41 +1,210 @@
|
|
|
1
1
|
---
|
|
2
|
-
# Owned by
|
|
2
|
+
# Owned by lighthouse-sdlc. Regenerate the lock with gh aw v0.93.2.
|
|
3
3
|
name: Lighthouse SDLC review
|
|
4
|
-
description:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
LIGHTHOUSE_SKILL: node_modules/@juangcarmona/lighthouse-sdlc/skills/review/SKILL.md
|
|
4
|
+
description: Assess review with OpenCode and retain a verified delivery record.
|
|
5
|
+
run-name: "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 }}
|
|
12
11
|
on:
|
|
13
|
-
|
|
12
|
+
# The required preparation job authenticates the originating owner request.
|
|
13
|
+
roles: all
|
|
14
|
+
workflow_dispatch:
|
|
14
15
|
inputs:
|
|
15
|
-
|
|
16
|
-
description:
|
|
16
|
+
issue:
|
|
17
|
+
description: Source issue
|
|
17
18
|
required: true
|
|
18
19
|
type: string
|
|
19
|
-
|
|
20
|
-
description:
|
|
20
|
+
dispatch-request:
|
|
21
|
+
description: Authenticated router receipt comment ID
|
|
21
22
|
required: true
|
|
22
23
|
type: string
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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: 15
|
|
29
|
+
env:
|
|
30
|
+
LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
|
|
31
|
+
LIGHTHOUSE_STAGE: review
|
|
32
|
+
LIGHTHOUSE_DISPATCH_REQUIRED: "true"
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
engine:
|
|
36
|
+
id: opencode
|
|
37
|
+
command: node
|
|
33
38
|
imports:
|
|
34
|
-
- shared/lighthouse-
|
|
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
|
+
ref: ${{ needs.prepare.outputs.revision }}
|
|
65
|
+
persist-credentials: false
|
|
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-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/completion-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-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
|
+
if-no-files-found: error
|
|
90
|
+
retention-days: 14
|
|
91
|
+
- name: Preserve OpenCode diagnostic events
|
|
92
|
+
if: always()
|
|
93
|
+
uses: actions/upload-artifact@v7
|
|
94
|
+
with:
|
|
95
|
+
name: opencode-events-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
96
|
+
path: ${{ runner.temp }}/gh-aw/opencode-events-${{ github.run_id }}-${{ github.run_attempt }}.jsonl
|
|
97
|
+
if-no-files-found: ignore
|
|
98
|
+
retention-days: 14
|
|
99
|
+
jobs:
|
|
100
|
+
prepare:
|
|
101
|
+
outputs:
|
|
102
|
+
eligible: ${{ steps.prepare.outputs.eligible }}
|
|
103
|
+
revision: ${{ steps.prepare.outputs.revision }}
|
|
104
|
+
name: Verify accepted commit, checks and evidence protection
|
|
105
|
+
runs-on: ubuntu-24.04
|
|
106
|
+
permissions:
|
|
107
|
+
actions: read
|
|
108
|
+
checks: read
|
|
109
|
+
contents: read
|
|
110
|
+
pull-requests: read
|
|
111
|
+
issues: write
|
|
112
|
+
env:
|
|
113
|
+
LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
|
|
114
|
+
steps:
|
|
115
|
+
- uses: actions/checkout@v5
|
|
116
|
+
with:
|
|
117
|
+
repository: juangcarmona/lighthouse
|
|
118
|
+
ref: __LIGHTHOUSE_REF__
|
|
119
|
+
persist-credentials: false
|
|
120
|
+
- uses: actions/setup-node@v5
|
|
121
|
+
with:
|
|
122
|
+
node-version: 24
|
|
123
|
+
- name: Collect verified owner intent and reserve the issue
|
|
124
|
+
id: prepare
|
|
125
|
+
env:
|
|
126
|
+
GH_TOKEN: ${{ github.token }}
|
|
127
|
+
run: node src/packages/sdlc/src/completion-actions.mjs prepare
|
|
128
|
+
- name: Preserve the execution request
|
|
129
|
+
if: steps.prepare.outputs.eligible == 'true'
|
|
130
|
+
uses: actions/upload-artifact@v7
|
|
131
|
+
with:
|
|
132
|
+
name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
133
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/
|
|
134
|
+
if-no-files-found: error
|
|
135
|
+
retention-days: 14
|
|
136
|
+
- name: Release reservation if preparation failed
|
|
137
|
+
if: failure()
|
|
138
|
+
env:
|
|
139
|
+
GH_TOKEN: ${{ github.token }}
|
|
140
|
+
run: node src/packages/sdlc/src/completion-actions.mjs cleanup
|
|
141
|
+
publish:
|
|
142
|
+
concurrency:
|
|
143
|
+
group: lighthouse-process-publication
|
|
144
|
+
cancel-in-progress: false
|
|
145
|
+
name: Validate, publish and release
|
|
146
|
+
needs: [prepare, agent]
|
|
147
|
+
if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
|
|
148
|
+
runs-on: ubuntu-24.04
|
|
149
|
+
permissions:
|
|
150
|
+
actions: write
|
|
151
|
+
checks: read
|
|
152
|
+
contents: write
|
|
153
|
+
pull-requests: write
|
|
154
|
+
issues: write
|
|
155
|
+
env:
|
|
156
|
+
LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
|
|
157
|
+
steps:
|
|
158
|
+
- uses: actions/checkout@v5
|
|
159
|
+
with:
|
|
160
|
+
repository: juangcarmona/lighthouse
|
|
161
|
+
ref: __LIGHTHOUSE_REF__
|
|
162
|
+
persist-credentials: false
|
|
163
|
+
- uses: actions/setup-node@v5
|
|
164
|
+
with:
|
|
165
|
+
node-version: 24
|
|
166
|
+
- name: Load the execution request
|
|
167
|
+
uses: actions/download-artifact@v8
|
|
168
|
+
with:
|
|
169
|
+
name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
170
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
171
|
+
- name: Load the candidate result
|
|
172
|
+
if: needs.agent.result == 'success'
|
|
173
|
+
uses: actions/download-artifact@v8
|
|
174
|
+
with:
|
|
175
|
+
name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
176
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
|
|
177
|
+
- name: Require an executed agent
|
|
178
|
+
if: needs.agent.result != 'success'
|
|
179
|
+
run: |
|
|
180
|
+
echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
|
|
181
|
+
exit 1
|
|
182
|
+
- name: Recheck authority and publish the validated result
|
|
183
|
+
if: needs.agent.result == 'success'
|
|
184
|
+
env:
|
|
185
|
+
GH_TOKEN: ${{ github.token }}
|
|
186
|
+
run: node src/packages/sdlc/src/completion-actions.mjs publish
|
|
187
|
+
- name: Preserve merge and publication receipts
|
|
188
|
+
if: always()
|
|
189
|
+
uses: actions/upload-artifact@v7
|
|
190
|
+
with:
|
|
191
|
+
name: lighthouse-completion-${{ inputs.issue }}-${{ github.run_attempt }}
|
|
192
|
+
path: |
|
|
193
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/integration-receipt.json
|
|
194
|
+
${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/publication-receipt.json
|
|
195
|
+
if-no-files-found: warn
|
|
196
|
+
retention-days: 30
|
|
197
|
+
- name: Release the issue reservation
|
|
198
|
+
if: always()
|
|
199
|
+
env:
|
|
200
|
+
GH_TOKEN: ${{ github.token }}
|
|
201
|
+
run: node src/packages/sdlc/src/completion-actions.mjs cleanup
|
|
35
202
|
---
|
|
36
203
|
|
|
37
|
-
#
|
|
204
|
+
# Review the accepted delivery
|
|
205
|
+
|
|
206
|
+
Follow `/harness/skills/review/SKILL.md` using `/input/context.json`. The host supplies the accepted PR revision, intent and policy fingerprints, changed paths and authenticated GitHub check results. Source under `/workspace` is read-only. Inspect affected guidance and acceptance evidence; a green check alone does not establish intended behavior. Distinguish missing verification from a failed check.
|
|
38
207
|
|
|
39
|
-
|
|
208
|
+
Explain each decision and finding in public progress messages. Write `/output/envelope.json` with the supplied identity. Return `blocked` for unresolved current-stage evidence or decisions. For review, include `output.retrospective` as concise Markdown: what went well, what went wrong, start doing, stop doing and improvement candidates with evidence and an owner. Do not infer recurrence from retries of a single issue. Separate actual source defects from process gaps; proposed guards need their own review and regression proof.
|
|
40
209
|
|
|
41
|
-
|
|
210
|
+
The publisher rechecks current authority, GitHub checks and reservation. Only an explicit owner dispatch with `merge: true` can authorize integration, and GitHub still enforces merge rules. A passed assessment never proves a merge occurred. Review records learning without changing permissions, opening issues or starting another stage. The host validates the envelope and records the gh-aw completion signal.
|
|
@@ -1,35 +1,71 @@
|
|
|
1
|
-
# Optional GitHub-native
|
|
1
|
+
# Optional GitHub-native stage adapter; source owned by lighthouse-sdlc.
|
|
2
2
|
name: Lighthouse SDLC router
|
|
3
|
-
run-name: "
|
|
3
|
+
run-name: "${{ (github.event_name == 'workflow_run' && 'Delivery after CI') || inputs.stage || github.event.label.name || ((github.event.pull_request || github.event.issue.pull_request) && 'PR review') || (github.event_name == 'issue_comment' && 'reply') || 'refine' }} #${{ github.event.issue.number || github.event.pull_request.number || inputs.issue }} · ${{ github.actor }}"
|
|
4
4
|
on:
|
|
5
5
|
issues:
|
|
6
|
-
types: [labeled]
|
|
6
|
+
types: [labeled, unlabeled]
|
|
7
7
|
issue_comment:
|
|
8
8
|
types: [created]
|
|
9
|
+
pull_request_review:
|
|
10
|
+
types: [submitted]
|
|
11
|
+
pull_request_review_comment:
|
|
12
|
+
types: [created]
|
|
13
|
+
workflow_run:
|
|
14
|
+
workflows: ["*"]
|
|
15
|
+
types: [completed]
|
|
9
16
|
workflow_dispatch:
|
|
10
17
|
inputs:
|
|
11
18
|
issue:
|
|
12
|
-
description:
|
|
19
|
+
description: Work item to process
|
|
20
|
+
required: true
|
|
21
|
+
type: string
|
|
22
|
+
stage:
|
|
23
|
+
description: Authorized lifecycle stage
|
|
13
24
|
required: true
|
|
25
|
+
default: refine
|
|
26
|
+
type: choice
|
|
27
|
+
options: [refine, propose, implement, integrate, review]
|
|
28
|
+
after_run:
|
|
29
|
+
description: Recheck a completed execution through the same continuation rules
|
|
30
|
+
required: false
|
|
14
31
|
type: string
|
|
32
|
+
pull_request:
|
|
33
|
+
description: PR number for integrate or review
|
|
34
|
+
required: false
|
|
35
|
+
type: string
|
|
36
|
+
head:
|
|
37
|
+
description: Full accepted PR head SHA for integrate or review
|
|
38
|
+
required: false
|
|
39
|
+
type: string
|
|
40
|
+
merge:
|
|
41
|
+
description: Explicitly authorize integrating this accepted PR head
|
|
42
|
+
required: false
|
|
43
|
+
default: false
|
|
44
|
+
type: boolean
|
|
15
45
|
permissions:
|
|
16
46
|
contents: read
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
47
|
+
env:
|
|
48
|
+
LIGHTHOUSE_ENABLED_STAGES: refine,propose,implement,integrate,review
|
|
49
|
+
LIGHTHOUSE_AUTO_IMPLEMENT: true
|
|
50
|
+
LIGHTHOUSE_COMPLETION_ENABLED: true
|
|
20
51
|
jobs:
|
|
21
52
|
route:
|
|
22
53
|
if: >-
|
|
23
54
|
vars.LIGHTHOUSE_AUTOMATION_ENABLED == 'true' &&
|
|
24
|
-
github.actor == github.repository_owner &&
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'needs-info')))
|
|
55
|
+
(github.actor == github.repository_owner || github.event_name == 'workflow_run') &&
|
|
56
|
+
(github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run' ||
|
|
57
|
+
(github.event_name == 'issues' && (github.event.label.name == 'refine' || github.event.label.name == 'propose' || github.event.label.name == 'implement' || (github.event.action == 'unlabeled' && github.event.label.name == 'future'))) ||
|
|
58
|
+
github.event_name == 'issue_comment' || github.event_name == 'pull_request_review' || github.event_name == 'pull_request_review_comment')
|
|
29
59
|
runs-on: ubuntu-24.04
|
|
60
|
+
permissions:
|
|
61
|
+
actions: read
|
|
62
|
+
contents: read
|
|
63
|
+
issues: write
|
|
64
|
+
pull-requests: write
|
|
30
65
|
outputs:
|
|
31
66
|
run: ${{ steps.route.outputs.run }}
|
|
32
67
|
issue: ${{ steps.route.outputs.issue }}
|
|
68
|
+
stage: ${{ steps.route.outputs.stage }}
|
|
33
69
|
steps:
|
|
34
70
|
- uses: actions/checkout@v5
|
|
35
71
|
with:
|
|
@@ -41,14 +77,52 @@ jobs:
|
|
|
41
77
|
node-version: 24
|
|
42
78
|
- name: Route the authorized event
|
|
43
79
|
id: route
|
|
80
|
+
env:
|
|
81
|
+
GH_TOKEN: ${{ github.token }}
|
|
82
|
+
LIGHTHOUSE_COMPLETION_ENABLED: true
|
|
44
83
|
run: node src/packages/sdlc/src/issue-actions.mjs route
|
|
45
|
-
|
|
84
|
+
dispatch:
|
|
85
|
+
name: 📥 Dispatch selected stage
|
|
46
86
|
needs: route
|
|
47
87
|
if: needs.route.outputs.run == 'true'
|
|
88
|
+
concurrency:
|
|
89
|
+
group: lighthouse-dispatch-${{ needs.route.outputs.issue }}
|
|
90
|
+
cancel-in-progress: false
|
|
91
|
+
queue: max
|
|
92
|
+
runs-on: ubuntu-24.04
|
|
48
93
|
permissions:
|
|
49
|
-
actions:
|
|
94
|
+
actions: write
|
|
50
95
|
contents: read
|
|
51
96
|
issues: write
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
97
|
+
pull-requests: read
|
|
98
|
+
env:
|
|
99
|
+
LIGHTHOUSE_ISSUE: ${{ needs.route.outputs.issue }}
|
|
100
|
+
LIGHTHOUSE_STAGE: ${{ needs.route.outputs.stage }}
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v5
|
|
103
|
+
with:
|
|
104
|
+
repository: juangcarmona/lighthouse
|
|
105
|
+
ref: __LIGHTHOUSE_REF__
|
|
106
|
+
persist-credentials: false
|
|
107
|
+
- uses: actions/setup-node@v5
|
|
108
|
+
with:
|
|
109
|
+
node-version: 24
|
|
110
|
+
- name: Record the authorized request
|
|
111
|
+
id: request
|
|
112
|
+
env:
|
|
113
|
+
GH_TOKEN: ${{ github.token }}
|
|
114
|
+
run: node src/packages/sdlc/src/issue-actions.mjs dispatch-prepare
|
|
115
|
+
- name: Preserve the request before dispatch
|
|
116
|
+
if: steps.request.outputs.send == 'true'
|
|
117
|
+
uses: actions/upload-artifact@v7
|
|
118
|
+
with:
|
|
119
|
+
name: ${{ steps.request.outputs.artifact }}
|
|
120
|
+
path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/dispatch.json
|
|
121
|
+
retention-days: 14
|
|
122
|
+
if-no-files-found: error
|
|
123
|
+
- name: Dispatch the independent stage
|
|
124
|
+
if: steps.request.outputs.send == 'true'
|
|
125
|
+
env:
|
|
126
|
+
GH_TOKEN: ${{ github.token }}
|
|
127
|
+
LIGHTHOUSE_DISPATCH_COMMENT: ${{ steps.request.outputs.comment }}
|
|
128
|
+
run: node src/packages/sdlc/src/issue-actions.mjs dispatch-send
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
name: Lighthouse worker maintenance
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: '17,47 * * * *'
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
issue:
|
|
8
|
+
description: Optional source issue; empty scans open owner issues
|
|
9
|
+
required: false
|
|
10
|
+
type: string
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
env:
|
|
14
|
+
LIGHTHOUSE_MAINTENANCE_ENABLED: ${{ vars.LIGHTHOUSE_MAINTENANCE_ENABLED }}
|
|
15
|
+
LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
|
|
16
|
+
jobs:
|
|
17
|
+
scan:
|
|
18
|
+
if: vars.LIGHTHOUSE_AUTOMATION_ENABLED == 'true' && vars.LIGHTHOUSE_MAINTENANCE_ENABLED == 'true' && github.actor == github.repository_owner
|
|
19
|
+
runs-on: ubuntu-24.04
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
actions: read
|
|
23
|
+
issues: read
|
|
24
|
+
outputs:
|
|
25
|
+
issues: ${{ steps.scan.outputs.issues }}
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v5
|
|
28
|
+
with:
|
|
29
|
+
repository: juangcarmona/lighthouse
|
|
30
|
+
ref: __LIGHTHOUSE_REF__
|
|
31
|
+
persist-credentials: false
|
|
32
|
+
- uses: actions/setup-node@v5
|
|
33
|
+
with:
|
|
34
|
+
node-version: 24
|
|
35
|
+
- id: scan
|
|
36
|
+
env:
|
|
37
|
+
GH_TOKEN: ${{ github.token }}
|
|
38
|
+
run: node src/packages/sdlc/src/worker-maintenance.mjs scan
|
|
39
|
+
reconcile:
|
|
40
|
+
needs: scan
|
|
41
|
+
if: needs.scan.outputs.issues != '[]'
|
|
42
|
+
strategy:
|
|
43
|
+
fail-fast: false
|
|
44
|
+
max-parallel: 5
|
|
45
|
+
matrix:
|
|
46
|
+
issue: ${{ fromJSON(needs.scan.outputs.issues) }}
|
|
47
|
+
concurrency:
|
|
48
|
+
group: lighthouse-dispatch-${{ matrix.issue }}
|
|
49
|
+
cancel-in-progress: false
|
|
50
|
+
queue: max
|
|
51
|
+
runs-on: ubuntu-24.04
|
|
52
|
+
permissions:
|
|
53
|
+
contents: read
|
|
54
|
+
actions: write
|
|
55
|
+
issues: write
|
|
56
|
+
pull-requests: read
|
|
57
|
+
env:
|
|
58
|
+
LIGHTHOUSE_ISSUE: ${{ matrix.issue }}
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v5
|
|
61
|
+
with:
|
|
62
|
+
repository: juangcarmona/lighthouse
|
|
63
|
+
ref: __LIGHTHOUSE_REF__
|
|
64
|
+
persist-credentials: false
|
|
65
|
+
- uses: actions/setup-node@v5
|
|
66
|
+
with:
|
|
67
|
+
node-version: 24
|
|
68
|
+
- name: Reconcile and record one bounded retry
|
|
69
|
+
id: request
|
|
70
|
+
env:
|
|
71
|
+
GH_TOKEN: ${{ github.token }}
|
|
72
|
+
run: node src/packages/sdlc/src/worker-maintenance.mjs prepare
|
|
73
|
+
- name: Preserve request before dispatch
|
|
74
|
+
if: steps.request.outputs.send == 'true'
|
|
75
|
+
uses: actions/upload-artifact@v7
|
|
76
|
+
with:
|
|
77
|
+
name: ${{ steps.request.outputs.artifact }}
|
|
78
|
+
path: ${{ runner.temp }}/lighthouse-maintenance-${{ github.run_id }}-${{ matrix.issue }}/dispatch.json
|
|
79
|
+
retention-days: 14
|
|
80
|
+
if-no-files-found: error
|
|
81
|
+
- name: Send the recorded retry once
|
|
82
|
+
if: steps.request.outputs.send == 'true'
|
|
83
|
+
env:
|
|
84
|
+
GH_TOKEN: ${{ github.token }}
|
|
85
|
+
LIGHTHOUSE_DISPATCH_COMMENT: ${{ steps.request.outputs.comment }}
|
|
86
|
+
run: node src/packages/sdlc/src/worker-maintenance.mjs send
|
|
87
|
+
- name: Preserve observations
|
|
88
|
+
if: always()
|
|
89
|
+
uses: actions/upload-artifact@v7
|
|
90
|
+
with:
|
|
91
|
+
name: lighthouse-maintenance-${{ matrix.issue }}
|
|
92
|
+
path: ${{ runner.temp }}/lighthouse-maintenance-${{ github.run_id }}-${{ matrix.issue }}/observations.json
|
|
93
|
+
retention-days: 14
|
|
94
|
+
if-no-files-found: error
|
|
95
|
+
report:
|
|
96
|
+
needs: [scan, reconcile]
|
|
97
|
+
if: always() && needs.scan.result == 'success' && needs.scan.outputs.issues != '[]' && vars.LIGHTHOUSE_REPORT_INDEX_ISSUE != ''
|
|
98
|
+
concurrency:
|
|
99
|
+
group: lighthouse-worker-reports
|
|
100
|
+
cancel-in-progress: false
|
|
101
|
+
queue: max
|
|
102
|
+
runs-on: ubuntu-24.04
|
|
103
|
+
permissions:
|
|
104
|
+
contents: read
|
|
105
|
+
actions: read
|
|
106
|
+
issues: write
|
|
107
|
+
env:
|
|
108
|
+
LIGHTHOUSE_REPORT_INDEX_ISSUE: ${{ vars.LIGHTHOUSE_REPORT_INDEX_ISSUE }}
|
|
109
|
+
LIGHTHOUSE_OBSERVED_ISSUES: ${{ needs.scan.outputs.issues }}
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@v5
|
|
112
|
+
with:
|
|
113
|
+
repository: juangcarmona/lighthouse
|
|
114
|
+
ref: __LIGHTHOUSE_REF__
|
|
115
|
+
persist-credentials: false
|
|
116
|
+
- uses: actions/setup-node@v5
|
|
117
|
+
with:
|
|
118
|
+
node-version: 24
|
|
119
|
+
- uses: actions/download-artifact@v8
|
|
120
|
+
with:
|
|
121
|
+
pattern: lighthouse-maintenance-*
|
|
122
|
+
path: ${{ runner.temp }}/worker-observations
|
|
123
|
+
- name: Reconcile and update worker error reports
|
|
124
|
+
env:
|
|
125
|
+
GH_TOKEN: ${{ github.token }}
|
|
126
|
+
run: node src/packages/sdlc/src/worker-maintenance.mjs report
|
|
@@ -11,10 +11,12 @@ engine:
|
|
|
11
11
|
execution:
|
|
12
12
|
command-name: node
|
|
13
13
|
args: [tools/src/packages/sdlc/src/opencode-execute.mjs]
|
|
14
|
-
step-name:
|
|
14
|
+
step-name: OpenCode progress and result
|
|
15
15
|
write-timestamp: true
|
|
16
16
|
log-parser: |
|
|
17
17
|
function parseLog(logContent) {
|
|
18
|
-
|
|
18
|
+
const fs = require("fs");
|
|
19
|
+
const events = require("path").join(process.env.RUNNER_TEMP, "gh-aw", `opencode-events-${process.env.GITHUB_RUN_ID}-${process.env.GITHUB_RUN_ATTEMPT}.jsonl`);
|
|
20
|
+
return require("./parse_opencode_log.cjs").parseOpenCodeLog(fs.existsSync(events) ? fs.readFileSync(events, "utf8") : logContent);
|
|
19
21
|
}
|
|
20
22
|
---
|