Skip to content

Refresh the port inventory: what 0.0.11 → 0.0.27 added to the port #249

Closed

Description

@blooop

Question

What does main at 0.0.27 actually contain that the feasibility research (measured at 2026-08-07, ~2.6K LOC / 413 tests) did not cover — and what does that do to the port's shape?

Deliverable: a refreshed inventory, as a successor doc to the feasibility research, covering:

  • Source inventory by module (dl.py, worktree/*, workspace clones + LFS, tool provisioning, benchmarking, completions, anything else), each classified as ports ~1:1, needs design, or stays language-agnostic (like the bash completion did).
  • Test-suite split at HEAD: which tests are mock-free and target the CLI/filesystem boundary (acceptance-harness candidates, the successors of the "61"), vs mock-based behavior spec. Count both; name the harness candidates by file.
  • Crate-mapping deltas: anything the new subsystems need that the 2026-08-07 crate survey didn't cover (git worktree ops, LFS probing, PTY handling in tests, zellij/pixi provisioning) — does the "every crate exists" claim still hold?
  • Subprocess surface: is it still uniformly list-form with no shell interpolation, or did anything creep in that breaks the std::process::Command 1:1 story?

Facts only; the decisions belong to the tickets this blocks. Work against origin/main (note: local checkouts may be stale).

Activity

  1. self-assigned this
    on Aug 18, 2026
  2. blooop commented on Aug 18, 2026

    @blooop
    OwnerAuthor

    Resolved. Full inventory: docs/research/rust-rewrite-inventory-0.0.27.md (branch research/rust-rewrite-inventory, measured 2026-08-18 at 54d8280 = v0.0.27).

    Headline: 0.0.11 → 0.0.27 is 298 commits, +33,915/−2,049 lines. Shipped package grew 4,016 → 11,175 Python LOC (26 files, 10 new modules: tools, timing, workspace_state, disk_usage, tty_session, devpod_ssh, devpod_provider, xdg, worktree/locks, worktree/git_errors; dl.py alone 1,592 → 4,909). Tests grew 657 → 1,514 functions / 30,362 lines.

    1. Source inventory by module — almost everything new classifies ports ~1:1 (workspace_state, disk_usage, devpod_ssh, devpod_provider, locks, git_errors, xdg, and the grown worktree managers). Needs design: dl.py's launch-flow sequencing (still a hand-rolled dispatcher), tools.py's provisioning composition (its embedded POSIX scripts carry over verbatim), timing.py's global registry shape, and whether to port worktree/migration.py at all. Stays language-agnostic / out of port scope: dl.bash (unchanged story) and scripts/ benchmarking (~630 LOC of dev tooling driving dl over its CLI) plus its 59 tests.

    2. Test split at HEAD — 312 mock-free vs 1,202 mock/patch-based. Of the mock-free, 96 exercise the CLI/filesystem/process boundary (the successors of #53's "61"): e2e 24, integration 32 (incl. real-LFS and clone-race suites), flock 19, multi-process drivers 5, PTY harness 16 — files named in the doc. The other 216 are in-process pure-function tests (port as ordinary unit tests). test_worktree_storage.py, counted in the old 61, now patches seams and moved to the mock-based column.

    3. Crate deltas — four additions cover everything the new subsystems need: fd-lock 4.0.4 (flock), shlex 2.0.1 (remote-payload quoting), portable-pty 0.9.0 / expectrl 0.9.0 (PTY e2e), assert_cmd 2.2.2 (CLI harness). LFS probing and zellij/pixi provisioning need no crate (file-content sniffing + external git lfs; generated shell strings). "Every crate exists and is maintained" still holds.

    4. Subprocess surface — still uniformly list-form: zero shell=True, zero os.system, zero f-string argv across ~33 spawn sites; the std::process::Command 1:1 story holds. One change in character: tools.py/tty_session.py now deliberately compose remote shell payloads as shlex.quoted strings (bash -lc <script> via devpod ssh --command, cd <dir> && cmd inside ssh argv) — interpreted in the container, not by a host shell, and reproduced in Rust by the shlex crate. The quoting layer is now load-bearing surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions