Publish note changes after writes and preserve racing files (#587) #627

Closed
kayg wants to merge 0 commits from issue/587-event-after-write-5 into dev
Owner

Note creates and moves must preserve a file another writer places at the destination. This branch publishes note list changes after durable file/history work, uses exclusive destination placement for creates, renames, folder moves, Trash, restore, conflict copies and migration, and keeps dependent bulk edits behind successful placement. Stored plans return a conflict if their fixed destination changes; replayed creates do not append their body again or give undo ownership of later typing.

Discovery now makes three attempts with backoff, then records an actionable persistent health error and releases startup waiters while known notes remain usable. Lists stay incomplete until a successful rescan. Independent same-id creates sharing one Tokio task serialize without a debug panic. The three delta regressions were ported and confirmed failing before fixes; additional placement, backlink and replay regressions are permanent tests too.

Validation: cargo fmt --all --check; workspace all-targets Clippy with -D warnings; workspace tests (591 passed, zero failed, two ignored). Local release save latency versus 80e9469, across twelve balanced runs per revision: median run p95 increases 0.193 ms at 100 lines and 0.045 ms at 10,000 lines. Individual pairs exceed 1 ms under shared-host variance; full measurements and verbatim gates are posted to issue 587. Evidence and benchmark artifacts are outside the repository.

Compatibility: an old partial job with an indexed identity and no authored seed returns a conflict rather than adopting an outside file; the stored plan is retained for resolution and fresh planning. Exclusive move/exchange support is required; unsupported operations fail safely.

Refs: #587

Note creates and moves must preserve a file another writer places at the destination. This branch publishes note list changes after durable file/history work, uses exclusive destination placement for creates, renames, folder moves, Trash, restore, conflict copies and migration, and keeps dependent bulk edits behind successful placement. Stored plans return a conflict if their fixed destination changes; replayed creates do not append their body again or give undo ownership of later typing. Discovery now makes three attempts with backoff, then records an actionable persistent health error and releases startup waiters while known notes remain usable. Lists stay incomplete until a successful rescan. Independent same-id creates sharing one Tokio task serialize without a debug panic. The three delta regressions were ported and confirmed failing before fixes; additional placement, backlink and replay regressions are permanent tests too. Validation: cargo fmt --all --check; workspace all-targets Clippy with -D warnings; workspace tests (591 passed, zero failed, two ignored). Local release save latency versus 80e9469, across twelve balanced runs per revision: median run p95 increases 0.193 ms at 100 lines and 0.045 ms at 10,000 lines. Individual pairs exceed 1 ms under shared-host variance; full measurements and verbatim gates are posted to issue 587. Evidence and benchmark artifacts are outside the repository. Compatibility: an old partial job with an indexed identity and no authored seed returns a conflict rather than adopting an outside file; the stored plan is retained for resolution and fresh planning. Exclusive move/exchange support is required; unsupported operations fail safely. Refs: #587
kayg added 14 commits 2026-10-19 15:19:18 +00:00
Reconcile note lists from durable writes before publishing hints
Some checks failed
CI / server (pull_request) Successful in 23s
CI / web (pull_request) Failing after 32s
CI / rust (pull_request) Successful in 4m22s
e174661153
Place absent files exclusively so an outside create survives the placement
window and is returned as a conflict. Propagate deletion-history failures
through discovery so startup remains incomplete until its retry succeeds.
Key lifecycle diagnostics by note identity so independent sibling futures
can wait safely in one Tokio task.

Skip backlink parsing without an opening bracket and stop tag scanning
after the last hash's line. This removes unnecessary full-text parsing
from synchronous list publication. Add permanent regression tests for the
three review findings and both scan failure stages.

Refs: #587
Preserve note placements and bound failed discovery
Some checks failed
CI / server (pull_request) Successful in 32s
CI / web (pull_request) Failing after 48s
CI / rust (pull_request) Failing after 1m56s
5b4e4ea47b
Use exclusive note moves and guarded writes through create, bulk jobs,
Trash, restore and migration. Keep stored destinations fixed until their
dependent edits can run, and preserve the original create version on replay.

Bound startup retries and retain an actionable failed-scan health state
while known notes remain usable. Serialize independent same-id create
futures without mistaking their shared Tokio task for recursive entry.

Refs: #587
Base-commit: 80e94699a6
Author
Owner

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.
kayg closed this pull request 2026-10-21 11:32:36 +00:00
Some checks failed
CI / server (pull_request) Successful in 32s
CI / web (pull_request) Failing after 48s
CI / rust (pull_request) Failing after 1m56s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!627
No description provided.