{"record":{"id":"cb21ae269ec070af","repo":"ruvnet/RuView","slug":"manifest-not-found-manifest-path","errorCode":null,"errorMessage":"manifest not found: {MANIFEST_PATH}","messagePattern":"manifest not found: (.+?)","errorType":"exception","errorClass":"ManifestError","httpStatus":null,"severity":"error","filePath":"scripts/check_fix_markers.py","lineNumber":69,"sourceCode":"    return f\"\\033[{code}m{s}\\033[0m\" if _TTY else s\nGREEN = lambda s: _c(\"32\", s)\nRED = lambda s: _c(\"31\", s)\nYELLOW = lambda s: _c(\"33\", s)\nDIM = lambda s: _c(\"2\", s)\nBOLD = lambda s: _c(\"1\", s)\n\nOK_MARK = \"PASS\"\nBAD_MARK = \"FAIL\"\nARROW = \"->\"\n\n\nclass ManifestError(Exception):\n    pass\n\n\ndef load_manifest() -> dict:\n    if not MANIFEST_PATH.exists():\n        raise ManifestError(f\"manifest not found: {MANIFEST_PATH}\")\n    try:\n        data = json.loads(MANIFEST_PATH.read_text(encoding=\"utf-8\"))\n    except json.JSONDecodeError as e:\n        raise ManifestError(f\"manifest is not valid JSON: {e}\") from e\n    if not isinstance(data, dict) or not isinstance(data.get(\"markers\"), list):\n        raise ManifestError(\"manifest must be an object with a 'markers' array\")\n    ids = [m.get(\"id\") for m in data[\"markers\"]]\n    dupes = {i for i in ids if ids.count(i) > 1}\n    if dupes:\n        raise ManifestError(f\"duplicate marker ids: {sorted(dupes)}\")\n    return data\n\n\ndef _pattern_found(text: str, pattern: str) -> bool:\n    if len(pattern) >= 2 and pattern.startswith(\"/\") and pattern.endswith(\"/\"):\n        return re.search(pattern[1:-1], text, re.MULTILINE) is not None\n    return pattern in text\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/scripts/check_fix_markers.py#L51-L87","documentation":"scripts/check_fix_markers.py is the repo's fix-marker regression guard (CI gate): it reads scripts/fix-markers.json, located via MANIFEST_PATH = REPO_ROOT/scripts/fix-markers.json where REPO_ROOT is derived from the script's own location. It raises ManifestError (and exits with code 2) when that manifest file does not exist. Because the path is anchored to the script file, not the current directory, this means the file is genuinely missing from the checkout.","triggerScenarios":"Running `python scripts/check_fix_markers.py` in a tree where scripts/fix-markers.json was deleted, moved, or never fetched — for example after a refactor that relocated the manifest without updating MANIFEST_PATH, or a partial copy of the repo.","commonSituations":"A shallow/partial clone or a tarball extraction that skipped the manifest; someone moved or renamed fix-markers.json during reorganization; running a copied version of the script from outside a full checkout.","solutions":["Restore the file from git: `git restore scripts/fix-markers.json` (or `git checkout HEAD -- scripts/fix-markers.json`)","Confirm the file is where the script looks: `ls scripts/fix-markers.json` from the repo root","If the manifest was intentionally relocated, update MANIFEST_PATH at scripts/check_fix_markers.py:37 to the new location","Run the script from a full repository checkout, not a copied subtree"],"exampleFix":"# before (manifest moved to config/fix-markers.json but MANIFEST_PATH unchanged)\nMANIFEST_PATH = REPO_ROOT / \"scripts\" / \"fix-markers.json\"  # ManifestError: manifest not found\n\n# after\nMANIFEST_PATH = REPO_ROOT / \"config\" / \"fix-markers.json\"","handlingStrategy":"validation","validationCode":"from pathlib import Path\nMANIFEST_PATH = Path(\"scripts/fix-markers.json\")  # repo-root relative\n\nif not MANIFEST_PATH.exists():\n    raise SystemExit(\"scripts/fix-markers.json missing — run inside a full checkout or `git restore scripts/fix-markers.json`\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the guard from a full repository checkout, not a copied subtree","Keep scripts/fix-markers.json tracked in git so it restores with `git restore`","If the manifest moves, update MANIFEST_PATH at scripts/check_fix_markers.py:37 in the same commit"],"tags":["ci","manifest","regression-guard","python","scripts","file-not-found"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}