Skip to content

CoreWatcher implementation#1263

Merged
streamich merged 3 commits into
masterfrom
fs-core-events-2
Jul 7, 2026
Merged

CoreWatcher implementation#1263
streamich merged 3 commits into
masterfrom
fs-core-events-2

Conversation

@streamich

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 7, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a scoped CoreWatcher on top of Superblock change events, while evolving the underlying event model to support multiple listeners and richer event metadata.

Changes:

  • Replaced Superblock.onchange with a changes FanOut stream to support multiple listeners and unsubscribe semantics.
  • Extended filesystem events with FsEventType.ATTRIB and added link to FsEvent so watchers can access both path/link and node information.
  • Added CoreWatcher (plus tests) to re-emit subtree-scoped events with relative steps, including move translation across watch boundaries.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/fs-node/src/tests/volume.events.test.ts Updates volume event tests to subscribe via core.changes and validates ATTRIB for metadata ops.
packages/fs-core/src/watch/FsEvent.ts Adds ATTRIB, enriches FsEvent with link, and expands event-type documentation.
packages/fs-core/src/watch/CoreWatcher.ts Introduces CoreWatcher and CoreWatchEvent to scope and translate Superblock events to a watch root.
packages/fs-core/src/Superblock.ts Switches to changes: FanOut<FsEvent>, emits link on events, and refines truncate/metadata emission semantics.
packages/fs-core/src/index.ts Exports the new CoreWatcher API.
packages/fs-core/src/tests/Superblock.events.test.ts Updates tests for changes fan-out, ATTRIB, link population, and truncation behavior.
packages/fs-core/src/tests/CoreWatcher.test.ts Adds comprehensive CoreWatcher behavioral tests (scoping, moves, symlinks, close semantics).

Comment thread packages/fs-core/src/watch/FsEvent.ts
Comment thread packages/fs-core/src/watch/CoreWatcher.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread packages/fs-core/src/watch/FsEvent.ts
Comment thread packages/fs-core/src/Superblock.ts
@streamich streamich merged commit 80fc36f into master Jul 7, 2026
10 checks passed
@streamich streamich deleted the fs-core-events-2 branch July 7, 2026 08:26
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