You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: autohands generate deletes start_here.ipynb when ipynb-py-convert is missing #330
autohands generate <project> deletes the tracked root start_here*.ipynb (generate.py:150) before build_util.py_to_notebook shells out to ipynb-py-convert. When that converter is not on PATH (it is missing from ~/venv/PyAuto313), the run dies with FileNotFoundError, leaving start_here.ipynb deleted and a stray temp.py in the workspace. This hit 3 workspaces on 2026-11-04 during workspace-hygiene-sweep-1104; they were restored from git.
Plan
Preflight check: before anything destructive, confirm ipynb-py-convert is on PATH. If it is missing, exit non-zero, saying how to install it and "Nothing was modified" (the same pattern as the unknown-project guard).
Warn, without stopping, when the local assistant checkout used for the Colab Gemini context is behind origin/main (local refs only, no fetch). A stale assistant silently rewrote 239 notebooks' context in the same session.
Add a regression test that runs generate with an empty PATH for the converter and asserts the workspace is untouched.
Tier: glance — merge mode: human /prm (no auto-merge authorized this session)
Detailed implementation plan
autohands/generate.py: after the COLAB_PROJECTS validation, add if shutil.which("ipynb-py-convert") is None: sys.exit(...).
autohands/build_util.py: add assistant_behind_origin(root) -> int | None, which runs git rev-list --count HEAD..origin/main and returns None on any error. generate.py prints a WARNING when it is greater than 0.
tests/test_generate_validates_project.py: add a missing-converter test using a PATH that has python3 and git but no ipynb-py-convert; assert a non-zero exit, a clean git status, start_here.ipynb present, and no temp.py.
Run pytest tests/test_generate_validates_project.py tests/test_gemini_instructions.py.
Shipped in #331 (merged, CI green 3/3): generate now preflights ipynb-py-convert before deleting anything and warns when the assistant checkout is behind origin/main.
Activity
Jammy2211 commentedon Nov 4, 2026
Shipped in #331 (merged, CI green 3/3): generate now preflights
ipynb-py-convertbefore deleting anything and warns when the assistant checkout is behind origin/main.