This commit is contained in:
master
2026-02-21 16:21:33 +02:00
parent 7e36c1f151
commit b911537870
116 changed files with 4365 additions and 5903 deletions

View File

@@ -80,46 +80,46 @@ const endpointMatrixFile = process.env.PACK_ENDPOINT_MATRIX_FILE?.trim();
const endpointMatrixAbsFile = endpointMatrixFile ? path.resolve(process.cwd(), endpointMatrixFile) : null;
const EXPECTATIONS: PackExpectation[] = [
{ pack: '22', path: '/dashboard', text: /Dashboard/i, canonical: /\/dashboard$/ },
{ pack: '22', path: '/mission-control/board', text: /Dashboard|Mission board/i, canonical: /\/mission-control\/board$/ },
{ pack: '22', path: '/releases', text: /Release|Run/i, canonical: /\/releases\/runs$/ },
{ pack: '22', path: '/releases/new', text: /Create Release|Version|Release/i, canonical: /\/releases\/versions\/new$/ },
{ pack: '22', path: '/releases/activity', text: /Activity|Release|Run/i, canonical: /\/releases\/runs$/ },
{ pack: '22', path: '/releases/approvals', text: /Approval/i, canonical: /\/releases\/approvals$/ },
{ pack: '22', path: '/releases/overview', text: /Release Ops Overview|Release/i, canonical: /\/releases\/overview$/ },
{ pack: '22', path: '/releases/versions', text: /Release Versions|Release list|Version/i, canonical: /\/releases\/versions$/ },
{ pack: '22', path: '/releases/versions/new', text: /Create Release|Version/i, canonical: /\/releases\/versions\/new$/ },
{ pack: '22', path: '/releases/runs', text: /Release Runs|Timeline|Run/i, canonical: /\/releases\/runs$/ },
{ pack: '22', path: '/releases/approvals', text: /Approvals?/i, canonical: /\/releases\/approvals$/ },
{ pack: '22', path: '/releases/hotfixes', text: /Hotfix/i, canonical: /\/releases\/hotfixes$/ },
{ pack: '22', path: '/releases/promotion-queue', text: /Promotion Queue|Promotion/i, canonical: /\/releases\/promotion-queue$/ },
{ pack: '22', path: '/releases/environments', text: /Environment|Region/i, canonical: /\/releases\/environments$/ },
{ pack: '22', path: '/releases/deployments', text: /Deployment/i, canonical: /\/releases\/deployments$/ },
{ pack: '22', path: '/security', text: /Risk Overview|Security/i, canonical: /\/security\/overview$/ },
{ pack: '22', path: '/security/findings', text: /Findings|Triage/i, canonical: /\/security\/triage$/ },
{ pack: '22', path: '/security/disposition', text: /Disposition|VEX|Exception/i, canonical: /\/security\/advisories-vex$/ },
{ pack: '22', path: '/security/sbom/lake', text: /SBOM|Supply-Chain|Component/i, canonical: /\/security\/supply-chain-data\/lake$/ },
{ pack: '22', path: '/security/posture', text: /Security|Risk|Posture/i, canonical: /\/security\/posture$/ },
{ pack: '22', path: '/security/triage', text: /Findings|Triage/i, canonical: /\/security\/triage$/ },
{ pack: '22', path: '/security/advisories-vex', text: /Advisories|VEX|Disposition/i, canonical: /\/security\/advisories-vex$/ },
{ pack: '22', path: '/security/supply-chain-data', text: /SBOM|Supply-Chain|Component/i, canonical: /\/security\/supply-chain-data$/ },
{ pack: '22', path: '/security/reachability', text: /Reachability/i, canonical: /\/security\/reachability$/ },
{ pack: '22', path: '/security/reports', text: /Reports?/i, canonical: /\/security\/reports$/ },
{ pack: '22', path: '/evidence', text: /Evidence/i, canonical: /\/evidence\/overview$/ },
{ pack: '22', path: '/evidence/packs', text: /Decision Capsule|Capsule|Evidence/i, canonical: /\/evidence\/capsules$/ },
{ pack: '22', path: '/evidence/exports', text: /Export Center|Export/i, canonical: /\/evidence\/exports\/export$/ },
{ pack: '22', path: '/evidence/overview', text: /Evidence|Capsule|Verify/i, canonical: /\/evidence\/overview$/ },
{ pack: '22', path: '/evidence/capsules', text: /Decision Capsule|Capsule|Evidence/i, canonical: /\/evidence\/capsules$/ },
{ pack: '22', path: '/evidence/verify-replay', text: /Verify|Replay|Proof/i, canonical: /\/evidence\/verify-replay$/ },
{ pack: '22', path: '/evidence/exports', text: /Export/i, canonical: /\/evidence\/exports/ },
{ pack: '22', path: '/evidence/audit-log', text: /Audit Log|Events?/i, canonical: /\/evidence\/audit-log/ },
{ pack: '22', path: '/topology/regions', text: /Region|Topology/i, canonical: /\/topology\/regions$/ },
{ pack: '22', path: '/topology/environments', text: /Environment|Topology/i, canonical: /\/topology\/environments$/ },
{ pack: '22', path: '/topology/agents', text: /Agent|Topology/i, canonical: /\/topology\/agents$/ },
{ pack: '22', path: '/topology/promotion-paths', text: /Promotion|Path|Topology/i, canonical: /\/topology\/promotion-paths$/ },
{ pack: '22', path: '/ops', text: /Ops|Overview/i, canonical: /\/ops$/ },
{ pack: '22', path: '/ops/operations', text: /Operations|Platform Ops/i, canonical: /\/ops\/operations$/ },
{ pack: '22', path: '/ops/operations/data-integrity', text: /Data Integrity|Trust/i, canonical: /\/ops\/operations\/data-integrity/ },
{ pack: '22', path: '/ops/operations/orchestrator', text: /Orchestrator/i, canonical: /\/ops\/operations\/orchestrator$/ },
{ pack: '22', path: '/ops/integrations', text: /Integration Hub|Integrations/i, canonical: /\/ops\/integrations$/ },
{ pack: '22', path: '/ops/integrations/advisory-vex-sources', text: /Advisory|VEX|Source|FeedMirror|Integrations/i, canonical: /\/ops\/integrations\/advisory-vex-sources$/ },
{ pack: '22', path: '/ops/policy', text: /Policy|Governance/i, canonical: /\/ops\/policy/ },
{ pack: '22', path: '/ops/platform-setup', text: /Setup|Release Templates|Promotion Paths/i, canonical: /\/ops\/platform-setup/ },
{ pack: '22', path: '/operations', text: /Operations|Platform Ops/i, canonical: /\/operations$/ },
{ pack: '22', path: '/operations/data-integrity', text: /Data Integrity|Ops/i, canonical: /\/operations\/data-integrity$/ },
{ pack: '22', path: '/operations/orchestrator', text: /Orchestrator/i, canonical: /\/operations\/orchestrator$/ },
{ pack: '22', path: '/operations/feeds', text: /Feeds|Mirror/i, canonical: /\/operations\/feeds/ },
{ pack: '22', path: '/integrations', text: /Integration Hub|Integrations/i, canonical: /\/integrations$/ },
{ pack: '22', path: '/integrations/feeds', text: /Feed|Advisory/i, canonical: /\/integrations\/feeds$/ },
{ pack: '22', path: '/integrations/vex-sources', text: /VEX|Source/i, canonical: /\/integrations\/vex-sources$/ },
{ pack: '22', path: '/administration', text: /Platform Setup|Administration/i, canonical: /\/platform\/setup/ },
{ pack: '22', path: '/administration/policy-governance', text: /Policy|Governance/i, canonical: /\/administration\/policy-governance/ },
// Legacy roots must continue to resolve into canonical Pack 22 routes.
{ pack: '22', path: '/release-control/releases', text: /Release|Run/i, canonical: /\/releases\/runs$/ },
{ pack: '22', path: '/release-control/setup/environments-paths', text: /Promotion|Path|Topology/i, canonical: /\/topology\/promotion-paths$/ },
{ pack: '22', path: '/security-risk/findings', text: /Findings|Triage/i, canonical: /\/security\/triage$/ },
{ pack: '22', path: '/evidence-audit/packs', text: /Decision Capsule|Capsule|Evidence/i, canonical: /\/evidence\/capsules$/ },
{ pack: '22', path: '/platform-ops/agents', text: /Agent|Topology/i, canonical: /\/topology\/agents$/ },
{ pack: '22', path: '/setup', text: /Setup|Identity|Notifications|Topology/i, canonical: /\/setup$/ },
{ pack: '22', path: '/setup/topology/overview', text: /Topology Overview|Topology/i, canonical: /\/setup\/topology\/overview$/ },
{ pack: '22', path: '/setup/topology/map', text: /Map|Topology|Target/i, canonical: /\/setup\/topology\/map$/ },
{ pack: '22', path: '/setup/topology/targets', text: /Targets?|Topology/i, canonical: /\/setup\/topology\/targets$/ },
{ pack: '22', path: '/setup/topology/hosts', text: /Hosts?|Topology/i, canonical: /\/setup\/topology\/hosts$/ },
{ pack: '22', path: '/setup/topology/agents', text: /Agent|Topology/i, canonical: /\/setup\/topology\/agents$/ },
];
const RUN_EXPECTATIONS = (() => {
@@ -200,19 +200,6 @@ async function go(page: Page, path: string): Promise<void> {
await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(() => null);
}
async function goClientSide(page: Page, routePath: string): Promise<void> {
await go(page, '/dashboard');
await page.evaluate((targetPath) => {
window.history.pushState({}, '', targetPath);
window.dispatchEvent(new PopStateEvent('popstate'));
}, routePath);
await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(() => null);
}
function isProxyCapturedDevRoute(routePath: string): boolean {
return routePath.startsWith('/integrations') || routePath.startsWith('/platform-ops');
}
async function ensureShell(page: Page): Promise<void> {
await expect(page.locator('aside.sidebar')).toHaveCount(1, { timeout: 15000 });
}
@@ -279,13 +266,7 @@ test.describe('Pack conformance from docs/modules/ui/v2-rewire/pack-01..21', ()
activeRecord = { pack: item.pack, route: item.path };
try {
try {
if (isProxyCapturedDevRoute(item.path)) {
// Dev proxy maps "/integrations" and "/platform*" to backend services.
// Reach these routes via client-side routing to validate SPA shell behavior.
await goClientSide(page, item.path);
} else {
await go(page, item.path);
}
await go(page, item.path);
} catch (error) {
failures.push(`[pack-${item.pack}] ${item.path} -> navigation failed: ${String(error)}`);
return;