beam-free's writes end with their own path, " path="…", so every file it writes is corrupted #327

Closed
opened 2026-10-30 02:30:47 -04:00 by cmoriarty · 1 comment
Owner

What happens
Run 157 (Free), openspec.propose, attempt 1: all 8 of its write calls, served by kilo/reflection/beam-free, ended their file's content with the call's own path as an attribute, …" path="/var/lib/…/proposal.md. Every proposal file carried the tail. .osf/proposal.json failed to parse ("Extra data at line 12"), the step was retried, and the agent spent turns finding and cutting the tails by hand.

Fix
Braid's guards plugin cuts the tail before the file is written: a write's content, or an edit's newString, ending with " path="<the path being written>" (or filePath=). Only that exact path counts, so nothing a file means to say is cut. The plugin logs each cut.

Done when
A write whose content ends with its own path as an attribute leaves the file without it, and one whose content merely mentions a path is untouched. Tests cover both.

**What happens** Run 157 (Free), `openspec.propose`, attempt 1: all 8 of its `write` calls, served by `kilo/reflection/beam-free`, ended their file's content with the call's own path as an attribute, `…" path="/var/lib/…/proposal.md`. Every proposal file carried the tail. `.osf/proposal.json` failed to parse ("Extra data at line 12"), the step was retried, and the agent spent turns finding and cutting the tails by hand. **Fix** Braid's guards plugin cuts the tail before the file is written: a `write`'s `content`, or an `edit`'s `newString`, ending with `" path="<the path being written>"` (or `filePath=`). Only that exact path counts, so nothing a file means to say is cut. The plugin logs each cut. **Done when** A write whose content ends with its own path as an attribute leaves the file without it, and one whose content merely mentions a path is untouched. Tests cover both.
Author
Owner

Closed on the simulated run, by the operator's rule (production has to happen to hand beam-free a write it spills). The guard is live since de4c67e (PR #328). spilled-path (PR #332) has the implementer write app.js and .osf/fix.md ending with " path="<its own path>: the guards cut the tail and the run succeeds. With the cut switched off, the run fails and both files keep the tail.

**Closed on the simulated run, by the operator's rule** (production has to happen to hand beam-free a write it spills). The guard is live since de4c67e (PR #328). `spilled-path` (PR #332) has the implementer write `app.js` and `.osf/fix.md` ending with `" path="<its own path>`: the guards cut the tail and the run succeeds. With the cut switched off, the run fails and both files keep the tail.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#327
No description provided.