fix(#3804): audit-uat enumerates all three phase-archive layouts (#4022)

* test(#3804): audit-uat must see all three phase-archive layouts

* fix(#3804): enumerate all three phase-archive layouts (flat, workstream-archived, workstream-active)

* chore(#3804): changeset fragment (pr number backfilled after PR creation)

* chore(#3804): backfill changeset PR number (4022)

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-29 01:14:58 -04:00
committed by GitHub
parent 80de48c319
commit f4fefb0bef
6 changed files with 229 additions and 22 deletions

View File

@@ -31,7 +31,7 @@ import phaseIdMod = require('./phase-id.cjs');
const { PHASE_NUMBER_TOKEN_SOURCE, scopeToPhase } = phaseIdMod;
// eslint-disable-next-line @typescript-eslint/no-require-imports
import phaseLocator = require('./phase-locator.cjs');
const { getArchivedPhaseDirs } = phaseLocator;
const { getAllArchivedPhaseDirs } = phaseLocator;
import { requireSafePath, sanitizeForDisplay, sanitizeLabel } from './security.cjs';
import { platformWriteSync } from './shell-command-projection.cjs';
// eslint-disable-next-line @typescript-eslint/no-require-imports
@@ -956,8 +956,11 @@ function listAuditPhaseTargets(planDir: string, cwd: string): { targets: AuditPh
}
}
// #3804: the audit is cross-workstream by design — the shared
// getAllArchivedPhaseDirs helper (root + every workstream, distinct
// '<ws>/<version>' labels) owns that walk.
try {
for (const archived of getArchivedPhaseDirs(cwd)) {
for (const archived of getAllArchivedPhaseDirs(cwd)) {
targets.push({ dir: archived.name, fullPath: archived.fullPath, milestone: archived.milestone });
}
} catch {