@metasession.co/devaudit-cli 0.3.9 → 0.3.10

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.
@@ -34,6 +34,9 @@ jobs:
34
34
  production-evidence:
35
35
  name: Production Evidence
36
36
  runs-on: {{RUNNER}}
37
+ permissions:
38
+ contents: read
39
+ issues: write
37
40
  env:
38
41
  DEVAUDIT_BASE_URL_VAR: ${{ vars.DEVAUDIT_BASE_URL }}
39
42
  DEVAUDIT_API_KEY: ${{ secrets.DEVAUDIT_API_KEY }}
@@ -151,7 +154,9 @@ jobs:
151
154
  - name: File incident on smoke failure
152
155
  if: failure()
153
156
  env:
154
- GH_TOKEN: ${{ secrets.DEVAUDIT_USER_TOKEN || github.token }}
157
+ # GitHub issue/label mutations use the workflow token. DevAudit
158
+ # user tokens are portal PATs, not guaranteed GitHub PATs (#305).
159
+ GH_TOKEN: ${{ github.token }}
155
160
  PROD_URL: ${{ secrets.{{PRODUCTION_URL_SECRET}} }}
156
161
  GIT_SHA: ${{ github.sha }}
157
162
  CI_RUN: ${{ github.run_id }}
@@ -31,7 +31,7 @@ jobs:
31
31
  steps:
32
32
  - name: Verify prior Quality Gates success on head SHA
33
33
  env:
34
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ GH_TOKEN: ${{ github.token }}
35
35
  HEAD_SHA: ${{ github.event.pull_request.head.sha }}
36
36
  CURRENT_RUN_ID: ${{ github.run_id }}
37
37
  run: |
@@ -38,6 +38,9 @@ echo "Pre-push: TypeScript check passed."
38
38
  # Previous code had two `while read` loops; the second consumed nothing
39
39
  # because stdin was already exhausted by the first (devaudit-installer#278).
40
40
  PUSH_REFS="$(cat)"
41
+ PUSH_REFS_FILE=$(mktemp)
42
+ trap 'rm -f "$PUSH_REFS_FILE"' EXIT HUP INT TERM
43
+ printf '%s\n' "$PUSH_REFS" > "$PUSH_REFS_FILE"
41
44
 
42
45
  INTEGRATION_BRANCH=$(jq -r '.integration_branch // "develop"' sdlc-config.json 2>/dev/null || echo "develop")
43
46
 
@@ -49,7 +52,8 @@ INTEGRATION_BRANCH=$(jq -r '.integration_branch // "develop"' sdlc-config.json 2
49
52
  # (written by e2e-test-engineer Phase 5½ after validating tagTest/evidenceShot).
50
53
  # Scoped to integration-branch pushes (correct for the normal workflow).
51
54
 
52
- echo "$PUSH_REFS" | while read -r local_ref local_sha remote_ref remote_sha; do
55
+ while read -r local_ref local_sha remote_ref remote_sha; do
56
+ [ -n "${local_ref:-}" ] || continue
53
57
  # Check if pushing to the integration branch
54
58
  case "$remote_ref" in
55
59
  *"refs/heads/$INTEGRATION_BRANCH") ;;
@@ -103,7 +107,7 @@ echo "$PUSH_REFS" | while read -r local_ref local_sha remote_ref remote_sha; do
103
107
  fi
104
108
  echo "Pre-push: E2E evidence wiring check passed."
105
109
  fi
106
- done
110
+ done < "$PUSH_REFS_FILE"
107
111
 
108
112
  # ── 3. Skill-invocation sentinel (devaudit-installer#226) ────────────
109
113
  # If feat/fix/refactor/perf commits are in the push, verify the
@@ -115,11 +119,9 @@ done
115
119
  TRACKED_TYPES='^(feat|fix|refactor|perf)(\(.+\))?!?:'
116
120
  HAS_TRACKED=false
117
121
 
118
- # Parse stdin refs in the current shell (not a subshell) so HAS_TRACKED propagates.
119
- for ref_line in $PUSH_REFS; do
120
- set -- $ref_line
121
- local_sha="$2"
122
- remote_sha="$4"
122
+ # Parse captured refs in the current shell so HAS_TRACKED propagates.
123
+ while read -r local_ref local_sha remote_ref remote_sha; do
124
+ [ -n "${local_ref:-}" ] || continue
123
125
  if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
124
126
  RANGE="$local_sha"
125
127
  else
@@ -129,7 +131,7 @@ for ref_line in $PUSH_REFS; do
129
131
  if echo "$COMMITS" | grep -qE "$TRACKED_TYPES"; then
130
132
  HAS_TRACKED=true
131
133
  fi
132
- done
134
+ done < "$PUSH_REFS_FILE"
133
135
 
134
136
  if [ "$HAS_TRACKED" = "true" ]; then
135
137
  if [ ! -f .sdlc-implementer-invoked ]; then
@@ -147,10 +149,8 @@ if [ "$HAS_TRACKED" = "true" ]; then
147
149
  # If the commit touches Phase 3 artifacts (compliance/evidence/REQ-XXX/),
148
150
  # the sentinel must contain a phase "3" record. If it touches Phase 5
149
151
  # close-out (approved-releases/ or RTM RELEASED), sentinel must have phase "5".
150
- for ref_line in $PUSH_REFS; do
151
- set -- $ref_line
152
- local_sha="$2"
153
- remote_sha="$4"
152
+ while read -r local_ref local_sha remote_ref remote_sha; do
153
+ [ -n "${local_ref:-}" ] || continue
154
154
  if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
155
155
  RANGE="$local_sha"
156
156
  else
@@ -181,7 +181,7 @@ if [ "$HAS_TRACKED" = "true" ]; then
181
181
  exit 1
182
182
  fi
183
183
  fi
184
- done
184
+ done < "$PUSH_REFS_FILE"
185
185
  echo "Pre-push: phase-progression check passed."
186
186
  fi
187
187
 
package/sdlc/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-sdlc",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "DevAudit SDLC CLI Engine — cross-agent terminal-driven SDLC orchestrator.",
5
5
  "bin": {
6
6
  "devaudit-sdlc": "./src/bin/devaudit-sdlc.js"