Skip to content

automation: demo-cleanups - #876

Merged
fizzy-pm[bot] merged 3 commits into
mainfrom
automation/demo-cleanups
Oct 27, 2026
Merged

fizzy-pm[bot] merged 3 commits into
mainfrom
automation/demo-cleanups

Conversation

@fizzy-macos

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

Copy link
Copy Markdown
Contributor

Part of fizzyedit/work#444

Goal

Fix the demo arrangement leaks reported by PR #876's soak verdict (Part of fizzyedit/work#444).

What changed and why

Finish allocating saved regions, the seed tree, and document panes before copying the arena into the returned Arrangement. ArenaAllocator stores its buffer-list head by value: copying it before these allocations can leave the owner with a stale head, leaking subsequent buffers at scene/snapshot/demo cleanup. Existing destruction paths can now free the complete arena. The arrangement refactor, tape format cleanup, and fresh skip waits remain intact.

How it was verified

Formatting, lint, native build, web build, SDK fingerprint, and test-discovery checks pass. Unit and integration gates ran; their failures are socket-dependent sandbox restrictions, named in GATES.md. Existing demo integration tests pass. The regression scenario is tests/tapes/soak.zon with tests/tapes/soak.expect.zon; both local launch attempts stop at PermissionDenied while binding the single-instance Unix socket, before playback. A leak-free verdict could not be verified locally.

Not done / follow-ups

The harness must run the soak verdict and full gates outside the socket-restricted sandbox, commit/push the working tree, and post the requested FIXES marker at the resulting head. No publishing or git metadata writes were performed here. See GATES.md for exact results.

Changes (59 files, +498/-1337)
 .github/workflows/ci.yml                           |  35 +--
 .github/workflows/hello-numbers.yml                |  13 +-
 CONTRIBUTING.md                                    |   4 +-
 app/App.zig                                        |   4 +-
 app/Recents.zig                                    |   4 +-
 app/Tracks.zig                                     |  67 +-----
 app/automation/overlay.zig                         |  54 +----
 app/control/Server.zig                             |  73 +++---
 app/layout/Picker.zig                              |   2 +-
 app/layout/Region.zig                              |  27 +--
 app/layout/SplitTree.zig                           |  28 +--
 app/layout/State.zig                               |   2 +-
 app/layout/ViewDrag.zig                            |  19 +-
 app/store/PluginLoader.zig                         |  44 ++--
 app/store/PluginStore.zig                          |   2 +-
 app/update/update_notify.zig                       |  24 +-
 backend/src/glass/BlurBackdrop.zig                 |   8 +-
 backend/src/glass/LiquidField.zig                  |  12 -
 core/FileTable.zig                                 |   5 +-
 core/LocalFs.zig                                   |  17 +-
 core/dialogs.zig                                   |   8 +-
 core/form_factor.zig                               |  26 +-
 docs/AGENT_WORK.md                                 |  11 -
 docs/AUTOMATION.md                                 |   1 -
 docs/DEPENDENCIES.md                               |   3 -
 docs/HELLO_NUMBERS.md                              |  23 +-
 docs/REVIEW.md                                     |  19 +-
 plugins/text/src/textcore/encoding.zig             |  11 +-
 readme.md                                          |  27 ++-
 scripts/agent-finish                               |  11 +-
 scripts/compare-hello.sh                           |   5 +
 scripts/hello-numbers.py                           |  21 +-
 scripts/hello-numbers.sh                           |   4 +
 scripts/test-agent-work.sh                         |  12 -
 scripts/test-hello-numbers.py                      |   4 +-
 scripts/test-web-text-input.sh                     |  13 -
 sdk/replay/BlackBox.zig                            |  30 +--
 sdk/replay/Capture.zig                             |  11 +-
 sdk/replay/Input.zig                               |   9 +-
 sdk/replay/LiveDriver.zig                          |  26 +-
 sdk/replay/Player.zig                              |  69 ++----
 sdk/replay/Snapshot.zig                            |  69 +-----
 sdk/replay/Stage.zig                               |   6 +-
 sdk/replay/overlay.zig                             |  29 +--
 sdk/tape/Script.zig                                |  13 +-
 sdk/tape/Tape.zig                                  |  14 --
 sdk/tape/binary.zig                                |  15 +-
 src/Entry.zig                                      |   7 +-
 src/backend/layout_file.zig                        |   3 -
 src/editor/Demo.zig                                | 200 +++++++++-------
 src/editor/Editor.zig                              |  11 +-
 src/editor/PluginReloads.zig                       |   9 +-
 src/editor/explorer/settings.zig                   | 100 ++++++--
 tests/demos.zig                                    |  14 +-
 tests/integration.zig                              | 161 +++----------
 tests/tapes/soak.zon                               |   2 -
 web/fizzy.js                                       |  21 +-
 ...oard-s-correction-replaces-the-typed-word.patch | 266 ---------------------
 web/tests/text-input.test.js                       | 107 ---------
 59 files changed, 498 insertions(+), 1337 deletions(-)
Gates: 6 of 6 passed

scripts/check-fmt.sh (exit 0)

check-fmt: listing tracked files
check-fmt: checking 535 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 12ms MaxRSS:38M
|     +- 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 12ms MaxRSS:33M
|     +- 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 12ms 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)


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

... (earlier output omitted)
      +- WriteFile freetype cached
      +- compile lib freetype debug native cached 13ms MaxRSS:37M
      +- WriteFile . cached
      +- compile lib tree-sitter debug native cached 9ms MaxRSS:36M
      +- 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 5ms MaxRSS:37M
      |     +- options cached
      |     +- options cached
      |     +- options cached
      |     +- run exe generate-def (aarch64.zig) cached
      |     |  +- compile exe generate-def debug native cached 4ms MaxRSS:37M
      |     +- 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 15ms MaxRSS:37M
|     +- 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 15ms MaxRSS:34M
|     +- 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 15ms MaxRSS:37M
|     +- 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:37M
      +- 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:33M
+- compile obj rehome-fixture-web debug wasm32-freestanding cached 6ms MaxRSS:34M
   +- 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 10ms MaxRSS:32M
   +- 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:37M
   |     +- options cached
   |     +- options cached
   |     +- options cached
   |     +- run exe generate-def (aarch64.zig) cached
   |     |  +- compile exe generate-def debug native cached 6ms MaxRSS:35M
   |     +- 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


Demo.zig holds a window's arrangement in its own struct instead of a
placeholder Snapshot; the unread Keyframe.layout leaves the tape (its
binary slot is padding, version unchanged); skipIfShown and skipIfGone
wait for idle first so the skip reads a fresh frame.

Part of fizzyedit/work#304

Agent-Team: macos
Worker: claude
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@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: automation: demo-cleanups
Issue #304: automation: demo cleanups left from PR #831 (arrangement struct, dead Keyframe.layout, skip tags)
Done when (from the issue): draft PR; the three items done or each declined with a reason in the body; tests pass; then stop.

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

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 (242)
  • 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.

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: Done: approved
Next: Waiting for the merge queue

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: 250 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 (6 answered)
  • Clean reviews at this commit from 2 different kinds: linux/agy, linux/codex (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 PM's final okay (pm-approval)

Rules that apply: touches the SDK or plugin ABI: the shape fingerprint must be recorded.

Reviews at the current commit (945df6e):

Reviewer Verdict Findings
linux/agy clean none
linux/codex clean none

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

Latest fixes comment: https://github.com/fizzyedit/work/issues/401#issuecomment-6436923036 (6 findings answered)

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

Agent-Team: linux

Worker: codex
@fizzy-windows fizzy-windows Bot added the reviewing:windows-codex a windows/codex 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-windows fizzy-windows Bot removed the reviewing:windows-codex a windows/codex review is running label Oct 27, 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 and removed reviewing:linux-codex a linux/codex review is running reviewing:linux-agy a linux/agy review is running labels Oct 27, 2026
Skip tests put an action before the skip so they fail without the wait;
expectEqual for the wait; restoreExplorer takes *const Arrangement; take
documents its arena; freeSaved reuses its gpa.

Agent-Team: macos
Worker: claude
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fizzy-linux fizzy-linux Bot added reviewing:linux-codex a linux/codex review is running reviewing:linux-agy a linux/agy review is running and removed reviewing:linux-codex a linux/codex review is running reviewing:linux-agy a linux/agy review is running labels Oct 27, 2026
@fizzy-pm
fizzy-pm Bot marked this pull request as ready for review October 27, 2026 08:49
@fizzy-pm
fizzy-pm Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 3b3d42e Oct 27, 2026
25 checks passed
@fizzy-pm
fizzy-pm Bot deleted the automation/demo-cleanups branch October 27, 2026 09:33
This was referenced Oct 27, 2026
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.

0 participants