@metasession.co/devaudit-cli 0.3.18 → 0.3.19
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 +17 -17
- 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
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function emitJsonResult(payload) {
|
|
|
56
56
|
|
|
57
57
|
// package.json
|
|
58
58
|
var package_default = {
|
|
59
|
-
version: "0.3.
|
|
59
|
+
version: "0.3.19"};
|
|
60
60
|
|
|
61
61
|
// src/lib/version.ts
|
|
62
62
|
var CLI_VERSION = package_default.version;
|
|
@@ -597,17 +597,14 @@ async function runStatus(options) {
|
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
// src/lib/release-lineage-contract.ts
|
|
600
|
-
function renderEvidenceLineageFields(input,
|
|
601
|
-
if (input.
|
|
602
|
-
throw new Error("
|
|
603
|
-
}
|
|
604
|
-
if (!capabilities.supportsFirstClassCycleApi) {
|
|
605
|
-
return input.testCycleId ? { testCycleId: input.testCycleId } : {};
|
|
600
|
+
function renderEvidenceLineageFields(input, _capabilities) {
|
|
601
|
+
if (input.testExecutionRecordId && input.evidenceScope !== "execution") {
|
|
602
|
+
throw new Error("testExecutionRecordId requires execution evidenceScope");
|
|
606
603
|
}
|
|
607
604
|
return {
|
|
608
605
|
...input.evidenceScope ? { evidenceScope: input.evidenceScope } : {},
|
|
609
|
-
...input.
|
|
610
|
-
...input.
|
|
606
|
+
...input.testExecutionRecordId ? { testExecutionRecordId: input.testExecutionRecordId } : {},
|
|
607
|
+
...input.testExecutionId ? { testExecutionId: input.testExecutionId } : {}
|
|
611
608
|
};
|
|
612
609
|
}
|
|
613
610
|
|
|
@@ -709,10 +706,10 @@ function buildUploadForm(file, source, opts) {
|
|
|
709
706
|
const lineageFields = renderEvidenceLineageFields(
|
|
710
707
|
{
|
|
711
708
|
evidenceScope: opts.evidenceScope,
|
|
712
|
-
|
|
713
|
-
|
|
709
|
+
testExecutionRecordId: opts.testExecutionRecordId,
|
|
710
|
+
testExecutionId: opts.testExecutionId
|
|
714
711
|
},
|
|
715
|
-
opts.lineageCapabilities ?? {
|
|
712
|
+
opts.lineageCapabilities ?? { }
|
|
716
713
|
);
|
|
717
714
|
const form = new FormData();
|
|
718
715
|
form.set("file", source.blob, basename(file));
|
|
@@ -730,9 +727,13 @@ function buildUploadForm(file, source, opts) {
|
|
|
730
727
|
if (opts.changeType) form.set("changeType", opts.changeType);
|
|
731
728
|
if (opts.gateStatus) form.set("gateStatus", opts.gateStatus);
|
|
732
729
|
if (opts.sdlcStage) form.set("sdlcStage", opts.sdlcStage);
|
|
733
|
-
if (lineageFields.
|
|
734
|
-
if (lineageFields.evidenceScope)
|
|
735
|
-
|
|
730
|
+
if (lineageFields.testExecutionId) form.set("testCycleId", lineageFields.testExecutionId);
|
|
731
|
+
if (lineageFields.evidenceScope) {
|
|
732
|
+
form.set("evidenceScope", lineageFields.evidenceScope === "execution" ? "cycle" : lineageFields.evidenceScope);
|
|
733
|
+
}
|
|
734
|
+
if (lineageFields.testExecutionRecordId) {
|
|
735
|
+
form.set("testCycleRecordId", lineageFields.testExecutionRecordId);
|
|
736
|
+
}
|
|
736
737
|
if (opts.sentinelContent) form.set("sentinelContent", opts.sentinelContent);
|
|
737
738
|
if (opts.commitTimestamp) form.set("commitTimestamp", opts.commitTimestamp);
|
|
738
739
|
return form;
|
|
@@ -826,10 +827,10 @@ async function uploadPresigned(file, source, opts) {
|
|
|
826
827
|
const lineageFields = renderEvidenceLineageFields(
|
|
827
828
|
{
|
|
828
829
|
evidenceScope: opts.evidenceScope,
|
|
829
|
-
|
|
830
|
-
|
|
830
|
+
testExecutionRecordId: opts.testExecutionRecordId,
|
|
831
|
+
testExecutionId: opts.testExecutionId
|
|
831
832
|
},
|
|
832
|
-
opts.lineageCapabilities ?? {
|
|
833
|
+
opts.lineageCapabilities ?? { }
|
|
833
834
|
);
|
|
834
835
|
let uploadUrl = "";
|
|
835
836
|
let evidenceId = "";
|
|
@@ -863,9 +864,11 @@ async function uploadPresigned(file, source, opts) {
|
|
|
863
864
|
...opts.releaseSummary ? { releaseSummary: opts.releaseSummary } : {},
|
|
864
865
|
...opts.changeType ? { changeType: opts.changeType } : {},
|
|
865
866
|
...opts.sdlcStage ? { sdlcStage: opts.sdlcStage } : {},
|
|
866
|
-
...lineageFields.
|
|
867
|
-
...lineageFields.evidenceScope ? {
|
|
868
|
-
|
|
867
|
+
...lineageFields.testExecutionId ? { testCycleId: lineageFields.testExecutionId } : {},
|
|
868
|
+
...lineageFields.evidenceScope ? {
|
|
869
|
+
evidenceScope: lineageFields.evidenceScope === "execution" ? "cycle" : lineageFields.evidenceScope
|
|
870
|
+
} : {},
|
|
871
|
+
...lineageFields.testExecutionRecordId ? { testCycleRecordId: lineageFields.testExecutionRecordId } : {},
|
|
869
872
|
...opts.sentinelContent ? { sentinelContent: opts.sentinelContent } : {},
|
|
870
873
|
...opts.commitTimestamp ? { commitTimestamp: opts.commitTimestamp } : {}
|
|
871
874
|
}),
|
|
@@ -1057,11 +1060,11 @@ function validateOptions(options) {
|
|
|
1057
1060
|
for (const kv of options.metaKeys ?? []) {
|
|
1058
1061
|
if (!kv.includes("=")) return `--meta-key requires key=value (got: ${kv})`;
|
|
1059
1062
|
}
|
|
1060
|
-
if (options.evidenceScope !== void 0 && !["release", "stage", "
|
|
1061
|
-
return "--evidence-scope must be one of: release, stage,
|
|
1063
|
+
if (options.evidenceScope !== void 0 && !["release", "stage", "execution", "approval"].includes(options.evidenceScope)) {
|
|
1064
|
+
return "--evidence-scope must be one of: release, stage, execution, approval";
|
|
1062
1065
|
}
|
|
1063
|
-
if (options.
|
|
1064
|
-
return "--test-
|
|
1066
|
+
if (options.testExecutionRecordId && options.evidenceScope !== "execution") {
|
|
1067
|
+
return "--test-execution-record-id requires --evidence-scope execution";
|
|
1065
1068
|
}
|
|
1066
1069
|
return null;
|
|
1067
1070
|
}
|
|
@@ -1142,9 +1145,9 @@ async function runPush(options) {
|
|
|
1142
1145
|
...options.changeType !== void 0 ? { changeType: options.changeType } : {},
|
|
1143
1146
|
...options.gateStatus !== void 0 ? { gateStatus: options.gateStatus } : {},
|
|
1144
1147
|
...options.sdlcStage !== void 0 ? { sdlcStage: options.sdlcStage } : {},
|
|
1145
|
-
...options.
|
|
1148
|
+
...options.testExecutionId !== void 0 ? { testExecutionId: options.testExecutionId } : {},
|
|
1146
1149
|
...options.evidenceScope !== void 0 ? { evidenceScope: options.evidenceScope } : {},
|
|
1147
|
-
...options.
|
|
1150
|
+
...options.testExecutionRecordId !== void 0 ? { testExecutionRecordId: options.testExecutionRecordId } : {},
|
|
1148
1151
|
...sentinelContent !== void 0 ? { sentinelContent } : {},
|
|
1149
1152
|
...commitTimestamp !== void 0 ? { commitTimestamp } : {},
|
|
1150
1153
|
metadata
|
|
@@ -1868,8 +1871,7 @@ async function bootstrapNode(ctx) {
|
|
|
1868
1871
|
return { step: "8/11 Bootstrap hook framework", status: "ok", message: ".husky/ bootstrapped" };
|
|
1869
1872
|
}
|
|
1870
1873
|
var MAIN_REQUIRED_CHECKS = [
|
|
1871
|
-
"Quality Gates"
|
|
1872
|
-
"CI Status Fallback"
|
|
1874
|
+
"Quality Gates"
|
|
1873
1875
|
];
|
|
1874
1876
|
var DEVELOP_REQUIRED_CHECKS = [
|
|
1875
1877
|
"Quality Gates"
|
|
@@ -2660,8 +2662,7 @@ async function syncWorkflows(ctx) {
|
|
|
2660
2662
|
};
|
|
2661
2663
|
}
|
|
2662
2664
|
var MAIN_REQUIRED_CHECKS2 = [
|
|
2663
|
-
"Quality Gates"
|
|
2664
|
-
"CI Status Fallback"
|
|
2665
|
+
"Quality Gates"
|
|
2665
2666
|
];
|
|
2666
2667
|
var DEVELOP_REQUIRED_CHECKS2 = [
|
|
2667
2668
|
"Quality Gates"
|
|
@@ -3475,7 +3476,7 @@ async function main(argv) {
|
|
|
3475
3476
|
...globals.dryRun !== void 0 ? { dryRun: Boolean(globals.dryRun) } : {}
|
|
3476
3477
|
});
|
|
3477
3478
|
});
|
|
3478
|
-
program.command("push <project-slug> <requirement-id> <evidence-type> <file>").description("Upload evidence file(s) to DevAudit (port of scripts/upload-evidence.sh)").option("--release <version>", "release version (e.g. v1.0.0)").option("--create-release-if-missing", "auto-create the release as 'draft' if absent").option("--environment <env>", "uat | production").option("--category <cat>", "ci_pipeline | local_dev | planning | test_report | security_scan | release_artifact").option("--git-sha <sha>", "attached to metadata.gitSha").option("--ci-run-id <id>", "attached to metadata.ciRunId").option("--branch <name>", "git branch \u2014 sent as releaseBranch + metadata.branch").option("--release-title <text>", "human title for the release row (releaseTitle; portal no-clobbers)").option("--release-summary <text>", "reviewer-facing short description (releaseSummary; portal no-clobbers)").option("--change-type <type>", "conventional-commit prefix for the release row (changeType)").option("--gate-status <status>", "passed | failed | skipped (gateStatus)").option("--sdlc-stage <stage>", "SDLC stage 1-5 (sdlcStage)").option("--test-
|
|
3479
|
+
program.command("push <project-slug> <requirement-id> <evidence-type> <file>").description("Upload evidence file(s) to DevAudit (port of scripts/upload-evidence.sh)").option("--release <version>", "release version (e.g. v1.0.0)").option("--create-release-if-missing", "auto-create the release as 'draft' if absent").option("--environment <env>", "uat | production").option("--category <cat>", "ci_pipeline | local_dev | planning | test_report | security_scan | release_artifact").option("--git-sha <sha>", "attached to metadata.gitSha").option("--ci-run-id <id>", "attached to metadata.ciRunId").option("--branch <name>", "git branch \u2014 sent as releaseBranch + metadata.branch").option("--release-title <text>", "human title for the release row (releaseTitle; portal no-clobbers)").option("--release-summary <text>", "reviewer-facing short description (releaseSummary; portal no-clobbers)").option("--change-type <type>", "conventional-commit prefix for the release row (changeType)").option("--gate-status <status>", "passed | failed | skipped (gateStatus)").option("--sdlc-stage <stage>", "SDLC stage 1-5 (sdlcStage)").option("--test-execution <id>", "test execution identifier (typically the CI run ID)").option("--evidence-scope <scope>", "release | stage | execution | approval (evidenceScope)").option("--test-execution-record-id <id>", "first-class portal test execution UUID (requires --evidence-scope execution)").option(
|
|
3479
3480
|
"--meta-key <pair>",
|
|
3480
3481
|
"repeatable key=value merged into the metadata JSON",
|
|
3481
3482
|
(val, acc) => [...acc, val],
|
|
@@ -3500,9 +3501,9 @@ async function main(argv) {
|
|
|
3500
3501
|
...opts.changeType !== void 0 ? { changeType: opts.changeType } : {},
|
|
3501
3502
|
...opts.gateStatus !== void 0 ? { gateStatus: opts.gateStatus } : {},
|
|
3502
3503
|
...opts.sdlcStage !== void 0 ? { sdlcStage: opts.sdlcStage } : {},
|
|
3503
|
-
...opts.
|
|
3504
|
+
...opts.testExecution !== void 0 ? { testExecutionId: opts.testExecution } : {},
|
|
3504
3505
|
...opts.evidenceScope !== void 0 ? { evidenceScope: opts.evidenceScope } : {},
|
|
3505
|
-
...opts.
|
|
3506
|
+
...opts.testExecutionRecordId !== void 0 ? { testExecutionRecordId: opts.testExecutionRecordId } : {},
|
|
3506
3507
|
...opts.metaKey !== void 0 && opts.metaKey.length > 0 ? { metaKeys: opts.metaKey } : {},
|
|
3507
3508
|
...opts.baseUrl !== void 0 ? { baseUrl: opts.baseUrl } : {},
|
|
3508
3509
|
...opts.apiKey !== void 0 ? { apiKey: opts.apiKey } : {},
|