- C2: 'at-least-once wake delivery' collapsed to 'best-effort hints' (ADR-006 §1 + core-contract) — coalescing and the pg no-replay hole contradict per-commit wake promises; the guarantee table's row was already correct. - W2: uniform job-handle validity predicate pinned (ADR-010 §2, core-contract, queues.md; verification-backlog row): processing state + unexpired deadline; D-12's missing-check not inherited. - W1: outbox run_once worker semantics pinned in core-contract (pull op, ack/retry-on-curve, no heartbeat in delivery — honker parity, dual-execution window documented). - W3: named-locks tx-seam posture stated (no lock_tx; acquisition is auto-commit; TTL discipline governs). - C1 -> OQ-12: streams depth (key semantics w/ honker ground, event shape, ordering row, retention); method names pinned, depth open. - New find -> OQ-13: the v1 TxHandle surface cannot express the transactional outbox enqueue (derived backing-queue name is reserved-prefix-rejected; honker's raw-Transaction seam unavailable); option set + decision rule sketched. - README resolution order refreshed (OQ-06 resolved); ScheduleOpts + stream consumption-trigger lines added to core-contract.
status, last_updated
| status | last_updated |
|---|---|
| draft | 2026-10-05 |
alkstore — Architecture
Architecture documentation for the alkstore project: one reactive store interface (notify, streams, queues, locks, scheduler, outbox) over SQLite and Postgres, with each engine native underneath (see overview.md).
Current State
Phase 1 (Architecture) — in progress. Phase 0 is complete
(docs/research/phase-0.md): both POCs ran and passed, the scope
inventory is confirmed, and the crate split, drivers, and ownership
postures are decided. This directory carries the architecture spec
build-out over that evidence base; all spec documents are draft
pending architecture review and OQ resolution.
Architecture Documents
| Doc | Status | Purpose | Key OQs |
|---|---|---|---|
| overview.md | draft | Crate family, feature surface, non-goals, evidence base | — |
| core-contract.md | draft | The unified trait surface, delivery guarantees, tx seam | OQ-08, OQ-10, OQ-12, OQ-13 |
| engine-sqlite.md | draft | SQLite engine: forked-substrate/rusqlite mapping | OQ-06 (resolved), OQ-12, OQ-13 |
| engine-postgres.md | draft | Postgres engine: tokio-postgres/LISTEN mapping | OQ-05 (resolved), OQ-08, OQ-12, OQ-13 |
| queues.md | draft | Queue/scheduler/outbox semantics depth (resolved: ADR-009/ADR-010) | OQ-06 (resolved) |
| deployment.md | draft | Host semantics, connection budgets, knobs, matrix | OQ-08 |
| open-questions.md | draft | OQ tracker (promoted from OQ-ST register) | — |
Architecture Decision Records
| ADR | Title | Status |
|---|---|---|
| 001 | Reactive-core crate + per-engine crates | Accepted |
| 002 | Feature scope — inventory-confirmed surface | Accepted |
| 003 | SQLite engine — rusqlite + honker-core lineage, bridged seam (ownership: ADR-011) | Accepted |
| 004 | Postgres engine — tokio-postgres + deadpool, hand-rolled LISTEN | Accepted |
| 005 | Published libraries by default, named fork triggers | Accepted |
| 006 | Wake contract — opaque wake + re-read; notify-vs-streams split | Accepted |
| 007 | Transactional seam — caller-held TxHandle, *_tx methods |
Accepted |
| 008 | Contract v1 surface pinning — surface partition, TxHandle shape, wake type, reserved strings, error taxonomy |
Accepted |
| 009 | Scheduler collapse — queues + schedule()/run_schedules, @every-only v1, boundary guarantee row |
Accepted |
| 010 | Queue semantics depth — visibility/renewal, backoff curve, dead-letter, no-stranded-rows sweep, schema layout | Accepted |
| 011 | SQLite substrate — fork honker-core into owned code | Accepted |
| 012 | Forked substrate design — contract-blind boundary, fidelity posture, port deltas | Accepted |
| 013 | Fold the forked substrate into alkstore-sqlite — no fourth crate |
Accepted |
Open Questions
Tracked in open-questions.md (OQ-01..NN; the Phase 0 register's OQ-ST-01..08 promote one-to-one — OQ-NN mirrors OQ-ST-NN — with new Phase 1 questions appended after). Open, in suggested resolution order:
- OQ-12 (high): streams depth — key semantics,
StreamEventshape, ordering guarantee row, retention (Phase 1 review find; evidence gathered in the OQ). - OQ-13 (high): transactional outbox enqueue shape — the v1
TxHandlesurface cannot express the outbox's one load-bearing operation (Phase 1 review find; option set sketched in the OQ). - OQ-08 (medium): capability-surface shape.
- OQ-10 (medium): contract versioning across engine crates.
- OQ-11 (medium): forked-substrate follow-through (provenance register format, cherry-pick procedure; item (1) dissolved by ADR-013).
Resolved (kept with resolutions): OQ-01 (feature scope), OQ-02
(crate split), OQ-03 (drivers), OQ-07 (extension surface cut),
OQ-04 (contract v1 pinning —
ADR-008), OQ-09
(scheduler collapse — ADR-009;
scheduler guarantee row pinned), OQ-05 (queue semantics depth —
ADR-010), OQ-06
(honker-core quality read — fork fired,
ADR-011).
No deferred OQs: all open questions are actionable Phase 1 work with complete evidence bases.
Document Lifecycle
| Status | Meaning | Transitions |
|---|---|---|
draft |
Under active development; may change significantly | → reviewed when the doc's OQs are resolved |
reviewed |
Architecture final; implementation may begin | → stable when implementation verified |
stable |
Locked; changes need review, may warrant an ADR | → deprecated when superseded |
deprecated |
Superseded; kept for reference | Removed when unreferenced |
All spec documents carry YAML frontmatter (status, last_updated);
ADRs carry a ## Status section (Accepted/Proposed/Superseded).
Provenance of decisions
Phase 1 inherits its decisions from Phase 0's evidence base — every Accepted ADR above cites its POC findings and register record. The research documents remain the deep background:
docs/research/phase-0.md— vision, prior art, OQ-ST register, convergence.docs/research/consumer-inventory.md— per-feature scope evidence.docs/research/poc-sqlite-posture-findings.md/docs/research/poc-pg-posture-findings.md— measured ground.