Repository navigation
V16-KI30: native receipt drain mirrors busy_timeout, capped at host grace - #737
Merged
Merged
Conversation
…n_busy_timeout deterministically fail Test-First: src-tauri/src/store/native_managed_tests.rs::real_native_completed_receipt_survives_sqlite_writer_within_busy_timeout Co-authored-by: Cursor <cursoragent@cursor.com>
Launch sleep only shifts the run before drain starts (workflow 37840356500 stayed green). Process persistence overlaps the fixed 5s receipt budget. Test-First: src-tauri/src/store/native_managed_tests.rs::real_native_completed_receipt_survives_sqlite_writer_within_busy_timeout Co-authored-by: Cursor <cursoragent@cursor.com>
A fixed 5s drain rejected a successful Receipt commit when earlier checkpoints still overlapped child exit. Keep fail-closed bounds, but allow four sequential busy_timeout waits plus margin. Test-First: src-tauri/src/store/native_managed_tests.rs::real_native_completed_receipt_survives_sqlite_writer_within_busy_timeout Co-authored-by: Cursor <cursoragent@cursor.com>
Four busy_timeout stages (22s) outlived the 20s parent observer used by self_test_host_receipt_ack, so a missing ack hit capture deadline exceeded. Size the drain for the three stages that can overlap child exit instead. Test-First: src-tauri/src/store/native_managed_tests.rs::real_native_completed_receipt_survives_sqlite_writer_within_busy_timeout Co-authored-by: Cursor <cursoragent@cursor.com>
Failing contract for R737-A1/A2/O1: uncapped 3*busy+margin exceeds HOST_GRACE_MS, and the 20s receipt-ack self-test parent lacks 10s slack. Test-First: src-tauri/src/process_capture/protocol.rs::writer_drain_budget_never_exceeds_host_grace Test-First: src-tauri/src/process_capture/protocol.rs::writer_drain_budget_mirrors_sqlite_busy_timeout_within_host_grace Test-First: src-tauri/src/process_capture/protocol.rs::host_receipt_ack_self_test_parent_bound_has_slack_over_drain_budget Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror Store::open busy_timeout via SQLITE_BUSY_TIMEOUT_MS, cap the host drain at HOST_GRACE_MS so it cannot outlive parent/owner grace, and widen the receipt-ack self-test parent bound for runner slack (R737-A1/A2/O1). Test-First: src-tauri/src/process_capture/protocol.rs::writer_drain_budget_never_exceeds_host_grace Test-First: src-tauri/src/process_capture/protocol.rs::writer_drain_budget_mirrors_sqlite_busy_timeout_within_host_grace Test-First: src-tauri/src/process_capture/protocol.rs::host_receipt_ack_self_test_parent_bound_has_slack_over_drain_budget Co-authored-by: Cursor <cursoragent@cursor.com>
No-Test: comment wording only (R737-O3/A3) Co-authored-by: Cursor <cursoragent@cursor.com>
Cuarroc
marked this pull request as ready for review
October 9, 2026 00:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
30 of 46 tasks
Contributor
Merge Queue Status
This pull request spent 14 minutes 39 seconds in the queue, including 14 minutes 23 seconds running CI. Required conditions to merge
|
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Der Windows-Host für Native-Receipts wartet unter SQLite-Last länger; nur diese lokale Wartezeit ist auf die Host-Grace begrenzt, übergeordnete Fristen können vorher ablaufen. Die Busy-Timeout-Zahl ist mit dem Store geteilt; der Kommentar beschreibt nur die lokale Drain-Frist. Du musst nichts entscheiden; Review und Merge übernimmt der Orchestrator.
Report
Package: V16-KI30 · Review tier: A (process capture / concurrency)
Author model: Cursor auto (Composer; exact served slug not exposed by harness)
Head:
0b407bac8040fa59254bf8129ba5106500271a17(round-3 delta fromdd0768de06440d99e71c0020d697320df0685505)Goal / benefit: Keep KI-30 receipt survival under SQLite writer load, while the host drain mirrors busy_timeout capped at host grace (not an end-to-end deadline claim).
Parent / ticket / owner: PLAN row V16-KI30 · Root msg-0mv073o34-19227f25 · NACHBESSERN round 3 (delta only)
Scope / limits: comment wording in
windows_capture.rsonly this round; no other code; fail-closed drain retainedDiff size (full PR): +94 / −8 plus comment delta; round-3: comment-only (
git diff dd0768d..HEAD --stat= 1 file)Decision (round-1 disposition)
Cap the writer drain at
HOST_GRACE_MS(do not extend ownership/security deadlines). ShareSQLITE_BUSY_TIMEOUT_MSbetween Store::open and the capture budget. Widen the receipt-ack self-test parent bound to 30 s. Explicitly leave the full three-checkpoint busy budget unsupported when a child finishes near its provider timeout and only grace remains.What changed
101dcdd).writer_drain_budget_ms() = min(3*busy+margin, HOST_GRACE_MS); wire windows_capture + Store::open + self-test parent const (dd0768d).0b407ba).Findings disposition
SQLITE_BUSY_TIMEOUT_MSshared; Store::open + drain use it (dd0768d)dd0768d)HOST_GRACE_MS(10 s)HOST_GRACE_MS; full 3×busy near-deadline budget retained as unresolved (dd0768d)0b407ba)0b407ba)native_managed_tests.rsunderstore/seam pathstore.rsseam touch + capture dependency edgeReview: ausstehend (Stufe A) — round-3 delta; orchestrator queues OpenAI + Anthropic delta reviews.
Evidence
cargo test -p projecta --lib writer_drain_budget(RED head101dcdd)cargo test -p projecta --lib host_receipt_ack_self_test_parent_bound(RED)dd0768dbash scripts/ci/gates.sh lane prepush(headdd0768d)git diff dd0768de06440d99e71c0020d697320df0685505..HEAD --statwindows_capture.rscomment (+11/−10)bash scripts/ci/gates.sh lane prepush(head0b407ba,CARGO_BUILD_JOBS=2)bash scripts/ci/red-first.sh --plangit push -u origin cursor/v16-ki30-native-receipt-deadlinegit ls-remote origin cursor/v16-ki30-native-receipt-deadline0b407bac8040fa59254bf8129ba5106500271a1737844893967/ reject-22s37846914003/ GREEN37848531045gh workflow run ci.yml→ 37854560786 (headdd0768d)NICHT ABGEDECKT
#[cfg(windows)]capture/host code orreal_native_*tests; Windows native run only via the merge queue (and prior workflow_dispatch 37854560786 ondd0768d).real_native_runner_bounds_…/ store owner-deadline hypothesis unchanged.development_capturestill uses literal+ 10_000for owner deadline (mirrorsHOST_GRACE_MS; follow-up to share the const).Open points
0b407ba; no ready/labels/merge from this worker.Made with Cursor
Root-Abnahme (09.10.2026, head 0b407ba) — Tier A, round 3 (user-approved E1)
HOST_GRACE_MSand enclosing deadlines may expire firstprotocol.rs:30wording; diff-size figureStore-seam exception (Root, file-bounded): authorized ONLY for this PR at head
0b407bac8040and ONLY for the existing edits insrc-tauri/src/store.rs(~1122:busy_timeoutnow readsSQLITE_BUSY_TIMEOUT_MS= 5 000 ms, same value as before) andsrc-tauri/src/store/native_managed_tests.rs(~157–181: test uses the shared constant; Process-stage delay). No other Store work is authorized by this exception. Serial ownership: no other open job/PR editsstore.rs/store/(Z4-ARCH-11 and KI14-POISON wait until after the v1.6.0 tag). Source: user decision E1 (09.10.2026) + Root msg-0mv073o34.Claims bound: no "KI-30 fixed" claim. Windows evidence = workflow_dispatch 37854560786 on code-identical
dd0768d+ the merge-queue run; KI-30 needs several clean queue/weekly runs before closure (V16-NACHBEOB).Reviews at this head: OpenAI d3 — code delta acceptable, report defects O4/O5 → fixed above in the report; Anthropic d3 — approve with conditions → conditions 1–2 met above, 3 follow-up. Reports: ~/pa-orch/reports/review-pr737-{openai,anthropic}-d3-0b407bac8040.md.