@metasession.co/devaudit-cli 0.3.18 → 0.3.20
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/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/scripts/upload-evidence.sh +23 -19
- package/sdlc/files/_common/governance/incident-report.md.template +6 -1
- package/sdlc/files/_common/governance/nil-incident-report.md.template +5 -2
- package/sdlc/files/_common/scripts/check-release-pr-scope.sh +8 -1
- package/sdlc/files/_common/scripts/check-release-pr-scope.test.sh +58 -10
- package/sdlc/files/_common/scripts/check-self-hosted-runner.sh +103 -0
- package/sdlc/files/_common/scripts/check-self-hosted-runner.test.sh +74 -0
- package/sdlc/files/_common/scripts/record-uat-execution.sh +195 -0
- package/sdlc/files/_common/scripts/record-uat-execution.test.sh +144 -0
- package/sdlc/files/_common/scripts/render-test-executions.sh +146 -0
- package/sdlc/files/_common/scripts/{render-test-cycles.test.sh → render-test-executions.test.sh} +12 -18
- package/sdlc/files/_common/scripts/{report-test-cycle.sh → report-test-execution.sh} +66 -74
- package/sdlc/files/_common/scripts/report-test-execution.test.sh +177 -0
- package/sdlc/files/_common/scripts/submit-for-uat-review.sh +21 -0
- package/sdlc/files/_common/scripts/upload-evidence.sh +23 -19
- package/sdlc/files/_common/scripts/validate-commits.sh +6 -4
- package/sdlc/files/_common/scripts/validate-commits.test.sh +15 -0
- package/sdlc/files/_common/skills/e2e-test-engineer/SKILL.md +9 -7
- package/sdlc/files/_common/skills/e2e-test-engineer/references/e2e-regression-3-tier.yml +4 -1
- package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +16 -14
- package/sdlc/files/ci/ci.yml.template +54 -44
- package/sdlc/files/ci/compliance-evidence.yml.template +135 -46
- package/sdlc/files/ci/feature-e2e.yml.template +58 -18
- package/sdlc/files/ci/incident-export.yml.template +18 -4
- package/sdlc/files/ci/post-deploy-prod.yml.template +33 -30
- package/sdlc/files/ci/python/ci.yml.template +14 -14
- package/sdlc/files/ci/quality-gates-provenance.yml.template +3 -0
- package/sdlc/package.json +1 -1
- package/sdlc/src/blueprints/3-compile-evidence.raw.md +10 -10
- package/sdlc/src/blueprints/4-submit-for-review.raw.md +1 -1
- package/sdlc/src/blueprints/5-deploy-main.raw.md +1 -1
- package/sdlc/src/blueprints/implementing-an-sdlc-issue.raw.md +3 -3
- package/sdlc/files/_common/scripts/render-test-cycles.sh +0 -227
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# render-test-cycles.sh — Render release test cycles as markdown tables.
|
|
3
|
-
#
|
|
4
|
-
# Usage:
|
|
5
|
-
# bash scripts/render-test-cycles.sh path/to/release-journey.json
|
|
6
|
-
#
|
|
7
|
-
# Supported inputs:
|
|
8
|
-
# 1. First-class cycle payloads with `.cycles[]`
|
|
9
|
-
# 2. Legacy grouped-evidence payloads with one of:
|
|
10
|
-
# - `.legacyCycles[]`
|
|
11
|
-
# - `.testCycleGroups[]`
|
|
12
|
-
# - `.evidenceGroups[]`
|
|
13
|
-
#
|
|
14
|
-
# Output:
|
|
15
|
-
# Markdown suitable for inclusion under `## Test Cycles` in
|
|
16
|
-
# `compliance/evidence/REQ-XXX/test-execution-summary.md`.
|
|
17
|
-
|
|
18
|
-
set -euo pipefail
|
|
19
|
-
|
|
20
|
-
INPUT_JSON="${1:-}"
|
|
21
|
-
|
|
22
|
-
if [ -z "$INPUT_JSON" ] || [ ! -f "$INPUT_JSON" ]; then
|
|
23
|
-
echo "Usage: $0 <release-journey.json>" >&2
|
|
24
|
-
exit 2
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
if ! command -v jq >/dev/null 2>&1; then
|
|
28
|
-
echo "Error: jq is required." >&2
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
stage_label() {
|
|
33
|
-
case "$1" in
|
|
34
|
-
1) printf '1 plan' ;;
|
|
35
|
-
2) printf '2 implement_test' ;;
|
|
36
|
-
3) printf '3 compile_evidence' ;;
|
|
37
|
-
4) printf '4 uat_review' ;;
|
|
38
|
-
5) printf '5 production' ;;
|
|
39
|
-
*) printf '%s unknown' "${1:-?}" ;;
|
|
40
|
-
esac
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
format_date() {
|
|
44
|
-
local value="$1"
|
|
45
|
-
if [ -z "$value" ] || [ "$value" = "null" ]; then
|
|
46
|
-
printf 'Unknown'
|
|
47
|
-
else
|
|
48
|
-
printf '%s' "$value" | sed -E 's/T/ /; s/Z$//; s/[.][0-9]+$//'
|
|
49
|
-
fi
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
render_first_class_cycles() {
|
|
53
|
-
echo "| Source Release | SDLC Stage | Cycle | Kind | Outcome | Workflow / Run | Related Evidence | Incident / Remediation | Date |"
|
|
54
|
-
echo "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"
|
|
55
|
-
|
|
56
|
-
declare -A COUNTS=()
|
|
57
|
-
local rows
|
|
58
|
-
rows="$(
|
|
59
|
-
jq -r '
|
|
60
|
-
(.cycles // [])
|
|
61
|
-
| sort_by(.sourceRelease // "", .sdlcStage // 0, .startedAt // "", .completedAt // "", .cycleKind // "")
|
|
62
|
-
| .[]
|
|
63
|
-
| {
|
|
64
|
-
sourceRelease: (.sourceRelease // "Unknown"),
|
|
65
|
-
stageCode: ((.sdlcStage // 0) | tostring),
|
|
66
|
-
kind: (.cycleKind // "unknown"),
|
|
67
|
-
outcome: (.outcome // "unknown"),
|
|
68
|
-
workflow: (
|
|
69
|
-
if (.workflowUrl // "") != "" then
|
|
70
|
-
"[" + ((.workflowName // "Workflow")) + "](" + .workflowUrl + ")"
|
|
71
|
-
else
|
|
72
|
-
(.workflowName // "Manual")
|
|
73
|
-
end
|
|
74
|
-
),
|
|
75
|
-
runMeta: (
|
|
76
|
-
[
|
|
77
|
-
(if (.externalRunId // "") != "" then "run " + .externalRunId else empty end),
|
|
78
|
-
(if (.externalRunAttempt // null) != null then "attempt " + (.externalRunAttempt | tostring) else empty end)
|
|
79
|
-
]
|
|
80
|
-
| map(select(length > 0))
|
|
81
|
-
| join(", ")
|
|
82
|
-
),
|
|
83
|
-
evidence: (
|
|
84
|
-
(.relatedEvidence // [])
|
|
85
|
-
| map(.displayName // .fileName // .name // .evidenceType // empty)
|
|
86
|
-
| map(select(length > 0))
|
|
87
|
-
| join(", ")
|
|
88
|
-
),
|
|
89
|
-
incident: (
|
|
90
|
-
[
|
|
91
|
-
(.incidentReference // empty),
|
|
92
|
-
(.remediationReference // empty),
|
|
93
|
-
(.outcomeReason // empty)
|
|
94
|
-
]
|
|
95
|
-
| map(select(length > 0))
|
|
96
|
-
| join("; ")
|
|
97
|
-
),
|
|
98
|
-
date: (.completedAt // .startedAt // "")
|
|
99
|
-
}
|
|
100
|
-
| @base64
|
|
101
|
-
' "$INPUT_JSON"
|
|
102
|
-
)"
|
|
103
|
-
|
|
104
|
-
if [ -z "$rows" ]; then
|
|
105
|
-
echo "| Unknown | Unknown | None | unknown | unknown | No cycle records returned | None | None | Unknown |"
|
|
106
|
-
echo
|
|
107
|
-
echo "**Final assessment:** No first-class cycle records were returned by the portal."
|
|
108
|
-
return 0
|
|
109
|
-
fi
|
|
110
|
-
|
|
111
|
-
while IFS= read -r row_b64; do
|
|
112
|
-
[ -n "$row_b64" ] || continue
|
|
113
|
-
local source_release stage_code kind outcome workflow run_meta evidence incident date
|
|
114
|
-
source_release="$(printf '%s' "$row_b64" | base64 -d | jq -r '.sourceRelease')"
|
|
115
|
-
stage_code="$(printf '%s' "$row_b64" | base64 -d | jq -r '.stageCode')"
|
|
116
|
-
kind="$(printf '%s' "$row_b64" | base64 -d | jq -r '.kind')"
|
|
117
|
-
outcome="$(printf '%s' "$row_b64" | base64 -d | jq -r '.outcome')"
|
|
118
|
-
workflow="$(printf '%s' "$row_b64" | base64 -d | jq -r '.workflow')"
|
|
119
|
-
run_meta="$(printf '%s' "$row_b64" | base64 -d | jq -r '.runMeta')"
|
|
120
|
-
evidence="$(printf '%s' "$row_b64" | base64 -d | jq -r '.evidence')"
|
|
121
|
-
incident="$(printf '%s' "$row_b64" | base64 -d | jq -r '.incident')"
|
|
122
|
-
date="$(printf '%s' "$row_b64" | base64 -d | jq -r '.date')"
|
|
123
|
-
[ -n "$source_release" ] || continue
|
|
124
|
-
local group_key cycle_ordinal workflow_cell evidence_cell incident_cell
|
|
125
|
-
group_key="${source_release}|${stage_code}"
|
|
126
|
-
COUNTS["$group_key"]=$(( ${COUNTS["$group_key"]:-0} + 1 ))
|
|
127
|
-
cycle_ordinal="#${COUNTS[$group_key]}"
|
|
128
|
-
workflow_cell="$workflow"
|
|
129
|
-
if [ -n "$run_meta" ]; then
|
|
130
|
-
workflow_cell="${workflow_cell} (${run_meta})"
|
|
131
|
-
fi
|
|
132
|
-
evidence_cell="${evidence:-None}"
|
|
133
|
-
incident_cell="${incident:-None}"
|
|
134
|
-
printf '| %s | %s | %s | %s | %s | %s | %s | %s | %s |\n' \
|
|
135
|
-
"$source_release" \
|
|
136
|
-
"$(stage_label "$stage_code")" \
|
|
137
|
-
"$cycle_ordinal" \
|
|
138
|
-
"$kind" \
|
|
139
|
-
"$outcome" \
|
|
140
|
-
"$workflow_cell" \
|
|
141
|
-
"$evidence_cell" \
|
|
142
|
-
"$incident_cell" \
|
|
143
|
-
"$(format_date "$date")"
|
|
144
|
-
done <<<"$rows"
|
|
145
|
-
|
|
146
|
-
echo
|
|
147
|
-
echo "**Final assessment:** Stage-scoped cycle numbering is authoritative from first-class portal cycle records."
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
render_legacy_cycles() {
|
|
151
|
-
echo "> Legacy portal fallback — first-class cycle records unavailable; grouped by uploaded evidence \`testCycleId\`."
|
|
152
|
-
echo
|
|
153
|
-
echo "| Source Release | SDLC Stage | Cycle | Kind | Outcome | Workflow / Run | Related Evidence | Incident / Remediation | Date |"
|
|
154
|
-
echo "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"
|
|
155
|
-
|
|
156
|
-
local rows
|
|
157
|
-
rows="$(
|
|
158
|
-
jq -r '
|
|
159
|
-
(.legacyCycles // .testCycleGroups // .evidenceGroups // [])
|
|
160
|
-
| .[]
|
|
161
|
-
| {
|
|
162
|
-
sourceRelease: (.sourceRelease // "Legacy grouped evidence"),
|
|
163
|
-
stageLabel: (.sdlcStageLabel // "legacy grouping"),
|
|
164
|
-
cycleId: (.testCycleId // .cycleId // "unknown"),
|
|
165
|
-
kind: (.cycleKind // "legacy"),
|
|
166
|
-
outcome: (.outcome // "unknown"),
|
|
167
|
-
workflow: (
|
|
168
|
-
if (.workflowUrl // "") != "" then
|
|
169
|
-
"[" + ((.workflowName // "Workflow")) + "](" + .workflowUrl + ")"
|
|
170
|
-
else
|
|
171
|
-
(.workflowName // "Legacy grouping")
|
|
172
|
-
end
|
|
173
|
-
),
|
|
174
|
-
evidence: (
|
|
175
|
-
(.relatedEvidence // .evidence // [])
|
|
176
|
-
| map(.displayName // .fileName // .name // .evidenceType // .path // empty)
|
|
177
|
-
| map(select(length > 0))
|
|
178
|
-
| join(", ")
|
|
179
|
-
),
|
|
180
|
-
incident: (.incidentReference // .notes // "Legacy fallback"),
|
|
181
|
-
date: (.date // .createdAt // "")
|
|
182
|
-
}
|
|
183
|
-
| @base64
|
|
184
|
-
' "$INPUT_JSON"
|
|
185
|
-
)"
|
|
186
|
-
|
|
187
|
-
if [ -z "$rows" ]; then
|
|
188
|
-
echo "| Legacy grouped evidence | legacy grouping | unknown | legacy | unknown | Legacy grouping | None | Legacy fallback | Unknown |"
|
|
189
|
-
echo
|
|
190
|
-
echo "**Final assessment:** Legacy fallback used, but no grouped evidence records were returned."
|
|
191
|
-
return 0
|
|
192
|
-
fi
|
|
193
|
-
|
|
194
|
-
while IFS= read -r row_b64; do
|
|
195
|
-
[ -n "$row_b64" ] || continue
|
|
196
|
-
local source_release stage_label_value cycle_id kind outcome workflow evidence incident date
|
|
197
|
-
source_release="$(printf '%s' "$row_b64" | base64 -d | jq -r '.sourceRelease')"
|
|
198
|
-
stage_label_value="$(printf '%s' "$row_b64" | base64 -d | jq -r '.stageLabel')"
|
|
199
|
-
cycle_id="$(printf '%s' "$row_b64" | base64 -d | jq -r '.cycleId')"
|
|
200
|
-
kind="$(printf '%s' "$row_b64" | base64 -d | jq -r '.kind')"
|
|
201
|
-
outcome="$(printf '%s' "$row_b64" | base64 -d | jq -r '.outcome')"
|
|
202
|
-
workflow="$(printf '%s' "$row_b64" | base64 -d | jq -r '.workflow')"
|
|
203
|
-
evidence="$(printf '%s' "$row_b64" | base64 -d | jq -r '.evidence')"
|
|
204
|
-
incident="$(printf '%s' "$row_b64" | base64 -d | jq -r '.incident')"
|
|
205
|
-
date="$(printf '%s' "$row_b64" | base64 -d | jq -r '.date')"
|
|
206
|
-
[ -n "$cycle_id" ] || continue
|
|
207
|
-
printf '| %s | %s | %s | %s | %s | %s | %s | %s | %s |\n' \
|
|
208
|
-
"$source_release" \
|
|
209
|
-
"$stage_label_value" \
|
|
210
|
-
"$cycle_id" \
|
|
211
|
-
"$kind" \
|
|
212
|
-
"$outcome" \
|
|
213
|
-
"$workflow" \
|
|
214
|
-
"${evidence:-None}" \
|
|
215
|
-
"${incident:-Legacy fallback}" \
|
|
216
|
-
"$(format_date "$date")"
|
|
217
|
-
done <<<"$rows"
|
|
218
|
-
|
|
219
|
-
echo
|
|
220
|
-
echo "**Final assessment:** Legacy grouping was used because the portal did not expose first-class cycle records."
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if jq -e '((.cycles // []) | length) > 0' "$INPUT_JSON" >/dev/null 2>&1; then
|
|
224
|
-
render_first_class_cycles
|
|
225
|
-
else
|
|
226
|
-
render_legacy_cycles
|
|
227
|
-
fi
|