Row-first gate: consumer-inventory.md gains an engine-tier section — the mem-engine need recorded operator-authority, dated 2026-10-10 (wasm32 sandboxing across the alk protocol family + downstream ffi/napi/python-adapter economics; rusqlite/tokio-postgres structurally out on wasm, so mem is the only triad member the sandbox can carry). ADR-024 (decisions/024-mem-engine.md) pins the decision set: (1) separate `alkstore-mem` crate — discharges and amends ADR-001 §4 (superseded in part: full contract-v1 engine, not an "implementation convenience"; annotation on ADR-001 §4 + Status, class-1 window still open); (2) honest-ephemeral posture — no durability, single-process, ephemeral by design, never fleet-valid (ADR-010 §3's shared-pool predicate fails structurally), riding ADR-016's carriers unchanged (identity + docs + matrix); (3) full contract v1 tier with the asymmetry classification — `PayloadTooLarge` never produced (SQLite arm), no reconnection concept (reconnect-wake/watcher rows absent from mem's per-engine column), receiver close at engine drop, wake coalescing N/A; (4) `MemStore::new()` engine-native constructor — the one documented exception to the open-prose, core-contract.md Store concept amended; shared-instance (two opens → one engine) rejected with the ADR-016 §4-style re-entry gate (consumer-inventory row), register stays closed; (5) wasm32 — compile-clean for wasm32-unknown-unknown plus the suite's mem column green on host under a current-thread runtime flavor are wave-6 acceptance items; on-target suite execution scoped out with a named collapse condition (wasm-bindgen-test adapter crate) — a scope decision, not a pending-client hedge; (6) mem is not a core dev-dependency — core's doc examples stay mock-based, ADR-001 §4's doctest posture declines. engine-mem.md (draft): the in-process mapping — guarded per-mechanism state (no pool, no schema bootstrap, no forwarder, no spawn_blocking seam), the tx overlay (staged *_tx effects merged atomically at commit; read-your-own-writes easy, drop-=-rollback trivial; wake-at-commit structural — the seam pg needed pg-fix-tx-wake for, mem pins from birth via the existing tx-commit-atomicity rows), ADR-012 §2 third owner of the curve/opts/@every arithmetic (three-way equivalence, ADR-022's StoreFactory reused verbatim — born pinned). deployment.md: host-semantics row (single-process, ephemeral, never fleet-valid, wasm32-clean), mem connection-budget subsection (none — nothing to budget), durability-knobs row (the honest row is the absence), toolchain row (wasm32 subset + current-thread-clean, acceptance-cited). README/overview: engine-mem.md row, ADR-024 row, family table entry (alkstore-mem, no driver deps), current-state updated to the implementation phase with engine specs' stable statuses reflected. implementation.md: wave table gains wave 6 (mem engine, depends waves 1 + 5) and renumbers release readiness to wave 7 (fuzzing decision — the one remaining decided-at-implementation deferral — rides wave 7); wave-6 section records the born-pinned posture, acceptance items, the one suite-harness pre-task (past_stamp_sleep blocking sleep → async sleep, review 003's properties.rs:1683 note), and the window riders (review 003 Finding 1: the pg transient-fault seam, MEDIUM, rides wave 6; Findings 2–3 follow their park into wave 7's pre-release); wave-6 review gate defined; Decided points updated (mem discharged, fuzzing renumbered); stale wave-6 references swept across review docs and the landed tasks' notes (release-readiness items renumbered or annotated). Docs-only change; verified by cross-reference audit (all ADR/OQ/anchor references resolve, residual wave-6 mentions are correct under the new numbering or carry dated annotations).
4.3 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||
|---|---|---|---|---|---|---|---|---|---|---|
| scaffold-workspace | Cargo workspace scaffold (three crates per ADR-001) | completed | narrow | low | project | implementation |
|
Description
Create the Cargo workspace and the three crates of the ADR-001 split, so every later task lands in an existing, compiling structure:
alkstore— the core crate (contract surface only; no driver dependencies, ever).alkstore-sqlite— engine crate stub; manifest carries the rusqlite dependency (^0.40,bundledfeature per ADR-003) and the core path dependency. No code yet beyond an empty lib.alkstore-postgres— engine crate stub; manifest carries tokio-postgres 0.7.x + deadpool-postgres 0.14.x (ADR-004) and the core path dependency. No code yet beyond an empty lib.
Workspace-level: shared [workspace.package] fields (edition, license
MIT OR Apache-2.0, repository), resolver = "2" (or 3 per edition),
and a root Cargo.toml with members. Crate versions are 0.1.0
placeholders — ADR-017 §1 pins the initial release at 1.0.0; that
bump is wave 7's release task, not this one.
The engines' manifests must pin the core dependency as a path
dependency with the version field set (the ADR-017 §4.1 manifest-pin
carrier) — alkstore = { version = "0.1", path = "../alkstore" }
shape, so the pin exists from the first commit.
Family standards apply from this commit onward: tokio async runtime,
thiserror errors, no panics in library code, no unwrap()/expect()
outside tests, no comments in code (doc comments on public API fine).
Acceptance Criteria
cargo buildat the workspace root compiles all three cratesalkstorehas zero non-dev dependencies (serde/serde_json are the allowed exception — ADR-020 §4 puts payload encoding in core)alkstore-sqlitedepends only onalkstore+ rusqlite;alkstore-postgresonly onalkstore+ tokio-postgres + deadpool-postgres (+ tokio)- Engine manifests carry the versioned core path pin (ADR-017 §4.1 carrier 1)
cargo clippy --all-targets -- -D warningsandcargo fmt --checkpass- No CI wiring is added (manual CI per docs/plans/implementation.md)
References
- docs/architecture/decisions/001-crate-split.md
- docs/architecture/decisions/003-sqlite-driver.md (rusqlite pin)
- docs/architecture/decisions/004-postgres-driver.md (pg driver pins)
- docs/architecture/decisions/017-contract-versioning.md §4.1
- docs/plans/implementation.md
Notes
- Edition 2024 with
resolver = "3"(the task left "2 or 3 per edition" open): wave 2 ports honker-core — an edition-2024 crate — intoalkstore-sqliteas a module subtree (ADR-011/013); a 2021 workspace would force an edition down-migration of the forked lineage for no benefit. rusqlite 0.40 already forces rustc ≥ 1.99, so no new toolchain floor is introduced. - Family conventions copied from alknet/alktty: repository URL
https://git.alk.dev/alkdev/alkstore,Cargo.lockcommitted,.gitignoreoftarget/+.worktrees/. LICENSE-MIT/LICENSE-APACHE files at repo root are not added here — they belong with the release-readiness/publish-prep work (wave 7), matching the repo's no-honest-artifact-yet posture; the manifests already declare the license field per the task spec. - Engine manifests pin the core path dependency with the version field
set per ADR-017 §4.1 carrier 1:
alkstore = { version = "0.1", path = "../alkstore" }. alkstore-postgrescarries tokio withrt-multi-thread+macrosfeatures (a usable runtime +#[tokio::test]out of the box); the acceptance criterion permits tokio on the postgres side only.- No CI wiring added, per docs/plans/implementation.md (manual CI).
Summary
Workspace scaffold complete: root Cargo.toml (resolver 3, shared
[workspace.package]: version 0.1.0 placeholder, edition 2024, MIT OR
Apache-2.0, repository) with three members — alkstore (empty lib,
zero dependencies), alkstore-sqlite (core path pin + rusqlite ^0.40
bundled), alkstore-postgres (core path pin + tokio + tokio-postgres
0.7 + deadpool-postgres 0.14). All acceptance criteria verified:
cargo build compiles all three; dependency trees confirmed via
cargo tree; versioned core pins present in both engine manifests;
clippy -D warnings and cargo fmt --check clean.