Hmbown/CodeWhale · error · PersistenceBacklogError

unsupported RSS fields must be null

Error message

unsupported RSS fields must be null

What it means

Raised by validate_receipt() when a receipt declares rss_supported=false (the Linux/Windows measurement lanes) but any of the six RSS fields (rss_before_bytes, rss_during_bytes, rss_after_bytes, rss_during_delta_bytes, rss_after_delta_bytes) is not None. The schema keeps the RSS field shape on every platform but only the macOS lane may carry values, so non-macOS receipts must null all six. This stops cross-platform receipts from carrying numbers the RSS ceilings cannot legitimately compare (compare() skips RSS ceilings when rss_supported is false).

Source

Thrown at scripts/check-persistence-backlog-budget.py:239

    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):
        raise PersistenceBacklogError("unsupported RSS fields must be null")


def validate_budget(budget: dict[str, Any]) -> None:
    if budget.get("document_kind") != BUDGET_KIND:
        raise PersistenceBacklogError(f"budget document_kind must be {BUDGET_KIND}")
    if budget.get("schema_version") != SCHEMA_VERSION:
        raise PersistenceBacklogError("budget schema_version changed")
    fixture = budget.get("fixture")
    if not isinstance(fixture, dict) or set(fixture) != set(FIXTURE):
        raise PersistenceBacklogError("budget fixture no longer matches the frozen workload")
    for field, expected in FIXTURE.items():
        if type(fixture[field]) is not type(expected) or fixture[field] != expected:
            raise PersistenceBacklogError(
                f"budget fixture.{field} must remain {expected!r}"
            )
    if budget.get("baseline_receipt") != BASELINE_RECEIPT_REFERENCE:
        raise PersistenceBacklogError("budget baseline_receipt path changed")
    ceilings = budget.get("ceilings")

View on GitHub (pinned to 8880682c63)

Solutions

  1. Set all six RSS fields to null in the non-macOS receipt
  2. Regenerate the receipt on the actual Linux/Windows lane via scripts/measure-persistence-backlog.py
  3. If RSS numbers are actually needed, take the measurement on macOS where rss_supported=true

Example fix

// before (receipt.json, linux lane)
"platform": "linux",
"rss_supported": false,
"rss_before_bytes": 0,
"rss_during_bytes": 0,
"rss_after_bytes": 0,
"rss_during_delta_bytes": 0,
"rss_after_delta_bytes": 0

// after
"platform": "linux",
"rss_supported": false,
"rss_before_bytes": null,
"rss_during_bytes": null,
"rss_after_bytes": null,
"rss_during_delta_bytes": null,
"rss_after_delta_bytes": null
Defensive patterns

Strategy: validation

Validate before calling

RSS_FIELDS = ("rss_before_bytes", "rss_during_bytes", "rss_after_bytes",
              "rss_during_delta_bytes", "rss_after_delta_bytes")

def rss_nullity_ok(receipt: dict) -> bool:
    if receipt.get("rss_supported"):
        return True
    return all(receipt.get(f) is None for f in RSS_FIELDS)

Prevention

When it happens

Trigger: Calling compare()/validate_receipt() with platform 'linux' or 'windows', rss_supported=false, and any of the six RSS fields set to a number (including 0), string, or missing-but-required value instead of null.

Common situations: Copy-pasting a macOS receipt onto a Linux CI lane and only flipping rss_supported; older tooling that wrote 0 instead of null for unsupported metrics; hand-porting receipts between platforms.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/39011d787d22a556. Report an issue: GitHub.