fix: persist an effect run status before clearing its live buffer
commit
cff1665fix: persist an effect run status before clearing its live buffer
The checks page polls X-Check-Live and reloads once the live buffer is gone. live_finish ran before advance() persisted the settled outcome, so a reload landing in that window still read running from the run ref, re-entered the live view, found the buffer already gone, and reloaded again, an infinite refresh loop on fast-finishing checks.
Assisted-by: Claude:claude-sonnet-5
Reviews
No reviews of this commit yet — record a verdict below.
Start a review
crates/git-effect/src/engine.rs
@@ -451,7 +451,6 @@
let key: LiveKey = (repo.to_path_buf(), new, effect.name.clone());
let buffer = live_start(live, key.clone());
let result = backend.run_one(&effect.name, &command, &buffer);
- live_finish(live, &key);
if let Some(name) = &effect.cache
&& let Err(e) = backend.snapshot_cache(repo, name)
{
@@ -463,6 +462,9 @@
outcome.recording = Some(result.recording);
outcome.exit_code = result.exit_code;
}
+ advance(repo, new, &outcomes);
+ live_finish(live, &key);
+ continue;
}
Some(_) => {
eprintln!("effects: SKIP {} (a dependency did not pass)", effect.name);