From 0875b5d7971e732de8e4e64c361abc6e46fcc465 Mon Sep 17 00:00:00 2001 From: Alfonso Sastre Date: Sat, 5 Sep 2026 10:56:29 +0200 Subject: [PATCH] feat(bar): surface Lex-native signals in the bar walk (#121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bar ledger's 14 items are explicitly sourced from two published books (Prompt to Production ch.16, Prompt to Evidence ch.15) — prose checklists that have no way to ask about a typed effect system, since they weren't written for one. Adding a 15th item and attributing it to either book would misrepresent where it came from. Wires #119's effect_minimality probe into bar_check's run_walk as a separate, clearly-labeled "LEX-NATIVE SIGNALS" section instead — evidence specific to what Lex's own effect system can prove about itself, positioned between the book-sourced probes and the unprobed items so a bar walk surfaces it without pretending it's part of the canon. Verified via a direct driver calling bar_check.execute({root: ".", path: "src/tools"}): the new section renders correctly between the 6 probed items and the 8 unprobed ones, with effect_minimality's own report text intact. lex ci / lex test / doc-sync all still green, including test_bar.lex. Fixes #121 Co-Authored-By: Claude Sonnet 5 --- src/tools/bar_check.lex | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/tools/bar_check.lex b/src/tools/bar_check.lex index 1aa2515..2121ec9 100644 --- a/src/tools/bar_check.lex +++ b/src/tools/bar_check.lex @@ -23,6 +23,8 @@ import "../bar/checks" as checks import "../bar/ledger" as ledger +import "./effect_minimality" as effmin + import "./util" as util fn params() -> s.ModelSchema { @@ -56,9 +58,20 @@ fn run_one(root :: Str, path :: Str, id :: Str) -> [io, proc] Result[jv.Json, e. } } +# Lex-native evidence the ledger's two source books have no way to ask +# for — they were written for prose checklists, not a typed effect +# system — so this is deliberately a separate section, not a 15th +# ledger item pretending to be sourced from either book (#121). #119's +# effect_minimality probe is the first signal here: a declared effect +# row wider than the body needs, something no general-purpose review +# tool could check at all. +fn lex_native_signals(path :: Str) -> [io, proc] Str { + str.join(["\nLEX-NATIVE SIGNALS — not from either source book; specific to what a typed effect system can prove about itself.\n\n", effmin.report(path)], "") +} + fn run_walk(root :: Str, path :: Str) -> [io, proc] Result[jv.Json, e.Errors] { let probes := checks.run_all(root, path) - Ok(JStr(str.join(["MINIMUM BAR — repository probes over ", root, "\n\n", str.join(list.map(probes, checks.render), "\n\n"), "\n", open_items()], ""))) + Ok(JStr(str.join(["MINIMUM BAR — repository probes over ", root, "\n\n", str.join(list.map(probes, checks.render), "\n\n"), "\n", lex_native_signals(path), "\n", open_items()], ""))) } fn execute(args :: jv.Json) -> [net, io, proc] Result[jv.Json, e.Errors] {