@@ -649,7 +649,7 @@ def fix_spec_issues(spec: dict[str, Any]) -> None:
649649 log_level ["description" ] = "Severity level for log entries (e.g. info, warn, error)"
650650 fixes .append ("LogLevel: removed enum constraint, fixed description" )
651651
652- # 4. Metrics schema missing mem_used_mib and mem_total_mib
652+ # 4. Metrics schema: add missing fields and set format: int64 on byte/MiB fields
653653 metrics = schemas .get ("Metrics" )
654654 if metrics and "properties" in metrics :
655655 props = metrics ["properties" ]
@@ -665,6 +665,13 @@ def fix_spec_issues(spec: dict[str, Any]) -> None:
665665 "description" : "Total virtual memory in MiB" ,
666666 }
667667 fixes .append ("Metrics: added 'mem_total_mib'" )
668+ # Byte and MiB values can exceed int32 — set format: int64
669+ int64_fields = ("mem_total" , "mem_used" , "disk_used" , "disk_total" ,
670+ "mem_used_mib" , "mem_total_mib" )
671+ for field in int64_fields :
672+ if field in props and props [field ].get ("format" ) != "int64" :
673+ props [field ]["format" ] = "int64"
674+ fixes .append ("Metrics: set format int64 on memory/disk fields" )
668675
669676 # 5. Streaming RPC endpoints: wrong content-type and missing headers
670677 # Server requires application/connect+json with envelope framing,
0 commit comments