pmacs/docs/active-work.md

178 lines
7.8 KiB
Markdown

# Active work — cross-machine resume ledger
**Snapshot: 2026-07-23.** This file records volatile work that has not
landed on `main`. Read it after `docs/agent-handoff.md`. Remove completed
entries when their PR merges; do not let this become a second permanent
backlog.
## Repository authority
- Canonical development URL:
`https://github.com/levineuwirth/pmacs.git`. This ledger uses the
normalized local alias `githubsucks` so its refs and recovery commands
are identical on every machine. Remote names are otherwise
machine-local: `origin` may name this canonical URL, a release mirror,
or something else, and therefore has no authority by name alone.
- Canonical base at this snapshot:
`githubsucks/main` @ `96d0bae` (documentation refresh #140 atop Vterm
Stage 3 #135 and tab-width parity #137; protocol v19).
- On the transfer source, `origin/main` named a release mirror at
`d3fa632` and lagged badly. On the current destination, `origin` names
the canonical URL. This difference is why all recovery begins by
verifying URLs and normalizing `githubsucks` rather than trusting
`origin/main`.
- The shared desktop checkout contained unrelated uncommitted work. The
branches below were prepared in isolated worktrees; never clean or
overwrite the shared checkout to recover them.
Start on another machine by inspecting its remotes:
```sh
git remote -v
git remote get-url githubsucks
```
If the second command says the alias is absent, add it; if it prints a
different URL, stop and resolve that collision rather than overwriting an
unknown remote:
```sh
git remote add githubsucks https://github.com/levineuwirth/pmacs.git
```
Then recover current refs:
```sh
git fetch githubsucks --prune
git log -1 --oneline githubsucks/main
git worktree list
git status --short --branch
```
The first command must expose `96d0bae` or a newer intentional main.
If it does not, stop and repair the remote/fetch configuration.
## Active lane: one-command GPU invocation
- Portable branch: `githubsucks/gpu-invocation`
- Pull request: **#141 OPEN — do not merge without explicit user approval.**
- Base: `githubsucks/main` @ `96d0bae`; protocol remains v19.
- Implementation checkpoints: `154cb9f` (second implementation-review fixes)
atop `69825d0` (exception-safe immediate reaper ownership), `82355ca`
(first implementation-review fixes), and `6fd5834`; approved framing began
at `821835b` and is now Revision 6.
- State: both implementation reviews are resolved, all 18 acceptance criteria
complete, and the PR awaits user review. Public path is additive
`pmacs --gpu [--socket NAME|PATH]`; bare `pmacs [FILE]` remains TUI and
`pmacs --gpu FILE` remains rejected.
- Review fixes: pre-state GPU events are buffered until winit state exists;
daemon stdio is detached; spawned-child ownership is handed off without a
leak window; direct CLI guidance, help/path operands, and sibling-file
discovery are strict; transient retry, timeout reporting, hermetic socket
paths, deterministic concurrent-loser reaping, pre-I/O non-CRDT gating, and
post-SIGINT use of a pre-attached frontend have behavioral coverage. Probe
disconnect polling remains bounded and cleanup skips already-reaped PIDs.
- Verification: strict workspace and CRDT acceptance Clippy; 1,768 default +
1,944 CRDT library tests; root CLI 33; GPU 149 required; GPU invocation
acceptance 1 default + 9 CRDT; Vterm Stage 3 7; M4 121 with 3 ignored and
the requested `basedpyright` skip; full workspace 2,961 across 85 suites
with 19 ignored and 1 requested skip; formatting and diff check clean.
Unified release build passed. Two real Wayland/Vulkan launches attached at
protocol v19; the second reused the daemon retained after the first GPU
process exited.
- Distribution remains source-checkout/workspace oriented: `pmacs-gpu` is
still unpublished. No install/service packaging claim was added.
Recovery:
```sh
git fetch githubsucks --prune
git worktree add --track \
-b gpu-invocation \
../pmacs-gpu-invocation \
githubsucks/gpu-invocation
cd ../pmacs-gpu-invocation
cargo build -p pmacs-gpu
cargo test --features crdt --test gpu_invocation_acceptance
```
## Parked lane: kill-ring browser + persistence
- Portable branch: `githubsucks/kill-ring-browser`
- Parked framing head: `503c489`
- State: framing only, revision 2; no implementation and no PR.
- Status: explicitly parked by the user on 2026-07-20.
- Its original scout was based on `0efb5cd`. The preserved framing marks
this ground truth stale and requires a complete re-scout against the
then-current `githubsucks/main` before implementation.
- Compile-mode has merged since the original scout, so old
“compile-mode in flight” keybinding/touch-set assumptions are not
authoritative.
Recovery worktree, only when the user un-parks it:
```sh
git worktree add --track \
-b kill-ring-browser \
../pmacs-kill-ring-browser \
githubsucks/kill-ring-browser
```
## Documentation lane
- Portable branch: `githubsucks/handoff-2026-07-20`
- Carries synchronized `AGENTS.md` / `CLAUDE.md`, this ledger, the
durable handoff refresh, and the keybinding reference correction.
- It changes no runtime code.
- Review and merge this documentation branch separately; it must not be
folded into a feature framing branch.
- Now also absorbs both landed arcs: Vterm Stage 1 (#126) and the config
registry (#127). Canonical `main` is merged into it up to `2e37c04`,
so its diff against `main` is documentation only.
## Closed since the last snapshot
- **Branches deleted 2026-07-22 (authorized):** `vterm-stage3-framing`
(Revision 8 framing; its content is carried on `vterm-gpu`, verified as a
superset before deletion — the branch was NOT an ancestor of `vterm-gpu`
because the framing was copied rather than merged, so it needed a forced
local delete) and `tab-width-parity` (a clean ancestor of `main` via
#137). Both removed as worktree + local ref + `githubsucks` ref; the
`origin` tracking refs were pruned. The `-framing` branches for each are
deliberately kept.
- **Tab-width rendering parity — MERGED as #137** (`main` @ `2625ec7`,
2026-07-22). One fixed 8-column `TAB_STOP_COLUMNS` in `pmacs-protocol`
now drives core/TUI columns, GPU code projection, and minimap width;
source bytes and protocol ranges are unchanged. Its lane, worktree, and
`tab-width-parity` branch (local + `githubsucks`) are deleted; the
`tab-width-parity-framing` branch is kept. This closes the long-standing
"tab width is a rendering-parity
bug, NOT a config gap" deferral recorded in `docs/agent-handoff.md` §5.
- **Locals-query processing — MERGED as #134** (with handoff #136), and
**modeline detection handoff #133**. Both landed between this lane's
base and its canonical-main integration.
- **Config registry — MERGED as #127** (`main` @ `2e37c04`). Its lane
(`config-registry`, worktree `../pmacs-config-registry`) is done; the
branch is kept but carries nothing unmerged. Durable substrate facts
moved to `docs/agent-handoff.md` §1 per rule 3 below.
- Both this and Vterm Stage 1 ran as **concurrent lanes in sibling
worktrees off `main`**, with the shared files (`src/editor.rs`,
`src/lua_bindings/mod.rs`, `src/lib.rs`) assigned to one lane each in
advance. The rebase of the second lane onto the first had **zero
conflicts** — worth repeating for future parallel work, along with its
precondition: agree the file split before either lane starts, and keep
each lane's footprint in the other's files to a single line.
## Update protocol
Whenever a listed lane changes materially:
1. update its public branch and head/state here;
2. record new verification and remove superseded caveats;
3. keep durable architecture in `docs/agent-handoff.md`, not here;
4. remove the lane after merge or abandonment;
5. verify every recovery command from a clean worktree before calling
the transfer complete.