Skip to content

[2/9] Align native Account Overview advisory evaluations - #3567

Open
Dmitrii Shilov (bk201-) wants to merge 12 commits into
dev/dshilov/account-overview-01-offer-metricsfrom
dev/dshilov/account-overview-02-native-detectors
Open

Dmitrii Shilov (bk201-) wants to merge 12 commits into
dev/dshilov/account-overview-01-offer-metricsfrom
dev/dshilov/account-overview-02-native-detectors

Conversation

@bk201-

@bk201- Dmitrii Shilov (bk201-) commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Expose typed detector outcomes and inspectable capacity evidence. Correct sizing, fan-out, storage and configuration predicates, distinguish structural merge findings from action eligibility, and evaluate authoritative shared offers without duplicating recoverable capacity.

Includes backup/change-feed metadata, collector wiring, resource-oriented UI wording, native regressions and generated localization. Carries the existing raw-log observation duration into the stricter detector contract; aggregate-log acquisition follows in the next PR.

Stack

Part 2 of 9 in the Account Overview advisory stack. Depends on #3566. Base: dev/dshilov/account-overview-01-offer-metrics.
Each subsequent PR targets its predecessor branch so GitHub can represent the chain as a native PR stack.

Validation

The integrated stack passed localization generation, oxfmt, lint, all TypeScript build targets, and all unit suites. The full unit command used VITEST_MAX_WORKERS=2 to avoid local resource-contention timeouts. Intermediate runtime branches also passed builds and focused regressions.
Review fixes are committed to their originating PR layers; descendants are rebased onto the updated predecessors.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Integration Tests

  • Shell MCP Integration Tests: ✅ success
  • Integration Tests (extension host): ✅ success

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build (Compile, Lint, Prettier, l10n, Package)

🧱 Step Results

  • Validate Version: ✅ success
  • Localization: ✅ success
  • Lint: ✅ success
  • Prettier: ✅ success
  • Compile (tsc): ✅ success
  • Package: ✅ success
  • External Skills: verification ✅ success; tests ✅ success

📥 Artifacts (run)

@github-code-quality

github-code-quality Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/vitest

dev/dshilov/account-... 5c8102d dev/dshilov/account-... 9865be5 +/-
77% 77% 0%
View coverage of the 10 most impacted files.
File dev/dshilov/account-... 5c8102d dev/dshilov/account-... 9865be5 +/-
src/panels/acco...mentDetector.ts 100% 96% -4%
src/webviews/co...TabViewJson.tsx 99% 98% -1%
src/panels/acco...ries/collect.ts 92% 93% +1%
src/panels/acco...ces/ruTrends.ts 98% 100% +2%
src/panels/acco...es/inventory.ts 95% 97% +2%
src/panels/acco...titionHealth.ts 94% 97% +3%
src/panels/acco...onedDetector.ts 96% 100% +4%
src/panels/acco.../storageMath.ts 95% 100% +5%
src/cosmosdb/Az...urceMetadata.ts 15% 50% +35%
src/panels/acco...ctors/fanout.ts 0% 100% +100%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 19, 2026 17:34 UTC

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Unit Tests

🧪 Results

  • Unit Tests (vitest): ✅ success

📈 Coverage

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🎭 E2E Tests (Playwright + VS Code)

🧪 Result

  • E2E Tests: ✅ success

📥 Artifacts (run)

Tip: the HTML report artifact contains a self-contained Playwright report.
Download the zip, extract, and open index.html — or run
npx playwright show-report <extracted-dir> for the interactive view.

Copilot AI balanced review requested due to automatic review settings November 11, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The 200-shape cap can undercount fan-out execution rates and suppress both detectors, requiring uncapped classification aggregates and regression coverage for workloads exceeding 200 shapes.

1 open issue
What changed in this PR

Part 2 of the Account Overview advisory stack builds on #3566’s offer-scoped metrics to refine native detector decisions and expose their supporting evidence.

Changes:

  • Adds typed evaluation outcomes, capacity evidence, and separate action-eligibility decisions.
  • Updates sizing, fan-out, storage, and configuration rules, including shared-offer ownership and backup/change-feed metadata.
  • Adds regression coverage and resource-oriented UI wording.
File Description
src/​webviews/​cosmosdb/​AccountOverview/​DerivedAdvisories.tsx Uses resource-aware labels and more qualified guidance.
src/​webviews/​cosmosdb/​AccountOverview/​DerivedAdvisories.test.tsx Tests resource summaries and accessible names.
src/​webviews/​cosmosdb/​AccountOverview/​AccountOverview.test.tsx Updates advisory interaction selectors.
src/​panels/​trpc/​routers/​accountOverview/​derivedAdvisoriesRouter.ts Forwards backup, change-feed, and account configuration.
src/​panels/​trpc/​routers/​accountOverview/​derivedAdvisoriesRouter.test.ts Tests metadata propagation and merge eligibility.
src/​panels/​accountOverview/​services/​diagnosticPolicy.test.ts Removes obsolete severity thresholds.
src/​panels/​accountOverview/​services/​advisories/​offerMetrics.test.ts Tests shared-offer isolation and member failures.
src/​panels/​accountOverview/​services/​advisories/​nativeParity.test.ts Adds typed-outcome and detector-boundary regressions.
src/​panels/​accountOverview/​services/​advisories/​fetchers/​metrics.ts Adds offer-aware reads and recent indexing evidence.
src/​panels/​accountOverview/​services/​advisories/​fetchers/​metrics.test.ts Tests metric scope, empty results, and indexing samples.
src/​panels/​accountOverview/​services/​advisories/​fetchers/​logs.ts Supplies the fan-out observation duration.
src/​panels/​accountOverview/​services/​advisories/​detectors/​UnderProvisioningDetector.ts Adds typed outcomes and shared-offer scopes.
src/​panels/​accountOverview/​services/​advisories/​detectors/​UncontrolledIngestionDetector.ts Exposes outcomes and request-log evidence.
src/​panels/​accountOverview/​services/​advisories/​detectors/​StorageSkewRiskDetector.ts Distinguishes non-finding outcomes.
src/​panels/​accountOverview/​services/​advisories/​detectors/​storageMath.ts Estimates regression roundoff for boundary comparisons.
src/​panels/​accountOverview/​services/​advisories/​detectors/​StorageGrowthRiskDetector.ts Handles inclusive boundaries and missing history.
src/​panels/​accountOverview/​services/​advisories/​detectors/​SharedThroughputStarvationDetector.ts Restricts evaluation to authoritative shared members.
src/​panels/​accountOverview/​services/​advisories/​detectors/​ShardKeyMisalignmentDetector.ts Uses unrounded fan-out shares and rates.
src/​panels/​accountOverview/​services/​advisories/​detectors/​ServerlessThrottlingDetector.ts Exposes typed throttling outcomes.
src/​panels/​accountOverview/​services/​advisories/​detectors/​ServerlessCandidateDetector.ts Adds explicit candidate classifications.
src/​panels/​accountOverview/​services/​advisories/​detectors/​PartitionMergeCandidateDetector.ts Separates excess partitions from merge eligibility.
src/​panels/​accountOverview/​services/​advisories/​detectors/​OverProvisioningDetector.ts Exposes sizing evidence and blocks no-op guidance.
src/​panels/​accountOverview/​services/​advisories/​detectors/​MultiRegionWriteAntipatternDetector.ts Adds regional capacity evidence and qualified guidance.
src/​panels/​accountOverview/​services/​advisories/​detectors/​IndexingCostRiskDetector.ts Revises ratio checks and disabled-index handling.
src/​panels/​accountOverview/​services/​advisories/​detectors/​IdleContainerDetector.ts Attributes recoverable capacity to offers.
src/​panels/​accountOverview/​services/​advisories/​detectors/​HotPartitionRiskDetector.ts Supports shared-offer scopes and guidance.
src/​panels/​accountOverview/​services/​advisories/​detectors/​fanout.ts Centralizes fan-out statistics, severity, and RU evidence.
src/​panels/​accountOverview/​services/​advisories/​detectors/​ExpensiveConsistencyDetector.ts Revises consistency checks and optional read-charge evidence.
src/​panels/​accountOverview/​services/​advisories/​detectors/​CrossPartitionQueryDetector.ts Adds rate-based classification and revised remediation.
src/​panels/​accountOverview/​services/​advisories/​detectors/​AutoscaleToManualCandidateDetector.ts Adds typed outcomes and offer-aware wording.
src/​panels/​accountOverview/​services/​advisories/​detectors/​AutoscaleMaxOverProvisionedDetector.ts Corrects autoscale sizing and idle-floor recovery.
src/​panels/​accountOverview/​services/​advisories/​detectors/​AutoscaleCandidateDetector.ts Exposes conversion targets and typed outcomes.
src/​panels/​accountOverview/​services/​advisories/​derivedAdvisories.test.ts Expands boundary and classification coverage.
src/​panels/​accountOverview/​services/​advisories/​derivedAdvisories.parity.test.ts Aligns native fixtures with revised rules.
src/​panels/​accountOverview/​services/​advisories/​core/​types.ts Defines typed outcomes, evidence, and eligibility contracts.
src/​panels/​accountOverview/​services/​advisories/​core/​thresholds.ts Updates internal detector policies.
src/​panels/​accountOverview/​services/​advisories/​core/​helpers.ts Adds utilization bands and offer scopes.
src/​panels/​accountOverview/​services/​advisories/​collectParity.test.ts Tests revised collector wiring and evidence handling.
src/​panels/​accountOverview/​services/​advisories/​collect.ts Collects shared-offer signals and validates capacity inventory.
src/​panels/​accountOverview/​advisoryText.test.ts Verifies zero-recovery presentation.
src/​cosmosdb/​AzureResourceMetadata.ts Preserves the raw ARM change-feed flag.
src/​cosmosdb/​AzureResourceMetadata.test.ts Tests optional change-feed flag extraction.
specs/​account-overview.md Documents revised acquisition and evaluation contracts.

Review effort: Balanced

@bk201- Dmitrii Shilov (bk201-) changed the title [2/7] Align native Account Overview advisory evaluations [2/8] Align native Account Overview advisory evaluations Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 13, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The documented Coda commands and 379-scenario result are not reproducible because this layer lacks the required package.json scripts and configuration.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Low severity Document only Coda checks implemented in this stack layer

specs/​account-overview.md:684

This stack layer's package.json defines neither externalSpecifications.coda nor the test:coda and coda:check scripts, so contributors cannot run the documented commands or reproduce the claimed 379-scenario result. Describe the native regressions available here and defer the harness, pin and workflow guarantees until their implementation lands. The same issue affects the freshness-check paragraph at specs/account-overview.md:709–713.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documentation claims Coda verification and conformance results that cannot be reproduced with this revision’s tooling, so those claims should be deferred or labeled as planned.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread specs/account-overview.md Resolved
@bk201-
Dmitrii Shilov (bk201-) force-pushed the dev/dshilov/account-overview-02-native-detectors branch from d5f5f9a to 4d57133 Compare November 13, 2026 13:33
Copilot AI balanced review requested due to automatic review settings November 13, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A valid zero-byte observation is incorrectly classified as insufficient data rather than below the materiality floor, and the behavior needs correction with regression coverage.

1 open issue
1 resolved since last review

Review effort: Balanced

@bk201-
Dmitrii Shilov (bk201-) force-pushed the dev/dshilov/account-overview-02-native-detectors branch from 4d57133 to 30bc24e Compare November 13, 2026 13:59
Copilot AI balanced review requested due to automatic review settings November 13, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Regression coverage is missing for the new regional-capacity calculations, including mixed shared and dedicated manual offers, non-production versus legitimate-HA removable capacity, and autoscale or incomplete inventory exclusions.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 13, 2026 14:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Shared-offer sizing depends on Azure Monitor’s empty-CollectionName scoping, which remains unverified against populated mixed shared/dedicated databases and cannot be established by SDK fixtures.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@bk201-
Dmitrii Shilov (bk201-) requested a balanced review from Copilot November 13, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human live-service verification is needed because shared-offer sizing and saturation depend on Azure Monitor’s empty CollectionName scope, which remains unvalidated on a populated mixed shared/dedicated database.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Live validation of empty-CollectionName throughput metrics and dedicated-traffic exclusion remains outstanding for a populated mixed database, and controlled fixtures cannot establish Azure metric semantics.

No open issues 🎉

Review effort: Balanced

@bk201- Dmitrii Shilov (bk201-) changed the title [2/8] Align native Account Overview advisory evaluations [2/9] Align native Account Overview advisory evaluations Nov 18, 2026
Expose typed evaluations and capacity evidence, correct sizing and fan-out decisions, respect backup merge restrictions, and collect shared offers without duplicating recoverable capacity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Splitting out configuration failures left filter/map as the only array member in the native-detector and request-log layers, triggering unicorn/no-useless-spread.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The top-200 shape cap biased execution rates and shares, suppressing findings or overstating structural misalignment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep PR two accurate on its own; restore the pin, commands and scenario evidence with PR six.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The zero-initialized maximum incorrectly treated a valid zero-byte sample as missing evidence. Use the empty partition list and missing-history flag for insufficient_data, preserving too_small for observed zero bytes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise a mixed shared/dedicated all-manual inventory through the real advisory engine, excluding autoscale and incomplete inventories. Verify removable non-production capacity separately from legitimate production HA.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe only the raw request-log acquisition available in this PR; aggregate selection belongs to the following acquisition layer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/cosmosdb/AzureResourceMetadata.ts Resolved
Remove the obsolete container-count key at the earliest affected PR so each descendant passes l10n:check after rebasing. Regenerated the catalog with npm run l10n.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 12:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classify immaterial observations before balance, matching the pinned source contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants