JuliusBrussee/caveman · error · CatalogError

: unreviewed sync proposal marker on line(s) : the proposal…

Error message

{label}: unreviewed sync proposal marker on line(s) {', '.join(str(number) for number in offending)}: the proposal bumped verified_at, so merging with the marker intact attests a price check nobody performed -- confirm each row against its sources, then delete the {REVIEW_MARKER!r} line

What it means

validate_catalog.py enforces that automated provider-catalog sync proposals are manually reviewed before being merged. A sync proposal must carry a literal REVIEW_MARKER line; if any line in the file still starts with that marker, the check refuses validation, because the proposal bumped verified_at — merging it as-is would attest a price verification that nobody actually performed. The error exists to force a human to confirm each changed row against its sources and then delete the marker line.

Solutions

  1. Open the file at each reported line number, confirm the row's pricing against its upstream sources, then delete the REVIEW_MARKER line
  2. If the proposal is stale, re-run the sync to regenerate a fresh proposal before reviewing
  3. If verified_at should not have been bumped, revert the verified_at change and re-apply only intended edits, removing the marker
  4. Commit the marker-free file and re-run validate_catalog to confirm it passes

Example fix

# before (current.yaml)
verified_at: 2026-09-20
# REVIEW_MARKER: auto-generated sync, verify before merge
monthly_input: 3.00
# after (marker reviewed and removed)
verified_at: 2026-09-20
monthly_input: 3.00
Defensive patterns

Strategy: validation

Validate before calling

import pathlib

def ensure_review_marker_removed(path: str, marker: str) -> None:
    text = pathlib.Path(path).read_text()
    offending = [i + 1 for i, ln in enumerate(text.splitlines()) if ln.lstrip().startswith(marker)]
    if offending:
        raise ValueError(f"{path}: review marker still present on lines {offending}")

Prevention

When it happens

Trigger: Running `validate_catalog` (via `main`) on a catalog file whose text still contains one or more lines starting with REVIEW_MARKER, i.e. a sync proposal was generated (bumping verified_at) but never signed off; any of the marker lines left in current.yaml or a generated proposal triggers the raise with the 1-based offending line numbers.

Common situations: A developer merges an automated price-sync PR without deleting the review placeholder; a script re-generates a proposal and leaves the marker in place; a partial manual review removes some marker lines but misses others on multi-row syncs; CI validates a proposal file that was copied verbatim from the sync tool output.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20). Data as JSON: /api/errors/75bf73f354694047. Report an issue: GitHub.

Appendix: source

Thrown at shared/provider-catalog/validate_catalog.py:183

    if verified_at < now - timedelta(days=120):
        raise CatalogError(f"{label}: verified_at is older than 120 days")
    return identity[0], identity[1], identity[2]


def check_review_markers(text: str, label: str) -> None:
    """Refuse a catalog that still carries an unreviewed sync proposal.

    YAML comments are invisible to the parsed rows, so this reads the raw file:
    a rubber-stamped merge must not be able to advance price provenance while
    the line saying "nobody has confirmed this yet" is still in the file.
    """
    offending = [
        index + 1
        for index, line in enumerate(text.splitlines())
        if line.lstrip().startswith(REVIEW_MARKER)
    ]
    if offending:
        raise CatalogError(
            f"{label}: unreviewed sync proposal marker on line(s) "
            f"{', '.join(str(number) for number in offending)}: the proposal bumped "
            "verified_at, so merging with the marker intact attests a price check "
            "nobody performed -- confirm each row against its sources, then delete "
            f"the {REVIEW_MARKER!r} line"
        )


def pricing_identity(row: dict[str, Any]) -> dict[str, Any]:
    """The part of a row the immutable dated snapshot pins.

    Present-with-a-value and absent are different attestations, so only the
    price-affecting capability keys the row actually carries are recorded:
    adding one to a row that had none changes that row's price and must break
    the pin exactly like editing one that was already there.
    """
    identity = {key: row.get(key) for key in PRICING_IDENTITY_KEYS}
    capabilities = row.get("capabilities") or {}

View on GitHub (pinned to 3ee70a1026)