Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(regression): exclude desktop build output from source sync (#2186)

Call Whitefb0ce86e7457
diff --git a/docs/regression/README.md b/docs/regression/README.md
index 0aad89ee9..1d3f3a9bf 100644
--- a/docs/regression/README.md
+++ b/docs/regression/README.md
@@ -134,6 +134,7 @@ remain outside this cleanup boundary.
The same sender-only policy covers `.DS_Store` at any depth and these
repository-root host artifacts: `.bot.pid`, `.gstack/`, `.tmp/`,
+`desktop/target` (including a symlink to an external build directory),
`vibe/_version.py`, and `vibe/show_runtime_manifest.json`. Their stale copies
are removed only from the disposable synced source, never from the operator's
checkout or persistent product home.
diff --git a/scripts/incus_regression.py b/scripts/incus_regression.py
index bba974d9f..02da430ba 100644
--- a/scripts/incus_regression.py
+++ b/scripts/incus_regression.py
@@ -1645,6 +1645,7 @@ def source_hides() -> tuple[str, ...]:
"/.bot.pid",
"/.gstack",
"/.tmp",
+ "/desktop/target",
"/vibe/_version.py",
"/vibe/show_runtime_manifest.json",
)
diff --git a/tests/test_incus_regression.py b/tests/test_incus_regression.py
index 94cb846c8..f298ee7b5 100644
--- a/tests/test_incus_regression.py
+++ b/tests/test_incus_regression.py
@@ -1108,6 +1108,7 @@ def test_source_sync_keeps_uncommitted_inputs_and_nested_artifact_fixtures(tmp_p
"draft.py", "新目录/未提交.py",
"fixtures/vibe/_version.py", "fixtures/vibe/show_runtime_manifest.json",
"fixtures/.bot.pid", "fixtures/.gstack/example", "fixtures/.tmp/example",
+ "fixtures/desktop/target/example", "desktop/src/main.rs",
]
(source / ".gitignore").write_text("draft.py\n")
for relative in inputs:
@@ -1121,6 +1122,41 @@ def test_source_sync_keeps_uncommitted_inputs_and_nested_artifact_fixtures(tmp_p
assert all((deployed / relative).read_text() == "source fixture" for relative in inputs)
[email protected]("shape", ["directory", "symlink", "dangling-symlink"])
+def test_source_sync_omits_desktop_builds_and_removes_stale_copies(tmp_path, monkeypatch, shape):
+ """Build output is host-only, including links to external or missing trees."""
+ source, deployed, outside = (tmp_path / name for name in ("source", "deployed", "outside"))
+ for root in (source, deployed, outside):
+ root.mkdir()
+ sentinel = outside / "artifact"
+ sentinel.write_text("external build output")
+ host = source / "desktop/target"
+ receiver = deployed / "desktop/target"
+ for entry in (host, receiver):
+ entry.parent.mkdir()
+ if shape == "directory":
+ entry.mkdir()
+ (entry / "artifact").write_text("local build output")
+ else:
+ entry.symlink_to(outside if shape == "symlink" else outside / "missing", target_is_directory=True)
+ host_before = host.lstat()
+ sentinel_before = sentinel.stat()
+
+ local_source_sync(monkeypatch, source, deployed)
+
+ assert not os.path.lexists(receiver)
+ assert incus_regression.should_exclude("desktop/target")
+ assert incus_regression.should_exclude("desktop/target/debug/artifact")
+ assert host.lstat().st_ino == host_before.st_ino
+ assert host.lstat().st_ctime_ns == host_before.st_ctime_ns
+ if shape == "directory":
+ assert (host / "artifact").read_text() == "local build output"
+ else:
+ assert host.readlink() == (outside if shape == "symlink" else outside / "missing")
+ assert sentinel.read_text() == "external build output"
+ assert sentinel.stat().st_ctime_ns == sentinel_before.st_ctime_ns
+
+
def test_source_sync_leaves_only_empty_parents_of_excluded_caches(tmp_path, monkeypatch):
source, deployed = (tmp_path / name for name in ("source", "deployed"))
source.mkdir()