@juangcarmona/lighthouse-sdlc 0.8.0 → 0.10.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.
@@ -17,6 +17,10 @@ safe-outputs:
17
17
  max: 1
18
18
  report-as-issue: false
19
19
  steps:
20
+ - name: Install the locked consumer packages
21
+ run: npm ci --ignore-scripts
22
+ - name: Check the installed SDLC version
23
+ run: node node_modules/@juangcarmona/lighthouse-sdlc/src/installation.mjs
20
24
  - name: Materialize the host input
21
25
  shell: bash
22
26
  env:
@@ -24,7 +28,7 @@ steps:
24
28
  run: |
25
29
  set -euo pipefail
26
30
  mkdir -p /tmp/gh-aw/agent
27
- printf '%s\n' "${STAGE_INPUT:-{}}" > /tmp/gh-aw/agent/input.json
31
+ printf '%s\n' "${STAGE_INPUT:-"{}"}" > /tmp/gh-aw/agent/input.json
28
32
  - name: Load the previous stage result
29
33
  if: inputs.previous-stage != ''
30
34
  uses: actions/download-artifact@v8
@@ -45,27 +49,17 @@ post-steps:
45
49
  echo "::error::The worker did not produce /tmp/gh-aw/agent/stage-result.json"
46
50
  exit 1
47
51
  fi
48
- - name: Validate the stage result and declared gate
52
+ - name: Require completion of the dispatched stage
49
53
  if: always()
50
54
  shell: bash
51
55
  env:
52
56
  EXPECTED_STAGE: ${{ env.LIGHTHOUSE_STAGE }}
57
+ EXPECTED_RUN_ID: ${{ inputs.run-id }}
53
58
  RESULT_FILE: /tmp/gh-aw/agent/stage-result.json
54
59
  run: |
55
60
  set -euo pipefail
56
- node src/packages/sdlc/src/sdlc.mjs stage-result --input "$RESULT_FILE" --format json
57
- EXPECTED_STAGE="$EXPECTED_STAGE" RESULT_FILE="$RESULT_FILE" node --input-type=module <<'NODE'
58
- import { readFileSync } from 'node:fs';
59
-
60
- const stage = process.env.EXPECTED_STAGE;
61
- const result = JSON.parse(readFileSync(process.env.RESULT_FILE, 'utf8'));
62
- const contract = JSON.parse(readFileSync('src/packages/sdlc/stages.json', 'utf8'));
63
- const expected = contract.stages.find((item) => item.id === stage);
64
- if (!expected || result.stage !== stage || result.gate !== expected.gate) {
65
- console.error(`stage-result does not match stages.json for ${stage}`);
66
- process.exit(1);
67
- }
68
- NODE
61
+ node node_modules/@juangcarmona/lighthouse-sdlc/src/sdlc.mjs stage-result --input "$RESULT_FILE" \
62
+ --require-complete --stage "$EXPECTED_STAGE" --run-id "$EXPECTED_RUN_ID" --format json
69
63
  - name: Upload stage evidence
70
64
  if: always()
71
65
  uses: actions/upload-artifact@v7
@@ -79,3 +73,5 @@ post-steps:
79
73
  # Lighthouse SDLC worker mechanics
80
74
 
81
75
  The host input is in `/tmp/gh-aw/agent/input.json`. If this worker has a previous stage, its validated result is in `/tmp/gh-aw/agent/previous/stage-result.json`.
76
+
77
+ Set `runId` to `${{ inputs.run-id }}`. A worker completes only with `status: passed`, the declared stage and gate, empty `missingEvidence`, `unavailableChecks` and `pendingReview` arrays, and evidence whose status is `passed` or `not-applicable`. Preserve unresolved work in a `ready`, `blocked` or `failed` result; it is uploaded for inspection and fails the worker. Worker completion does not approve a human gate.