Skip to content

Store phone RAM as a float so sub-GB phones can be served - #94

Merged
Seungpyo1007 merged 1 commit into
mainfrom
fix/phone-subgb-ram
Sep 25, 2026
Merged

Seungpyo1007 merged 1 commit into
mainfrom
fix/phone-subgb-ram

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

GetTechAPI/TechAPI#257 set ram_gb to 0.125 / 0.5 on 2006-2012 phones (the storage had been recorded as RAM). SmartphoneRead.ram_gb: int then crashes the static dump:

ValidationError: SmartphoneRead ram_gb Input should be a valid integer, got a number with a fractional part [input_value=0.125]
  • The Smartphone.ram_gb model is now float. mobile_device already uses float.
  • The SmartphoneRead.ram_gb schema is now int | float, and the serializer emits whole values as ints (_whole_as_int), so existing phone pages keep "ram_gb": 8 and the dump does not rewrite them.

mypy and ruff are clean. The full pytest suite passes against the current TechAPI data, which includes the sub-GB records.

Refs GetTechAPI/TechAPI#1

TechAPI #257 corrected storage-as-RAM on 2006-2012 phones (original
iPhone 0.125 GB). SmartphoneRead.ram_gb was int, so the static dump
crashed on those records. Store it as float, type the schema int | float,
and emit whole values as ints so the other ~90k pages keep "ram_gb": 8.
@Seungpyo1007 Seungpyo1007 added the bug Something isn't working label Sep 25, 2026
@Seungpyo1007 Seungpyo1007 self-assigned this Sep 25, 2026
@Seungpyo1007
Seungpyo1007 merged commit b32b5a6 into main Sep 25, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the fix/phone-subgb-ram branch September 25, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant