[K2A] Persist K1 Program history in SQLite #14

Merged
adrian.tkacz merged 9 commits from issue-5-k2a-sqlite into develop 2026-09-25 18:44:39 +00:00
Member

Implements Creatidy/creatidy-kernel#5 and keeps the issue open for owner integration.

  • Persists final K1 Program truth with explicit versioned codecs, append-only decision history, atomic command dedupe/projection updates, and restart-rebuildable projections without replaying history through the current Program.apply().
  • Preserves ProgramSpec history, approved/effective input provenance, Attempts, TrustedSatisfaction, WorkUnit/Attempt cancellations, conclusions, actors/authority, and ordering.
  • Rehydrates only inside the adapter using K1 validation; no public arbitrary restore or state-forcing API is added.
  • Uses one validated native local Linux data directory; opened-path fdinfo.mnt_id checks bind the main DB, WAL/SHM/journal sidecars, and backup artifacts to the actual filesystem. Hidden/split/file-only mounts, OverlayFS, tmpfs/ramfs, volatile storage, network filesystems, and checkpoint-disabled F2FS are rejected.
  • Uses a private-cache SQLite connection with retained locking_mode=EXCLUSIVE, actual runtime/capability/pragma evidence, and a process/thread ownership guard. Online backups fsync files/directories around atomic publication; amendment inputs follow K1 canonical ordering.
  • No unconditional SQLite version floor and no K2B/#13, external Operation/outbox, Runtime/Workspace, Forgejo runtime, or K4 semantics.

Validation for HEAD f588de5bcc0d2e8f1b7ae50618cafd8dc7d6c25d: make check passed (142 tests, lint, basedpyright, import contract, secret scan, diff check); make package-check passed; Forgejo CI run #1937 is successful. An independent Local GPT-6 Astra max review returned APPROVE for this exact HEAD with no blocking findings. The completed review ledger and optional nonblocking test suggestions are recorded on Issue #5. This PR is open, targets develop, and has not been merged.

Implements Creatidy/creatidy-kernel#5 and keeps the issue open for owner integration. - Persists final K1 Program truth with explicit versioned codecs, append-only decision history, atomic command dedupe/projection updates, and restart-rebuildable projections without replaying history through the current `Program.apply()`. - Preserves ProgramSpec history, approved/effective input provenance, Attempts, TrustedSatisfaction, WorkUnit/Attempt cancellations, conclusions, actors/authority, and ordering. - Rehydrates only inside the adapter using K1 validation; no public arbitrary restore or state-forcing API is added. - Uses one validated native local Linux data directory; opened-path `fdinfo.mnt_id` checks bind the main DB, WAL/SHM/journal sidecars, and backup artifacts to the actual filesystem. Hidden/split/file-only mounts, OverlayFS, tmpfs/ramfs, volatile storage, network filesystems, and checkpoint-disabled F2FS are rejected. - Uses a private-cache SQLite connection with retained `locking_mode=EXCLUSIVE`, actual runtime/capability/pragma evidence, and a process/thread ownership guard. Online backups fsync files/directories around atomic publication; amendment inputs follow K1 canonical ordering. - No unconditional SQLite version floor and no K2B/#13, external Operation/outbox, Runtime/Workspace, Forgejo runtime, or K4 semantics. Validation for HEAD `f588de5bcc0d2e8f1b7ae50618cafd8dc7d6c25d`: `make check` passed (142 tests, lint, basedpyright, import contract, secret scan, diff check); `make package-check` passed; Forgejo CI run #1937 is successful. An independent Local GPT-6 Astra max review returned `APPROVE` for this exact HEAD with no blocking findings. The completed review ledger and optional nonblocking test suggestions are recorded on Issue #5. This PR is open, targets `develop`, and has not been merged.
feat: add K2A SQLite Program persistence
All checks were successful
ci / check (pull_request) Successful in 16s
590bf5d7a3
fix: address K2A durability review findings
All checks were successful
ci / check (pull_request) Successful in 17s
5b72c439d8
fix: enforce SQLite ownership topology
Some checks failed
ci / check (pull_request) Failing after 13s
d8954eeb9d
fix: enforce private cache and native CI storage
Some checks failed
ci / check (pull_request) Failing after 0s
bb657edb05
fix: validate SQLite mounts by opened file identity
Some checks failed
ci / check (pull_request) Failing after 2s
6ed09bca50
fix: bind SQLite ownership to creator thread token
Some checks failed
ci / check (pull_request) Failing after 1s
4817a5f5bc
fix: scope runner temp to CI steps
Some checks failed
ci / check (pull_request) Failing after 14s
a3362f7683
fix: configure native SQLite CI storage path
All checks were successful
ci / check (pull_request) Successful in 17s
d79c1e7ff8
fix: reject checkpoint-disabled F2FS storage
All checks were successful
ci / check (pull_request) Successful in 18s
f588de5bcc
adrian.tkacz deleted branch issue-5-k2a-sqlite 2026-09-25 18:44:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
Creatidy/creatidy-kernel!14
No description provided.