Publish note changes after list writes and preserve create file format #632

Closed
kayg wants to merge 0 commits from issue/587-create-format-7 into dev
Owner

Note changes now commit the current note list rows before publishing events, with bounded reconciliation after metadata failures and recovery from durable files and history. Creates retain same-text retries, reject different content, and refuse permanently deleted identities. Exclusive file placement and destination-first rename jobs preserve competing files and titles.

Train AJ exposed an unwanted title field in notes created with initial text. This revision writes only calternal-id, date and last edited before the body, and compares retries against the request and existing content without a generated title. Authored frontmatter remains intact. Rust coverage checks exact bytes, retries after reopen and conflicts; the title-property visibility test now sets the property explicitly.

Replaces #629 on a new branch because pushes to an open PR branch are ignored by this forge. Refs: #587.

Validation:

cargo fmt --all -- --check: exit 0
cargo test -p calternal-notes -j4 regression_create -- --nocapture: exit 0
cargo clippy --workspace --all-targets -j4 -- -D warnings: exit 0
cargo test --workspace -j4: exit 0
cargo build -p calternal -j4: exit 0
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 305 filtered out; finished in 0.11s
test result: ok. 310 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 20.16s
  ✓  1 [chromium-1440] › e2e/fresh-note.spec.ts:32:1 › a note made with text opens with its frontmatter, and typing at its start stays in the body (1.4s)
  ✓  2 [chromium-1440] › e2e/fresh-note.spec.ts:44:1 › a frontmatter change from elsewhere leaves the selection on its word, and ⌘B bolds that word (1.0s)
  ✓  3 [webkit-1440] › e2e/fresh-note.spec.ts:32:1 › a note made with text opens with its frontmatter, and typing at its start stays in the body (5.0s)
  ✓  4 [webkit-1440] › e2e/fresh-note.spec.ts:44:1 › a frontmatter change from elsewhere leaves the selection on its word, and ⌘B bolds that word (3.2s)
  4 passed (21.1s)

The branch audit found no other added note keys, key-order changes, vault sidecars, Trash or migration serialization fields, or schema changes. Authored seeds and permanent-deletion identity markers use existing history tables and remain for idempotency and deletion safety. Existing ADR 0025 title synchronization on later saves is unchanged. No evidence or generated artifacts are committed.

Note changes now commit the current note list rows before publishing events, with bounded reconciliation after metadata failures and recovery from durable files and history. Creates retain same-text retries, reject different content, and refuse permanently deleted identities. Exclusive file placement and destination-first rename jobs preserve competing files and titles. Train AJ exposed an unwanted title field in notes created with initial text. This revision writes only calternal-id, date and last edited before the body, and compares retries against the request and existing content without a generated title. Authored frontmatter remains intact. Rust coverage checks exact bytes, retries after reopen and conflicts; the title-property visibility test now sets the property explicitly. Replaces #629 on a new branch because pushes to an open PR branch are ignored by this forge. Refs: #587. Validation: ``` cargo fmt --all -- --check: exit 0 cargo test -p calternal-notes -j4 regression_create -- --nocapture: exit 0 cargo clippy --workspace --all-targets -j4 -- -D warnings: exit 0 cargo test --workspace -j4: exit 0 cargo build -p calternal -j4: exit 0 test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 305 filtered out; finished in 0.11s test result: ok. 310 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 20.16s ✓ 1 [chromium-1440] › e2e/fresh-note.spec.ts:32:1 › a note made with text opens with its frontmatter, and typing at its start stays in the body (1.4s) ✓ 2 [chromium-1440] › e2e/fresh-note.spec.ts:44:1 › a frontmatter change from elsewhere leaves the selection on its word, and ⌘B bolds that word (1.0s) ✓ 3 [webkit-1440] › e2e/fresh-note.spec.ts:32:1 › a note made with text opens with its frontmatter, and typing at its start stays in the body (5.0s) ✓ 4 [webkit-1440] › e2e/fresh-note.spec.ts:44:1 › a frontmatter change from elsewhere leaves the selection on its word, and ⌘B bolds that word (3.2s) 4 passed (21.1s) ``` The branch audit found no other added note keys, key-order changes, vault sidecars, Trash or migration serialization fields, or schema changes. Authored seeds and permanent-deletion identity markers use existing history tables and remain for idempotency and deletion safety. Existing ADR 0025 title synchronization on later saves is unchanged. No evidence or generated artifacts are committed.
kayg added 16 commits 2026-10-19 16:47:10 +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
Claim rename destinations before editing note titles
Some checks failed
CI / server (pull_request) Successful in 27s
CI / web (pull_request) Failing after 38s
CI / rust (pull_request) Successful in 5m20s
0104c0fe1d
Keep the original title and path unchanged when a planned destination becomes occupied. Preserve the placement conflict code through bulk jobs. Replay exclusive moves before title edits and retain destination-first undo ordering.

Port the public API collision regression and cover restart after conflict, real process death at both move/title boundaries, and undo title preservation.

Refs: #587
Base-commit: 5b4e4ea47b
Keep initial note frontmatter in its existing format
Some checks failed
CI / server (pull_request) Successful in 32s
CI / web (pull_request) Failing after 44s
CI / rust (pull_request) Failing after 5m16s
0a66200147
Write only calternal-id and timestamps when placing initial text. Compare retry content without treating title as a generated server field, preserving authored properties and rejecting different content.

Cover exact file bytes for plain text and H1 bodies, unchanged retries after reopening, and conflicting body or title changes. Make the title-property visibility test perform a real property edit without relying on a generated title.

Refs: #587
Base-commit: 0104c0fe1d
Author
Owner

Landed in train AJ, #633.

Landed in train AJ, #633.
kayg closed this pull request 2026-10-19 17:59:59 +00:00
Some checks failed
CI / server (pull_request) Successful in 32s
CI / web (pull_request) Failing after 44s
CI / rust (pull_request) Failing after 5m16s

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!632
No description provided.