|
oc_chat
|
Functions | |
| "subprocess.CompletedProcess[str]" | _git (list[str] args) |
| str | _head_commit () |
| bool | _is_ancestor (str ref, str of) |
| bool | _files_unmoved_at (str ref) |
| "list[tuple[str, str]]" | _parse_links (str text) |
| dict | _classify_and_normalize (str raw_target, str base_dir) |
| "str | None" | _read_text (str rel, "str | None" ref) |
| bool | _exists (str rel, "str | None" ref) |
| "list[str]" | _list_source_records ("str | None" ref) |
| "str | None" | _source_render_base (str rel) |
| bool | _is_exempt (str rel) |
| "list[dict]" | _collect_links ("str | None" ref=None) |
| dict | _resolve (*, str origin, str base, str link_text, str raw, "str | None" ref) |
| bool | _dead (dict record) |
| "list[str]" | _framing_violations () |
| bool | _archival_phrase_present () |
| str | _render_report (str baseline_ref, "list[str]" baseline_keys, "list[dict]" records) |
| "tuple[str, list[str]]" | _read_baseline () |
| "list[str]" | _dead_link_keys ("list[dict]" records) |
| int | _write_baseline () |
| int | _write_report () |
| int | _check () |
| int | main ("list[str] | None" argv=None) |
Variables | |
| REPO_ROOT = Path(__file__).resolve().parents[1] | |
| str | REPORT_PATH = REPO_ROOT / "tools" / "142k_d2_relocation_link_audit.md" |
| frozenset | MOVED_BASENAMES |
| str | ARCHIVE_REL = "oc_chat/roadmap/historical-archive-DO-NOT-DELETE" |
| str | ROADMAP_DIR = "oc_chat/roadmap" |
| tuple | FRAMING_VIEWS |
| dict | SOURCE_RENDER_CONTEXT |
| tuple | SOURCE_ONLY_PREFIXES = ("oc_chat/roadmap/source/items/",) |
| tuple | EXEMPT_PREFIXES |
| frozenset | EXTERNAL_SCHEMES |
| tuple | _STALE_FRAMING = ("(current)", "this version", "reading order:") |
| tuple | _ARCHIVE_CONTEXT_WORDS = ("legacy", "archived", "historical-archive", "receipt") |
| str | ARCHIVAL_PHRASE = "retained as a v3.38 receipt" |
| _MOVED_STEM_RE = re.compile(r"ROADMAP-[A-Za-z-]*v3\.38\.md") | |
| _LINK_RE = re.compile(r"\[(?P<text>(?:[^\]\[]|\[[^\]]*\])*)\]\((?P<target>[^)\s]+)\)") | |
|
protected |
Definition at line 320 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 418 of file 142k_d2_relocation_link_audit.py.
|
protected |
Classify a link + normalize its target. Returns a dict with ``kind`` in
{external, anchor, file, file_anchor}, the normalized repo-relative ``path``
(or None), the ``fragment``, and an ``escape``/``decoded`` flag.
Definition at line 184 of file 142k_d2_relocation_link_audit.py.
|
protected |
Resolve every audited source-record link (from ``ref``'s tree or the working tree). Key = ``S|<source path>|<normalized target>|<link text>`` — stable under line shifts AND adjacent-link edits on the same line.
Definition at line 251 of file 142k_d2_relocation_link_audit.py.
|
protected |
A non-external, non-anchor link whose target does not resolve.
Definition at line 287 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 383 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 220 of file 142k_d2_relocation_link_audit.py.
|
protected |
True iff the four moved receipts are STILL at oc_chat/roadmap/ in ``ref``'s tree — i.e. the baseline was captured BEFORE the relocation (R06-P1).
Definition at line 170 of file 142k_d2_relocation_link_audit.py.
|
protected |
Stale framing (``(current)`` / ``this version`` / ``Reading order:``) adjacent to a moved basename outside an archive context, in the rendered views or their source notes.
Definition at line 297 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 152 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 161 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 166 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 246 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 226 of file 142k_d2_relocation_link_audit.py.
|
protected |
Return ``[(link_text, raw_target), ...]`` for every Markdown link.
Definition at line 179 of file 142k_d2_relocation_link_audit.py.
|
protected |
Parse the committed report's baseline_ref + pre-existing dead-link keys.
Definition at line 363 of file 142k_d2_relocation_link_audit.py.
|
protected |
Read a file's text from ``ref``'s git tree (immutable baseline) or the working tree (``ref=None``); ``None`` if absent.
Definition at line 210 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 326 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 267 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 236 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 387 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 406 of file 142k_d2_relocation_link_audit.py.
| int 142k_d2_relocation_link_audit.main | ( | "list[str] | None" | argv = None | ) |
Definition at line 460 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 144 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 148 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 146 of file 142k_d2_relocation_link_audit.py.
|
protected |
Definition at line 143 of file 142k_d2_relocation_link_audit.py.
| str 142k_d2_relocation_link_audit.ARCHIVAL_PHRASE = "retained as a v3.38 receipt" |
Definition at line 145 of file 142k_d2_relocation_link_audit.py.
| str 142k_d2_relocation_link_audit.ARCHIVE_REL = "oc_chat/roadmap/historical-archive-DO-NOT-DELETE" |
Definition at line 99 of file 142k_d2_relocation_link_audit.py.
| tuple 142k_d2_relocation_link_audit.EXEMPT_PREFIXES |
Definition at line 123 of file 142k_d2_relocation_link_audit.py.
| frozenset 142k_d2_relocation_link_audit.EXTERNAL_SCHEMES |
Definition at line 137 of file 142k_d2_relocation_link_audit.py.
| tuple 142k_d2_relocation_link_audit.FRAMING_VIEWS |
Definition at line 104 of file 142k_d2_relocation_link_audit.py.
| frozenset 142k_d2_relocation_link_audit.MOVED_BASENAMES |
Definition at line 95 of file 142k_d2_relocation_link_audit.py.
| 142k_d2_relocation_link_audit.REPO_ROOT = Path(__file__).resolve().parents[1] |
Definition at line 91 of file 142k_d2_relocation_link_audit.py.
| str 142k_d2_relocation_link_audit.REPORT_PATH = REPO_ROOT / "tools" / "142k_d2_relocation_link_audit.md" |
Definition at line 92 of file 142k_d2_relocation_link_audit.py.
| str 142k_d2_relocation_link_audit.ROADMAP_DIR = "oc_chat/roadmap" |
Definition at line 100 of file 142k_d2_relocation_link_audit.py.
| tuple 142k_d2_relocation_link_audit.SOURCE_ONLY_PREFIXES = ("oc_chat/roadmap/source/items/",) |
Definition at line 119 of file 142k_d2_relocation_link_audit.py.
| dict 142k_d2_relocation_link_audit.SOURCE_RENDER_CONTEXT |
Definition at line 110 of file 142k_d2_relocation_link_audit.py.