Repository navigation
fix: ada command hints follow PATH, escape paths, and fall back to t3 - #241
Conversation
`ada update` recommended `ada` whenever this install owned an `ada` launcher, even when PATH runs another program's `ada` first, and double-quoted the runtime path, so `$workspace`, quotes and backticks in it broke the command. Boot recovery and the desktop's state-directory dialog said `ada triage` and `ada update`, which fail on installs that have only `t3`. The usage-data notice promised opt-in on every server, though older servers send by default. The update resolves `ada`, then `t3`, through PATH and names one only when the file PATH runs is this home's launcher (after an install, one that starts the new runtime); otherwise it prints the runtime path as a POSIX or PowerShell literal (`shellCommandPath` in @t3tools/shared/shell). Desktop recovery copy names the command its CLI state says runs, else the launcher, else `t3`; web and WSL copy without that state says `t3`. Servers now report `telemetryEnabled` in their config, and the notice promises opt-in only when the server says it is off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Review of 73a4769: CI is green and the four original defects are fixed. 245 tests pass, ordinary foreign-
Nit: |
…ied commands Review of #241 found three gaps. The PATH search dropped empty POSIX entries, which a shell searches as the working directory, and counted files it cannot execute. On Windows it tried only .exe and .cmd, so another program's ada.bat earlier on PATH was skipped. Where no desktop state verifies a command, the hints still named `t3`, which install.sh can leave to another program. The search now treats an empty POSIX entry as the working directory, counts only executable files, and follows PATHEXT's extensions in order. Boot recovery, the triage toast and draft hero, the WSL dialog, and the desktop dialog without a verified command say to run the subcommand with the Ada CLI (`ada`, or legacy `t3`) and offer nothing to copy. The quoted Windows path form is labelled "in PowerShell", since cmd.exe cannot run it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in c4607b2: the PATH search treats an empty POSIX entry as the working directory, counts only executable files, and follows PATHEXT order on Windows. Where no command is verified (boot error, triage toast and hero, WSL dialog, desktop dialog without CLI state), the hints say to run the subcommand with the Ada CLI ( |
Problem
Four defects from Randy's re-review of #234/#235 that merged to main:
ada updatechoseadabecause this install owned anadalauncher file, not because PATH runs it. With another program'sadaearlier on PATH, following the hint ran that program.$workspaceexpanded, and quotes or backticks in the path broke the command.ada triage) and the desktop state-directory dialog (ada update,ada service …) fail on installs that have onlyt3, or run a foreignada. The in-app triage fallback toast and the WSL dialog had the same hint.Change
ownedCommandOnPathresolvesada, thent3, through PATH, and names one only when the file PATH runs is this home's launcher (after an install: one that starts the new runtime). Otherwise the next name, then the runtime path.shellCommandPathin@t3tools/shared/shell: bare when plainly safe, else a POSIX single-quoted literal, or PowerShell& '…'with''(and doubled typographic quotes) on Windows.runnableCliCommand(state)uses the command its CLI state says PATH runs, else the escaped bundled launcher, elset3.DesktopCliCommandnow builds with the backend layer so the pool's dialog can read it. Web boot error, in-app triage fallback and the WSL dialog have no such state and sayt3.AnalyticsService.enabledreports the effective telemetry state, and the server sends it asServerConfig.telemetryEnabled. The notice promises opt-in only when the server reportsfalse, says so when it reportstrue, and for an older server that omits it says it may send data.Not changed: the telemetry default and the privacy-policy link (product decision).
Verification
origin/mainwith the new tests kept):update.test.ts: rows for a foreignadafirst on PATH, launchers off PATH, no launcher. The temp home contains$workspace,", a backtick and spaces, and the fallback must be the single-quoted literal.shell.test.ts:shellCommandPathtable ($, quotes, backticks, spaces, Windows'and’), plus a round-trip through/bin/sh.bootError.test.tsandDesktopCliCommand.test.ts(runnableCliCommand): thet3fallback and owned-command rows.managedPolicy.test.ts(usageDataNotice) andAnalyticsService.test.ts(enabledacross shell discovery).vp run check:changed: format, lint, knip, typecheck (37 packages), tests (15 files), react compiler all pass.🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code (Claude Code harness)