@juangcarmona/lighthouse-sdlc 0.15.2 → 0.16.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.
@@ -0,0 +1,183 @@
1
+ ---
2
+ # Owned by lighthouse-sdlc. Regenerate the lock with gh aw v0.93.2.
3
+ name: apply-product-change
4
+ description: Recheck an explicit owner decision, apply the provider delta without GitHub credentials, and publish its verified result.
5
+ run-name: "apply product change #${{ inputs.issue }} · PR #${{ inputs.pull-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
+ roles: all
13
+ workflow_dispatch:
14
+ inputs:
15
+ issue:
16
+ description: Linked issue
17
+ required: true
18
+ type: string
19
+ dispatch-request:
20
+ description: Authenticated router receipt comment ID
21
+ required: true
22
+ type: string
23
+ pull-request:
24
+ description: Product Change PR
25
+ required: true
26
+ type: string
27
+ head:
28
+ description: Approved full PR head SHA
29
+ required: true
30
+ type: string
31
+ needs: [prepare]
32
+ if: needs.prepare.outputs.eligible == 'true'
33
+ runs-on: [self-hosted, linux, lighthouse-workflow]
34
+ runs-on-slim: ubuntu-24.04
35
+ timeout-minutes: 30
36
+ env:
37
+ LIGHTHOUSE_STAGE: propose
38
+ LIGHTHOUSE_WORKER: apply-product-change
39
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
40
+ LIGHTHOUSE_PRODUCT_CHANGE_ENABLED: "true"
41
+ permissions:
42
+ contents: read
43
+ strict: false
44
+ tools:
45
+ bash: [cat, git, node, npm, npx]
46
+ safe-outputs:
47
+ create-issue: false
48
+ report-failure-as-issue: false
49
+ report-incomplete: false
50
+ threat-detection: false
51
+ noop:
52
+ report-as-issue: false
53
+ network:
54
+ allowed: []
55
+ jobs:
56
+ prepare:
57
+ outputs:
58
+ eligible: ${{ steps.prepare.outputs.eligible }}
59
+ head: ${{ steps.prepare.outputs.head }}
60
+ name: Recheck product approval
61
+ runs-on: ubuntu-24.04
62
+ permissions:
63
+ actions: read
64
+ contents: read
65
+ issues: read
66
+ pull-requests: read
67
+ env:
68
+ LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
69
+ LIGHTHOUSE_WORKER: apply-product-change
70
+ LIGHTHOUSE_STAGE: propose
71
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
72
+ LIGHTHOUSE_PRODUCT_CHANGE_ENABLED: "true"
73
+ steps:
74
+ - uses: actions/checkout@v5
75
+ with:
76
+ repository: juangcarmona/lighthouse
77
+ ref: __LIGHTHOUSE_REF__
78
+ persist-credentials: false
79
+ - uses: actions/setup-node@v5
80
+ with:
81
+ node-version: 24
82
+ - name: Recheck the explicit current owner decision
83
+ id: prepare
84
+ env:
85
+ GH_TOKEN: ${{ github.token }}
86
+ run: node src/packages/sdlc/src/issue-actions.mjs product-apply-prepare
87
+ - name: Preserve the approval checkpoint
88
+ if: steps.prepare.outputs.eligible == 'true'
89
+ uses: actions/upload-artifact@v7
90
+ with:
91
+ name: lighthouse-product-apply-input-${{ inputs.issue }}-${{ github.run_attempt }}
92
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/product-apply.json
93
+ if-no-files-found: error
94
+ retention-days: 14
95
+ apply:
96
+ name: Apply with the pinned ProductShape provider
97
+ needs: [prepare]
98
+ if: needs.prepare.outputs.eligible == 'true'
99
+ runs-on: ubuntu-24.04
100
+ permissions: {}
101
+ steps:
102
+ - uses: actions/checkout@v5
103
+ with:
104
+ persist-credentials: false
105
+ ref: ${{ needs.prepare.outputs.head }}
106
+ - uses: actions/checkout@v5
107
+ with:
108
+ repository: juangcarmona/lighthouse
109
+ ref: __LIGHTHOUSE_REF__
110
+ path: tools
111
+ persist-credentials: false
112
+ - uses: actions/setup-node@v5
113
+ with:
114
+ node-version: 24
115
+ - name: Install provider packages without credentials
116
+ run: |
117
+ npm ci --ignore-scripts
118
+ npm install --no-save --package-lock=false --ignore-scripts @prodshape/integration-openspec@0.6.6
119
+ - name: Load the approval checkpoint
120
+ uses: actions/download-artifact@v8
121
+ with:
122
+ name: lighthouse-product-apply-input-${{ inputs.issue }}-${{ github.run_attempt }}
123
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
124
+ - name: Run provider dry-run, apply and validation
125
+ run: node tools/src/packages/sdlc/src/issue-actions.mjs product-apply
126
+ - name: Preserve the provider output and apply receipt
127
+ if: always()
128
+ uses: actions/upload-artifact@v7
129
+ with:
130
+ name: lighthouse-product-apply-result-${{ inputs.issue }}-${{ github.run_attempt }}
131
+ path: |
132
+ ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/apply-result.json
133
+ ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/affected-citations.json
134
+ if-no-files-found: error
135
+ retention-days: 30
136
+ publish:
137
+ name: Recheck and publish provider output
138
+ needs: [prepare, apply]
139
+ if: always() && needs.prepare.outputs.eligible == 'true'
140
+ runs-on: ubuntu-24.04
141
+ permissions:
142
+ actions: read
143
+ contents: write
144
+ issues: write
145
+ pull-requests: write
146
+ env:
147
+ LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
148
+ LIGHTHOUSE_WORKER: apply-product-change
149
+ LIGHTHOUSE_STAGE: propose
150
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
151
+ LIGHTHOUSE_PRODUCT_CHANGE_ENABLED: "true"
152
+ steps:
153
+ - uses: actions/checkout@v5
154
+ with:
155
+ repository: juangcarmona/lighthouse
156
+ ref: __LIGHTHOUSE_REF__
157
+ persist-credentials: false
158
+ - uses: actions/setup-node@v5
159
+ with:
160
+ node-version: 24
161
+ - name: Load the approved checkpoint
162
+ uses: actions/download-artifact@v8
163
+ with:
164
+ name: lighthouse-product-apply-input-${{ inputs.issue }}-${{ github.run_attempt }}
165
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
166
+ - name: Load provider output
167
+ if: needs.apply.result == 'success'
168
+ uses: actions/download-artifact@v8
169
+ with:
170
+ name: lighthouse-product-apply-result-${{ inputs.issue }}-${{ github.run_attempt }}
171
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
172
+ - name: Stop when the provider apply did not complete
173
+ if: needs.apply.result != 'success'
174
+ run: exit 1
175
+ - name: Publish only the verified applied delta
176
+ env:
177
+ GH_TOKEN: ${{ github.token }}
178
+ run: node src/packages/sdlc/src/issue-actions.mjs product-apply-publish
179
+ ---
180
+
181
+ # Apply an approved Product Change
182
+
183
+ This workflow has no agent job. Its prepare job authenticates and rechecks the explicit product decision. The apply job has no GitHub token and performs only the pinned ProductShape dry-run, apply and resulting-model validation. The publisher rechecks the same PR head and decision before writing the provider-generated model delta to the issue branch. A failed or uncertain apply needs owner recovery; it is never retried automatically.