Skip to content

0.14.0 — Deterministic Editing - #8

Merged
ooyeku merged 4 commits into
mainfrom
0.14.0
Jul 25, 2026
Merged

0.14.0 — Deterministic Editing#8
ooyeku merged 4 commits into
mainfrom
0.14.0

Conversation

@ooyeku

@ooyeku ooyeku commented Jul 24, 2026

Copy link
Copy Markdown
Owner

0.14.0 is the "Deterministic Editing" release: transactional macros, a plugin host that is now a standalone library with metered, observable calls, and a docs/dead-code polish pass.

Transactional macros (closes #7)

  • Record command streams off the message bus (q + register), replay with counts ([N] @ + register) — immune to the mode/timing skew of keystroke tapes.
  • Replay is all-or-nothing: the whole macro applies as one undo group, and a replay that errors mid-way rolls the buffer back to its pre-replay state.
  • Recording indicator in the status bar; failed replays surface the rolled-back step as a toast.
  • Macros live in per-session az registers; durable cross-restart storage arrives with the named-register work (Named registers ("a–"z) with a yank ring #3).

Plugin host: wick + fuel + observability

  • The wasm interpreter now lives in its own library, wick, extracted from this repo. The in-tree copy is deleted; the integration contract is wick's docs/stem-contract.md.
  • Every plugin call runs under an instruction budget (CALL_FUEL_BUDGET, 50M). A runaway plugin fails that one call with OutOfFuel — logged, counted, contained — instead of hanging the editor. Host calls cost one instruction, so slow subprocesses aren't penalized.
  • Per-plugin CallStats (calls, traps, last error, last/max fuel) surface in the plugin-manager dashboard (JSON + report) and the control center; plugin traps feed a new RuntimeAlerts counter, lighting the same check-engine light as dead letters and open circuits.

Polish

  • Docs refreshed for the wick switch, fuel/stats surfaces, and shipped macros (README, plugins.md, stem.md, architecture.md, roadmap.md).
  • Dead code removed: orphaned ui/help_view.zig, a leftover loader helper, an unused import.

Verification

  • Full suite green: 656/656 tests, fuzz targets included; zig fmt clean.
  • Real-editor smoke: all four bundled plugins load, activate, and dispatch on the wick runtime under fuel metering (driven end-to-end in a pty); runaway-plugin containment covered by a dedicated loader test.
  • Release flow: self-installing Unix tarballs land automatically on tag push (workflow already on main since v0.13.1).

ooyeku added 4 commits July 20, 2026 15:47
Macros record the command stream off the message bus rather than raw
keystrokes, so replay is immune to mode and timing skew. Replay applies
as a single undo group: a replay that errors mid-way rolls the buffer
back to its pre-replay state instead of leaving a half-applied edit.

- q + register starts recording, q stops; [N] @ + register replays
  with a count
- Macros live in per-session a-z registers; durable cross-restart
  storage lands with the named-register work (issue #3)
- Recording indicator in the status bar; replay failures surface as
  a toast with the rolled-back step
- Covered by record/replay round-trip and mid-replay rollback tests
The wasm interpreter now lives in its own library, wick
(github.com/ooyeku/wick), extracted from this repo. The in-tree copy
is deleted; the loader, plugin CLI, and fuzz targets import the
package. The integration contract is wick's docs/stem-contract.md.

Every plugin call now runs under an instruction budget
(CALL_FUEL_BUDGET, 50M): a runaway plugin fails that one call with
OutOfFuel — logged, counted, and contained — instead of hanging the
editor. Host calls cost one instruction, so slow subprocesses are not
penalized.

Containment is observable: the loader keeps per-plugin CallStats
(calls, traps, last error, last/max fuel per call), shown in the
plugin-manager dashboard JSON and report and in the control center
plugin section. Plugin traps feed a new RuntimeAlerts counter, so a
misbehaving plugin lights the same check-engine light as dead letters
and open circuits.
Docs catch up with the release:
- All references to the in-tree wasm interpreter now point at the
  wick package (plugins.md host-internals section rewritten with the
  fuel budget and CallStats; dead source link removed)
- wick added to the dependency lists in README and docs/stem.md
- Plugin dashboard docs describe the per-plugin call/trap/fuel stats;
  check-engine enumerations include plugin traps
- Roadmap 0.14.0 section reflects what shipped (wick + fuel +
  observability, transactional macros); architecture essay closing
  updated to match
- stem.md: project tree drops interpreter.zig, gains
  wasm_loader_fuzz.zig; select-mode row mentions macro keys

Dead code removed, verified unreferenced:
- src/ui/help_view.zig (orphan file; help.zig is the live help UI)
- WasmPlugin.readWasmStr and an unused wick import alias in
  plugin_cli.zig (extraction leftovers)
@ooyeku
ooyeku merged commit 6c32c6d into main Jul 25, 2026
11 checks passed
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.

Macros: transactional record/replay

1 participant