Skip to content

Stabilize rewatch scheduling and integration tests - #8667

Merged
cknitt merged 5 commits into
masterfrom
codex/stabilize-rewatch-tests
Sep 24, 2026
Merged

cknitt merged 5 commits into
masterfrom
codex/stabilize-rewatch-tests

Conversation

@cknitt

@cknitt cknitt commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Extracted from #8653. This PR contains only the Rust rewatch fix and test-harness improvements; it does not include the OCaml rewatch implementation or related compatibility changes.

What changed

Deterministic scheduling after errors

Rewatch continues compiling modules that are independent of a failed module. This keeps diagnostics consistent across worker schedules while leaving dependents of the failed module blocked until a later build.

A regression test checks that an independent warning is emitted after an unrelated failure, a dependent stays blocked, and that dependent compiles after its dependency is repaired.

Preserve blocked dependents across full watcher rebuilds

When an interface changes but its implementation fails, rewatch keeps dependents dirty. A full watcher rebuild now carries that dirty state forward for matching source modules, so the dependents compile after the implementation is repaired.

The regression test uses an atomic file replacement to exercise the full rebuild path that exposed the failure on macOS.

More reliable and faster integration tests

  • Replace fixed sleeps with bounded polling for completed builds, compiler-log updates, generated files, removed lock files, and watcher shutdown.
  • Use rebuild baselines so an earlier filesystem event cannot satisfy a later assertion.
  • Handle watcher process checks and timeout scaling on Windows.
  • Wait for watchers to stop before subsequent fixture changes can race with them.
  • Use explicit git restore --worktree commands for tracked fixture cleanup.
  • Verify warning persistence both during watch mode and after watcher shutdown.
  • Verify imported dependency output exists before consuming the root output.
  • Keep the clean/rebuild check out of a tracked snapshot.
  • Make the configuration-change test observe each rebuild separately and keep unrelated cleanup events out of the transition under test.

The event-driven waits let fast CI runners proceed immediately while retaining bounded timeouts for slower runners.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df4917b59f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rewatch/src/build/compile.rs
Comment thread rewatch/src/build/compile.rs
@cknitt
cknitt force-pushed the codex/stabilize-rewatch-tests branch from df4917b to 4672514 Compare September 22, 2026 16:04
@cknitt

cknitt commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46725146ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt
cknitt force-pushed the codex/stabilize-rewatch-tests branch 2 times, most recently from ce8d47e to c7bc735 Compare September 22, 2026 18:08
@cknitt

cknitt commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: c7bc73519d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8667

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8667

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8667

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8667

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8667

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8667

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8667

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8667

commit: 9153fbd

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt added this pull request to stack #8668 September 22, 2026 18:44
@cknitt

cknitt commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7bc73519d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rewatch/src/build/compile.rs Outdated
@cknitt
cknitt force-pushed the codex/stabilize-rewatch-tests branch from c7bc735 to 066981e Compare September 23, 2026 05:14
@cknitt

cknitt commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 066981e8d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt

cknitt commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d523d1dbd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rewatch/tests/watch/02-watch-warnings-persist.sh
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the codex/stabilize-rewatch-tests branch from e4f9bc4 to f465543 Compare September 23, 2026 14:24
@cknitt

cknitt commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4655439e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rewatch/tests/watch/06-watch-missing-source-folder.sh
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt

cknitt commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 9153fbd7d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt
cknitt merged commit 5b00bcf into master Sep 24, 2026
29 checks passed
@cknitt
cknitt deleted the codex/stabilize-rewatch-tests branch September 24, 2026 08:21
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