Hmbown/CodeWhale · error · PersistenceBacklogError
rss_supported must be boolean
Error message
rss_supported must be boolean
What it means
rss_supported must be a strict JSON boolean. The checker branches all RSS sample/delta validation on this flag, so a string, number, or null value makes it impossible to know whether the RSS fields should be validated or null, and the receipt is rejected.
Solutions
- Emit rss_supported as a JSON boolean (true or false) in the measurement script.
- Re-generate the receipt rather than editing the field by hand.
- Fix any intermediary that round-trips the receipt through a format that coerces booleans (e.g. YAML, env vars).
Example fix
// before "rss_supported": "true" // after "rss_supported": true
Defensive patterns
Strategy: type-guard
Validate before calling
def rss_supported_is_bool(receipt):
return isinstance(receipt.get("rss_supported"), bool) Type guard
def is_bool(v):
return isinstance(v, bool) Try / catch
try:
validate_receipt(receipt)
except PersistenceBacklogError as e:
print(f"receipt rejected: {e}", file=sys.stderr)
sys.exit(2) Prevention
- Use a JSON serializer that preserves booleans; avoid round-tripping through YAML or env vars.
- Type-check receipt fields at generation time.
- Never represent true/false as strings in receipts.
When it happens
Trigger: Raised by validate_receipt when type(receipt['rss_supported']) is not bool, from validate_baseline_receipt or compare.
Common situations: A generator serializing the flag as "true"/"false" strings or 0/1; hand-editing the receipt with YAML-ish true; a JSON library writing None for missing values.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- accepted_requests must equal requests_attempted; sender…
- applied_version is not the final sent version
- estimated_retained_payload_bytes is smaller than the frozen…
- final_version_applied must be true
- limitations must be a non-empty string array
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/f4426cef5c1058c3.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/check-persistence-backlog-budget.py:220
raise PersistenceBacklogError(
"estimated_retained_payload_bytes is smaller than the frozen retained content"
)
applied = non_negative_integer(
receipt["applied_version"], "applied_version"
)
if applied != FIXTURE["expected_applied_version"]:
raise PersistenceBacklogError("applied_version is not the final sent version")
if receipt["final_version_applied"] is not True:
raise PersistenceBacklogError("final_version_applied must be true")
limitations = receipt["limitations"]
if not isinstance(limitations, list) or not limitations or not all(
isinstance(item, str) and item for item in limitations
):
raise PersistenceBacklogError("limitations must be a non-empty string array")
if not isinstance(receipt["rss_supported"], bool):
raise PersistenceBacklogError("rss_supported must be boolean")
if receipt["rss_supported"] != (platform == "macos"):
raise PersistenceBacklogError(
"rss_supported must be true exactly on the macOS measurement lane"
)
rss_fields = RSS_SAMPLE_FIELDS + RSS_DELTA_FIELDS
if receipt["rss_supported"]:
for field in rss_fields:
non_negative_integer(receipt[field], field)
before = receipt["rss_before_bytes"]
if receipt["rss_during_delta_bytes"] != max(
0, receipt["rss_during_bytes"] - before
):
raise PersistenceBacklogError("rss_during_delta_bytes is inconsistent")
if receipt["rss_after_delta_bytes"] != max(
0, receipt["rss_after_bytes"] - before
):
raise PersistenceBacklogError("rss_after_delta_bytes is inconsistent")
elif any(receipt[field] is not None for field in rss_fields):View on GitHub (pinned to 433685b202)