18 lines
513 B
Python
18 lines
513 B
Python
"""Curated source-only notes, bound to exact source bytes; never execution evidence."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from functools import lru_cache
|
|
from pathlib import Path
|
|
|
|
|
|
@lru_cache(maxsize=1)
|
|
def _reviews() -> dict:
|
|
return json.loads(Path(__file__).with_name("source_reviews.json").read_text(encoding="utf-8"))
|
|
|
|
|
|
def review_for(path: str, source_sha: str) -> dict | None:
|
|
review = _reviews().get(path)
|
|
return review if review and review["source_sha"] == source_sha else None
|