Skip to content

Fusion: list the files workers changed on the delegate result (ATO-1700, ATO-1701) - #1759

Closed
sosidudku1 wants to merge 3 commits into
mainfrom
fix/ato-1700-fusion-changed-files
Closed

sosidudku1 wants to merge 3 commits into
mainfrom
fix/ato-1700-fusion-changed-files

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Reported in Discord: after a Fusion turn the desktop shows no Changed files card, because the workers' own write results run in their sessions and never reach the chat stream.

What changed

  • WrittenFilesTracker also keeps the details.diffstat of each ok os.fs.write / os.fs.edit a worker makes, summed per path. The runner puts the list on the worker's row as diffstats.
  • Under isolation: "worktree", a task's paths are rebased from its workspace to the folder after the merge. Only files the merge wrote are kept; conflicts, refused inputs and discarded workspaces show nothing.
  • fusion.delegate sums every row into details.diffstats (one row per path).
  • The tool_result frame of an ok fusion.delegate carries diffstats: [{path, added, removed}], each row checked. The single diffstat of write/edit is unchanged.

The desktop side is a separate PR on rel/xp-build (ATO-1702).

Tests

  • worker-diffstats.test.ts: reading, summing (two workers on one file give one row), rebasing.
  • worker-files-written.test.ts: the tracker keeps only ok write/edit diffstats.
  • fusion-delegate.test.ts: two workers editing the same file end up as one summed row in details.diffstats.
  • branch-merge.test.ts: workspace paths become folder paths; a conflict and a failed task are left out.
  • stream-tool-result-frame.test.ts: the frame carries diffstats only for an ok fusion.delegate.

Also covered after review:

  • A split parent's row sums its children's files (task-tree.ts), and a task the judge sent back keeps the first attempt's files next to the retry's (fusion-delegate.ts). Tests in task-tree.test.ts and judge.test.ts.
  • The frame carries diffstats on an all-failed delegate too: in-place writes are still in the folder, and an unmerged workspace lists none.
  • Known limit: rows a resume carries over from the checkpoint have no file list (the checkpoint keeps none).

Verification

  • Reviewer: no blockers; three minor points fixed (error-status frame, resume comment, README).
  • Skeptic, round 1: two findings (split children, judge retry), both confirmed by a separate check and fixed. Round 2 on the fix commits: no findings.
  • Not run locally; CI runs the tests.

Not yet checked on the second Mac.

…1700, ATO-1701)

Each worker keeps the diffstat of its ok os.fs.write / os.fs.edit calls,
summed per path. A workspace worker's paths are rebased to the folder
after its merge, keeping only what the merge wrote. fusion.delegate sums
the rows into details.diffstats and the tool_result frame carries them
as diffstats, so the desktop's Changed files card can list them.
…1700)

A split parent's closed row now sums its children's diffstats, and a
task the judge sent back keeps the first attempt's files next to the
retry's: both stay changed in the folder.
…O-1701)

Every task failing its checks still leaves its in-place writes in the
folder, so the frame carries the list whatever the call's status. The
fusion README describes the new module and field.
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Merged into main via #1764 (all commits are in main). GitHub did not mark it merged because of the outage during the merge.

@sosidudku1 sosidudku1 closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant