Skip to content

fix(watch): complete RPC builds independently#15191

Open
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-puokwtospnyx
Open

fix(watch): complete RPC builds independently#15191
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-puokwtospnyx

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Introduce build requests with hidden completion ivars in the build system. The watch build loop can still batch RPC build requests together, but each request now reports success as soon as its own action builder completes instead of waiting for the entire batch.

Update the concurrent RPC build cram test to expect the fast request to finish before the slow target is released.

@rgrinberg rgrinberg force-pushed the push-puokwtospnyx branch 4 times, most recently from 353f381 to e2a2bdf Compare June 15, 2026 20:57
Introduce build requests with hidden completion ivars in the build system.
The watch build loop can still batch RPC build requests together, but each
request now reports success as soon as its own action builder and per-request
finalization complete instead of waiting for the entire batch.

Complete any unfinished RPC requests with the batch outcome when a build
iteration ends, so requests cancelled by --stop-on-first-error do not hang.

Update the concurrent RPC build cram test to expect the fast request to finish
before the slow target is released.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

refactor(watch): narrow RPC request completion hook

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

refactor(watch): use input generation for RPC completion

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

fix(watch): defer diff-promotion output and finish to batch end

Per-request finalization now only saves the diff-promotion database
without promoting files, so promotion output stays ordered after
diff and error messages.

When per-request completion triggers a restart signal but all RPC
requests have already finished, treat the iteration as Done so that
the watch status line is still emitted.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

refactor(watch): split RPC request checkpointing from completion

Checkpoint request side effects before completing RPC requests, but keep build-wide diff-promotion finalization at the end of the build iteration.

Defer request completion under --auto-promote after a checkpoint saves diff promotions, so watch mode can still restart after the final auto-promotion.

This restores ordinary auto-promote output ordering while keeping saved promotions visible to RPC promotion requests.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg force-pushed the push-puokwtospnyx branch from e2a2bdf to f1a68d5 Compare June 15, 2026 22:47
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