Skip to content
pi-c Check-in [eae917e9e9]
Login

Check-in [eae917e9e9]

Overview
Comment:Shared journal store: several pic processes on one workspace, one conversation each

Each conversation has a lease (an exclusive flock beside the journal) that its process holds while it advances it and that the kernel drops when the process and its forked children are gone. Taking a lease claims the conversation's request and settles what a dead owner left; open recovers only conversations whose lease is free. The journal lock is held shared and taken exclusive only to create or migrate the schema. SQLite runs in normal locking mode with the fair busy handler; dev builds stop on a write begun under an open read.

pic run takes only requests nobody is running. A second pic asking into a conversation in use is refused with its owner's pid. An edit that misses in a file another conversation changed says so and shows the file; a write to such a file is refused once.

New test/pic/shared.sh: two-process crash matrix, kill -9 beside a live pic, claim and admission races, stale-file results. No schema change.

Timelines: family | ancestors | descendants | both | shared-store
Files: files | file ages | folders
SHA3-256: eae917e9e96bd8c2c53d2c99623c6e632291e3618add2ebcc189d260687b9913
User & Date: dmestas on 2026-11-21 12:03:36.899
Other Links: branch diff | manifest | tags
Context
2026-11-21
12:30
Shared journal store: review fixes

pic import reads all of its input, and import --claude loads the transcript into temporary tables, before the write transaction begins: every open takes the write lock for a moment, so one held across a slow pipe stalled every pic that started.

A file counts as changed by another conversation only for changes journaled since this process took the request up, so one pic never sees it, forks included. A request pic run passes over for its model gives its lease back. A branch summary also leases the conversation its request is journaled under. Recovery for a lease taken inside the admitting transaction joins that transaction. Looking at who holds a lease takes the lock shared, and a taker rides out a look. Lease files are never removed. A named conversation in use is refused before its hooks run. Recovery reads surface errors.

shared.sh: slow import beside other pics, model-skip lease, lone fork, no hooks for a refused prompt, symlinked journal, two-calls-in-a-turn matrix. check-in: 207faa4c67 user: dmestas tags: shared-store

12:03
Shared journal store: several pic processes on one workspace, one conversation each

Each conversation has a lease (an exclusive flock beside the journal) that its process holds while it advances it and that the kernel drops when the process and its forked children are gone. Taking a lease claims the conversation's request and settles what a dead owner left; open recovers only conversations whose lease is free. The journal lock is held shared and taken exclusive only to create or migrate the schema. SQLite runs in normal locking mode with the fair busy handler; dev builds stop on a write begun under an open read.

pic run takes only requests nobody is running. A second pic asking into a conversation in use is refused with its owner's pid. An edit that misses in a file another conversation changed says so and shows the file; a write to such a file is refused once.

New test/pic/shared.sh: two-process crash matrix, kill -9 beside a live pic, claim and admission races, stale-file results. No schema change. check-in: eae917e9e9 user: dmestas tags: shared-store

11:51
land filc-runs check-in: 6298149a87 user: pi-c-lander tags: trunk
Changes