add position field to capnp schema

Position was only in the bincode cache (serde field) — it would
be lost on cache rebuild from capnp logs. Now persisted in the
append-only log via ContentNode.position @19.

Also fixes journal-tail sorting to extract dates from content
headers, falling back to key-embedded dates.
This commit is contained in:
ProofOfConcept 2026-02-28 23:15:10 -05:00
parent da10dfaeb2
commit f20ea4f827
2 changed files with 5 additions and 1 deletions

View file

@ -31,6 +31,9 @@ struct ContentNode {
# Spaced repetition
lastReplayed @17 :Float64; # unix epoch
spacedRepetitionInterval @18 :UInt32; # days: 1, 3, 7, 14, 30
# Section ordering within a file
position @19 :UInt32; # 0 = file-level, 1+ = section index
}
enum NodeType {