Task · TSO-0191

Land the dashboard selector-scope guard from the retained audit candidate

Description

Split out of TSO-0172 (comprehensive dashboard audit) after loop28 and loop29 landed nothing: the audit’s static, locally provable half was held hostage to its live-evidence half. TSO-0170 found a whole tab ignoring the tailnet and provider variables; the loop28 audit lane built a generated-dashboard selector-scope guard plus the generator fixes and regenerated both dashboards, with the full gate green and an independent security review passed, but it was never landed. The retained staged candidate lives in the gitignored codex/loop28 campaign directory (selector_scope.py, test_selector_scope.py, build.py, two existing test expectation lines and both generated dashboard JSONs) on a base that main has since moved past with dependency bumps only. Live per-panel verdicts and query evidence stay in TSO-0172.

Acceptance Criteria

Definition of Done

Implementation Plan

Rebase the retained selector-scope candidate in an isolated worktree; regenerate, reproduce the unscoped-query failure, run G, obtain fresh security review then sharded CodeRabbit; root lands and verifies composed gate, exact-SHA CI and dashboard delivery.

Implementation Notes

loop30: 2 implementation attempts, 1 review-repair round. Initial gate passed but fresh security review found a mixed scheduler TraceQL collector false pass; retry corrected conditional scope and independent assembled/shipped behavioral negative tests, then full gate and delta security passed. Original unscoped ratio proof failed with missing tailnet/provider; mixed-trace proof failed before correction. Existing test hunks add only tailnet matcher. CodeRabbit completed with zero major/critical and one out-of-scope historical audit-plan minor; actual completion listed all candidate Python files and both artifacts. Land 00a9936814845d5f46c4beacc410b65ed8536e0d; fresh detached composed G exit 0; CI 38302365105 ci-success success; grafana-sync 38302365172 success; both far-side dashboard blobs match landed commit. helm-success absent, not a pass. Backend TraceQL parser/Grafana interpolation remains unverified; later live audit owns that evidence.

Final Summary

Landed selector scope guard and regenerated both dashboards at 00a9936814845d5f46c4beacc410b65ed8536e0d. Full local/composed gates, fresh guarded review and exact CI passed; both GitSync artifacts verified by blob identity. Guard now detects the previously missed mixed scheduler query as well as unscoped metric operands.

References

View the source file on GitHub