@pourkit/cli 0.0.0-next-20260607184355 → 0.0.0-next-20260607223610
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/cli.js +95 -44
- package/dist/cli.js.map +1 -1
- package/dist/e2e/run-live-e2e.js +20 -5
- package/dist/e2e/run-live-e2e.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2867,8 +2867,9 @@ function parseConflictResolutionArtifact(output) {
|
|
|
2867
2867
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync5 } from "fs";
|
|
2868
2868
|
import { dirname as dirname3, isAbsolute, join as join6, relative } from "path";
|
|
2869
2869
|
import { z as z2 } from "zod";
|
|
2870
|
+
var PRD_REF_FOUR_DIGIT = /^PRD-\d{4,}$/;
|
|
2870
2871
|
var PlanningArtifactManifestSchema = z2.object({
|
|
2871
|
-
prdRef: z2.string().regex(
|
|
2872
|
+
prdRef: z2.string().regex(PRD_REF_FOUR_DIGIT),
|
|
2872
2873
|
parentIssue: z2.object({
|
|
2873
2874
|
number: z2.number().int().positive(),
|
|
2874
2875
|
url: z2.string().url(),
|
|
@@ -2927,7 +2928,15 @@ function readPlanningArtifactManifest(repoRoot2, prdRef) {
|
|
|
2927
2928
|
if (!parsed.ok) {
|
|
2928
2929
|
return parsed;
|
|
2929
2930
|
}
|
|
2930
|
-
|
|
2931
|
+
const readiness = validatePlanningArtifactManifestReadiness(parsed.manifest);
|
|
2932
|
+
if (!readiness.ok) {
|
|
2933
|
+
return readiness;
|
|
2934
|
+
}
|
|
2935
|
+
return {
|
|
2936
|
+
ok: true,
|
|
2937
|
+
manifest: readiness.manifest,
|
|
2938
|
+
...location.locationDiagnostics?.length ? { warnings: location.locationDiagnostics } : {}
|
|
2939
|
+
};
|
|
2931
2940
|
}
|
|
2932
2941
|
function validatePlanningArtifactManifestAtPath(repoRoot2, manifestPath) {
|
|
2933
2942
|
let content;
|
|
@@ -2984,6 +2993,10 @@ function validatePlanningArtifactManifestReadiness(manifest) {
|
|
|
2984
2993
|
}
|
|
2985
2994
|
return { ok: true, manifest: schemaResult.data };
|
|
2986
2995
|
}
|
|
2996
|
+
function deriveOldFormatRef(prdRef) {
|
|
2997
|
+
const match = prdRef.match(/^PRD-0(\d{3})$/);
|
|
2998
|
+
return match ? `PRD-${match[1]}` : null;
|
|
2999
|
+
}
|
|
2987
3000
|
function findPlanningArtifactManifestLocation(repoRoot2, prdRef) {
|
|
2988
3001
|
const initiativesRoot = join6(
|
|
2989
3002
|
repoRoot2,
|
|
@@ -3010,26 +3023,35 @@ function findPlanningArtifactManifestLocation(repoRoot2, prdRef) {
|
|
|
3010
3023
|
}).filter((entry) => entry.isDirectory()).map((entry) => join6(initiativesRoot, entry.name)).sort();
|
|
3011
3024
|
const diagnostics = [];
|
|
3012
3025
|
const collatedOffendingPaths = [];
|
|
3026
|
+
const oldFormatRef = deriveOldFormatRef(prdRef);
|
|
3013
3027
|
for (const initiativeDir of initiativeDirs) {
|
|
3014
3028
|
const indexPath = join6(initiativeDir, "INDEX.md");
|
|
3015
3029
|
if (!existsSync5(indexPath)) continue;
|
|
3016
3030
|
const indexContent = readFileSync5(indexPath, "utf-8");
|
|
3017
|
-
const
|
|
3031
|
+
const lines = indexContent.split(/\r?\n/);
|
|
3032
|
+
const fourDigitLine = lines.find(
|
|
3018
3033
|
(line) => line.includes(prdRef) && line.includes("planning-manifest.md")
|
|
3019
3034
|
);
|
|
3035
|
+
const threeDigitLine = oldFormatRef ? lines.find(
|
|
3036
|
+
(line) => line.includes(oldFormatRef) && line.includes("planning-manifest.md")
|
|
3037
|
+
) : null;
|
|
3038
|
+
const manifestLine = fourDigitLine ?? threeDigitLine;
|
|
3020
3039
|
if (!manifestLine) continue;
|
|
3021
3040
|
const manifestPath = extractBacktickedPath(manifestLine);
|
|
3022
3041
|
if (!manifestPath) {
|
|
3023
3042
|
diagnostics.push(
|
|
3024
|
-
`INDEX.md matched ${prdRef} but did not expose a manifest path: ${toRepoRelativePath(repoRoot2, indexPath)}`
|
|
3043
|
+
`INDEX.md matched ${prdRef}${oldFormatRef ? ` (or ${oldFormatRef})` : ""} but did not expose a manifest path: ${toRepoRelativePath(repoRoot2, indexPath)}`
|
|
3025
3044
|
);
|
|
3026
3045
|
collatedOffendingPaths.push(toRepoRelativePath(repoRoot2, indexPath));
|
|
3027
3046
|
continue;
|
|
3028
3047
|
}
|
|
3029
|
-
const
|
|
3048
|
+
const expectedFourDigitPattern = new RegExp(
|
|
3030
3049
|
`^prds/${prdRef}-[^/]+/planning-manifest\\.md$`
|
|
3031
3050
|
);
|
|
3032
|
-
|
|
3051
|
+
const expectedThreeDigitPattern = oldFormatRef ? new RegExp(`^prds/${oldFormatRef}-[^/]+/planning-manifest\\.md$`) : null;
|
|
3052
|
+
const matchedFourDigit = expectedFourDigitPattern.test(manifestPath);
|
|
3053
|
+
const matchedThreeDigit = expectedThreeDigitPattern?.test(manifestPath) ?? false;
|
|
3054
|
+
if (!matchedFourDigit && !matchedThreeDigit) {
|
|
3033
3055
|
diagnostics.push(
|
|
3034
3056
|
`INDEX.md path does not match expected pattern prds/${prdRef}-<slug>/planning-manifest.md. Found: ${manifestPath} (${toRepoRelativePath(repoRoot2, indexPath)})`
|
|
3035
3057
|
);
|
|
@@ -3049,7 +3071,16 @@ function findPlanningArtifactManifestLocation(repoRoot2, prdRef) {
|
|
|
3049
3071
|
);
|
|
3050
3072
|
continue;
|
|
3051
3073
|
}
|
|
3052
|
-
|
|
3074
|
+
if (!matchedFourDigit && matchedThreeDigit) {
|
|
3075
|
+
diagnostics.push(
|
|
3076
|
+
`Old-format PRD ref ${oldFormatRef} found in INDEX.md at ${toRepoRelativePath(repoRoot2, indexPath)} for PRD ${prdRef}; should be migrated to ${prdRef}`
|
|
3077
|
+
);
|
|
3078
|
+
}
|
|
3079
|
+
return {
|
|
3080
|
+
ok: true,
|
|
3081
|
+
manifestPath: absoluteManifestPath,
|
|
3082
|
+
...diagnostics.length > 0 ? { locationDiagnostics: [...diagnostics] } : {}
|
|
3083
|
+
};
|
|
3053
3084
|
}
|
|
3054
3085
|
if (diagnostics.length > 0) {
|
|
3055
3086
|
return {
|
|
@@ -3464,10 +3495,10 @@ function normalizePrdRunRef(ref) {
|
|
|
3464
3495
|
const match = trimmed.match(/^(?:PRD-)?(\d+)$/);
|
|
3465
3496
|
if (!match) {
|
|
3466
3497
|
throw new Error(
|
|
3467
|
-
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-
|
|
3498
|
+
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-0043)`
|
|
3468
3499
|
);
|
|
3469
3500
|
}
|
|
3470
|
-
return `PRD-${match[1].padStart(
|
|
3501
|
+
return `PRD-${match[1].padStart(4, "0")}`;
|
|
3471
3502
|
}
|
|
3472
3503
|
function normalizeRepoPath(pathValue) {
|
|
3473
3504
|
return pathValue.split("\\").join("/");
|
|
@@ -3867,8 +3898,8 @@ function validateLocalPrepare(prdPath, issuePaths, options) {
|
|
|
3867
3898
|
return { ...triageResult, gate: "triage_consistency" };
|
|
3868
3899
|
}
|
|
3869
3900
|
const protectedBranchNames = ["dev", "next", "main"];
|
|
3870
|
-
const barePrdPattern = /^PRD-\d{
|
|
3871
|
-
const localPrdBranchPattern = /^local\/PRD-\d{
|
|
3901
|
+
const barePrdPattern = /^PRD-\d{4}$/;
|
|
3902
|
+
const localPrdBranchPattern = /^local\/PRD-\d{4}$/;
|
|
3872
3903
|
const dirtyRaw = tryExecSync("git status --porcelain", options?.repoRoot);
|
|
3873
3904
|
if (dirtyRaw !== null && dirtyRaw.length > 0) {
|
|
3874
3905
|
return {
|
|
@@ -3903,7 +3934,7 @@ function validateLocalPrepare(prdPath, issuePaths, options) {
|
|
|
3903
3934
|
ok: false,
|
|
3904
3935
|
gate: "branch_safety",
|
|
3905
3936
|
failureCode: "branch_unsafe",
|
|
3906
|
-
message: `PRD localPrdBranch "${localPrdBranch}" matches bare PRD-
|
|
3937
|
+
message: `PRD localPrdBranch "${localPrdBranch}" matches bare PRD-0000N pattern without local/ prefix`
|
|
3907
3938
|
};
|
|
3908
3939
|
}
|
|
3909
3940
|
if (!localPrdBranchPattern.test(localPrdBranch)) {
|
|
@@ -3911,7 +3942,7 @@ function validateLocalPrepare(prdPath, issuePaths, options) {
|
|
|
3911
3942
|
ok: false,
|
|
3912
3943
|
gate: "branch_safety",
|
|
3913
3944
|
failureCode: "branch_unsafe",
|
|
3914
|
-
message: `PRD localPrdBranch "${localPrdBranch}" must match local/PRD-
|
|
3945
|
+
message: `PRD localPrdBranch "${localPrdBranch}" must match local/PRD-0000N pattern`
|
|
3915
3946
|
};
|
|
3916
3947
|
}
|
|
3917
3948
|
const branchExists = tryExecSync(
|
|
@@ -3965,7 +3996,7 @@ function validateLocalPrepare(prdPath, issuePaths, options) {
|
|
|
3965
3996
|
gate: "branch_safety",
|
|
3966
3997
|
failureCode: "branch_unsafe",
|
|
3967
3998
|
offendingPath: issuePath,
|
|
3968
|
-
message: `Issue branch "${branchName}" matches bare PRD-
|
|
3999
|
+
message: `Issue branch "${branchName}" matches bare PRD-0000N pattern without local/ prefix`
|
|
3969
4000
|
};
|
|
3970
4001
|
}
|
|
3971
4002
|
}
|
|
@@ -4409,12 +4440,12 @@ function validateLocalIssue(path9) {
|
|
|
4409
4440
|
message: "id must be a non-empty string"
|
|
4410
4441
|
};
|
|
4411
4442
|
}
|
|
4412
|
-
if (typeof data.parentPrdId !== "string" || !/^PRD-\d{
|
|
4443
|
+
if (typeof data.parentPrdId !== "string" || !/^PRD-\d{4}$/.test(data.parentPrdId.trim())) {
|
|
4413
4444
|
return {
|
|
4414
4445
|
ok: false,
|
|
4415
4446
|
failureCode: "invalid_issue_artifact",
|
|
4416
4447
|
offendingPath: path9,
|
|
4417
|
-
message: "parentPrdId must match PRD-
|
|
4448
|
+
message: "parentPrdId must match PRD-0000N format"
|
|
4418
4449
|
};
|
|
4419
4450
|
}
|
|
4420
4451
|
if (typeof data.title !== "string" || data.title.trim() === "") {
|
|
@@ -4507,12 +4538,12 @@ function validateLocalIssue(path9) {
|
|
|
4507
4538
|
message: "dependencyIssueIds must be an array"
|
|
4508
4539
|
};
|
|
4509
4540
|
}
|
|
4510
|
-
if (typeof data.branchName !== "string" || !/^local\/PRD-\d{
|
|
4541
|
+
if (typeof data.branchName !== "string" || !/^local\/PRD-\d{4}\/I-\d{2}-[a-z0-9-]+$/.test(data.branchName)) {
|
|
4511
4542
|
return {
|
|
4512
4543
|
ok: false,
|
|
4513
4544
|
failureCode: "invalid_issue_artifact",
|
|
4514
4545
|
offendingPath: path9,
|
|
4515
|
-
message: "branchName must match local/PRD-
|
|
4546
|
+
message: "branchName must match local/PRD-0000N/I-0N-slug pattern"
|
|
4516
4547
|
};
|
|
4517
4548
|
}
|
|
4518
4549
|
if (!(data.blockedReason === null || typeof data.blockedReason === "string")) {
|
|
@@ -4628,7 +4659,7 @@ function validateLocalIssue(path9) {
|
|
|
4628
4659
|
}
|
|
4629
4660
|
return { ok: true };
|
|
4630
4661
|
}
|
|
4631
|
-
var PRD_REF_PATTERN = /^PRD-\d
|
|
4662
|
+
var PRD_REF_PATTERN = /^PRD-\d{4}$/;
|
|
4632
4663
|
var EVIDENCE_HASH_PATTERN = /^[0-9a-f]{64}$/;
|
|
4633
4664
|
var RECONCILIATION_TMP_PATH_PREFIX = ".pourkit/.tmp/reconciliation/";
|
|
4634
4665
|
function validateReconciliationArtifact(artifact) {
|
|
@@ -4639,7 +4670,7 @@ function validateReconciliationArtifact(artifact) {
|
|
|
4639
4670
|
const a = artifact;
|
|
4640
4671
|
if (typeof a.prdRef !== "string" || !PRD_REF_PATTERN.test(a.prdRef)) {
|
|
4641
4672
|
errors.push(
|
|
4642
|
-
`prdRef must match PRD-
|
|
4673
|
+
`prdRef must match PRD-0000N format, got ${JSON.stringify(a.prdRef)}`
|
|
4643
4674
|
);
|
|
4644
4675
|
}
|
|
4645
4676
|
if (a.stage !== "prdReconciliation") {
|
|
@@ -4651,7 +4682,7 @@ function validateReconciliationArtifact(artifact) {
|
|
|
4651
4682
|
errors.push("checkoutBase must be a non-empty string");
|
|
4652
4683
|
} else if (!PRD_REF_PATTERN.test(a.checkoutBase.trim())) {
|
|
4653
4684
|
errors.push(
|
|
4654
|
-
`checkoutBase must match active PRD branch format PRD-
|
|
4685
|
+
`checkoutBase must match active PRD branch format PRD-0000N, got ${JSON.stringify(a.checkoutBase)}`
|
|
4655
4686
|
);
|
|
4656
4687
|
}
|
|
4657
4688
|
if (typeof a.mergeBase !== "string" || a.mergeBase.trim() === "") {
|
|
@@ -4680,6 +4711,19 @@ function validateReconciliationArtifact(artifact) {
|
|
|
4680
4711
|
);
|
|
4681
4712
|
}
|
|
4682
4713
|
}
|
|
4714
|
+
if (a.result === "no_changes_needed") {
|
|
4715
|
+
const paths = a.changedPlanningPaths ?? [];
|
|
4716
|
+
if (Array.isArray(paths) && paths.length > 0) {
|
|
4717
|
+
errors.push(
|
|
4718
|
+
`Reconciliation artifact result is "no_changes_needed" but changedPlanningPaths is not empty (${paths.length} paths).`
|
|
4719
|
+
);
|
|
4720
|
+
}
|
|
4721
|
+
if (!a.noChangeRationale || typeof a.noChangeRationale !== "string") {
|
|
4722
|
+
errors.push(
|
|
4723
|
+
'Reconciliation artifact result is "no_changes_needed" but noChangeRationale is missing or not a string.'
|
|
4724
|
+
);
|
|
4725
|
+
}
|
|
4726
|
+
}
|
|
4683
4727
|
if (!Array.isArray(a.completionArtifactPaths) || !a.completionArtifactPaths.every((p) => typeof p === "string")) {
|
|
4684
4728
|
errors.push("completionArtifactPaths must be an array of strings");
|
|
4685
4729
|
}
|
|
@@ -6379,7 +6423,8 @@ function parseAffectedCodePaths(body) {
|
|
|
6379
6423
|
return Array.from(paths);
|
|
6380
6424
|
}
|
|
6381
6425
|
function normalizeParentRef(ref) {
|
|
6382
|
-
|
|
6426
|
+
if (!ref) return void 0;
|
|
6427
|
+
return ref.trim().toUpperCase().replace(/^(PRD-)(\d+)$/, (_, p, n) => `${p}${n.padStart(4, "0")}`);
|
|
6383
6428
|
}
|
|
6384
6429
|
function looksLikeRepoPath(value) {
|
|
6385
6430
|
return /[./][A-Za-z0-9_-]/.test(value) && !value.includes(":");
|
|
@@ -7761,7 +7806,10 @@ import { join as join14 } from "path";
|
|
|
7761
7806
|
import { z as z3 } from "zod";
|
|
7762
7807
|
var PRD_RUN_STATE_DIR = ".pourkit/prd-runs";
|
|
7763
7808
|
var PrdRunRecordSchema = z3.object({
|
|
7764
|
-
prdRef: z3.string().regex(
|
|
7809
|
+
prdRef: z3.string().regex(
|
|
7810
|
+
/^PRD-\d{4}$/,
|
|
7811
|
+
"PRD ref must use four-digit format (e.g., PRD-0052)"
|
|
7812
|
+
),
|
|
7765
7813
|
status: z3.enum([
|
|
7766
7814
|
"blocked",
|
|
7767
7815
|
"preparing",
|
|
@@ -7890,10 +7938,10 @@ function normalizePrdRunRef2(ref) {
|
|
|
7890
7938
|
const match = trimmed.match(/^(?:PRD-)?(\d+)$/);
|
|
7891
7939
|
if (!match) {
|
|
7892
7940
|
throw new Error(
|
|
7893
|
-
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-
|
|
7941
|
+
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-0043)`
|
|
7894
7942
|
);
|
|
7895
7943
|
}
|
|
7896
|
-
return `PRD-${match[1].padStart(
|
|
7944
|
+
return `PRD-${match[1].padStart(4, "0")}`;
|
|
7897
7945
|
}
|
|
7898
7946
|
function readPrdRun(repoRoot2, prdRef) {
|
|
7899
7947
|
const normalized = normalizePrdRunRef2(prdRef);
|
|
@@ -7954,7 +8002,7 @@ function writePrdRunRecord(repoRoot2, record) {
|
|
|
7954
8002
|
}
|
|
7955
8003
|
var LOCAL_PRD_RUN_STATE_DIR = ".pourkit/local-prd-runs";
|
|
7956
8004
|
var LocalPrdRunRecordSchema = z3.object({
|
|
7957
|
-
prdId: z3.string().regex(/^PRD-\d
|
|
8005
|
+
prdId: z3.string().regex(/^PRD-\d{4}$/, "PRD id must use four-digit format (e.g., PRD-0052)"),
|
|
7958
8006
|
createdAt: z3.string().min(1),
|
|
7959
8007
|
receipts: z3.object({
|
|
7960
8008
|
prepare: z3.object({
|
|
@@ -8582,7 +8630,7 @@ function getLocalPrdBranchName(prdId) {
|
|
|
8582
8630
|
return `local/${prdId}`;
|
|
8583
8631
|
}
|
|
8584
8632
|
var PROTECTED_BRANCHES = /* @__PURE__ */ new Set(["dev", "next", "main"]);
|
|
8585
|
-
var LOCAL_BRANCH_PATTERN = /^local\/PRD-\d{
|
|
8633
|
+
var LOCAL_BRANCH_PATTERN = /^local\/PRD-\d{4}(\/(I-\d{2}(-[a-z0-9-]+)?)?)?$/;
|
|
8586
8634
|
function validateLocalBranchName(name) {
|
|
8587
8635
|
if (!name || name.length === 0) {
|
|
8588
8636
|
return {
|
|
@@ -8611,7 +8659,7 @@ function isProtectedBranch(name) {
|
|
|
8611
8659
|
return PROTECTED_BRANCHES.has(name);
|
|
8612
8660
|
}
|
|
8613
8661
|
function hasRemoteBackedCollision(localName, repoRoot2) {
|
|
8614
|
-
const match = localName.match(/^local\/(PRD-\d{
|
|
8662
|
+
const match = localName.match(/^local\/(PRD-\d{4})/);
|
|
8615
8663
|
if (!match) {
|
|
8616
8664
|
return Promise.resolve({
|
|
8617
8665
|
ok: false,
|
|
@@ -13099,10 +13147,10 @@ function validateReconciliationArtifact2(artifact, context) {
|
|
|
13099
13147
|
}
|
|
13100
13148
|
return { ok: true };
|
|
13101
13149
|
}
|
|
13102
|
-
var PRD_047_PRD_MIRROR_PATH = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-
|
|
13103
|
-
var PRD_047_CHILD_ISSUE_DIR = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-
|
|
13150
|
+
var PRD_047_PRD_MIRROR_PATH = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-0047-prd-reconciliation-run/PRD.md";
|
|
13151
|
+
var PRD_047_CHILD_ISSUE_DIR = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-0047-prd-reconciliation-run/issues/";
|
|
13104
13152
|
var PRD_047_ESCAPE_HATCH_PATH = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/completions/006-prd-047-prd-reconciliation-run-status.md";
|
|
13105
|
-
var PRD_047_MANIFEST_PATH = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-
|
|
13153
|
+
var PRD_047_MANIFEST_PATH = ".pourkit/architecture/initiatives/prd-run-lifecycle-and-integration-gate/prds/PRD-0047-prd-reconciliation-run/planning-manifest.md";
|
|
13106
13154
|
function auditPrd047Implementation(repoRoot2, prdRef) {
|
|
13107
13155
|
const normalizedRef = normalizePrdRunRef2(prdRef);
|
|
13108
13156
|
const blockerBugs = [];
|
|
@@ -13123,7 +13171,7 @@ function auditPrd047Implementation(repoRoot2, prdRef) {
|
|
|
13123
13171
|
const prdMirrorExists = existsSync16(prdMirrorPath);
|
|
13124
13172
|
if (!prdMirrorExists) {
|
|
13125
13173
|
nonBlockers.push(
|
|
13126
|
-
`PRD-
|
|
13174
|
+
`PRD-0047 PRD mirror not found at ${PRD_047_PRD_MIRROR_PATH}. Cannot verify scope alignment from published mirrors.`
|
|
13127
13175
|
);
|
|
13128
13176
|
}
|
|
13129
13177
|
if (prdMirrorExists) {
|
|
@@ -13132,12 +13180,12 @@ function auditPrd047Implementation(repoRoot2, prdRef) {
|
|
|
13132
13180
|
const hasEscapeHatch = mirrorContent.includes("escape hatch");
|
|
13133
13181
|
if (!hasReconcileCommand) {
|
|
13134
13182
|
blockerBugs.push(
|
|
13135
|
-
"PRD-
|
|
13183
|
+
"PRD-0047 PRD mirror does not reference prd-run reconcile command."
|
|
13136
13184
|
);
|
|
13137
13185
|
}
|
|
13138
13186
|
if (!hasEscapeHatch) {
|
|
13139
13187
|
nonBlockers.push(
|
|
13140
|
-
"PRD-
|
|
13188
|
+
"PRD-0047 PRD mirror does not reference escape hatch mechanism."
|
|
13141
13189
|
);
|
|
13142
13190
|
}
|
|
13143
13191
|
}
|
|
@@ -13145,7 +13193,7 @@ function auditPrd047Implementation(repoRoot2, prdRef) {
|
|
|
13145
13193
|
const childIssuesExist = existsSync16(childIssueDir);
|
|
13146
13194
|
if (!childIssuesExist) {
|
|
13147
13195
|
nonBlockers.push(
|
|
13148
|
-
`PRD-
|
|
13196
|
+
`PRD-0047 child Issue mirrors not found at ${PRD_047_CHILD_ISSUE_DIR}.`
|
|
13149
13197
|
);
|
|
13150
13198
|
}
|
|
13151
13199
|
const manifestPath = join19(repoRoot2, PRD_047_MANIFEST_PATH);
|
|
@@ -13216,16 +13264,16 @@ function auditPrd047Implementation(repoRoot2, prdRef) {
|
|
|
13216
13264
|
}
|
|
13217
13265
|
if (!prdMirrorExists && !childIssuesExist && !prdRunRecord.record) {
|
|
13218
13266
|
nonBlockers.push(
|
|
13219
|
-
"Insufficient evidence to verify PRD-
|
|
13267
|
+
"Insufficient evidence to verify PRD-0047 scope alignment: mirrors and PRD Run record are missing."
|
|
13220
13268
|
);
|
|
13221
13269
|
}
|
|
13222
13270
|
if (escapeHatchPresent) {
|
|
13223
13271
|
blockersFixed.push(
|
|
13224
|
-
"PRD-
|
|
13272
|
+
"PRD-0047 escape-hatch lifecycle violation record confirmed present."
|
|
13225
13273
|
);
|
|
13226
13274
|
} else {
|
|
13227
13275
|
nonBlockers.push(
|
|
13228
|
-
"PRD-
|
|
13276
|
+
"PRD-0047 escape-hatch lifecycle violation record is missing. Expected at " + PRD_047_ESCAPE_HATCH_PATH + "."
|
|
13229
13277
|
);
|
|
13230
13278
|
}
|
|
13231
13279
|
return {
|
|
@@ -18957,10 +19005,13 @@ function normalizePrdRef(ref) {
|
|
|
18957
19005
|
const normalized = ref.trim().toUpperCase();
|
|
18958
19006
|
if (!/^PRD-\d+$/.test(normalized)) {
|
|
18959
19007
|
throw new Error(
|
|
18960
|
-
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-
|
|
19008
|
+
`Invalid PRD ref "${ref}". Expected format: PRD-<number> (e.g., PRD-0021)`
|
|
18961
19009
|
);
|
|
18962
19010
|
}
|
|
18963
|
-
return normalized
|
|
19011
|
+
return normalized.replace(
|
|
19012
|
+
/^(PRD-)(\d+)$/,
|
|
19013
|
+
(_, p, n) => `${p}${n.padStart(4, "0")}`
|
|
19014
|
+
);
|
|
18964
19015
|
}
|
|
18965
19016
|
function buildPrCreateArgs(options) {
|
|
18966
19017
|
const args = ["--target", options.target, "--title", options.title];
|
|
@@ -19790,11 +19841,11 @@ function createCliProgram(version) {
|
|
|
19790
19841
|
return program;
|
|
19791
19842
|
}
|
|
19792
19843
|
async function resolveCliVersion() {
|
|
19793
|
-
if (isPackageVersion("0.0.0-next-
|
|
19794
|
-
return "0.0.0-next-
|
|
19844
|
+
if (isPackageVersion("0.0.0-next-20260607223610")) {
|
|
19845
|
+
return "0.0.0-next-20260607223610";
|
|
19795
19846
|
}
|
|
19796
|
-
if (isReleaseVersion("0.0.0-next-
|
|
19797
|
-
return "0.0.0-next-
|
|
19847
|
+
if (isReleaseVersion("0.0.0-next-20260607223610")) {
|
|
19848
|
+
return "0.0.0-next-20260607223610";
|
|
19798
19849
|
}
|
|
19799
19850
|
try {
|
|
19800
19851
|
const root = repoRoot();
|