Package scaffold, config, the Kit and the encrypted store, with the validation pipeline #7

Closed
opened 2026-11-12 20:18:14 +00:00 by svc-agent-writer · 0 comments

Parent: #6. Records: ADR 0001, ADR 0003, ADR 0007 and GLOSSARY.md.

What to build

The foundation that every other service slice sits on. A Python 3.12 package with FastMCP pinned, mypy --strict and ruff with the S rules, following the conventions of the sibling minds.

  • Config. TOML parsed into typed models. Every secret is a file path; no credential comes from an environment variable or a tool argument. The service refuses to start when it finds a write token file.
  • The Kit (ADR 0003): an internal subpackage that holds token scopes, the row format, the page footer, cursors and the change-feed primitives. The token scopes are nested: evidence within read. The Kit imports nothing from the rest of the service.
  • The store (ADR 0007): one SQLite file encrypted with SQLCipher, in WAL mode, with full-text search. A writer mode for sync and a reader mode for api share one key file. The store holds Chats, Members, typed Handles, messages with their Transport, Tapbacks, one event log, Consumer positions, sync state and the epoch. The Tombstone store is a separate small file.
  • The api writes Consumer positions and nothing else.
  • Validation pipeline. A pipeline for pull requests and pushes to main that runs the linters, the type check and the tests on Linux. Document its checks in the README.
  • CLI. check validates the config, the key file and the store, offline.

Test fixtures are synthetic. No real message enters this repository.

Acceptance criteria

  • A test fails when any Kit module imports from the rest of the service.
  • A test proves the startup refusal for a write token file.
  • The SQLCipher wheel and full-text search pass in the pipeline on Linux. This is the gate in ADR 0007. If it fails, report the failure on this issue and stop; the fallback in ADR 0007 is the owner's call.
  • A test opens the store file without the key and reads no row.
  • A test proves that no api code path can write a message row.
  • check exits non-zero on a missing key file, a secret file with open permissions and an unreadable store.
  • Tests run with a base temp directory outside the worktree.

Blocked by

  • none

Filed under: operator word "go" sha256:4cd0e21a9a07

Parent: #6. Records: ADR 0001, ADR 0003, ADR 0007 and `GLOSSARY.md`. ## What to build The foundation that every other service slice sits on. A Python 3.12 package with FastMCP pinned, `mypy --strict` and ruff with the `S` rules, following the conventions of the sibling minds. - **Config.** TOML parsed into typed models. Every secret is a file path; no credential comes from an environment variable or a tool argument. The service refuses to start when it finds a write token file. - **The Kit** (ADR 0003): an internal subpackage that holds token scopes, the row format, the page footer, cursors and the change-feed primitives. The token scopes are nested: `evidence` within `read`. The Kit imports nothing from the rest of the service. - **The store** (ADR 0007): one SQLite file encrypted with SQLCipher, in WAL mode, with full-text search. A writer mode for `sync` and a reader mode for `api` share one key file. The store holds Chats, Members, typed Handles, messages with their Transport, Tapbacks, one event log, Consumer positions, sync state and the epoch. The Tombstone store is a separate small file. - **The api writes Consumer positions and nothing else.** - **Validation pipeline.** A pipeline for pull requests and pushes to `main` that runs the linters, the type check and the tests on Linux. Document its checks in the README. - **CLI.** `check` validates the config, the key file and the store, offline. Test fixtures are synthetic. No real message enters this repository. ## Acceptance criteria - A test fails when any Kit module imports from the rest of the service. - A test proves the startup refusal for a write token file. - The SQLCipher wheel and full-text search pass in the pipeline on Linux. This is the gate in ADR 0007. If it fails, report the failure on this issue and stop; the fallback in ADR 0007 is the owner's call. - A test opens the store file without the key and reads no row. - A test proves that no api code path can write a message row. - `check` exits non-zero on a missing key file, a secret file with open permissions and an unreadable store. - Tests run with a base temp directory outside the worktree. ## Blocked by - none Filed under: operator word "go" sha256:4cd0e21a9a07
Sign in to join this conversation.
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
dev/messages-mind-mcp#7
No description provided.