Skip to content

sdk: tape-replay-plugins - #880

Merged
fizzy-pm[bot] merged 4 commits into
mainfrom
sdk/tape-replay-plugins
Oct 27, 2026
Merged

fizzy-pm[bot] merged 4 commits into
mainfrom
sdk/tape-replay-plugins

Conversation

@fizzy-linux

@fizzy-linux fizzy-linux Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of fizzyedit/work#423
Rework: work#490

Goal

Store (dylib) plugins can import tape and replay, proven by a fixture plugin built bundled and as a dylib.

What changed and why

Round-2 fixes: the tape_fixture dependency is lazy and its use is guarded by cfg.app_is_fizzy (lazyDependency + lazyImport), so an app fetching fizzy as a tarball, which lacks tests/, still resolves. Merged origin/main (one conflict in scripts/check-examples.sh) and re-recorded the fingerprint.

How it was verified

check-fmt ok; build 84/84; test 183/183; test-integration 97/97 (includes fizzy-tape-plugin-bundled-tests); check-web 44/44; test-sdk-version 35/35. scripts/check-examples.sh passes with the tape-plugin dylib fixture, app-only, the build-API fixture app (fizzy fetched as a tarball) and the example-plugin and minimal example-app builds.

Not done / follow-ups

Other example-app shapes (studio, endless, replay, dvui) were not built here.

Changes (13 files, +238/-1)
 build.zig.zon                             |  5 +++
 build/app.zig                             | 33 ++++++++++++++
 build/sdk.zig                             |  3 ++
 scripts/check-examples.sh                 |  5 +++
 sdk/AGENTS.md                             |  4 ++
 sdk/plugin_sdk.zig                        | 10 +++++
 sdk/src/dylib.zig                         | 34 ++++++++++++++
 sdk/src/version.zig                       |  2 +-
 tests/fixtures/tape-plugin/build.zig      | 21 +++++++++
 tests/fixtures/tape-plugin/build.zig.zon  | 18 ++++++++
 tests/fixtures/tape-plugin/play.zig       | 74 +++++++++++++++++++++++++++++++
 tests/fixtures/tape-plugin/plugin.zig     | 22 +++++++++
 tests/fixtures/tape-plugin/plugin.zig.zon |  8 ++++
 13 files changed, 238 insertions(+), 1 deletion(-)
Gates: 6 of 6 passed

scripts/check-fmt.sh (exit 0)

check-fmt: listing tracked files
check-fmt: checking 551 files

scripts/zb build --summary all (exit 0)

... (earlier output omitted)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- options (reused)
|     +- translate-c dvui-c cached
|     |  +- compile exe translate-c debug native (+21 more reused dependencies)
|     +- options cached
|     +- options cached
+- install text cached
|  +- compile lib text debug native cached 13ms MaxRSS:37M
|     +- WriteFile plugin_root.zig cached
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- install markdown cached
|  +- compile lib markdown debug native cached 13ms MaxRSS:39M
|     +- WriteFile plugin_root.zig cached
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- options (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
|     +- translate-c (reused)
+- install image cached
   +- compile lib image debug native cached 13ms MaxRSS:39M
      +- WriteFile plugin_root.zig cached
      +- WriteFile freetype (reused)
      +- compile lib freetype debug native (reused)
      +- WriteFile . (reused)
      +- compile lib tree-sitter debug native (reused)
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- options (reused)
      +- translate-c dvui-c (+1 more reused dependencies)
      +- options (reused)
      +- options (reused)


scripts/zb build test --summary all (exit 0)

... (earlier output omitted)
      +- WriteFile freetype cached
      +- compile lib freetype debug native cached 11ms MaxRSS:39M
      +- WriteFile . cached
      +- compile lib tree-sitter debug native cached 11ms MaxRSS:38M
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- translate-c dvui-c cached
      |  +- compile exe translate-c debug native cached 7ms MaxRSS:40M
      |     +- options cached
      |     +- options cached
      |     +- options cached
      |     +- run exe generate-def (aarch64.zig) cached
      |     |  +- compile exe generate-def debug native cached 5ms MaxRSS:39M
      |     +- run exe generate-def (amdgcn.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (arm.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (bpf.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (common.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (hexagon.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (loongarch.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (mips.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (neon.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (nvptx.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (powerpc.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (riscv.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (s390x.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (ve.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (wasm.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (x86_64.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (x86.zig) cached
      |     |  +- compile exe generate-def debug native (reused)
      |     +- run exe generate-def (xcore.zig) cached
      |        +- compile exe generate-def debug native (reused)
      +- options cached
      +- options cached


scripts/zb build test-integration --summary all (exit 0)

... (earlier output omitted)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-glass-tests cached
|  +- compile test fizzy-glass-tests debug native cached 13ms MaxRSS:39M
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-plugin-loader-tests cached
|  +- compile test fizzy-plugin-loader-tests debug native cached 14ms MaxRSS:39M
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-text-plugin-tests cached
|  +- compile test fizzy-text-plugin-tests debug native cached 13ms MaxRSS:40M
|     +- options (reused)
|     +- WriteFile freetype (reused)
|     +- compile lib freetype debug native (reused)
|     +- WriteFile . (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- compile lib freetype debug native (reused)
|     +- compile lib tree-sitter debug native (reused)
|     +- translate-c dvui-c (+1 more reused dependencies)
|     +- options (reused)
|     +- options (reused)
+- run test fizzy-workbench-plugin-tests cached
   +- compile test fizzy-workbench-plugin-tests debug native cached 14ms MaxRSS:39M
      +- options (reused)
      +- options (reused)
      +- WriteFile freetype (reused)
      +- compile lib freetype debug native (reused)
      +- WriteFile . (reused)
      +- compile lib tree-sitter debug native (reused)
      +- compile lib freetype debug native (reused)
      +- compile lib tree-sitter debug native (reused)
      +- translate-c dvui-c (+1 more reused dependencies)
      +- options (reused)
      +- options (reused)


scripts/zb build check-web --summary all (exit 0)

... (earlier output omitted)
|  |     +- run exe generate-def (amdgcn.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (arm.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (bpf.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (common.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (hexagon.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (loongarch.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (mips.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (neon.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (nvptx.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (powerpc.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (riscv.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (s390x.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (ve.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (wasm.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (x86_64.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (x86.zig) cached
|  |     |  +- compile exe generate-def debug native (reused)
|  |     +- run exe generate-def (xcore.zig) cached
|  |        +- compile exe generate-def debug native (reused)
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- options cached
|  +- translate-c cached 3ms MaxRSS:37M
+- compile obj rehome-fixture-web debug wasm32-freestanding cached 6ms MaxRSS:37M
   +- translate-c dvui-c (+1 more reused dependencies)
   +- options (reused)
   +- options (reused)


scripts/zb build test-sdk-version --summary all (exit 0)

... (earlier output omitted)
   +- WriteFile . cached
   +- compile lib tree-sitter debug native cached 9ms MaxRSS:39M
   +- compile lib freetype debug native (reused)
   +- compile lib tree-sitter debug native (reused)
   +- options cached
   +- options cached
   +- translate-c dvui-c cached
   |  +- compile exe translate-c debug native cached 5ms MaxRSS:40M
   |     +- options cached
   |     +- options cached
   |     +- options cached
   |     +- run exe generate-def (aarch64.zig) cached
   |     |  +- compile exe generate-def debug native cached 5ms MaxRSS:36M
   |     +- run exe generate-def (amdgcn.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (arm.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (bpf.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (common.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (hexagon.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (loongarch.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (mips.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (neon.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (nvptx.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (powerpc.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (riscv.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (s390x.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (ve.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (wasm.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (x86_64.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (x86.zig) cached
   |     |  +- compile exe generate-def debug native (reused)
   |     +- run exe generate-def (xcore.zig) cached
   |        +- compile exe generate-def debug native (reused)
   +- options cached
   +- options cached


A plugin loaded from the store imports `tape` and `replay` as a bundled one
does (plugin.create's modules, the instances core was built with). The shape
fingerprint now folds `tape.binary.version` and hashes the tape data types and
replay's Stage, so a change to a tape's format moves it; recorded.

tests/fixtures/tape-plugin writes, encodes, loads and plays a tape: tested
linked into the app (test-integration) and as a dylib (its own build, run by
scripts/check-examples.sh).

Agent-Team: linux
Worker: claude
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fizzy-linux fizzy-linux Bot added the sdk Moves the plugin boundary's fingerprint; ships at the next SDK release label Oct 26, 2026
@fizzy-pm

fizzy-pm Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

PM note: how this PR will be handled

What it is for: sdk: tape-replay-plugins
Issue #331: sdk: store (dylib) plugins get tape and replay too
Done when (from the issue): a test plugin that imports tape and replay builds bundled and as a dylib and plays a tape both ways; the fingerprint check passes; one PR.

Rules that apply: touches the SDK or plugin ABI: the shape fingerprint must be recorded; touches build scripts; changes agent rules or guides.
Reviews needed: 2, from two different kinds.
Needs the maintainer's explicit yes before merge: yes

Things to watch (checked by rule):

  • the body names its work issue (Part of fizzyedit/work#N)
  • size within 800 lines outside tests and docs (67)
  • a gates section with what was run
  • the body says whether the SDK shape fingerprint moved

What happens next:

  1. Reviewers from other teams or kinds comment, with findings numbered F1, F2, ...
  2. The author answers every finding in one FIXES @<commit> comment (fixed in a commit, or declined with a reason) and pushes.
  3. Reviewers re-review the new commit on their own.
  4. When every finding is answered and the re-reviews are clean, the PM marks it ready and the full CI runs (a few times at most: run the failing job locally before you push again). Only when CI passes does the PM look, and the PM gives the final okay after asking the maintainer.

A living status comment below is kept current. Nothing here is a merge decision.

@fizzy-pm

fizzy-pm Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Where this PR stands

Stage: Waiting for the maintainer
Next: Maintainer should say yes or no when the PM asks

What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):

  • The body names its basis (Part of fizzyedit/work#N or a plan step)
  • Within the size limit: 92 of 800 lines outside tests and docs
  • The body shows which gates the author ran
  • The body says whether the SDK shape fingerprint moved
  • No open findings at this commit
  • Every earlier finding was answered in a FIXES comment (0 answered)
  • Clean reviews at this commit from 2 different kinds: linux/codex, macos/claude (has 2)
  • Marked ready, which starts the full CI (the PM does this the moment the items above are met)
  • The full CI passes at this commit (CI is green)
  • The maintainer's explicit yes (rules)
  • The PM's final okay (pm-approval)

Rules that apply: touches the SDK or plugin ABI: the shape fingerprint must be recorded; touches build scripts; changes agent rules or guides.

Reviews at the current commit (0f3c206):

Reviewer Verdict Findings
linux/codex clean none
macos/claude clean none

7 earlier reviews are for older commits and will be redone.

Latest fixes comment: https://github.com/fizzyedit/work/issues/409#issuecomment-6447425703 (0 findings answered)

Updated 2026-10-27 18:24 UTC by the PM. This comment is edited in place.

@fizzy-windows fizzy-windows Bot added reviewing:windows-codex a windows/codex review is running reviewing:windows-agy a windows/agy review is running and removed reviewing:windows-codex a windows/codex review is running reviewing:windows-agy a windows/agy review is running labels Oct 26, 2026
@fizzy-linux fizzy-linux Bot added reviewing:linux-codex a linux/codex review is running reviewing:linux-agy a linux/agy review is running labels Oct 26, 2026
@fizzy-macos fizzy-macos Bot added reviewing:macos-agy a macos/agy review is running and removed reviewing:macos-agy a macos/agy review is running labels Oct 26, 2026
@fizzy-linux fizzy-linux Bot removed reviewing:linux-codex a linux/codex review is running reviewing:linux-agy a linux/agy review is running labels Oct 26, 2026
Hash Tape.Check, the Sequencer sink types and replay.Player in the
boundary fingerprint, build the bundled fixture through its own
staticModule and rehome, and scope Script's errdefer so a failure after
finish cannot free the arena twice.

Agent-Team: linux
Worker: claude
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fizzy-linux fizzy-linux Bot added the reviewing:linux-codex a linux/codex review is running label Oct 27, 2026
@fizzy-windows fizzy-windows Bot added the reviewing:windows-agy a windows/agy review is running label Oct 27, 2026
@fizzy-linux fizzy-linux Bot removed the reviewing:linux-codex a linux/codex review is running label Oct 27, 2026
@fizzy-windows fizzy-windows Bot removed the reviewing:windows-agy a windows/agy review is running label Oct 27, 2026
@fizzy-macos fizzy-macos Bot added reviewing:macos-claude a macos/claude review is running and removed reviewing:macos-claude a macos/claude review is running labels Oct 27, 2026
@fizzy-windows fizzy-windows Bot removed the reviewing:windows-claude a windows/claude review is running label Oct 27, 2026
@fizzy-pm fizzy-pm Bot added the pm:fixes author fixes the must-fix items label Oct 27, 2026
Merge origin/main (conflict in scripts/check-examples.sh: kept main's
builds-optional structure and the tape-plugin dylib step). The tape_fixture
path dependency is now lazy and used only in fizzy's own build, since
tests/ is not in the root .paths and an app fetching fizzy lacks it.
Re-recorded the SDK shape fingerprint for the merged boundary.

Agent-Team: linux
Worker: claude
@fizzy-macos fizzy-macos Bot added the reviewing:macos-agy a macos/agy review is running label Oct 27, 2026
@fizzy-linux fizzy-linux Bot added reviewing:linux-agy a linux/agy review is running and removed reviewing:linux-agy a linux/agy review is running labels Oct 27, 2026
@fizzy-macos fizzy-macos Bot removed the reviewing:macos-agy a macos/agy review is running label Oct 27, 2026
@fizzy-linux fizzy-linux Bot added reviewing:linux-codex a linux/codex review is running and removed reviewing:linux-codex a linux/codex review is running labels Oct 27, 2026
@fizzy-macos fizzy-macos Bot added reviewing:macos-claude a macos/claude review is running and removed reviewing:macos-claude a macos/claude review is running labels Oct 27, 2026
@fizzy-pm
fizzy-pm Bot marked this pull request as ready for review October 27, 2026 15:42
@fizzy-pm fizzy-pm Bot added pm:fixes author fixes the must-fix items and removed pm:fixes author fixes the must-fix items labels Oct 27, 2026
Agent-Team: linux
Worker: claude

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fizzy-pm fizzy-pm Bot added pm:verify the same reviewer verifies the fixes and removed pm:fixes author fixes the must-fix items labels Oct 27, 2026
@fizzy-macos fizzy-macos Bot added reviewing:macos-claude a macos/claude review is running and removed reviewing:macos-claude a macos/claude review is running labels Oct 27, 2026
@fizzy-linux fizzy-linux Bot added reviewing:linux-codex a linux/codex review is running and removed reviewing:linux-codex a linux/codex review is running labels Oct 27, 2026
@fizzy-pm fizzy-pm Bot removed the pm:verify the same reviewer verifies the fixes label Oct 27, 2026
@fizzy-pm
fizzy-pm Bot added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@fizzy-pm
fizzy-pm Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 07ad835 Oct 27, 2026
19 checks passed
@fizzy-pm
fizzy-pm Bot deleted the sdk/tape-replay-plugins branch October 27, 2026 18:57
@fizzy-linux fizzy-linux Bot mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk Moves the plugin boundary's fingerprint; ships at the next SDK release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants