Hmbown/CodeWhale · error · PersistenceBacklogError

rss_supported must be true exactly on the macOS measurement…

Error message

rss_supported must be true exactly on the macOS measurement lane

What it means

rss_supported must be true exactly when platform is "macos" and false otherwise. RSS sampling is only implemented on the macOS measurement lane, so the flag must match the platform invariant; any other combination means the receipt claims RSS data from a platform that cannot produce it, or hides it on the one lane that can.

Solutions

  1. Run the measurement on the platform matching the capability: RSS receipt on macOS, null RSS fields elsewhere.
  2. Fix the measuring script so rss_supported is derived from (platform == "macos"), not set independently.
  3. If you ported RSS sampling to another platform, that requires changing this contract deliberately, not just the flag.

Example fix

// before
{"platform": "linux", "rss_supported": true}
// after
{"platform": "linux", "rss_supported": false, "rss_before_bytes": null, ...}
Defensive patterns

Strategy: validation

Validate before calling

def rss_support_matches_platform(receipt):
    return receipt.get("rss_supported") == (receipt.get("platform") == "macos")

Type guard

def is_supported_platform(p):
    return isinstance(p, str) and p in {"linux", "macos", "windows"}

Try / catch

try:
    validate_receipt(receipt)
except PersistenceBacklogError as e:
    print(f"receipt rejected: {e}", file=sys.stderr)
    sys.exit(2)

Prevention

When it happens

Trigger: Raised by validate_receipt when receipt['rss_supported'] != (receipt['platform'] == "macos"), from validate_baseline_receipt or compare. Examples: platform="linux" with rss_supported=true, or platform="macos" with rss_supported=false.

Common situations: Measuring on Linux/Windows with an RSS sampler ported locally; copying a macOS receipt and changing only the platform field; the measuring script's platform detection disagreeing with its RSS capability check.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/b9576092b2d99a07. Report an issue: GitHub.

Appendix: source

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

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

View on GitHub (pinned to 433685b202)