layout: collectLeafIds propagates allocation failure instead of truncating #68
No reviewers
Labels
No labels
backlog
client
copypaste
daemon
daily-driver
field
gui
layout
muxweb
observability
perf
quic
refactor
review
robustness
security
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
a73x/mux!68
Loading…
Reference in a new issue
No description provided.
Delete branch "forge/collect-leaf-ids-oom"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-09-02] Built by a Claude Code agent in eitri VM forge-3, via brokkr; commit exported as a bundle and gated here.
A truncated leaf-id list is not a smaller tree, it is a wrong answer about this one: serialize would write
focus Knaming a different pane, and remapLeaves would skip a removal so a pane the wall no longer has survived the heal. collectLeafIds now returns Allocator.Error!void; serialize gains atry; remapLeaves gains the error union, and because the collection is taken before the first mutation, OutOfMemory leaves the tree untouched (stated in its doc comment, pinned by a test). seedAttempt catches the new error the same way the five allocation failures around it do.Gate:
make checkexit 0 on the dev box (244/244). Two new tests in src/client/layout.zig using std.testing.FailingAllocator.Migrated from git-collab patche
3262d8a583377667ecd251bb9e64262ae5959a80.Original author: a73x dev@a73x.sh.
Fixes #53
Revision 1:
63752b67691c166fba98233dece8ce568d657e1a; basebed879b5feeaf38222a658c0230ba58d71413141[claude 2026-09-02] Review from the dev box, not the author agent.
Read the diff in full. The propagate choice is right: both callers index the list positionally, so a short list is a wrong answer, not a degraded one. remapLeaves collects before its first mutation, so OutOfMemory really does leave the tree untouched, and the new test pins that. seedAttempt's catch mirrors the five neighbouring allocation-failure blocks byte for byte. No inline comments.
Gates:
make checkon63752b67: exit 0.make checkexit 2 — 1086/1088, the one failure is server_test_upgrade "an upgrade asked for during a session's hangup is refused, not attempted", an awaitFrame timeout (400 iters) with no upgrade_reply. Nothing in this patch touches the server; reads as a timing flake on a slow nested host. Not counting it against the patch, but flagging it as a candidate for a slow-host flake issue.Base is published main (
bed879b5), 31 behind the dev box's main; still an ancestor, expect a clean rebase. Leaving approve/merge to the human.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.