Skip to content

test(rpc): reproduce skipped registry scan - #15632

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-uuununrvoosy
Jul 31, 2026
Merged

rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-uuununrvoosy

Conversation

@rgrinberg

@rgrinberg rgrinberg commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Add a deterministic RPC registry polling test with controlled IO. The test polls an empty registry, adds a valid entry while changing the directory mtime, and records that the changed and subsequent polls neither rescan nor discover the entry.

Add a deterministic registry poll test showing that an mtime change prevents the new entry from being discovered and leaves later polls stuck.

Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg
rgrinberg merged commit 6976614 into ocaml:main Jul 31, 2026
37 of 38 checks passed
@Alizter Alizter added this to the 3.25.0 milestone Aug 1, 2026
rgrinberg added a commit that referenced this pull request Aug 1, 2026
## Description

Skip RPC registry scans only when the directory mtime is unchanged, and
record each newly observed mtime. This allows clients that poll before
Dune registers to discover the new registry entry while avoiding
repeated scans afterward.

## Related Issue and Motivation

Fixes #15630. The regression test was added in #15632.

## Checklist

- [x] Tests added in #15632.
- [x] Change log entry added.
- [x] Documentation is not applicable to this bug fix.

Signed-off-by: Rudi Grinberg <[email protected]>
@Alizter Alizter mentioned this pull request Aug 3, 2026
23 of 24 tasks
Alizter pushed a commit to Alizter/dune that referenced this pull request Aug 3, 2026
## Description

Skip RPC registry scans only when the directory mtime is unchanged, and
record each newly observed mtime. This allows clients that poll before
Dune registers to discover the new registry entry while avoiding
repeated scans afterward.

## Related Issue and Motivation

Fixes ocaml#15630. The regression test was added in ocaml#15632.

## Checklist

- [x] Tests added in ocaml#15632.
- [x] Change log entry added.
- [x] Documentation is not applicable to this bug fix.

Signed-off-by: Rudi Grinberg <[email protected]>
Alizter pushed a commit that referenced this pull request Aug 3, 2026
Add a deterministic RPC registry polling test with controlled IO. The
test polls an empty registry, adds a valid entry while changing the
directory mtime, and records that the changed and subsequent polls
neither rescan nor discover the entry.

Signed-off-by: Rudi Grinberg <[email protected]>
(cherry picked from commit 6976614)
Signed-off-by: Ali Caglayan <[email protected]>
Alizter added a commit that referenced this pull request Aug 3, 2026
Backport the RPC registry regression test from #15632 and its fix from
#15634 onto `3.24.2-rc`.

The commits remain separate and in test-before-fix order.

Fixes #15630 for Dune 3.24.2.
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