Skip to content
pi-c Timeline
Login

Timeline

38 ancestors of ffaf5a4afb70b113

2026-11-19
02:04
Add follow-up conversations, forks and in-place instruction updates

Entries form a tree: a trigger links each new entry to its conversation head and moves the head, inside the inserting transaction. Requests are built from the path, so pic ask -c and an explicit id continue a conversation and pic fork branches one from a point that ends a turn. Each conversation freezes its opening prompt and tools; edited project instructions are appended once as an update at that point. New commands list, name and print conversations. Schema 5, with journals of earlier versions stepped up in place. closed check-in: ffaf5a4afb user: dmestas tags: stage-5

01:52
Plan: project instructions update a running conversation, appended check-in: 9b6a8e0082 user: dmestas tags: stage-5
01:40
Plan stage 5: follow-up conversations, branching and compaction check-in: a048da0814 user: dmestas tags: stage-5
01:39
Land stage 4: any model

A model registry, a provider-neutral journal, and adapters for the Messages API, Chat Completions (OpenAI, OpenRouter and compatible servers) and OpenAI Responses, with conversations moving between them. check-in: aca81cd9e3 user: dmestas tags: trunk

01:36
Record stage 4: any model, done closed check-in: 92fa046e46 user: dmestas tags: stage-4
01:16
Fil-C payload: build all three decoders and run the registry tests check-in: 6ecb1963da user: dmestas tags: stage-4
01:15
Benchmark each decoder and parse a chat chunk in one cached query

make bench-pic now decodes one realistic reply (500 text deltas and a 50-piece tool call) per API. It showed the Chat Completions decoder at 9.8ms against 1.3ms for the Messages API decoder, because it compiled about ten statements per chunk; one cached query per chunk and per tool delta brings it to 1.9ms. The baseline gains the decoder rows. check-in: 0e4ade46bb user: dmestas tags: stage-4

01:08
Add the OpenAI Responses adapter

Output items are kept whole, so reasoning items with encrypted_content go back verbatim to the same model under store:false; the final output list is authoritative and fills in late encrypted_content. The neutral form follows Pi: reasoning to thinking, messages to text, function calls to tool calls with call_id|item_id ids. Requests send input items, function_call_output under the call ids, flat tools, and reasoning effort with encrypted reasoning for reasoning models. Recorded streams, a fuzz target and fake server cases cover it, including conversations moving between the Messages API and Responses both ways. check-in: dd694d986b user: dmestas tags: stage-4

00:56
Add the Chat Completions adapter for OpenAI, OpenRouter and compatibles

A chunk decoder following Pi: text, reasoning from reasoning_content, reasoning or reasoning_text kept under its field, OpenRouter reasoning_details verbatim, tool calls by index, usage, finish_reason, and in-stream errors. Requests follow Pi too: system or developer role, tools as functions, tool messages, stream_options, store and reasoning by dialect. The retry loop and header assembly move into a shared module both adapters use. Recorded streams, a fuzz target and fake server cases cover it, including a conversation moving between the two APIs in both directions. check-in: 55cff08c2c user: dmestas tags: stage-4

00:38
Journal every reply in two forms and convert across models

Assistant entries keep the provider content verbatim with its origin (provider, api, model) and Pi neutral form; tool calls come from the neutral form, the same for every provider. A turn goes back verbatim to the model that wrote it and is otherwise rebuilt from the neutral form, without thinking and with tool-call ids normalised identically in calls and results. --model resolves through the registry, keys come from the model, and schema 3 journals migrate in place on open. check-in: 3ff8346a3f user: dmestas tags: stage-4

00:24
Add the model registry: provider/model names, Pi compat, models.json

Built-in providers carry the base URL, wire API and key variable Pi uses for them; OpenAI-compatible dialects are detected from provider and base URL as Pi does; ~/.pic/models.json, or an existing Pi models file, adds providers such as a local server and overrides any field. check-in: 42a80c44fd user: dmestas tags: stage-4

00:23
Bring CI and its test fixes into stage 4 check-in: f40e74ccdb user: dmestas tags: stage-4
00:23
Land CI: the full suite on every push, on the Mac runner

Adds ci/test.yml and its docs, and the fixes the first runs exposed: build paths quoted for directories with spaces, and crash tests that wait on signals from the running command instead of fixed sleeps. check-in: a515a7995c user: dmestas tags: trunk

00:20
Hold the first pic until the test is done with it, not for seconds

The CI runner is a launchd agent that macOS throttles, so a second writer could start after the first had finished its fixed sleep and run to completion. Commands in the lock and orphan tests now wait for a release file the test creates when it is done, and the background-child test proves pic returned before releasing the child. The suite passes under full CPU load. closed check-in: 445b149716 user: dmestas tags: ci

00:14
CI: print the runner limits and fence-test evidence on failure

The single-writer test fails only inside the CI runner, never in a faithful reproduction outside it. CI now prints the job limits first, and the fence test prints the first writer, the processes, the lock files and the second writer output when it is admitted. check-in: 370e28623f user: dmestas tags: ci

00:07
Wait for proof the first pic holds the journal, not a fixed second

Four crash cases slept one second and assumed the backgrounded pic had taken the lock and started its command by then. On the CI Mac, running two jobs at once, it had not, so the second writer was admitted. Each case now waits for a file its running command creates. check-in: 2e10ee615e user: dmestas tags: ci

2026-11-18
23:54
Quote build paths so the suite runs from a directory with spaces

CI on the Mac runner works under Application Support, and the unquoted $(CURDIR) paths split at the space, failing the provider suite before it started. Every path handed to the test scripts is quoted now. check-in: 13f2d57321 user: dmestas tags: ci

23:44
Use the forge runner installer instead of hand-written scripts

quarry-runner install now sets up the Mac runner in one command, collects its own token, and uninstalls cleanly, so the hand-written LaunchAgent scripts go and docs/ci.md describes the installer. check-in: 8b2ef45a57 user: dmestas tags: ci

22:37
Plan stage 4: any model, with a provider-neutral journal

Providers beyond the first are now a requirement: OpenAI, OpenRouter and any OpenAI-compatible server. Stage 4 adds a provider-neutral journal, a model registry, and Chat Completions and Responses adapters; follow-up conversations and pic-owned compaction move to stage 5. check-in: 065d180567 user: dmestas tags: stage-4

21:27
Add CI: the full suite on every push, on a Mac runner

ci/test.yml runs make test-pic and, where an LLVM clang exists, a short fuzz pass. tools/ci installs and removes the zeitforge runner on the Mac mini as a LaunchAgent, and docs/ci.md covers setup and teardown. check-in: 377cccd611 user: dmestas tags: ci

21:20
Land stages 2 and 3: real provider, Pi tools, context and benchmarks check-in: 6a67cdb25a user: dmestas tags: trunk
21:18
Record the stage 3 Fil-C run: every suite passed closed check-in: 889393ba72 user: dmestas tags: stage-3
21:17
Add make install-pic: install the release binary after the suite passes check-in: 5e17337fe7 user: dmestas tags: stage-3
20:59
Benchmark every tool and stop bash waiting 50ms for each exit

make bench-pic measures each tool alone, one journal commit, a scripted turn per tool and process start-up, and compares medians with a per-platform baseline, failing only when a regression repeats on three runs. The first run showed bash true at 60ms because the supervisor slept 50ms between exit checks; it now starts at 1ms and backs off, bringing it to 9ms. check-in: e0a4799a8b user: dmestas tags: stage-3

19:42
Add context assembly, pic ask and cancel, and tool contract tests

The system prompt follows Pi: preamble, tools, rules, project instructions from the workspace and every ancestor, outermost first, then the working directory. pic ask runs a request in the current directory with the journal under .pic and prints each tool call and the answer; pic cancel skips calls that have not run. Each tool gets exact contract tests, and an edit interrupted after writing is replayed from its journaled plan. check-in: ba0addd3d7 user: dmestas tags: stage-3

19:37
Adopt Pi's default tools: read, write, edit and bash

Tools take Pi's inputs and return Pi's truncation notices and messages. Edit computes the new file first and journals it with started, so a replay after a crash writes the same bytes and edit joins read and write as replay-safe. Bash keeps the tail of its output, saves the full output when it has to cut, and reports Pi's status lines. Results carry a journaled error flag, cancelled calls are skipped with a result, and the schema moves to version 3. check-in: c5ab59d7d7 user: dmestas tags: stage-3

19:30
Detail stage 3: Pi default tools, context assembly and benchmarks check-in: aab53b7dbf user: dmestas tags: stage-3
19:29
Run pic under Fil-C remotely and fix a varargs over-read it found

The remote tooling gains a pic mode: a hashed snapshot of the sources, larger guarded limits, and a payload that builds pic with the pinned Fil-C compiler and runs every suite. The first run caught record_reply passing six bind types for five values; run_stmt now refuses a type count that differs from the statement. The second run passed every suite, and teardown verified the host clean. closed check-in: 03114f7dbf user: dmestas tags: stage-2

18:12
Record the first live run of the provider

One real task completed with two parallel tool calls and an answer, the journal checked clean, and the key never reached the database. check-in: 28ce9a71d3 user: dmestas tags: stage-2

18:04
Wire the Messages API provider into the durable loop

The journal moves to schema 2: assistant entries hold the provider content verbatim, one turn may carry several tool calls with their call ids, and every provider request is a journaled generation. An interrupted request fails that attempt and the turn is asked again, up to three attempts. The provider builds requests from the journal, retries only before a stream starts, and reads the key just before sending it. A local fake server drives fourteen end-to-end cases, including a crash mid-stream and a check that the key never reaches the journal or output; the crash matrix grows to cover generations and parallel calls. check-in: 417d9dcb01 user: dmestas tags: stage-2

17:44
Plan the credential project and add the credential seam

The credential project holds only sanctioned credentials, runs one authority reached over SSH, and starts after stage 2. pic gets a single function that reads the key from the environment and a wipe helper, so the helper-command source can replace it later without touching callers. check-in: 38a6005d71 user: dmestas tags: stage-2

17:41
Test and fuzz the HTTP response parser

Unit tests cover chunked, length-delimited and close-delimited bodies, interim responses, smuggling guards, chunk framing, truncation and the header cap, whole and bytewise. A libFuzzer target checks that chunking never changes the outcome. check-in: cb38c63312 user: dmestas tags: stage-2

17:26
Add an HTTPS stack on vendored BearSSL

BearSSL 0.6 is vendored and verified byte for byte against the upstream release. net.c adapts suit TLS and trust-anchor code to C11 with a deadline-bounded name lookup and TCP connect; http.c is a strict HTTP/1.1 response parser and one-shot POST. A probe completes a TLS 1.2 handshake and an HTTP exchange with the Messages API and refuses expired, wrong-host, self-signed and plain-HTTP endpoints. check-in: 7ce5fcd871 user: dmestas tags: stage-2

17:21
Vendor zlib and drop iconv and dynamic loading

pic now compiles zlib in, builds libfossil without iconv and SQLite without extension loading, so the binary links only libc, libm and pthread. check-in: 7e80bb990b user: dmestas tags: stage-2

17:12
Add the SSE framer and Messages API stream decoder

The framer is provider-neutral and pure over bytes. The decoder enforces event order and rebuilds each content block from its start object, so thinking signatures and unknown block types replay verbatim. Eleven recorded streams are decoded whole, bytewise and chunked against frozen summaries, and a libFuzzer target checks chunking independence and that decoded content is a JSON array. check-in: 1d1b0294ce user: dmestas tags: stage-2

16:20
Replace the 11-stage plan with five stages; detail stage 2

The harness owns its own database and ctx becomes an optional outbox consumer. Stage 2 adds a streaming Messages API provider with a neutral SSE framer, verbatim content replay, a generation journal with re-request on interrupted streams, and credential handling that never reaches the journal. check-in: 71be44a488 user: dmestas tags: stage-2

16:19
Merge the tracer-bullet durable agent loop into trunk check-in: f4faaeff64 user: dmestas tags: trunk
12:30
Add the first durable agent loop in C

pic keeps its journal in its own libfossil-hosted SQLite database: an idempotent admission per request key, then one short transaction per state change, never held across provider or tool I/O. A replay-safe write tool reruns after a crash; a replay-unsafe exec records an unknown outcome and never reruns. exec runs under a supervisor that starts the command only after the started commit and kills its group if pic dies or is interrupted. A second pic on the same database is refused.

test/pic/crash.sh crashes at every commit and effect boundary and checks the journal against an external ledger, plus deadline, output redirection, background child, crash and interrupt orphaning, and second-writer cases. Vendored SQLite and libfossil match ctx byte for byte. closed check-in: 7e7550292a user: dmestas tags: tracer-bullet

11:58
Record S0/S1 qualification groundwork before product code

Contract maps and pinned Pi reference, local C qualification fixtures, MC/DC and Fil-C remote lifecycle tooling, and the context transaction substrate probe. No product harness code yet. check-in: 11f47eadde user: dmestas tags: trunk