Skip to content

Fix Python 3.9 install crash that silently skipped all shim generation (v2.7.0 regression)#99

Merged
gbrbks merged 1 commit into
mainfrom
fix/py39-install-crash
Jun 12, 2026
Merged

Fix Python 3.9 install crash that silently skipped all shim generation (v2.7.0 regression)#99
gbrbks merged 1 commit into
mainfrom
fix/py39-install-crash

Conversation

@gbrbks

@gbrbks gbrbks commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Customer impact

Any machine whose python3 is 3.9 (notably the macOS-bundled /usr/bin/python3 3.9.6) gets a broken install from v2.7.0 through v2.9.0: npx @bitraptors/archie prints 'Installed!' and exits 0, but no slash commands or workflow files are written. Reported as 'the archie files are not generated'. Installs that worked on v2.6.0 and earlier (pure-JS shim writing) broke on upgrade. Node version is irrelevant (verified working on Node 26.3).

Root cause

manifest.py gained section: str | None = None (commit 6ce68d2, shipped in 2.7.0) without from __future__ import annotations. PEP 604 unions in class bodies are evaluated at import time on Python 3.9 -> TypeError: unsupported operand type(s) for | -> python3 -m _install_pkg.install dies before writing anything. archie.mjs then swallowed the non-zero exit with a single dim warning and still reported success.

Fix

  • manifest.py: add the future import (root cause, one line)
  • install.py: version gate before package imports - Python <3.9 gets an actionable message, exit 3
  • archie.mjs: missing python3 or a failed install loop now prints a prominent 'Install INCOMPLETE - no Claude/Codex commands were written' block and exits 1
  • tests/test_py39_compat.py: AST regression guard over every shipped .py - flags any runtime-evaluated union annotation in a module lacking the future import (works on any CI python; py_compile cannot catch this class)

Verification

  • Reproduced the crash with /usr/bin/python3 3.9.6 pre-fix; same command post-fix writes all shims + workflow (exit 0)
  • New test fails on the pre-fix npm asset copy, passes post-fix
  • python3-missing path: local installer exits 1 with the INCOMPLETE block
  • Happy path unchanged: full install on Node 24 + python3.13, 'Installed!', exit 0
  • Full suite: 980 passed; scripts/verify_sync.py passes

Needs a v2.9.1 npm release once merged to actually reach the customer.

Generated with Claude Code

…fails loudly

Since v2.7.0 the npx installer delegates all shim/workflow generation to
python3 -m _install_pkg.install. manifest.py's ConfigPatch grew a
`section: str | None = None` dataclass field (6ce68d2) without
`from __future__ import annotations` - PEP 604 unions are evaluated at
import time on Python 3.9, so the whole install loop died with
TypeError before writing a single CLI shim. macOS ships /usr/bin/python3
3.9.6, so any user without a newer python3 on PATH got a broken install
from v2.7.0 through v2.9.0.

Worse, archie.mjs swallowed the failure: one dim warning between forty
green checkmarks and a 45s viewer build, then 'Installed!' and exit 0.
Users reported it as 'the archie files are not generated' (the .py
support scripts DO get copied; the slash commands don't).

- manifest.py: add the future import (the one-line root-cause fix;
  verified end-to-end on /usr/bin/python3 3.9.6)
- install.py: explicit version gate before package imports - Python
  <3.9 now gets an actionable message instead of a traceback
- archie.mjs: when python3 is missing or the install loop exits
  non-zero, print a prominent 'Install INCOMPLETE' block and exit 1
  instead of 'Installed!' / exit 0
- tests/test_py39_compat.py: AST guard over every shipped .py - any
  X | Y annotation in a module without the future import fails the
  suite (py_compile can't catch this and CI has no 3.9 interpreter)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
archie Ready Ready Preview, Comment Jun 12, 2026 9:13am
archie-viewer Ready Ready Preview, Comment Jun 12, 2026 9:13am

@gbrbks gbrbks merged commit 78b3655 into main Jun 12, 2026
4 checks passed
@gbrbks gbrbks deleted the fix/py39-install-crash branch June 12, 2026 09:19
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