Fix topology scope hydration and live sweep readiness

This commit is contained in:
master
2026-03-10 14:37:38 +02:00
parent b302a5a3d6
commit ec22b8ee46
4 changed files with 320 additions and 77 deletions

View File

@@ -61,13 +61,16 @@ Completion criteria:
| 2026-03-10 | First authenticated live topology sweep failed 25 actions with 0 runtime issues. Every failure traced to scope loss across topology shell tabs, CTA/drilldown links, or environment detail operator actions; two tab failures were harness selector collisions on partial `Security` and `Evidence` matches. | QA |
| 2026-03-10 | Root cause analysis found two product defects: Topology links were not consistently using scope-preserving navigation, and `SecurityFindingsPageComponent.reloadFromFilters()` rewrote `/security/triage` without merge semantics, stripping the incoming topology scope. | Developer |
| 2026-03-10 | Added focused navigation regressions for topology and security findings. Focused Angular run passed `6/6` assertions across `2` spec files. | Test Automation |
| 2026-03-10 | Rebuilt the web bundle, synced `dist/stellaops-web/browser` into `compose_console-dist`, and reran the same live topology sweep. Final evidence is clean with `0` failed actions and `0` runtime issues in `src/Web/StellaOps.Web/output/playwright/live-setup-topology-action-sweep.json`. Commit hash pending local commit. | QA |
| 2026-03-10 | Cold-stack replay showed the earlier sweep still had a QA harness defect: it sampled generic shell states before lazy topology routes hydrated and counted navigation-aborted XHRs as runtime failures. Hardened `live-setup-topology-action-sweep.mjs` with route-readiness gates, URL waits, and `ERR_ABORTED` filtering so Playwright only reports live defects. | QA |
| 2026-03-10 | The hardened sweep exposed one real product issue on `/setup/topology/environments`: local environment selection could drift off the scoped environment during hydration, causing `Open Targets`, `Open Agents`, and `Open Runs` to launch against `dev` or `prod-us-west` while the active scope was `stage`. Fixed `TopologyRegionsEnvironmentsPageComponent` to reconcile region/environment selection from the active context first, added a focused regression to `topology-scope-links.component.spec.ts`, rebuilt the web bundle, synced `dist/stellaops-web/browser` into `compose_console-dist`, and reran the live topology sweep clean with `0` failed actions and `0` runtime issues in `src/Web/StellaOps.Web/output/playwright/live-setup-topology-action-sweep.json`. Commit hash pending local commit. | Developer |
## Decisions & Risks
- Decision: treat scope preservation as a correctness requirement in topology because the active platform context changes the data surface on every page and drilldown.
- Risk: `TabbedNavComponent` is shared across multiple shells. If topology needs scope-preserving shell tabs, prefer an opt-in contract instead of a silent repo-wide behavior change.
- Decision: `TabItem` now supports opt-in `queryParamsHandling`, and Topology explicitly sets `merge` on its shell tabs. This preserves scope without changing every other shared tabbed navigation surface.
- Decision: fixing the destination rewrite in `/security/triage` is mandatory. Accepting a scoped entry link is not sufficient if the landing page immediately discards the topology context.
- Decision: topology inventory pages must reconcile local selection state from the active platform context before falling back to the first loaded row. Otherwise operator actions can silently target the wrong environment during cold-start hydration.
- Decision: live Playwright sweeps on the SPA must wait for route-specific readiness, not just `domcontentloaded`, because the shell can render before the lazy child route and produce false QA failures on a healthy stack.
## Next Checkpoints
- Capture the first failing topology live sweep.