beam-free's writes end with their own path, " path="…", so every file it writes is corrupted #327
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
Run 157 (Free),
openspec.propose, attempt 1: all 8 of itswritecalls, served bykilo/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.jsonfailed 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'scontent, or anedit'snewString, ending with" path="<the path being written>"(orfilePath=). 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.
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 writeapp.jsand.osf/fix.mdending 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.