Repository navigation
reviewer: bound preparation time and expose progress - #849
jameshilliard wants to merge 5 commits into
Conversation
Sashiko reviewCommit 5/5 —
|
0eb2ba8 to
5d8e5eb
Compare
|
Moved the Added a Rust regression test that applies a two-patch series, records baseline-log writes through a SQLite trigger, and verifies exactly one running The existing commits were amended. The UI test suite and its Node.js CI step were also removed; the web UI functionality is retained. |
Sashiko review — v2✓ No issues found across 5 commits. |
Define a separate preparation deadline and retry budget, retained worktree ownership for cancellation, and structured public progress. Keep AI execution and ordinary baseline selection behavior unchanged. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Separate allocation from registration and checkout so a caller can keep the worktree outside a cancellable operation and explicitly remove it. Keep the existing constructor responsible for cleanup on errors. Test cancellation while waiting for the worktree lock, cleanup after an invalid revision, and successful population of a fresh checkout. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Reuse the CLI process-group guard for scoped daemon preparation commands. Kill hooks and transports when their owning future is cancelled. Keep interactive commands in the foreground group so terminal credentials and Ctrl-C continue to work normally. Drain stdout and stderr while feeding patches to git am to avoid a full-pipe deadlock. Observe exit without reaping the leader, terminate remaining descendants, then reap it without signalling a reusable PID. Keep the existing CLI shutdown registry. Test concurrent input and output, inherited and isolated process groups, helpers waiting for parent exit, descendant cancellation, and registry cleanup with synthetic commands. Fixes: b03f297 ("Implement sandboxed git worktree and apply patch operations") Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Return directory removal and blocking-task errors instead of logging and discarding them. Still attempt metadata removal when directory deletion fails, while preserving the original error. Metadata pruning must not report successful cleanup while checkout files remain. Keep managed ownership until metadata removal finishes, and separate directory deletion so cleanup-lock tests can synchronize with it. Cover managed worktrees and unregistered allocations with a filesystem error reproducible without permission assumptions. Check registrations as well as the returned error. Fixes: 104fc7f ("git_ops, prompts: offload GitWorktree TempDir cleanup to blocking pool") Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Bound daemon baseline and prerequisite preparation before AI execution. Default to a 30-minute deadline and three fresh-worktree retries, matching the AI retry count while keeping its budget independent. Retry only timeouts, and stop if bounded cleanup cannot finish safely. Retain worktree ownership across cancellation and pause the attempt deadline during separately bounded cleanup. Shield shared remote config, ref, and timestamp writes with owned locks. Join only the attempt's own writers before retrying. Use SIGTERM for shared writers on shutdown so Git can clean its lockfiles. Query remote HEAD outside config locks, bound its output, and tolerate unrelated non-UTF-8 refs. Retain ownership through post-fetch HEAD initialization so retries can reuse local refs without skipping unfinished setup. Treat baseline database errors as preparation failures, not failed patch application. Publish typed preparation stages, attempt counters, timing, and timeout history through claim-fenced baseline logs. Show progress in the web UI using fixed public labels without interpolating subprocess diagnostics. Publish the application stage once per baseline rather than per patch, preserving its start time without redundant database writes. Continue polling while queued or in review, including through reruns and late baseline metadata publication. Preserve legacy baseline entries and ordinary application failures. Cover successful retries, exhaustion, cleanup failure, cancellation, supersession, persistence failure, settings, multi-patch progress, and shared-writer ownership with synthetic fixtures and controlled timeouts. Document the new configuration and keep the existing CI setup. Fixes: db16ef0 ("refactor: move baseline/model/prompts to patchset level and log baseline detection") Fixes: 04bd858 ("baseline: add branch patterns for selective remote refspec fetching") Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
5d8e5eb to
ffa8b34
Compare
Sashiko review — v3✓ No issues found across 5 commits. |
|
This should fix stuck reviews like these, hard to tell for sure this was the cause without access to the sashiko server but this change will also show more precisely where the reviewer failed at a minimum even if it doesn't fully fix the underlying issue: |
Summary
Bound daemon review preparation and expose its progress so a stalled baseline lookup, fetch, checkout, or patch application cannot hold a review slot indefinitely without indicating what it is doing.
The existing AI review timeout starts after preparation. This adds a separate preparation budget without changing AI timeout/retry behavior, baseline ordering, or prerequisite precedence. It is a safeguard against unbounded preparation, not a claim to identify the cause of a particular production hang.
Changes
review.preparation_timeout_seconds(default: 1800) andreview.preparation_max_retries(default: 3 additional attempts, matching the AI retry default). Retry timeouts with fresh worktrees and bounded backoff; do not retry ordinary application failures through this mechanism.Exhausted preparation timeouts and cleanup failures finish as
Failedwith a specific preparation reason. An ordinary unsuccessful baseline search retainsFailed To Apply. Cancellation or a replacement claim prevents further attempts and stale progress/status updates.Validation
make check-pr RANGE=origin/main..HEAD: formatting, Clippy across all three feature profiles, sign-offs, and 1,843 passing Rust tests (2 ignored).make check-prin a throwaway clone.No production patch samples or diagnostic artifacts are included in the commits.