Hmbown/CodeWhale · error · PersistenceBacklogError
baseline provenance platform must be macos
Error message
baseline provenance platform must be macos
What it means
Raised by validate_budget() when baseline_observation.provenance.platform is not exactly 'macos'. The budget's RSS ceilings (rss_during_delta_bytes, rss_after_delta_bytes) are only meaningful on the macOS measurement lane where rss_supported=true, so a baseline produced on Linux or Windows cannot anchor them. The comparison is exact - 'MacOS' or 'darwin' also fail.
Source
Thrown at scripts/check-persistence-backlog-budget.py:302
baseline_retained = baseline["retained_queued_requests"]
baseline_payload = baseline["estimated_retained_payload_bytes"]
if baseline_retained == 0 or baseline_payload == 0:
raise PersistenceBacklogError(
"baseline_observation must retain the final request and payload"
)
if baseline_retained > baseline_accepted:
raise PersistenceBacklogError(
"baseline_observation.retained_queued_requests exceeds accepted_requests"
)
if baseline_payload < baseline_retained * FIXTURE["content_bytes_per_request"]:
raise PersistenceBacklogError(
"baseline_observation payload is smaller than frozen retained content"
)
provenance = baseline.get("provenance")
if not isinstance(provenance, dict):
raise PersistenceBacklogError("baseline_observation needs provenance")
if provenance.get("platform") != "macos":
raise PersistenceBacklogError("baseline provenance platform must be macos")
if not isinstance(provenance.get("source_sha"), str) or not SOURCE_SHA_PATTERN.fullmatch(
provenance["source_sha"]
):
raise PersistenceBacklogError("baseline provenance needs an exact source SHA")
if provenance.get("source_dirty") is not False:
raise PersistenceBacklogError("baseline provenance must identify a clean source tree")
for field, prefix in (("rustc_version", "rustc "), ("cargo_version", "cargo ")):
if not isinstance(provenance.get(field), str) or not provenance[field].startswith(prefix):
raise PersistenceBacklogError(f"baseline provenance needs {field}")
if provenance.get("build_profile") != "test" or not (
type(provenance.get("sample_count")) is int
and provenance["sample_count"] == 1
):
raise PersistenceBacklogError("baseline provenance build profile/sample count changed")
def validate_baseline_receipt(
budget: dict[str, Any], baseline_receipt: dict[str, Any]View on GitHub (pinned to 8880682c63)
Solutions
- Re-baseline on macOS from a clean tree whenever baseline numbers change
- Keep provenance.platform exactly the lowercase string 'macos'
- Leave the RSS ceilings untouched when iterating on non-macOS lanes
Example fix
// before (budget.json)
"provenance": { "platform": "linux", ... }
// after
"provenance": { "platform": "macos", ... } Defensive patterns
Strategy: validation
Validate before calling
def provenance_platform_ok(budget: dict) -> bool:
provenance = budget.get("baseline_observation", {}).get("provenance", {})
return provenance.get("platform") == "macos" Prevention
- Regenerate baselines via the measure script so provenance is captured verbatim from git/rustc/cargo
- Re-baseline only on macOS with a clean tree (git status --porcelain empty)
- Never hand-write provenance fields; copy them from scripts/persistence-backlog-baseline-receipt.json
When it happens
Trigger: provenance.platform set to 'linux', 'windows', 'darwin', 'MacOS', or missing - typically when a Linux run is used to (re)baseline the budget.
Common situations: Re-baselining on a Linux CI box for convenience; capitalizing or localizing the platform string; renaming platform identifiers during a refactor.
Related errors
- baseline_observation needs provenance
- baseline provenance needs an exact source SHA
- baseline provenance must identify a clean source tree
- baseline provenance needs {field}
- rss_during_delta_bytes is inconsistent
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/5df0d6d3d727e376.
Report an issue: GitHub.