Repository navigation
fix(billing): treat a rollout-defaulted capability as an unresolved policy - #16182
dante01yoon wants to merge 1 commit into
Conversation
…olicy can_subscribe_self_serve, can_top_up and can_downgrade_to_personal can be answered with a rollout default instead of a policy result. The response marks those fields in rollout_defaults_applied, which the client never read, so a default was indistinguishable from a deny and closed every pricing entry point while the rollout flags were off. Route the three fields through the marker: a defaulted value carries no policy decision, so it falls back to ownership exactly as an unreadable snapshot already does for top-up.
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1886 passed, 0 failed📊 Browser Reports
📦 Bundle: 9.62 MB gzip 🟢 -41 BDetailsSummary
Category Glance App Entry Points — 3.78 kB (baseline 3.78 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.4 MB (baseline 1.4 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 622 kB (baseline 622 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 17 unchanged User & Accounts — 27.5 kB (baseline 27.5 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 115 kB (baseline 115 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 8 unchanged Data & Services — 3.56 MB (baseline 3.56 MB) • 🔴 +142 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 555 kB (baseline 555 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 19 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 16.2 MB (baseline 16.2 MB) • ⚪ 0 BBundles that do not match a named category
Status: 72 added / 72 removed / 224 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-28T11:49:45.743Z",
"gitSha": "7a9cb67ccb6346df35f6cf96301aaae04f45ba91",
"branch": "dante/consume-rollout-defaults",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2054.175999999984,
"styleRecalcs": 8,
"styleRecalcDurationMs": 5.706999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 519.5260000000001,
"heapDeltaBytes": 12581504,
"heapUsedBytes": 75540228,
"domNodes": -283,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 8.445,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2023.975000000064,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.641000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.06399999999996,
"heapDeltaBytes": -2263644,
"heapUsedBytes": 65916736,
"domNodes": -278,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 8.235,
"eventListeners": -187,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1874.8750000000314,
"styleRecalcs": 72,
"styleRecalcDurationMs": 35.57000000000001,
"layouts": 12,
"layoutDurationMs": 3.1780000000000004,
"taskDurationMs": 839.9859999999999,
"heapDeltaBytes": -2720216,
"heapUsedBytes": 59790352,
"domNodes": -281,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 138.891,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1733.0480000000534,
"styleRecalcs": 72,
"styleRecalcDurationMs": 27.990000000000002,
"layouts": 12,
"layoutDurationMs": 2.9139999999999997,
"taskDurationMs": 771.161,
"heapDeltaBytes": -9742344,
"heapUsedBytes": 59304828,
"domNodes": -281,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 125.46700000000003,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1666.195000000016,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.793999999999999,
"layouts": 6,
"layoutDurationMs": 0.6529999999999999,
"taskDurationMs": 320.067,
"heapDeltaBytes": 4359852,
"heapUsedBytes": 73364768,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 9.781999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.5779999999886,
"styleRecalcs": 32,
"styleRecalcDurationMs": 13.393,
"layouts": 6,
"layoutDurationMs": 0.606,
"taskDurationMs": 326.41900000000004,
"heapDeltaBytes": 3607852,
"heapUsedBytes": 67378900,
"domNodes": 75,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.395999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 598.1259999999793,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.658,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 401.108,
"heapDeltaBytes": 19027672,
"heapUsedBytes": 81844492,
"domNodes": 10,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 136.138,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 583.5510000000568,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.465999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.06699999999995,
"heapDeltaBytes": 19201396,
"heapUsedBytes": 88300072,
"domNodes": 20,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 140.975,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2034.0649999999982,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.3679999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 551.4430000000001,
"heapDeltaBytes": -12153660,
"heapUsedBytes": 88563348,
"domNodes": -268,
"jsHeapTotalBytes": -2363392,
"scriptDurationMs": 35.166,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2037.7790000000005,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.556,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 576.6820000000001,
"heapDeltaBytes": 12360688,
"heapUsedBytes": 87460524,
"domNodes": -271,
"jsHeapTotalBytes": -1875968,
"scriptDurationMs": 39.223000000000006,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2127.904000000001,
"styleRecalcs": 67,
"styleRecalcDurationMs": 9.444,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1425.685,
"heapDeltaBytes": 20625784,
"heapUsedBytes": 86288588,
"domNodes": -268,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 694.894,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2181.7009999999755,
"styleRecalcs": 63,
"styleRecalcDurationMs": 8.524000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1436.5030000000002,
"heapDeltaBytes": 19083512,
"heapUsedBytes": 85089384,
"domNodes": 2,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 715.0040000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3457.417000000021,
"styleRecalcs": 61,
"styleRecalcDurationMs": 10.459,
"layouts": 60,
"layoutDurationMs": 7.470999999999999,
"taskDurationMs": 1527.9820000000002,
"heapDeltaBytes": 9346660,
"heapUsedBytes": 77100680,
"domNodes": 2,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 694.421,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "large-graph-zoom",
"durationMs": 3593.3469999999943,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.864999999999997,
"layouts": 60,
"layoutDurationMs": 8.45,
"taskDurationMs": 1588.4729999999997,
"heapDeltaBytes": 8883976,
"heapUsedBytes": 76805592,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 719.593,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2614.3860000000245,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.209999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1642.1699999999998,
"heapDeltaBytes": 18189636,
"heapUsedBytes": 85513492,
"domNodes": 2,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 806.184,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2742.0419999999694,
"styleRecalcs": 42,
"styleRecalcDurationMs": 6.778,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1713.7919999999997,
"heapDeltaBytes": 20383684,
"heapUsedBytes": 87033564,
"domNodes": -275,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 844.536,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2020.5569999999966,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.6819999999999977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 525.129,
"heapDeltaBytes": 23269492,
"heapUsedBytes": 88700716,
"domNodes": -270,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 36.385,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2028.0279999999493,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.488000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 566.72,
"heapDeltaBytes": -13510072,
"heapUsedBytes": 88404604,
"domNodes": -268,
"jsHeapTotalBytes": -1576960,
"scriptDurationMs": 40.154999999999994,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 563.9449999999897,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.025,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 363.397,
"heapDeltaBytes": 13578164,
"heapUsedBytes": 78448480,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 120.76100000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 558.4510000001046,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.123000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 368.41599999999994,
"heapDeltaBytes": 14701364,
"heapUsedBytes": 79046148,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 124.65100000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2018.2629999999904,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.874,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 460.84200000000004,
"heapDeltaBytes": -6340016,
"heapUsedBytes": 58622128,
"domNodes": -292,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 7.576000000000001,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2008.560999999986,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.842999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.69999999999993,
"heapDeltaBytes": -11948696,
"heapUsedBytes": 59022680,
"domNodes": -295,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.603999999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1745.9430000000111,
"styleRecalcs": 74,
"styleRecalcDurationMs": 30.016000000000002,
"layouts": 16,
"layoutDurationMs": 4.1000000000000005,
"taskDurationMs": 759.3509999999999,
"heapDeltaBytes": -11927096,
"heapUsedBytes": 58772684,
"domNodes": -299,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 91.586,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1719.8260000000118,
"styleRecalcs": 75,
"styleRecalcDurationMs": 30.494999999999994,
"layouts": 16,
"layoutDurationMs": 3.808,
"taskDurationMs": 747.568,
"heapDeltaBytes": 13972028,
"heapUsedBytes": 79112452,
"domNodes": -296,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 88.958,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1183.2299999999805,
"styleRecalcs": 20,
"styleRecalcDurationMs": 26.976999999999993,
"layouts": 15,
"layoutDurationMs": 11.159,
"taskDurationMs": 806.2649999999998,
"heapDeltaBytes": 21934300,
"heapUsedBytes": 104567284,
"domNodes": 13671,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 26.116999999999994,
"eventListeners": 2383,
"totalBlockingTimeMs": 131,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8237.297000000013,
"styleRecalcs": 250,
"styleRecalcDurationMs": 32.925,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5182.113,
"heapDeltaBytes": -9262176,
"heapUsedBytes": 86457608,
"domNodes": -263,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 2365.6009999999997,
"eventListeners": -135,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8438.311999999996,
"styleRecalcs": 248,
"styleRecalcDurationMs": 34.805,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5333.228999999999,
"heapDeltaBytes": -9665120,
"heapUsedBytes": 90705056,
"domNodes": -266,
"jsHeapTotalBytes": -1089536,
"scriptDurationMs": 2467.524,
"eventListeners": -135,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14639.839999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13919.867,
"heapDeltaBytes": -41183784,
"heapUsedBytes": 174985312,
"domNodes": -6548,
"jsHeapTotalBytes": 1343488,
"scriptDurationMs": 262.11600000000004,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 14755.705000000034,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13956.239,
"heapDeltaBytes": -28883724,
"heapUsedBytes": 174146328,
"domNodes": -6552,
"jsHeapTotalBytes": -6643712,
"scriptDurationMs": 279.967,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 17621.982000000004,
"styleRecalcs": 150,
"styleRecalcDurationMs": 17.83599999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17168.875999999997,
"heapDeltaBytes": -32683132,
"heapUsedBytes": 176925236,
"domNodes": -6548,
"jsHeapTotalBytes": -5136384,
"scriptDurationMs": 890.811,
"eventListeners": -7471,
"totalBlockingTimeMs": 21,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 17975.063999999977,
"styleRecalcs": 161,
"styleRecalcDurationMs": 19.864000000000022,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17564.577,
"heapDeltaBytes": -24744136,
"heapUsedBytes": 176059392,
"domNodes": -6548,
"jsHeapTotalBytes": 3395584,
"scriptDurationMs": 947.333,
"eventListeners": -7473,
"totalBlockingTimeMs": 21,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 89.53699999995024,
"styleRecalcs": 8,
"styleRecalcDurationMs": 11.659999999999998,
"layouts": 2,
"layoutDurationMs": 1.0810000000000002,
"taskDurationMs": 65.00800000000001,
"heapDeltaBytes": 3201416,
"heapUsedBytes": 66569128,
"domNodes": 127,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.006999999999999,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 137.45200000005298,
"styleRecalcs": 7,
"styleRecalcDurationMs": 12.844,
"layouts": 2,
"layoutDurationMs": 1.1829999999999998,
"taskDurationMs": 77.80800000000002,
"heapDeltaBytes": 3032192,
"heapUsedBytes": 65908412,
"domNodes": 127,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.625999999999999,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
}
]
} |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe billing capability composable now preserves owner access for rollout-defaulted capabilities during policy gaps and unavailable responses. Fixtures accept rollout overrides. Unit and browser tests cover self-serve, top-up, downgrade, and retry behavior. ChangesBilling rollout fallback
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change preserves pricing and downgrade entry points when capability responses contain rollout defaults while still honoring explicit policy denies. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: End-To-End Regression Coverage For FixesExplanation The changed files are listed and include both Full details: Website End-To-End Regression CoverageExplanation No changed file is under Full details: Adr Compliance For Entity/Litegraph ChangesExplanation PASS: The changed files are limited to billing capability fixtures, enterprise tier browser tests, and workspace billing capability composable code. None are under Full details: Description checkExplanation The description is complete and relevant. It explains the root cause, changes, behavior, review focus, tests, screenshots, and follow-ups. It covers the required template sections, including the absence of new dependencies.
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #16182 +/- ##
==========================================
+ Coverage 80.62% 82.66% +2.04%
==========================================
Files 2315 1943 -372
Lines 118487 112197 -6290
Branches 34246 32355 -1891
==========================================
- Hits 95529 92749 -2780
+ Misses 22389 19105 -3284
+ Partials 569 343 -226
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 380 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Closing this — the fix belongs on the server, not here. Why the layer changed
if !enabled(billing_capability_can_top_up_rollout) {
capabilities.CanTopUp = true // fail OPEN
}
if !enabled(billing_capability_can_subscribe_self_serve_rollout) {
capabilities.CanSubscribeSelfServe = false // fail CLOSED
}Both flags are still What this PR does is have the client read the marker and re-derive the capability from workspace ownership. That is the client reconstructing billing policy the server declined to state, which our architecture rules explicitly forbid — server state should be deterministic from the server, not assembled on the frontend. I had the diagnosis right and the layer wrong. What replaces it Pending a decision from @wei-hai on whether Worth carrying forward, not lost
Sorry for the review time, @wei-hai @christian-byrne. The branch stays up if any of it is useful. |
Summary
rollout_defaults_appliedwas never read, so a capability the server answered with a rollout default was indistinguishable from a policy deny — which is what closed every pricing entry point in prod during IR-120.Root cause
BillingCapabilitiesResponsecarries two things: the capability values, androllout_defaults_appliedmarking which of them came from a rollout default rather than a policy decision. The generated contract is explicit about what a defaulted value means:The client only ever read the first half.
capabilitiesreturnedstate.response.capabilitiesand dropped the marker, so every consumer collapsed a defaulted value into a plain boolean:With the capabilities rollout flags off in production, billing-api returned 200 with
can_subscribe_self_serve: falseandrollout_defaults_applied.can_subscribe_self_serve: true— "no answer yet, here is a safe default". The client read it as "the server says no" and removed the profile-menu item, the settings link and the?pricing=deep link at once. Staging was unaffected because its flags were on, so it received real policy results.This is not the same failure #16100 fixed. That one guards on
snapshotAuthoritative, which is derived from the read state — and a 200 with rollout defaults isresolved, so the guard passes and the defaulted value still reads as a deny. The new unit test assertssnapshotAuthoritative === truein exactly this scenario to pin that down.Changes
BillingCapabilityRolloutDefaults(can_subscribe_self_serve,can_top_up,can_downgrade_to_personal) now go throughpolicyResult(), which returnsnullwhen the field carries no policy decision — unreadable snapshot or rollout default alike.ownerFallback()then applies the ownership fallbackcanTopUpalready had. Deterministic fields (can_cancel,can_reactivate,can_change_seats,can_invite_members) are untouched and still fail closed.false, valuefalse) still closes, so sales-managed Enterprise is unchanged; there is a test for that.Review Focus
Whether ownership is the right fallback for
can_downgrade_to_personal. It is rollout-defaulted and had no fallback at all, so it is included for consistency, but it is a destructive-ish action and a reviewer may want it to keep failing closed. Happy to drop it from this PR.Also worth a second opinion:
ownerFallbackkeys offactiveWorkspace.role === 'owner', matching the existingcanTopUpfallback rather thanpermissions.canManageSubscription. If a non-owner role can ever manage a subscription, these disagree.Tests
useBillingCapabilities.test.ts: 42 passing. Three added — owner keeps self-serve on a rollout-defaulted answer (withsnapshotAuthoritative === trueasserted), a member does not, and a real policy deny still closes for an owner.canSubscribeSelfServe === falsefor an owner on an unreadable snapshot — the production symptom, encoded as the expectation. They were correct for the contract as consumed at the time; they are updated, not deleted.src/platform/workspace,src/platform/cloud/subscription,src/components/topbar,src/services. All pass.pnpm typecheck,pnpm lint(0 errors),pnpm knipclean.Follow-ups not in this PR
UnifiedPricingTablere-derives its owncanSubscribeSelfServe/canChangeSeats/canDowngradeToPersonal, andisTeamButtonDisabledreads them directly — this fix reaches those via the composable, but a surface-level test needs an unsubscribed-workspace fixture that does not exist yet.dante/centralize-billing-ui-policy, which movescanOpenPricingSurfaceinto this composable. Complementary, but they will conflict textually inuseBillingCapabilities.ts.Screenshots
Captured against the production cloud build (
pnpm build:cloud) served locally, with/api/billing/capabilitiesreturning HTTP 200 androllout_defaults_applied.can_subscribe_self_serve: true— the exact shape prod returned while the rollout flags were off. Same mock both times; only the build differs.AS IS (
origin/main, before this change) —?pricing=teamis inert. No dialog, no error, nothing: the deep link silently does nothing because the defaulted value read as a policy deny.TO BE (this branch) — the same deep link opens "Plans for Team Workspace" with Standard / Creator / Pro selectable.
Images attached below. (The red node borders in the AS IS shot are unrelated mock-environment artifacts — the mocked workspace has no models installed; the relevant part is the absence of the pricing dialog.)