Skip to content

Investigate making Profile.volume_size_gb non-nullable #85

@ClaydeCode

Description

@ClaydeCode

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

  • Audit shard-controller code paths that create / migrate shards. Does every code path set volume_size_gb?
  • Check legacy / pre-volume-size shards in production. Run a quick query (or read the controller DB schema) to confirm no NULL rows remain.
  • If migrations are needed (backfill), spec them.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions