Native Rust runtime for Annotate Lite evaluation - #27
Conversation
|
Review (requesting changes; posted as a comment because the PR is under the same account). Reviewed against the parity bar: a Lite user swapping to this build should notice exactly one thing, that Bun is gone. Close, with two small parity fixes needed. Verified (macOS, live in a disposable Herdr session, previous install and the real store restored byte-for-byte afterwards)
Needs fixing before this can stand in for
|
|
Re-verified
Parity holds for macOS/Linux on everything I can exercise. Remaining, as documented: Windows is CI-only, the |
Parity proof: Filesystem effects / store directory creation.
Parity proof: Filesystem effects / saved annotation field order.
Parity proof: Filesystem effects / handoff take.
Parity proof: Process effects / terminal signal cleanup.
Parity proof: Filesystem effects / pending handoff deletion.
Parity proof: Filesystem effects / handoff take and removal.
Compare Bun and Rust process, PTY screen, and JSONL store observables on Ubuntu and macOS CI.
Summary
herdr-annotatebinary withcapture,copy-context,manage,editor, andmanagersubcommandslite-rsmanifest plus checksummed native-binary installers, local staging, path-filtered CI, and six-target prerelease packagingscripts/parity-lite.shNo TypeScript source changed.
Reproducible parity proof
Run:
Result on both Ubuntu and macOS:
The harness runs both implementations against identical temporary inputs. It mechanically compares exit status, stderr, exact Herdr argv, clipboard bytes, pending files and modes, JSONL products and temporary/lock trees, cross-reading in both directions, and fixed-size real-PTY terminal grids after each scripted key step. Generated timestamps, UUIDs, PIDs, and temporary roots are normalized only at comparison time; product files are not rewritten or weakened.
Green matrix: rust-lite-ci run 33346820571 — Linux checks, Windows Clippy, and parity on Ubuntu and macOS all passed.
Verification
Automated:
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test --all-targets— 59 passed (55 unit + 4 subprocess integration)cargo clippy --target x86_64-pc-windows-msvc --all-targets -- -D warningscargo check --target x86_64-apple-darwin --all-targetsbun test— original TypeScript suite unchanged, 58 passedbun run typecheckbash scripts/parity-lite.sh— summary abovegit diff --checkLive on macOS:
HERDR_SESSION=rust-lite-test bash scripts/smoke-rust-lite.sh— zero failuresannotateGitHub install was restored at commitba4903b, and the disposable session was stoppedNot live-tested:
Findings and deliberate divergence
The proof work found and fixed six observable differences: state-directory mode, direct-editor record key order, lossy handoff decoding, signal-time terminal restoration, forceful pending cleanup, and handoff removal failure propagation. Each fix is isolated in its own commit and mapped to a harness case in the call-path document.
The sole deliberate divergence is manager timestamp display on non-en-US hosts: Rust renders an en-US-style local timestamp, while TypeScript delegates to host
toLocaleString(). Persisted timestamps, ordering, and exports are identical. CI pins UTC/en-US and compares the literal timestamp cells; this locale difference is not hidden by normalization.The earlier reviewer findings for manager detail width and captured-record field order remain covered by exact cell/byte regression tests.