{"record":{"id":"5576f3887219951c","repo":"tirth8205/code-review-graph","slug":"post-processing-reported-warnings-details","errorCode":null,"errorMessage":"post-processing reported warnings: {details}","messagePattern":"post-processing reported warnings: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"code_review_graph/incremental.py","lineNumber":1590,"sourceCode":"    \"\"\"Fail the watch boundary when an incremental update reports errors.\"\"\"\n    errors = result.get(\"errors\") or []\n    if not errors:\n        return\n    details = \"; \".join(\n        f\"{error.get('file', 'unknown')}: {error.get('error', 'unknown error')}\"\n        for error in errors\n    )\n    raise RuntimeError(f\"{context} reported errors: {details}\")\n\n\ndef _raise_watch_postprocess_warnings(result: object) -> None:\n    \"\"\"Treat structured post-processing warnings as a failed watch update.\"\"\"\n    if not isinstance(result, dict):\n        return\n    warnings = result.get(\"warnings\") or []\n    if warnings:\n        details = \"; \".join(str(warning) for warning in warnings)\n        raise RuntimeError(f\"post-processing reported warnings: {details}\")\n\n\n# ---------------------------------------------------------------------------\n# Watch scheduling and supervision\n# ---------------------------------------------------------------------------\n\n# A single recursive watch on the repository root makes the OS register one\n# watch per directory in the tree — including every temp directory a build tool\n# churns through inside ``target/`` or ``node_modules/``.  Planning the watches\n# ourselves keeps ignored trees off the OS watch list entirely.  See: #811.\n_WATCH_PLAN_DEPTH = int(os.environ.get(\"CRG_WATCH_PLAN_DEPTH\", \"3\"))\n_MAX_WATCH_SCHEDULES = int(os.environ.get(\"CRG_MAX_WATCH_SCHEDULES\", \"24\"))\n# Splitting a watch costs one watchdog emitter, so it has to buy more than it\n# costs: an ignored tree is only worth excluding once it holds this many\n# directories.  A lone ``__pycache__`` is not worth a thread; ``target/`` is.\n_WATCH_SPLIT_MIN_DIRS = int(os.environ.get(\"CRG_WATCH_SPLIT_MIN_DIRS\", \"4\"))\n_WATCH_HEALTH_INTERVAL = float(os.environ.get(\"CRG_WATCH_HEALTH_INTERVAL\", \"10\"))\n_WATCH_STOP_TIMEOUT = 10.0","sourceCodeStart":1572,"sourceCodeEnd":1608,"githubUrl":"https://github.com/tirth8205/code-review-graph/blob/b58668751ab0c7670c078cf7cbd4d1f5b8e54f81/code_review_graph/incremental.py#L1572-L1608","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"null","typeGuard":"def has_postprocess_warnings(result: dict) -> bool:\n    return isinstance(result, dict) and bool(result.get(\"warnings\"))","tryCatchPattern":"try:\n    result = watch(...)\nexcept RuntimeError as e:\n    if \"post-processing reported warnings\" in str(e):\n        log.warning(\"watch postprocess degraded: %s\", e)\n        trigger_full_rebuild()\n    else:\n        raise","preventionTips":["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"],"tags":["watch-mode","post-processing","warnings"],"backgroundTag":"background-postprocess-warning","analyzedSha":"b58668751ab0c7670c078cf7cbd4d1f5b8e54f81","analyzedAt":"2026-08-28T13:19:08.966Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}