Skip to content

feat: make the native runtime the only lite runtime - #47

Merged
backnotprop merged 13 commits into
mainfrom
feat/rust-lite-only
Sep 10, 2026
Merged

feat: make the native runtime the only lite runtime#47
backnotprop merged 13 commits into
mainfrom
feat/rust-lite-only

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

The native Rust runtime becomes the only Lite runtime. Bun is no longer required anywhere in the plugin.

What changes for users

  • Nothing for existing installs; they stay pinned to their commit.
  • On install or reinstall, the build hooks download the pinned native Lite binary (herdr-annotate 0.1.0 from the rust-lite-v0.1.0 release, checksum verified) next to the TUI binary. Action ids, titles, contexts, pane ids, placements and sizes are unchanged, so keybindings and config need no edits. min_herdr_version stays 0.8.0. The annotation store format is unchanged.
  • plannotator/herdr-annotate/lite keeps working: lite/ is now the native variant, sharing the fetched binary through ../bin.
  • Plugin version 0.4.0.

What changes in the repo

  • Root manifest: the six Lite entries run ./bin/herdr-annotate.exe; two native fetch build entries (bash, PowerShell) join the TUI fetch. herdr-annotate.version sits beside plannotator-tui.version; the fetch scripts move to scripts/.
  • Deleted: src/, test/, package.json, the lockfile, tsconfig.json, lite-rs/.
  • Regression net: the parity harness became scripts/lite-regression.py, checking the native runtime against 55 golden files recorded from the Bun runtime before deletion, plus a Bun-written store fixture. 487 observables, 145 screens, zero failures, one known deliberate difference. Clipboard adapters are asserted through an explicit candidate table so one recording holds on macOS and Linux.
  • Smoke: scripts/smoke.sh expects both fetched binaries and reads the manager popup correctly; smoke-rust-lite.sh folded in. Windows CI gains test-fetch-herdr-annotate.ps1 (local override, idempotence, missing override, empty pin). Docs: README, docs/lite-testing.md, Windows acceptance checklist.

Verified

  • Gate: fmt, clippy, cargo test (80 + 4), lite regression, manifest checks, both fetch tests, native fetcher with a local override and with the real release download (sha matches SHA256SUMS).
  • Live in a disposable Herdr session on 0.8.2 with both binaries staged: seven actions with native commands; capture opened the editor, saved a record with full context; copy-context and copy-archive worked; manager and doc panes rendered; the lite/ variant linked from its own directory ran actions and the manager pane through ../bin.
  • Not verified before push: a GitHub install of this commit through the build hooks (the maintainer does that before merge), Linux goldens (CI), Windows (CI only).

refs #5

Turn the differential parity harness into a golden regression harness. The
recording is what the Bun runtime produced, so the native runtime keeps a
standing regression net once Bun is gone. The clipboard adapter chain moves out
of the recording into an explicit per-platform table, so one set of goldens
holds on macOS and Linux.
The version pin, both fetchers, and the local staging script move to the
repository root, so one staged bin/herdr-annotate.exe serves the Full plugin and
the Lite variant, the way one src/ tree served both Bun manifests.
The four annotation actions and the two popup panes start the native
herdr-annotate binary instead of Bun, and the manifest fetches it at build time
on macOS, Linux, and Windows. The plannotator-tui entries are untouched. The
Windows manifest check expects the two new build entries and requires the Lite
tools to stay ungated so they reach Windows.
plannotator/herdr-annotate/lite keeps working and now starts the same native
binary the Full plugin does, reached one directory up the way it used to reach
the shared TypeScript sources. The evaluation copy under lite-rs is gone. The
regression harness compares the two manifests directly: same header, same action
and pane declarations, and neither gates the annotation tools to a platform.
Delete src/, test/, package.json, bun.lock, and tsconfig.json. The recorded
goldens are what those sources produced, so the behavior they defined stays
checked. The regression harness now runs the native binary only, and the release
workflow reads the version pin from the repository root.

refs #5
A fresh Full install now fetches the native runtime as well as plannotator-tui,
and the Lite variant fetches the native runtime into the same shared bin/. The
smoke script checks both pins, the action programs each manifest declares, and
that the manage action opens a rendering manager pane on both installs. That
absorbs everything scripts/smoke-rust-lite.sh checked, so it is gone; link a
local build with scripts/stage-local.sh instead.
Mirror the plannotator-tui fetch tests for scripts/fetch-herdr-annotate: local
override, idempotent short-circuit, and the two fatal inputs, which are fatal
here because the annotation tools are the binary. Both run in windows-full-ci.
Bun is no longer a requirement: both installs download a checksummed binary. The
two parity documents mapped TypeScript call paths that no longer exist, so they
are replaced by a short account of how Lite is tested now, including what the
retirement cost. The Windows acceptance checklist drops Bun as a Lite
prerequisite.
A popup pane is not reported by `herdr pane list`, so the check could never find
the manager the manage action opens. Open it as an overlay with the same --cwd
the action passes, which is what resolves the relative program in either
manifest. Reading a missing version pin is quiet again: an old commit and the
Lite plugin root each carry only one of the two.
PowerShell parses $asset: inside a double-quoted string as a drive-qualified
variable, which made the whole script fail to parse on Windows.
Mirror the plannotator-tui fetcher, which passes the same Windows job: explicit
-LiteralPath, -Destination and -Value on every file operation and a string cast on
the stamp read, so the stamp is written and read the same way on Windows PowerShell.
Get-Content -Raw yields null for an empty file on Windows PowerShell; check for null
before casting, as fetch-plannotator-tui.ps1 does. The fetch test now includes the
fetcher output in its failure messages.
A successful manager copy closes the pane. The harness snapshotted the screen after
80 ms of quiet output, which on a slow runner could land before the terminal was
restored and differ from the blank golden. Exiting steps now wait for the process and
drain to EOF first.
@backnotprop
backnotprop merged commit 7c8f5a1 into main Sep 10, 2026
7 checks passed
@backnotprop
backnotprop deleted the feat/rust-lite-only branch September 10, 2026 05:57
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