land: view-publication-single-flight

Merged
AF
4d ago
+499-39

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Coalesces edits that arrive during view publication into one follow-up per root. The running publication completes, and subsequent edits accumulate as a single pending batch computed against the newly committed manifest instead of cancel-and-restart.

Behavior

  • Edits no longer cancel an in-flight publication; root deletion, unbind, CAS conflict, and configuration changes still do.
  • Failed batches are retried with both active and pending paths; a rescan follow-up is promoted to a full read exactly once, and incompatible configurations force a full read.
  • Adds differential tests for edit bursts, failed batches, rescans, unbind, configuration changes, and competing winning publications, each verified against a cold full-tree manifest.

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

View publication now keeps one worker per root and combines incoming edits into a pending batch.

  • View edits queue behind one publication per checkout.

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

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Schedule publication] --> B{Worker exists for root?}
  B -->|No| C[Start worker]
  B -->|Yes| D[Merge or replace pending batch]
  C --> E[Prepare and publish current batch]
  E --> F{Attempt succeeded?}
  F -->|Yes| G{Pending batch exists?}
  F -->|No| H[Retain failed paths for retry]
  H --> I[Merge compatible pending work]
  I --> E
  G -->|Yes| J[Take pending batch]
  J --> E
  G -->|No| K[Remove worker under scheduler lock]

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