From 491ca8a15fccb766ee487c025a9f426154de1a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= Date: Tue, 1 Sep 2026 23:24:46 +0200 Subject: [PATCH] Fix false-positive broken-edge findings in ckb-lint graph check Graph edge endpoints use project-root-absolute paths per Rule C (`/wiki/entities/foo.md`), while the `known` page set is keyed on paths relative to `wiki/`. check_graph compared them directly, so every conformant edge was reported as pointing at a missing page. Add the `/wiki/`-stripped form to the candidate set, matching the normalisation the decision-record check already performs. Bump VERSION 1.6.0 -> 1.6.1. Co-Authored-By: Claude Opus 5 (1M context) --- .agents/skills/ckb-lint/scripts/lint_report.py | 7 +++++++ VERSION | 2 +- workload/2026-09-01_summary.md | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.agents/skills/ckb-lint/scripts/lint_report.py b/.agents/skills/ckb-lint/scripts/lint_report.py index a2d8cf2..0fe4ad7 100644 --- a/.agents/skills/ckb-lint/scripts/lint_report.py +++ b/.agents/skills/ckb-lint/scripts/lint_report.py @@ -385,9 +385,16 @@ def check_graph(root, docs): if not value: findings.append(f"graph/edges.json: edge {i} has no `{side}`") continue + # Edge paths are project-root-absolute per Rule C + # (`/wiki/entities/foo.md`), while `known` holds paths relative to + # wiki/. Strip the prefix the same way the decision-record check + # above already does, or every conformant edge reads as broken. + stripped = value[len("/wiki/"):] if value.startswith("/wiki/") else value.lstrip("/") candidates = { value, value.removesuffix(".md"), + stripped, + stripped.removesuffix(".md"), f"entities/{value}", f"entities/{value}".removesuffix(".md"), } diff --git a/VERSION b/VERSION index dc1e644..9c6d629 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.0 +1.6.1 diff --git a/workload/2026-09-01_summary.md b/workload/2026-09-01_summary.md index 34f454e..b20ad45 100644 --- a/workload/2026-09-01_summary.md +++ b/workload/2026-09-01_summary.md @@ -42,3 +42,4 @@ - Graph gained `decided_by` (decision → person) and `affects` (decision → constrained entity) edge types. - Docs updated in both languages (README/README.pl feature + skill sections, MANUAL/MANUAL.pl new §2.D walkthrough and "say this" table rows, ownership table row noting the append-only convention), plus `ckb-init` (scaffold + skill list). Also fixed five stale `cbk-quiz` path references left from the upstream rename. - End-to-end tested on a scratch copy: a sample decision record passes lint clean and exports to OKF conformantly. That test surfaced a real bug in `export_okf.py` — a Rule B log line naming a directory (`wiki/decisions/` (directory)) was being turned into a broken intra-bundle link; `files_to_links` now only linkifies entries that name an actual `.md` file. +- Fixed a second bug in `lint_report.py`'s `check_graph`: graph edge endpoints are project-root-absolute per Rule C (`/wiki/entities/foo.md`), but the `known` set holds paths relative to `wiki/`, so every conformant edge was reported as pointing at a missing page. The candidate set now also tries the `/wiki/`-stripped form, matching what the decision-record check already did. Root `VERSION` 1.6.0 → 1.6.1 (patch).