Skip to content

land: path-status-batch - #569

Merged
ualtinok merged 2 commits into
mainfrom
land/path-status-batch
Oct 18, 2026
Merged

ualtinok merged 2 commits into
mainfrom
land/path-status-batch

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Batches pending path-status annotations in configure, view assembly, and refresh retry fanout so each set commits in one IMMEDIATE transaction instead of one sync per path.

  • Fails atomically: errors, panics, or process exit roll back the whole batch rather than leaving a partial prefix.
  • Reuses the existing age-preserving upsert and leaves synchronous=FULL durability unchanged.

Written for commit f4677ec. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no actionable issues were found.

Summary

This PR saves pending path statuses in batches instead of committing each path separately.

  • Pending path marks now share one SQLite transaction per batch.

No actionable issues were found. Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Configuration] --> D[mark_pending_many]
    B[View assembly] --> D
    C[Refresh retry] --> D
    D --> E{Any paths?}
    E -- No --> F[Return without a transaction]
    E -- Yes --> G[Begin immediate transaction]
    G --> H[Write each pending status]
    H --> I[Commit once]
    H -- Error or unwind --> J[Roll back]
Loading

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile

ualtinok and others added 2 commits October 18, 2026 22:42
Use one IMMEDIATE transaction for each pending set in configure, view assembly, and refresh retry fanout. Share the existing age-preserving upsert and leave synchronous FULL unchanged. A single transaction gives all-or-nothing cancellation/crash recovery rather than a partially applied prefix.

Add mixed-state equivalence, SQL failure/cancel rollback, abrupt process exit, and SQLite statement transaction-count tests. The real refresh caller's 5000-row test fails at 5000 commits before the fix and when that caller is mutated back to its per-row loop; the other 12 targeted tests remain green.

Linux fresh owner-identical worker measurement: annotation writes 32,355,708 -> 2,284,692 bytes; sync calls 5,327 -> 13. View integration (15), caller unit gates (708), strict Windows cross-check and cargo fmt pass. Investigation/evidence retained uncommitted under .cortexkit/internal-docs/investigations/path-status-batch.md.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit b3edd53 Oct 18, 2026
49 checks passed
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