Skip to content

Commit aa534ee

Browse files
committed
docs(s010): G1 plan, and the slice opens
ROADMAP row 010 to in_progress (plan_check rule 11 on a slice branch). NOTES.md carries the twelve-line G1 plan with the test or command each line names, the empty manual queue, and two deviations stated before any code: postgrex optional rather than default, and an in-tree UUIDv7 generator rather than a new dependency. plan_check: PASS. Signed-off-by: Ayla Croft <aylacroft@proton.me>
1 parent 68000bc commit aa534ee

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

‎ROADMAP.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ standards register names the rows that ask for them.
3333
| 001 | Packaging spike: Burrito + ex_tauri smoke build | 0 Foundation | M | 000 | approved |
3434
| 002 | Supply chain, early: SBOM, build provenance, the TLS floor | 0 Foundation | S | 000 | planned |
3535
| 003 | FIPS build leg in CI, from source | 0 Foundation | M | 000 | planned |
36-
| 010 | Core domain + persistence (Ecto/SQLite, schemas, Repo owner) | 1 Core loop | M | 000 | planned |
36+
| 010 | Core domain + persistence (Ecto/SQLite, schemas, Repo owner) | 1 Core loop | M | 000 | in_progress |
3737
| 011 | LLM provider layer (req_llm behind `Trinity.LLM` behaviour) | 1 Core loop | M | 010 | planned |
3838
| 012 | Session process + agent loop (gen_statem, DynamicSupervisor, rehydration) | 1 Core loop | L | 010, 011 | planned |
3939
| 013 | LiveView chat UI with streaming | 1 Core loop | M | 012 | planned |
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Slice 010: NOTES
2+
3+
## G1 plan, 2026-09-20
4+
5+
Tree at `68000bc` on `main`; branch `slice/010-core-domain-persistence`; ROADMAP row set to `in_progress` in
6+
this commit (docs/04 lifecycle, plan_check rule 11). Machine: Ryzen AI Max+ 395, OTP 28.5.0.5, Elixir 1.20.4,
7+
ecto_sqlite3 and exqlite as locked. Every line below names its test or command; the order is the build order.
8+
9+
1. **Gate follow-up first, its own commit:** `plan_check` rule 12 parses every `.github/**/*.yml` and
10+
`.github/dependabot.yml` with the Python YAML module the ubuntu runner and this machine both carry
11+
(pyyaml 6.0.1 here); red demonstrated on a planted bare colon (the defect PR #7 fixed), then green.
12+
2. Repo config: `journal_mode: :wal`, `synchronous: :normal`, `busy_timeout`, `wal_auto_check_point` named in
13+
config; write pool of size 1 (`Trinity.Repo`) and a read pool; `Trinity.Repo.Receipts` declared with the same
14+
adapter and not started (the slot the 2026-09-20 amendment reserves). Test: the pragmas read back from a
15+
connection (`PRAGMA journal_mode`, `PRAGMA synchronous`).
16+
3. `TRINITY_DB=postgres` branch in `config/runtime.exs` with `postgrex` as an optional dependency; a CI matrix
17+
job with a Postgres service running `mix ecto.reset` and the suite. Test on both: the migrations apply.
18+
4. Data-dir lock: `Trinity.DataDir.Lock` writes `<data_dir>/LOCK` carrying pid, mode (`desktop | headless`) and
19+
a monotonic token, taken with `:file.open` exclusive create plus a liveness check on the recorded pid; a
20+
second boot against a held dir refuses to start naming holder pid and mode and touches no database file.
21+
Test: two applications in one VM cannot both own the dir; the refusal message names the holder (AC6).
22+
5. Migrations: `personas` (name unique, soul, model, settings), `sessions`, `messages` per docs/05, UUIDv7 ids
23+
from a small generator in `Trinity.UUID` (no new dependency; tested against RFC 9562's version and variant
24+
bits and for monotonic ordering within a millisecond).
25+
6. `Trinity.Sessions.Store` (queries) behind `Trinity.Sessions` (`create_session/1`, `get_session/1`,
26+
`list_sessions/1`, `append_message/2`, `history/2`, `archive/1`); `boundary` on `Trinity.Sessions` with
27+
`exports: [Trinity.Sessions]` so `Store` is internal. Test for AC5: a module under `test/support` that calls
28+
`Store` from `TrinityWeb` fails `mix compile --warnings-as-errors` (output pasted).
29+
7. `append_message/2`: one transaction reading `max(seq)` and inserting; on Postgres `SELECT ... FOR UPDATE` on
30+
the session row. Changeset refuses unknown roles and empty content (AC3). `history/2` ordered by `seq` with
31+
`limit` and `offset` (AC4).
32+
8. Factories in `test/support/factory.ex` (no `ex_machina`; plain functions).
33+
9. Stress test (AC2): 20 processes, 200 appends each, 5 sessions; gapless `seq` per session; no `SQLITE_BUSY`
34+
surfaced; `PRAGMA integrity_check` returns `ok`; run on both adapters; the `-wal` file size reported after
35+
the run (the 2026-09-20 risk line).
36+
10. `mix ecto.reset` on SQLite and on Postgres in CI (AC1), log excerpts in PROOF.md.
37+
11. Coverage line and `mix gate` (AC7); docs/05 synced with any column the migrations add.
38+
12. PROOF.md from the template; ROADMAP row to `done`; final commit and tag per CLAUDE.md section 4, through a
39+
pull request as the ruleset requires.
40+
41+
Manual verification queue: none. Every criterion is `[auto]`.
42+
43+
Deviations from SLICE.md, stated before building: line 3 adds `postgrex` as `optional: true` rather than a
44+
default dependency, so the standalone desktop build carries no Postgres driver; line 5 writes the UUIDv7
45+
generator in-tree rather than adding `uniq`, and proposes nothing new for VERSIONS.md.

0 commit comments

Comments
 (0)