Skip to content

fix(config-sync): isolate global capabilities in sync tests - #842

Merged
vastsa merged 4 commits into
vastsa:mainfrom
yuxino:fix/config-sync-test-isolation
Sep 22, 2026
Merged

vastsa merged 4 commits into
vastsa:mainfrom
yuxino:fix/config-sync-test-isolation

Conversation

@yuxino

@yuxino yuxino commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

The configuration-sync tests can capture global skills from the developer's real ~/.agents directory despite using temporary databases. A local skill resource larger than 128 KiB makes the tests fail with SKILL_LIMIT_EXCEEDED. Setting PI_DESKTOP_AGENTS_DIR for the whole suite is insufficient because parallel tests temporarily replace and remove it.

Run both the two-device sync scenario and the newly added append-only compatibility scenario in exact-filtered child test processes, each with its own temporary agents directory. Both use the same test-only runner. Existing sync assertions and production size limits remain unchanged.

Validation: reproduced the missing isolation in the append-only scenario after incorporating current main, then ran the full Host suite successfully (623 tests), cargo fmt --check, and Clippy. The five engine scenarios also passed on the committed candidate. Clippy retains the existing user_skills.rs useless-format warning.

Candidate
  • Head: a4a0a68c64df
  • Base: 3a45d01ae4ba
  • Environment: macOS arm64, reused host Cargo cache
  • Both sync scenarios exercise the real Host capture/merge/apply code through local HTTP WebDAV test servers.
  • The initial sandbox run could not bind local fixture ports; those environment failures were rerun successfully with local networking allowed.

Recorded terminal test evidence

pr-842-terminal.mp4

This is a recording of actual PTY output, rendered with asciinema agg and encoded as video, not a native Terminal window capture or a product UI demonstration. The raw timestamped asciicast v2 recording is attached as .txt for inspection. Playback is uniformly 1.5× speed; the final result has an added reading hold. No test output was rewritten.

The same synthetic temporary agents directory (one 131073-byte skill resource) is supplied to four actual test executions against local HTTP WebDAV fixtures. On upstream 3a45d01ae4ba, both the two-device and append-only scenarios fail with SKILL_LIMIT_EXCEEDED / exit 101. On candidate a4a0a68c64df, both pass / exit 0 because their child processes isolate the global capability root. No real user skills, secrets, or production endpoints are used. Production limits remain unchanged.

The 2260 × 1286 video demonstrates the ambient-directory failure and both isolated successes. It does not attempt to reproduce the separate parallel environment-variable race on screen.

Run the two-device scenario in its own process with a temporary agents
root. This prevents capturing developer skills and avoids races with
tests that mutate the process-wide capability directory.
Include the new WebDAV compatibility work before candidate validation.
Preserve the original PR behavior and both upstream and author history.
The latest main adds another sync scenario that captures global skills.
Reuse the isolated child-process runner for both scenarios so the new
append-only test cannot read developer skills or race with other tests.
@yuxino yuxino changed the title fix(config-sync): isolate global capabilities in sync test fix(config-sync): isolate global capabilities in sync tests Sep 22, 2026
@vastsa
vastsa merged commit 55651c4 into vastsa:main Sep 22, 2026
3 checks passed
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