Repository navigation
automation: demo-cleanups - #876
Conversation
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>
PM note: how this PR will be handledWhat it is for: automation: demo-cleanups Rules that apply: touches the SDK or plugin ABI: the shape fingerprint must be recorded. Things to watch (checked by rule):
What happens next:
A living status comment below is kept current. Nothing here is a merge decision. |
Where this PR standsStage: Done: approved What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):
Rules that apply: touches the SDK or plugin ABI: the shape fingerprint must be recorded. Reviews at the current commit (
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
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>
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)
Gates: 6 of 6 passed
scripts/check-fmt.sh(exit 0)scripts/zb build --summary all(exit 0)scripts/zb build test --summary all(exit 0)scripts/zb build test-integration --summary all(exit 0)scripts/zb build check-web --summary all(exit 0)scripts/zb build test-sdk-version --summary all(exit 0)