Commit Graph

98 Commits

Author SHA1 Message Date
shitratgit[bot] 80639a382a fix: bound flowing capture and retire old memory surfaces 2026-08-25 07:22:16 +00:00
shitratgit[bot] f0a9058c6b fix: verify flowing recall credential before cutover 2026-08-23 18:41:19 +00:00
shitratgit[bot] 57c20f9845 feat: cut over to composed flowing recall 2026-08-23 18:26:04 +00:00
shitratgit[bot] 2a3d333ae5 fix(gateway): use launchd user domain 2026-08-11 18:59:49 +00:00
shitratgit[bot] d832acdfb4 ops: codify the isolated Typesense Books node 2026-08-11 04:39:13 +00:00
shitratgit[bot] 1a70a43f96 feat: isolate book search and ingestion 2026-08-11 04:38:50 +00:00
shitratgit[bot] 272cff0ae1 fix(herdr): isolate system automation session 2026-08-11 03:53:15 +00:00
shitratgit[bot] d5cec540f3 chore(slack): install jc-slack on satellites 2026-08-05 18:27:17 +00:00
shitratgit[bot] 43d39a3684 fix(search): normalize channel timestamps 2026-07-30 00:26:41 -07:00
shitratgit[bot] ca3f4d9636 fix(memory): recover and quarantine capture backlog 2026-07-30 00:26:33 -07:00
shitratgit[bot] 60d5333730 fix(search): retire Typesense run projections 2026-07-29 19:10:22 -07:00
shitratgit[bot] b3149dc226 fix(memory): decouple capture auth from Typesense 2026-07-29 17:22:13 -07:00
shitratgit[bot] 581c32568b fix(pi): detach session capture from turn lifecycle 2026-07-29 15:43:47 -07:00
shitratgit[bot] 08a2f77e1e fix(health): stop Front Projection paging as critical; snapshot the replica source
Carries three gateway-worker changes that were reviewed and left uncommitted:

- Front Projection drops out of CRITICAL_COMPONENTS. A stale inbox projection
  is worth knowing about and is not worth forcing overall health critical and
  paging Joel. Health alerts were the single largest producer in the message
  stream (740 of 1083 machine messages) and the largest fallback source.
- serve.ts runs the function-health registration check at startup, so the
  assertion still runs when the durable function's own registration was lost
  while Inngest was unavailable.
- replicate-critical-db.sh freezes one source generation before hashing it.
  The builder renames critical.db atomically, so reading the live path twice
  could pair the old file's checksum with the new file's built_at.

Also lands the three investigation briefs those findings came from.
2026-07-25 13:29:19 -07:00
shitratgit[bot] 94f287f683 receipts: 819-item zero-EnvID purge applied post-1.28.0 upgrade — ceiling 650→900 (Joel authorized), queue rescans clean at 0 2026-07-24 10:48:13 -07:00
shitratgit[bot] ea3d7e6c37 ops: staged Inngest v1.27.0→v1.28.0 upgrade script — fixes zero-EnvID cron minting (upstream faff716c8, PR #4419); checksum-pinned, backup + guarded service rewrite 2026-07-24 08:49:31 -07:00
shitratgit[bot] a7ef26a413 scripts: harden NAS archive writes
archive-memory-observations requires the archive root to resolve under the NAS
root. snapshot-panda-system-log refuses to overwrite an existing snapshot or
receipt and verifies post-copy bytes/sha256 against the source.
2026-07-22 09:28:18 -07:00
shitratgit[bot] 97f3bb76d4 message-event-stream: Inngest consumer for the append-only log
Registers message/event-consumer on the host worker (event + cron triggers),
adds the message/event.consume.requested event type, a live proof script, and
the Brain work receipt. Convex deploy of the backing schema is still blocked;
step status set to blocked with receipts.
2026-07-22 09:28:18 -07:00
shitratgit[bot] d68f50cff5 agent-comms-gateway: pre-flight — rollback script + gateway boot brief; pre-gateway-cutover pinned at bfd8e58e 2026-07-21 13:29:38 -07:00
Joel Hooks 8a25957c16 feat: dedupe session index, reconcile legacy outbox to zero
91 byte-proven duplicate Runs / 1,043 chunks removed across 24 sources
(including tonight's live ee2cabd9 incident, resolved exactly as
alerted). 977 outbox files reconciled through the canonical replay
tool: 911 redundant, 59 covered, 7 suffixes indexed; files retained by
the never-delete rule. Backup + SHA receipts kept; independent post-
pass check: integrity ok, zero overlap pairs.
2026-07-20 16:22:54 -07:00
Joel Hooks a744648d46 fix: key capture conflicts on source identity and cursor
Closes the ack-loss inflation class (root cause 32e6e13a): the server
resyncs any post matching an existing (source_identity, from_offset)
regardless of run_id; clients write pending entries on ack-ambiguous
paths; the session-index consumer rejects ANY non-exact-start range
intersection loudly. QA-verified with the live failure chain replayed
plus retry/concurrency/isolation variants; the one NOT PROVEN claim
(different-start overlap) fixed with the verifier's fixture as a
regression test.
2026-07-20 16:08:33 -07:00
Joel Hooks d135f8f9c8 fix: loud total-failure exits and flap-damped synthetic monitor
Replication verifier refuted two claims: all-backend failure exited 0,
and today's container flapping produced 7 transition alerts. Recall and
knowledge now exit 1 on total failure with the full failure chain;
the synthetic monitor requires 2 consecutive confirmations per
direction plus a 30-minute failure quiet floor.
2026-07-20 16:06:01 -07:00
Joel Hooks c33efc5ff6 feat: NAS replicas live — close replication step
Both containers up after the chmod fix; synthetic checks green on
three-body and maturin; outage proof passed (servedBy: three-body with
flagg-local skipped). Keep-alive flake fixed: clients send
connection:close, shim declares HTTP/1.1 for the next image build.
2026-07-20 15:53:59 -07:00
shitratgit[bot] 70ffa78ff2 feat(purge): --all-functions widens the fence to any envID-less item (requires --accept-scan)
Bounce-minting lands on whatever was in flight, so the five-prefix fence
misses fresh mints (9 items across 5 arbitrary functions post-purge).
Authorized by Joel 2026-07-20 for window-scoped runs; ceiling unchanged.
2026-07-20 12:03:54 -07:00
shitratgit[bot] 509ae8d2da chore(purge): vendor the v1.27.0 DequeueByJobID Lua the purge tool executes 2026-07-20 11:29:25 -07:00
shitratgit[bot] aaa979eb60 feat(purge): --accept-scan window-scoped authorization — criteria fence + 650 ceiling instead of exact count
Bounces mint envID-less items (595→597 across one bounce), so an exact
pre-pinned count is stale by apply time. Joel authorized window-scoped
re-scan 2026-07-20: same five function prefixes + missing-envID criteria,
hard ceiling 650, manifest regenerated at scan. Default exact-count mode
unchanged.
2026-07-20 11:29:08 -07:00
shitratgit[bot] 2d34e1f0bc replay-capture-outbox: verify against sessions.db instead of retired Typesense runs_dev
The capture replay verifier read the retired runs_dev collection, which
schema-drifted (missing source_identity -> HTTP 400) and false-conflicted
on fresh accepts. Query the canonical session index directly instead:

- exactRun/capturedSiblings are bun:sqlite queries against
  ~/.joelclaw/search/sessions.db (--sessions-db / SESSION_INDEX_PATH)
- resolve run-store-relative jsonl_path against RUN_STORE_PATH
  (~/.joelclaw/runs-dev), same convention as joelclaw sessions
- open read-write with PRAGMA query_only=ON: WAL sidecars vanish between
  writer sessions and a readonly open then fails with SQLITE_CANTOPEN
- tests seed a fixture sessions.db instead of faking a Typesense server
2026-07-20 07:18:05 -07:00
Joel Hooks f454962414 feat: stage critical.db replication to both NAS boxes
Generation-guarded SSH sync every 60s to three-body and maturin (local
Btrfs, atomic publish, older-generation and checksum conflicts fail
closed). Hardened read-only FTS5 shim containers staged on both hosts
(token auth, caps dropped). CLI walks flagg -> NAS-A -> NAS-B with
servedBy provenance; synthetic reads every 120s alert on failure and
recovery. 26 tests. Step stays blocked: container start needs Joel's
sudo on each NAS.
2026-07-19 22:56:01 -07:00
Joel Hooks 24b8fc3cd4 docs: harvest identity findings and fleet deploy; settle observer vocabulary
Identity: the 0/64 backlink failure tested the wrong field — observer
pages reference capture conversations (822/1,022 map exactly); the fake
runIds were Slack work-state producer IDs flattened by critical-search.
Vocabulary resettled to capture-conversation references; implementation
step chartered. Fleet: flagg/blaine/panda proven on c0299e6b with
provenance canaries; dark-wizard retired.
2026-07-19 22:13:12 -07:00
Joel Hooks ebea3b9d65 feat: wire session index into capture path and CLI reader
memory/run.captured appends to WAL-backed sessions.db before Typesense
(one transaction, SHA-256 conflict detection, idempotent under real
InngestTestEngine retry). joelclaw sessions search opens sessions.db
with rg-over-raw fallback. Bounded catch-up backfill added. Parity vs
healthy run_chunks_dev: 449,220 vs 3,570,503 chunks (87.42% reduction).
run_chunks_dev untouched; retirement awaits the cutover review.
Packet: .brain/projects/typesense-reboot-recovery/cutover-review-packet.svx
2026-07-19 21:29:52 -07:00
Joel Hooks 900c10325f feat: serve critical search from replicable SQLite FTS5
joelclaw recall and knowledge search open ~/.joelclaw/search/critical.db
first (29,906 docs: observations, Brain pages, vault, knowledge,
archived memory) with per-source freshness and clean fallback to
Typesense on any SQLite failure — proven through the compiled binary.
Builder holds an exclusive lock, refuses degraded or collapsed sources
(caught five malformed live pages), and swaps atomically. Observer refs
are honest source-labels (resolvableInRunsDev: false).

Refuted once by adversarial verification (fallback crash, unsafe
builder, fake backlinks); reworked and re-verified CONFIRMED on every
count. Receipts: critical-port-verification.svx
2026-07-19 21:07:48 -07:00
Joel Hooks 1188959466 feat: add compacted session index builder and validator
FTS5 sessions.db from the manifest keep-set: 134,013 Runs, 447,609
chunks, chunking via packages/memory/src/chunking.ts directly.
Adversarially verified: independent re-hash of all skipped bodies,
independent chunk parse, integrity clean. Cutover preconditions
recorded on the review step (WAL flip, reader/append wiring, parity).
2026-07-19 20:39:50 -07:00
Joel Hooks 7e2fb01252 fix: stop session-capture prefix inflation at the source
Capture clients (pi, claude, codex) send byte-accurate from_offset,
to_offset, jsonl_sha256, and deterministic source_identity. Stale
cursors coalesce into one pending outbox segment under one Run ID.
capture-outbox-replay.ts is the only replay implementation; the audit
script fails closed on legacy flags and the scheduled nas-backup caller
is migrated. Raw Run writes reject divergent redelivery; a larger
proven-prefix body returns accepted_prefix without overwrite.

Verified adversarially (multi-byte offsets, repeated stale cursors,
fixture-only replay): 20 bun tests + 2 vitest + tsc clean. Receipts in
.brain/projects/typesense-reboot-recovery/patch-verification.svx.
2026-07-19 20:10:39 -07:00
Joel Hooks c971ce8bdb feat: add reproducible Run manifest generator
Read-only scan of ~/.joelclaw/runs-dev producing byte-proven
prefix-coverage verdicts per Run. Receipts in
.brain/projects/typesense-reboot-recovery/run-manifest-summary.svx.
2026-07-19 19:47:47 -07:00
shitratgit[bot] 22da7c94c9 fix(audit-backup): truthful verifier and replay receipts
- File verification records ok/missing/timeout/error with null counts
  on timeout/error instead of fake zero files / missing backup.
- Replay receipts preserve child exit code, skipped-large count, and
  the first concrete child error; failures land in the host error list.

Forced-fixture validated (1 ms timeout -> backupStatus timeout,
unreachable Central -> failed attempt + Connection refused, healthy
fixture still passes). Receipts in dark-wizard
.brain/projects/fleet-check-maintenance-2026-07-18/.
2026-07-18 22:09:31 -07:00
Joel Hooks 997275cce6 memory: retire legacy stack + system log — one migration
joelclaw recall and voice recall now answer from Brain/observation
stores (19 tests). memory_observations archived to NAS (28,050 docs,
238MB, sha d2f3038d, verified) and dropped. Zombie functions
(reflect/review-promote/proposal-triage/batch-review) unregistered and
deleted with the MEM/FRIC suites (-6,306 lines). System log retired:
panda copy snapshotted (3,981 lines, sha 4e8e815d), slog write path /
system-logger / sync + backup + PDS mirror removed. Per decisions
decide-legacy-memory-retirement + decide-system-log-home.
2026-07-17 17:00:29 -07:00
shitratgit[bot] d5ee515510 fix(memory): harden capture and plan safe outbox replay 2026-07-17 17:00:29 -07:00
Joel Hooks 0c561c9287 canary: match journal origin_system_id composite (source:eventId) — attempt-2 rows prove the acting path was healthy; canary was blind, not delivery 2026-07-17 10:52:42 -07:00
Joel Hooks 92a35d4887 feat: slack-work-state-pass — hourly live sweep, pages + state-change wakes
Dedicated Inngest cron (17 * * * *) on the host worker: bounded live
conversations.history sweep per allowlisted channel (cc-matt-p +
brain-joel), non-Joel human roots classified untagged/started/shipped
from Joel's root reactions — Slack stays the only store. Finding runs
write one sensitive observation page (no message bodies); wakes fire
only on state transitions via joelclaw notify --event-id with 7-day
Redis dedup. Funnel: scripts/work-state-pass-funnel.ts. Seeded proof
01KXRGVJD5JPS8JGH95JP7PJSN (page + one wake), live run proved zero
repeat wakes. Closes the slack-work-state brief — all steps done.
2026-07-17 10:31:31 -07:00
Joel Hooks 6b1e29efc4 invisible-delivery root cause + fix: (1) normal-priority operator memories were digested (kind mapping now honest for the whole operator lane), (2) redis acting shim stamped confirmed unconditionally (redis.ts:802) — deliveryState now truthful through envelope+OTEL, (3) journal Effect.as(true) faked durability — receipts now carry written/queued; confirmed structurally requires platform message id + journal readback; visible-delivery canary added to flip runbook; hot-dog memory unburned; 173 gateway tests green
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 16:30:02 -07:00
shitratgit[bot] 9360edf63f fix(content): point custody paths at joelclaw-api 2026-07-15 16:47:09 +00:00
Joel Hooks ce155fc23c feat(skills): agent-usage-scan fn, capture-backup + daily-shitrat skills
New agent-usage-scan Inngest function, repo copies of the
agent-session-capture-backup and daily-shitrat skills, and a satellite
NAS mount installer script.

"The best modules are deep." -- A Philosophy of Software Design, John
Ousterhout

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:29:40 -07:00
Joel Hooks 546fd62f0e chore(infra): satellite-rig setup, NAS-by-IP, brain notes, fn registry
Satellite rig runbook/setup hardening, NAS_HOST pinned to LAN IP per
mount contract, agent-mail daemon uv resolution, CLAUDE.md + brain
areas/pipeline notes, and function registry wiring for the new
usage/webhook/backup functions.

"direct exposure and experience, documentation, or a runbook" -- the
three ways knowledge transfers, Observability Engineering, Ch. 11

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:29:40 -07:00
Joel Hooks eed65f81e1 feat(backup): agent session capture-backup to NAS
system/agent-session.capture-backup.requested event + audit-backup
script wired into nas-backup, with model-router escalation on backup
failures behind JOELCLAW_BACKUP_FAILURE_MODEL_ROUTER.

"Data durability, backup, and recovery" are where mixed transactional
and nontransactional solutions quietly corrupt -- Site Reliability
Engineering, Ch. 26

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:28:25 -07:00
Joel Hooks 66d000a1f9 feat(observability): cut OTEL event storage over to ClickHouse
ClickHouse store with durable outbox + forward mode for satellite
workers (OTEL_STORE=forward -> flagg), clickhouse-otel capability
adapters for cli/sdk, backfill script, and cutover runbook. Raw OTEL
stops writing to Typesense; launchd/k8s env updated to match.

"For the observability domain, rows pertain to individual telemetry
events, and columns pertain to the fields or attributes of those
events." -- Observability Engineering, Ch. 16

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:28:25 -07:00
shitratgit[bot] aa99bcbe4e docs: capture central topology and operator skills 2026-06-26 08:05:41 -07:00
Joel Hooks 9cc02f6e40 Harden satellite bootstrap for flagg repair path 2026-06-07 20:58:55 -07:00
Joel Hooks c430f0a265 Make satellite bootstrap verify central joelclaw via fallback paths 2026-06-07 20:04:29 -07:00
Joel Hooks bc5738f3e2 Teach satellite bootstrap to source Typesense config safely 2026-06-07 20:02:35 -07:00
Joel Hooks fc8d8a2644 Persist direct Colima operator access and add portable Typesense export tooling 2026-05-30 15:51:58 -07:00