Repository navigation
feat(cloud-agent-next): add containers billing identity from instance size - #6573
Conversation
41fc750 to
6620472
Compare
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryFull re-review (history was rewritten, so the incremental base is no longer an ancestor of HEAD): the containers billing-identity work and its Files Reviewed (5 files)
Previous Review Summaries (2 snapshots, latest commit f08df04)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f08df04)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit 6620472)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe billing-identity resolution added for Cloud Agent containers is sound; the only finding is a prototype-sensitive class-name check in Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (5 files)
Notes
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
…ss check isContainersBillingClassName used the prototype-inclusive `in` operator while containersBillingIdentity in the same file uses Object.hasOwn, so a name like `toString` or `constructor` classified as a containers class and billingCapacityForSandboxClass could resolve Object.prototype as a capacity. Use Object.hasOwn so the two checks share one own-key rule and cannot drift. Addresses PR #6573 review.
…ss check isContainersBillingClassName used the prototype-inclusive `in` operator while containersBillingIdentity in the same file uses Object.hasOwn, so a name like `toString` or `constructor` classified as a containers class and billingCapacityForSandboxClass could resolve Object.prototype as a capacity. Use Object.hasOwn so the two checks share one own-key rule and cannot drift. Addresses PR #6573 review.
f08df04 to
9fc549a
Compare
Summary
Resolve a containers billing identity (class, service, SKU, capacity) from instance size.
container-usage-context.tsbecomes the sole owner of class ↔ service ↔ SKU ↔ capacity.cloud-agent-containers-standard-3-2026-09andcloud-agent-containers-standard-4-2026-09toSANDBOX_USAGE_SKUSCONTAINERS_BILLING_CAPACITIES(standard-3: 2 vCPU / 8 GiB / 16 GB; standard-4: 4 vCPU / 12 GiB / 20 GB)containersBillingIdentity('standard-3'|'standard-4'); rejectslite/standard-1/standard-2assertSandboxBillingAllocationso containers classes accept an isolatedses-billing IDService strings use the existing camel→kebab transform (
SandboxContainersStandard4→cloud-agent-next-sandbox-containers-standard4); the transform is unchanged so every legacy service string is preserved.No runtime/adapter/picker wiring in this PR.
Verification
pnpm --filter cloud-agent-next exec vitest run src/container-usage-context.test.ts src/container-capacity-parity.test.ts— passpnpm --filter cloud-agent-next typecheck— passStack
Part 2 of 5. Previous: #6572.