Repair release investigation workspace contracts

This commit is contained in:
master
2026-03-09 23:19:42 +02:00
parent 3ecafc49a3
commit 359fafa9da
20 changed files with 1806 additions and 284 deletions

View File

@@ -9,6 +9,8 @@ VERIFIED
## Description
Deploy diff UI provides deterministic A/B SBOM comparison with policy-hit context, loading/error states, and inline release action controls.
As of 2026-03-09 the panel is no longer wired to the dead `/api/v1/sbom/diff` route. The canonical comparison source is SbomService lineage compare, and the surrounding Releases workspace now degrades to an actionable `No Comparison Selected` state instead of a hard route failure when no digests are present.
## Implementation Details
- **Feature directory**: `src/Web/StellaOps.Web/src/app/features/deploy-diff/`
- **Route module**: `src/Web/StellaOps.Web/src/app/features/deploy-diff/deploy-diff.routes.ts`
@@ -16,11 +18,16 @@ Deploy diff UI provides deterministic A/B SBOM comparison with policy-hit contex
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/pages/deploy-diff.page.ts`
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/components/deploy-diff-panel/deploy-diff-panel.component.ts`
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/services/deploy-diff.service.ts`
- **Canonical backend dependency**:
- `GET /api/v1/lineage/compare?a=<fromDigest>&b=<toDigest>&tenant=<tenantId>`
- **Focused tests**:
- `src/Web/StellaOps.Web/src/tests/deploy_diff/deploy-diff-panel.component.spec.ts`
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/services/deploy-diff.service.spec.ts`
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/components/deploy-diff-panel/deploy-diff-panel.component.spec.ts`
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/pages/deploy-diff.page.spec.ts`
## Follow-up Notes
- Primary shell route map now mounts `/deploy/diff` via `src/Web/StellaOps.Web/src/app/app.routes.ts`, enabling strict end-user Tier 2 replay.
- Primary Releases shell mounts the canonical workspace at `/releases/investigation/deploy-diff`.
- Direct shell navigation without digests is a supported workspace state, not an error path.
## Verification
- Date: 2026-02-10
@@ -30,18 +37,12 @@ Deploy diff UI provides deterministic A/B SBOM comparison with policy-hit contex
- `tier1-build-check.json`: pass
- `tier2-e2e-check.json`: pass
## Recheck (run-003)
- Date (UTC): 2026-02-10
- Status: VERIFIED (replayed)
- Tier 1 evidence: Angular build passed and checked-web suite passed 145/145.
- Tier 2 evidence: docs/qa/feature-checks/runs/web/a-b-deploy-diff-panel/run-003/tier2-e2e-check.json.
## Recheck (run-004)
- Date (UTC): 2026-02-10
- Status: VERIFIED (replayed)
@@ -55,3 +56,12 @@ Deploy diff UI provides deterministic A/B SBOM comparison with policy-hit contex
- Tier 2 evidence: `docs/qa/feature-checks/runs/web/a-b-deploy-diff-panel/run-006/tier2-ui-check.json`
- Notes: Playwright now covers positive deploy-diff rendering plus missing-parameter and API-error user paths; route is mounted in the primary shell map.
## Recheck (2026-03-09)
- Status: VERIFIED (lineage compare contract repair)
- Tier 1 evidence:
- `npx ng test --watch=false --ts-config tsconfig.spec.features.json --include=src/app/features/deploy-diff/services/deploy-diff.service.spec.ts --include=src/app/features/deploy-diff/components/deploy-diff-panel/deploy-diff-panel.component.spec.ts --include=src/app/features/deploy-diff/pages/deploy-diff.page.spec.ts`
- Tier 2 target:
- live `https://stella-ops.local/releases/investigation/deploy-diff`
- Notes:
- direct route loads an actionable workspace when digests are missing
- loaded comparisons are normalized from lineage compare into the deploy-diff UI model

View File

@@ -15,10 +15,15 @@ Integrated disconnected release-investigation route families (timeline, deploy-d
## Canonical URL Contract
- `/releases/investigation/timeline` - Investigation timeline overview
- `/releases/investigation/timeline/:correlationId` - Correlated event drill-in
- `/releases/investigation/deploy-diff` - Deployment diff (query params: from, to)
- `/releases/investigation/change-trace` - Change trace viewer
- `/releases/investigation/deploy-diff` - Deployment diff workspace; direct load shows a recovery state when no `from`/`to` digests are present
- `/releases/investigation/change-trace` - Change trace workspace; direct load shows a recovery state until a comparison or trace id is selected
- `/releases/investigation/change-trace/:traceId` - Specific trace detail
## Direct-Load Workspace Contract
- `/releases/investigation/deploy-diff` no longer fails with `Missing Parameters`. Direct navigation now shows `No Comparison Selected` plus recovery actions back to `/releases/deployments` and `/releases/overview`.
- `/releases/investigation/change-trace` no longer renders an inert `No Change Trace Loaded` shell. Direct navigation now shows `No Comparison Selected` plus recovery actions to `/releases/deployments`, or back to deploy-diff when `from`/`to` digests are already present.
- Both workspaces preserve tenant/scope query context when it exists and fall back to the canonical `demo-prod` tenant on a fresh shell load.
## Timeline Decision
**Bounded-secondary-route** (not absorb-into-run-workspace). The investigation timeline is a correlation-based tool that spans multiple services by correlationId, which is conceptually different from the run workspace's timeline tab showing run execution flow. Mounting it under `/releases/investigation/timeline` avoids URL collision and keeps both capabilities distinct.
@@ -30,6 +35,10 @@ Integrated disconnected release-investigation route families (timeline, deploy-d
- `src/Web/StellaOps.Web/src/app/features/deploy-diff/deploy-diff.routes.ts` - Updated canonical URL reference
- `src/Web/StellaOps.Web/src/app/features/change-trace/change-trace.routes.ts` - Added breadcrumb, title, sprint ref
- **Tests**: `src/Web/StellaOps.Web/src/app/routes/releases.routes.spec.ts`
- **Recheck (2026-03-09)**:
- `deploy-diff` is now backed by the live lineage compare contract instead of the dead `/api/v1/sbom/diff` path.
- `change-trace` is now backed by the restored `/api/change-traces/build` and `/api/change-traces/{traceId}` compatibility endpoints in SbomService.
- Focused verification passed on `src/Web/StellaOps.Web/src/app/features/deploy-diff/pages/deploy-diff.page.spec.ts` and `src/Web/StellaOps.Web/src/app/features/change-trace/change-trace-viewer.component.spec.ts`.
## Deliberately Excluded Legacy Behaviors
- The old timeline route at `/timeline` (standalone top-level) is not revived