← Back to Pull requests

fix: window orchestration logs and verify union coverage #7572

Closed
unknown closed this pull request without merging on Oct 16, 2026 16:40 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 03:27 UTC
Author

Why

The orchestration query in must-gather can exceed Kusto's 64 MB result limit even when it correctly selects a single newly created cluster. Repeating the entire collection does not reduce that response, and the E2E verifier previously allowed all three orchestration union arms to return no data as long as other queries supplied its expected containers.

No separate tracking ticket exists; this focused regression fix is motivated by the failing E2E run for #7557.

What

  • Collect only the orchestration child in five-minute, nonoverlapping windows while retaining full-range discovery of cluster and Maestro bundle IDs. Preserve the sibling queries' whole-range aggregations and the existing logical output file.

  • Discover all nonempty canonical cid values rather than one arbitrary scalar, scope discovery to the subscription/resource-group path when available, and retain resource-group-only discovery for generated Kusto links.

  • Label the Maestro, Hypershift, and ACM union arms. Add a library template summary mode returning counts, estimated bytes, and first/last timestamps from exactly the same selection as full log collection.

  • Execute one full-range orchestration summary in the lifecycle E2E presence verifier instead of downloading the raw orchestration payloads. Require a positive aggregate count from every arm, keyed by query name so other queries cannot satisfy the checks. Reject absent, zero, or malformed counts. Other source checks are unchanged; normal must-gather and its separate CLI smoke test still collect full logs.

  • Preserve global descending order when executing time windows.
  • Five-minute windows mitigate result-size failures; an unusually large individual window still returns an error. This does not silently truncate results, raise Kusto limits, add adaptive retries, or introduce a summary CLI flag.

    Testing

    Read-only validation against the development E2E Kusto environment using the requested Azure CLI profile and proxy bypass replayed the exact failed interval, 2026-10-14T14:26:17.9586902Z through 2026-10-15T14:26:17.9586903Z.

    | Union arm | Original selection summary | Updated selection summary | Full windowed collection |
    |---|---:|---:|---:|
    | Maestro | 1,599 | 1,599 | 1,599 |
    | Hypershift | 24,386 | 24,386 | 24,386 |
    | ACM agent | 274 | 274 | 274 |

    The summary estimated approximately 84.6 MB across these rows. Every full-data window completed without a result-limit error; all 26,259 rows were read through the Go Kusto client, with matching per-arm totals. A nonexistent resource group returned no summary rows. The valid cluster ID was present in the original lookup, so this incident was genuine result volume, not empty-ID broadening.

    The E2E summary selection was also replayed through the Go Kusto client: it returned exactly three rows in one request, with the counts above, rather than downloading 26,259 orchestration payloads.

  • Unit and race tests passed for tooling/hcpctl/pkg/kusto, tooling/hcpctl/pkg/mustgather, and test/util/verifiers; go vet passed for the same packages.

  • Regenerated both generated-link HTML test-table fixtures, which embed the shared orchestration query in compressed Kusto URLs. All test/cmd/... packages pass with fixture updates disabled, including both generated-HTML regression tests.

  • Regression tests cover shared summary/log selection, fixed discovery ranges, ascending/descending windows, unchanged siblings, and missing-arm detection even when unrelated queries return the same source labels. They verify that summary gathering executes only one full-range orchestration query (no raw duplicate), that Kusto long counts survive normalization as strings, and that the verifier reads aggregate counts rather than treating a summary row as presence. Negative cases cover missing/zero counts and malformed summaries.

  • hcpctl targeted lint passed. Verifier lint reports three existing QF1012 findings in untouched test/util/verifiers/fips.go at lines 160, 163, and 170.

  • A new cluster-provisioning E2E run was not performed locally; live validation replayed the failed cluster's persisted logs.
  • PR Checklist

  • PR is scoped to a single task

  • Title follows Conventional Commits

  • Summary explains why

  • Failure linked and no-ticket explanation provided

  • Self-reviewed all changes, including security review

  • Draft PR

  • Regression tests demonstrate missing-arm failures

  • CI/CD checks passing (excluding Tide)
  • Suggested reviewer: @janboll (hcpctl owner).

    Diff: 588 lines (+441 / -147) across 7 files Reviewer: stevekuznetsov Review duration: 793m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 588 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7572"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.0% (MEDIUM) · Higher = larger blast radius
    50.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.6% · Safe to merge
    21.6%
    Repository