Background
Profile.volume_size_gb was added in PR #84 as int | None = None to unblock the web-terminal Subscription card (web-terminal#22, closes web-terminal#20). The pricing helper in the frontend currently carries a defensive null fallback that renders €— on the Subscribe button label when volume_size_gb is missing.
If the freeshard-controller is guaranteed to populate volume_size_gb for every shard at provisioning time, we can drop the nullability:
Profile.volume_size_gb: int (no | None, no default).
- Same for
ShardBase.volume_size_gb if appropriate (touches shard_core/data_model/backend/shard_model.py lines 97 and 172).
- Frontend can then drop the
Number.isFinite(volumeSizeGb) defensive return in src/lib/pricing.js.
Investigation
Outcome
If guaranteed → small PR to make field non-nullable in shard-core + small cleanup PR in web-terminal removing the null branch in computeMonthlyPrice.
If not guaranteed → close wontfix with rationale.
Context
Background
Profile.volume_size_gbwas added in PR #84 asint | None = Noneto unblock the web-terminal Subscription card (web-terminal#22, closes web-terminal#20). The pricing helper in the frontend currently carries a defensivenullfallback that renders€—on the Subscribe button label whenvolume_size_gbis missing.If the freeshard-controller is guaranteed to populate
volume_size_gbfor every shard at provisioning time, we can drop the nullability:Profile.volume_size_gb: int(no| None, no default).ShardBase.volume_size_gbif appropriate (touchesshard_core/data_model/backend/shard_model.pylines 97 and 172).Number.isFinite(volumeSizeGb)defensive return insrc/lib/pricing.js.Investigation
volume_size_gb?NULLrows remain.Outcome
If guaranteed → small PR to make field non-nullable in shard-core + small cleanup PR in web-terminal removing the
nullbranch incomputeMonthlyPrice.If not guaranteed → close
wontfixwith rationale.Context