Skip to content

Add workspace change watching and PR test workflow#3

Merged
zac merged 5 commits into
mainfrom
file-watching
Mar 23, 2026
Merged

Add workspace change watching and PR test workflow#3
zac merged 5 commits into
mainfrom
file-watching

Conversation

@zac
Copy link
Copy Markdown
Member

@zac zac commented Mar 23, 2026

Summary

Adds Workspace.watchChanges(at:recursive:) and ChangeEvent so callers can observe future workspace mutations on files and directory trees. This also adds a PR test workflow and reorganizes the new tests around functionality rather than line-coverage buckets.

Changes

  • add the ChangeEvent model and a watcher registry to Workspace
  • emit buffered change events for writes, directory creation, deletes, copies, moves, applyEdits, and applyReplacement
  • deliver recursive directory, file, and symlink events, including move matching by both destination and source paths
  • add a PR GitHub Actions workflow that runs swift test, publishes xUnit and coverage summaries, and uploads artifacts
  • expand and retag the functional test suites across in-memory, overlay, mountable, sandbox, and security-scoped filesystems

Testing Performed

  • swift test
  • swift test --enable-code-coverage

Coverage Summary

  • overall: 93.97% region coverage, 97.18% line coverage
  • Workspace.swift: 94.87% region coverage
  • SecurityScopedFilesystem.swift: 91.46% region coverage
  • ChangeEvent.swift: 100% region coverage
  • no covered source files are below 80% region coverage

Screenshots

  • N/A (no UI changes)

@zac zac merged commit f680743 into main Mar 23, 2026
1 check passed
@zac zac deleted the file-watching branch March 23, 2026 03:32
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