Skip to content

feat(cli): add proofpath update and the TUI's /update - #15

Merged
Yigtwxx merged 2 commits into
mainfrom
feat/update-command
Oct 5, 2026
Merged

Yigtwxx merged 2 commits into
mainfrom
feat/update-command

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Oct 5, 2026

Copy link
Copy Markdown
Owner

What this changes

  • proofpath update [--check] and the TUI's /update. The command asks PyPI for the latest version, works out how proofpath was installed and re-installs it the same way: uv tool, pipx or pip. An editable install, or a temporary uvx/pipx run environment, is never touched; the command says how to update those instead. --check only reports.
  • Extras survive. The extras that are installed (browser, gpu) go into the install spec (uv tool install --upgrade "proofpath[browser]"), so a later plain uv tool upgrade keeps them too. The spec is never version-pinned.
  • Rules kept. network=deny sends nothing. network=ask with no TTY is a deny (rule 4); with a TTY it proceeds and adds a note. The installed version is checked afterwards in a fresh, isolated (-I) process; when it does not match, that is a failure.
  • TUI safety. A bare /update is refused while a run or a mirrored verb is still running the installed code, and nothing new starts while an update is installing.
  • Pasteable commands. Logged commands moved to a leaf shell module. Its display form pastes back into POSIX shells, cmd.exe and PowerShell: >, , and the like are double-quoted on Windows. The browser install log uses it too.
  • At 80x24 the / list now caps at 9 rows plus "… 2 more". update sits last, so /help stays visible.
  • Docs: spec docs/superpowers/specs/2026-10-05-update-command-design.md, OPEN-ITEMS §21, README "Updating", CHANGELOG.

Why

The user asked for an update command like claude update. A plain uv tool upgrade proofpath is not enough. The browser extra is pip-installed into the tool environment on consent, and on 2026-10-05 a spike in an isolated UV_TOOL_DIR showed that uv tool upgrade removes packages added that way. Upgrading by hand would silently drop the browser wheels the user had agreed to download.

The implementation had an independent review and three re-review rounds. They caught six real problems:

  • ask bypassed rule 4;
  • commands that could not be pasted on Windows;
  • /help hidden at 80x24;
  • /update replacing the venv under a running TUI;
  • pipx run caches missed on macOS and Windows;
  • >= unquoted in the Windows browser log.

Checklist

  • ruff check and ruff format --check are clean (and mypy --strict)
  • pytest passes (full suite green; new: test_update.py, test_update_cli.py, test_shell.py, plus TUI tests)
  • Type annotations on every new function signature
  • No network access in unit tests (PyPI via respx, the runner injected)
  • If a new reported state was added, spec section 15 is updated too (no new verification state; update outcomes live in the update spec)
  • This change does not make the tool sound more confident than its evidence

🤖 Generated with Claude Code

https://claude.ai/code/session_01K46EEsxMvuAuM8wjvPNWLM

Updating meant knowing how proofpath was installed and retyping that
install. A plain `uv tool upgrade` also silently removes the browser
extra: it is pip-installed into the tool environment on consent, and
uv drops such packages on upgrade (measured 2026-10-05).

The command checks PyPI, detects the install (uv tool, pipx, pip,
editable, or a temporary uvx/pipx-run environment) and re-installs with
the extras that are present written into the spec, so later upgrades
keep them too. `--check` only reports. `network=ask` without a TTY is a
deny (rule 4). The TUI refuses `/update` while anything that runs the
installed code is still going, and the reverse.

Logged commands moved to a leaf `shell` module whose display form
pastes back into cmd.exe and PowerShell as well as POSIX shells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K46EEsxMvuAuM8wjvPNWLM
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
proofpath Ignored Ignored Preview Oct 5, 2026 11:51am UTC

The new guard test released its blocked /resolve and left the app
straight away. On the Windows runners the worker then wrote to a RunLog
whose screen was already gone (NoMatches), failing both Windows jobs of
PR #15. Wait for the resolve result, as the sibling test already waits
for its install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K46EEsxMvuAuM8wjvPNWLM
@Yigtwxx
Yigtwxx merged commit ef5e18c into main Oct 5, 2026
11 checks passed
@Yigtwxx
Yigtwxx deleted the feat/update-command branch October 5, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant