tirth8205/code-review-graph · warning · RuntimeError
post-processing reported warnings: {details}
Error message
post-processing reported warnings: {details} What it means
Counterpart to the errors check: _raise_watch_postprocess_warnings promotes non-empty 'warnings' from a watch update's post-processing stage into a RuntimeError, treating degraded results as failures.
Source
Thrown at code_review_graph/incremental.py:1590
"""Fail the watch boundary when an incremental update reports errors."""
errors = result.get("errors") or []
if not errors:
return
details = "; ".join(
f"{error.get('file', 'unknown')}: {error.get('error', 'unknown error')}"
for error in errors
)
raise RuntimeError(f"{context} reported errors: {details}")
def _raise_watch_postprocess_warnings(result: object) -> None:
"""Treat structured post-processing warnings as a failed watch update."""
if not isinstance(result, dict):
return
warnings = result.get("warnings") or []
if warnings:
details = "; ".join(str(warning) for warning in warnings)
raise RuntimeError(f"post-processing reported warnings: {details}")
# ---------------------------------------------------------------------------
# Watch scheduling and supervision
# ---------------------------------------------------------------------------
# A single recursive watch on the repository root makes the OS register one
# watch per directory in the tree — including every temp directory a build tool
# churns through inside ``target/`` or ``node_modules/``. Planning the watches
# ourselves keeps ignored trees off the OS watch list entirely. See: #811.
_WATCH_PLAN_DEPTH = int(os.environ.get("CRG_WATCH_PLAN_DEPTH", "3"))
_MAX_WATCH_SCHEDULES = int(os.environ.get("CRG_MAX_WATCH_SCHEDULES", "24"))
# Splitting a watch costs one watchdog emitter, so it has to buy more than it
# costs: an ignored tree is only worth excluding once it holds this many
# directories. A lone ``__pycache__`` is not worth a thread; ``target/`` is.
_WATCH_SPLIT_MIN_DIRS = int(os.environ.get("CRG_WATCH_SPLIT_MIN_DIRS", "4"))
_WATCH_HEALTH_INTERVAL = float(os.environ.get("CRG_WATCH_HEALTH_INTERVAL", "10"))
_WATCH_STOP_TIMEOUT = 10.0View on GitHub (pinned to b58668751a)
Solutions
- Read the warning details in the message to see which postprocess step flagged issues
- Trigger a full rebuild of the graph to reset state
- If warnings recur on the same input, report with the repo snapshot that triggers it
Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
def has_postprocess_warnings(result: dict) -> bool:
return isinstance(result, dict) and bool(result.get("warnings")) Try / catch
try:
result = watch(...)
except RuntimeError as e:
if "post-processing reported warnings" in str(e):
log.warning("watch postprocess degraded: %s", e)
trigger_full_rebuild()
else:
raise Prevention
- Run a full rebuild after interrupted watch sessions
- Monitor postprocess warnings; recurring ones indicate state corruption
- Snapshot the repo when warnings repeat to capture a reproducible bug
When it happens
Trigger: A watch/process update whose result contains entries under 'warnings' — post-processing (e.g. relationship resolution, edge consolidation) flagged anomalies it could not fully resolve.
Common situations: Corrupted or partially-updated graph state after interrupted updates, inconsistent edges after rapid file churn, or bugs in post-processing logic surfacing on unusual graph shapes.
Related errors
AI-assisted analysis of tirth8205/code-review-graph@b58668751a (2026-08-28).
Data as JSON: /api/errors/5576f3887219951c.
Report an issue: GitHub.