aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-19 20:50:37 -0500
committerCraig Jennings <c@cjennings.net>2026-07-19 20:50:37 -0500
commit33c6d7b8f497ba103d3a949e7f3cadc3d2e100ae (patch)
treeec57ef5d317bb01c85861e942dccb1eb052742a2 /todo.org
parent2b619f1769cae4a96202ca521a9ed4a9db65bc8f (diff)
downloadrulesets-33c6d7b8f497ba103d3a949e7f3cadc3d2e100ae.tar.gz
rulesets-33c6d7b8f497ba103d3a949e7f3cadc3d2e100ae.zip
docs(todo): close the ai-launcher-hardening task
Netted the 17 uncovered functions (launcher tests 9 to 42), extracted four pure decision cores with Normal/Boundary/Error sets, and dispositioned the footgun audit plus refactor pass. shellcheck clean, shfmt consistent, suite green before and after.
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org4
1 files changed, 3 insertions, 1 deletions
diff --git a/todo.org b/todo.org
index da2366b..c192486 100644
--- a/todo.org
+++ b/todo.org
@@ -205,11 +205,13 @@ session needs its own contract (mutation rights, async surfacing, dedup
state across runs) — same open questions inbox.org logs for unattended
auto inbox zero. Take up only if the interactive shape proves too narrow.
-** TODO [#C] ai launcher hardening — bug hunt + refactor pass :refactor:solo:
+** DONE [#C] ai launcher hardening — bug hunt + refactor pass :refactor:solo:
+CLOSED: [2026-07-19 Sun]
:PROPERTIES:
:CREATED: [2026-07-13 Mon]
:LAST_REVIEWED: 2026-07-19
:END:
+Resolved across two commits (113e8d8 net, 2b619f1 refactor). Brought the 17 uncovered functions under characterization tests (launcher tests 9 → 42), extracted the git/tmux decision logic into four pure cores (_git_prep_action, _order_windows, _match_window_id, _git_is_dirty) each with a Normal/Boundary/Error set, and dispositioned the footgun audit + /refactor pass. Objective floor met: shellcheck clean, shfmt -i 2 -ci consistent, make test green before and after, live black-box smoke correct for claude and codex. Honest limit: attach_session and the full end-to-end of single/multi/fetch stay partially covered (their terminal step attaches to tmux or blocks on fzf, can't run headless). Their decision logic was extracted into the netted cores. The interactive runtime picker stayed out of scope (a design call, filed on the generic-agent-runtime parent).
Harden =claude-templates/bin/ai= (the agent-session launcher, 540 lines, 22 functions). Origin: roam inbox 2026-07-13, phrased open-endedly ("find bugs until none visible, refactor until nothing worthwhile remains"). Rescoped 2026-07-19 with measurable acceptance criteria per =todo-format.md='s "Making an open-ended task measurable," which is what makes it =:solo:=. The four moves:
1. *Bound the surface.* The 22 functions are the done-set. *Covered* (behaviorally, via =scripts/tests/ai-launcher-runtime.bats=, 9 tests over the runtime path): =resolve_agent_cmd=, =build_runtime_choices=, =pick_runtime=, =build_instructions=, the print modes. *Uncovered* (the 17 to bring under test): =usage=, =check_deps=, =attach_session=, =create_window=, =maybe_add_candidate=, =build_candidates=, =fetch_candidates=, =git_status_indicator=, =annotate_candidates=, =auto_pull_if_clean=, =read_selections=, =sort_windows=, =find_window_id=, =prep_git_single=, =attach_mode=, =single_mode=, =multi_mode=, =print_launch_mode=.