* fix(daemon): let a worktree turn repair a delivery it moved off its branch (MUL-8139)
Worktree-mode turns now get told which branch and starting commit their
delivery must stay on. When a turn still ends with its work squashed past
the baseline or committed off the task branch, the daemon runs one repair
turn asking the agent to put the work back before Finalize decides.
The MUL-6881 delivery guard is unchanged; resets past the baseline and
repairs that would revert the baseline's content are never offered.
Refs #9404
Co-authored-by: multica-agent <[email protected]>
* fix(daemon): refuse repairs that would revert baseline edits; no supplements in repair turn (MUL-8139)
Review follow-up on the worktree delivery self-repair:
- repairWouldRevertBase now proves at the content level that the agent's
files already carry every change the baseline made relative to its merge
base with tip (equal content, or a clean three-way merge that leaves the
agent's file unchanged). A path-level "both sides touched it" check let a
repair silently revert a user's edit in a file the agent also changed.
Deletions, non-regular or binary files, conflicts and git errors refuse.
- The repair turn no longer accepts additional messages: its reply is
discarded, so an accepted message would be acked as delivered and its
answer lost. Unclaimed, it settles as turn_ended and the receipt says so.
Co-authored-by: multica-agent <[email protected]>
* fix(daemon): keep file modes in the worktree repair preservation check (MUL-8139)
repairWouldRevertBase compared only text, so a user's chmod +x recorded in
the baseline was lost when the agent worked from an older checkout: the
repair re-committed run.sh as 100644. The agent's side is now read from the
tree `git add -A` would stage (built in a private copy of the worktree
index), which is exactly what RepairSteps commits, and every path the
baseline changed must keep the baseline's mode. A mismatch, or an index that
cannot be copied, refuses the repair.
Co-authored-by: multica-agent <[email protected]>
---------
Co-authored-by: multica-eve <[email protected]>
Co-authored-by: multica-agent <[email protected]>