Skip to content

fix(status): classify re-created cross-view files as Added, not invisible - #103

Closed
vinceblock99 wants to merge 2 commits into
devfrom
fix/status-cross-view-recreate
Closed

vinceblock99 wants to merge 2 commits into
devfrom
fix/status-cross-view-recreate

Conversation

@vinceblock99

@vinceblock99 vinceblock99 commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes a status bug with files that appear on multiple views.

If a file was first recorded on one view, then later re-created on another view, atomic status could skip it. That made record think there was nothing to save, even though the file existed on disk.

This PR treats that file as Added on the current view when it exists in the working copy.

Why

Managed runs and sandboxed workflows often work on different views. If two runs touch the same file path, the later run must still be recordable.

Without this fix, a real agent turn could end as a false EmptyTurn and lose the change from the current view.

Verified

Added a regression test with two orchestrator sessions on different views. The second session re-creates the same file path and now records it correctly.

…ible

The status tree scan skipped any file whose creating change is not
visible on the current view. Correct when the file is absent from the
working copy (another view's file must not show up here, e.g. as
Deleted) — but when the working copy HAS the file (re-created on this
view after a switch), skipping it opened a permanent gap: 'add' refuses
it because the global TREE already tracks it, while status called it
untracked-and-clean, so 'record' could never see it — every agent turn
that re-created such a file became a false EmptyTurn, forever.

Now a cross-view tree entry that exists on disk falls through with no
visible graph content and classifies as Added, exactly what the scan's
own comment prescribes for tree entries without a visible position.
The extra disk stat runs only for cross-view entries, which are rare.

Found doing real multi-session work in one repo (a file created by an
earlier session on another view, re-created by a later session).
Regression test drives two real orchestrator sessions end-to-end.
@leefaus

leefaus commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

i think this is a duplicate of the PR I opened yesterday.

@vinceblock99

Copy link
Copy Markdown
Contributor Author

i think this is a duplicate of the PR I opened yesterday.

Thanks! closing the PR

@vinceblock99
vinceblock99 deleted the fix/status-cross-view-recreate branch August 12, 2026 13:15
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.

2 participants