From b426eddac6ce2e05f118639e2c0955bc00844130 Mon Sep 17 00:00:00 2001 From: gHashTag Date: Fri, 14 Aug 2026 19:03:01 +0000 Subject: [PATCH] tri: dispatch loop helpers, and record the triage change in NOW.md (Closes #2156) The previous commit landed triage.py alone. The dispatcher and the NOW.md entry were staged, then unstaged by a `git stash` / `git stash pop` used to establish the language-check baseline, and the commit took only what was still in the index. Without the dispatcher `tri triage` does not resolve at all, so the branch as first pushed was inert. Recorded rather than amended away: a verification step that mutates the index is the defect, not the missing file. --- .../2026-08-21-triage-five-ordered-classes.md | 10 ++++++++++ scripts/tri | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 docs/now/2026-08-21-triage-five-ordered-classes.md diff --git a/docs/now/2026-08-21-triage-five-ordered-classes.md b/docs/now/2026-08-21-triage-five-ordered-classes.md new file mode 100644 index 0000000000..58047f0618 --- /dev/null +++ b/docs/now/2026-08-21-triage-five-ordered-classes.md @@ -0,0 +1,10 @@ +# NOW -- triage tells blocked from actionable (2026-08-21) + +## tri triage: five ordered classes, and blocked is tested before actionable (Closes #2156) + +- `tri triage` had three classes and made `actionable` the default, so anything it did not recognise was counted as available work. Three kinds of issue cannot be picked up and finished -- blocked on hardware or a human, research with no checkable end, duplicate or obsolete -- and all three were being advertised. The reported count was an upper bound read as an estimate +- Now five classes matched in order: actionable, research, tracking, blocked, duplicate. `blocked` is tested before `actionable` on purpose, so no blocked item is offered as available. Measured over 241 open issues: 45 actionable, 0 research, 189 tracking, 7 blocked, 0 duplicate. The seven blocked items were previously inside the actionable count +- `research` scoring zero is a limitation of the signal, not a finding: the rule reads title form, and this tracker's titles are declarative sentences rather than questions. Reported as measured rather than tuned until the histogram looked plausible +- The tool prints and exits. Autoclose is forbidden: 80% of the tracker is journal record with no completion condition, and a title regex is not grounds to destroy it. The classification is a composition estimate, never a verdict on one issue, and the output says so +- Loop helpers now dispatch from `scripts/tri_loop/` via `tri `, with `tri loop-help` listing them. They report and never mutate; keeping them out of `t27c` means a broken helper cannot take the compiler CLI down with it +- Entry migrated from `docs/NOW.md` to `docs/now/` (the layout #2298 introduced); the original entry was dated 2026-08-14. The branch's own commit had deleted the heading `# NOW -- BNF: the control that measures what ternary is worth (2026-08-09)` while keeping its body, orphaning it; `docs/NOW.md` is restored to master byte-for-byte, so that heading survives diff --git a/scripts/tri b/scripts/tri index 44d26004ec..70e68a7cbb 100755 --- a/scripts/tri +++ b/scripts/tri @@ -345,6 +345,26 @@ if [[ ! -x "$T27C" ]]; then echo "tri: local commands still work -- see 'tri help'" >&2 exit 1 fi +# Loop helpers live in scripts/tri_loop/ as Python, and are dispatched before +# anything is forwarded to t27c. They are separate from the compiler on purpose: +# they measure and report on the repository, they do not compile it, and none of +# them mutates anything. Keeping them out of t27c means a broken helper cannot +# take the compiler's CLI down with it. +cmd="${1:-}" +LOOP_DIR="$SCRIPT_DIR/tri_loop" +if [[ "$cmd" == "loop-help" ]]; then + echo "tri loop helpers (report only, never mutate):" + for f in "$LOOP_DIR"/*.py; do + [[ -e "$f" ]] || continue + name="$(basename "$f" .py)" + printf ' %-12s %s\n' "$name" "$(sed -n '2s/^"""tri [a-z-]* -- //p' "$f")" + done + exit 0 +fi +if [[ -n "$cmd" && -f "$LOOP_DIR/${cmd//-/_}.py" ]]; then + exec python3 "$LOOP_DIR/${cmd//-/_}.py" "${@:2}" +fi + # `t27c suite` is the only subcommand that accepts --repo-root. # Map `tri test` to the suite subcommand; pass other commands through unchanged. if [[ "$cmd" == "test" || "$cmd" == "suite" ]]; then