Commit Graph

231 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] 31b2f1efa2 fix: include exact remote workstream refs in memory review 2026-08-24 23:39:50 +00:00
shitratgit[bot] 913456b7d3 feat: add recent fleet memory review 2026-08-24 23:34:27 +00:00
shitratgit[bot] f8d3fc77b7 fix: decode failed flowing health receipts 2026-08-24 17:09:47 +00:00
shitratgit[bot] 57c20f9845 feat: cut over to composed flowing recall 2026-08-23 18:26:04 +00:00
shitratgit[bot] 825a1fadc6 feat: add scoped recall comparison 2026-08-23 06:36:18 +00:00
shitratgit[bot] 3c5232e48f fix: restore docs recovery and readiness 2026-08-17 07:49:57 -07:00
shitratgit[bot] 1a70a43f96 feat: isolate book search and ingestion 2026-08-11 04:38:50 +00:00
shitratgit[bot] cc1275a41e observations index: prune by id diff instead of hourly collection wipe
The hourly LaunchAgent ran a filter-delete of every document
(started_at:>=0) before each reimport. On 2026-08-05 08:02 that write
wedged Typesense 30.2's batched indexer while holding the collection
lock; searches exhausted all 16 threadpool threads in 48 seconds and
the server served nothing but /health 200s for four days.

Docs already use slug as id, so upsert was always idempotent. The wipe
only existed to remove deleted files; export ids + delete the stale
few does that without a mass delete on a serving collection. Files
that fail to parse keep their indexed copy instead of vanishing.
2026-08-09 09:31:15 -07:00
shitratgit[bot] 6e4d198a7f fix(slack): enforce one bot-owned work result 2026-08-05 23:23:59 +00:00
shitratgit[bot] cc16a18d1e fix(slack): export user token and normalize reply threads 2026-08-05 22:49:23 +00:00
shitratgit[bot] 5caff4bf78 fix(slack): route satellite replies through Central 2026-08-05 17:32:40 +00:00
shitratgit[bot] 558f526cf7 feat(slack): add gateway-owned thread replies 2026-08-05 17:23:39 +00:00
shitratgit[bot] 0b9b2fce49 docs(search): record Typesense debris cut 2026-07-29 19:27:45 -07:00
shitratgit[bot] 60d5333730 fix(search): retire Typesense run projections 2026-07-29 19:10:22 -07:00
shitratgit[bot] 15f378e8fb notify: kind tagging enforced at the boundary — telegram-quiet step
notify send warns on missing --kind and defaults to receipt (review
making it required 2026-08-12). check-system-health tags alert/receipt/
digest, check-email tags ask, voice canary + NAS soak timers tagged,
redis-backup already correct via sendHardAlert. Judgment prompt names
kind as primary routing evidence. Remaining untagged: external
cli/notify callers, check-gateway-health, pane-schedule. 66 targeted
tests re-run green by steering. Correction: audit had 140 kind-less
messages (119 was the priority count).
2026-07-29 16:30:49 -07:00
shitratgit[bot] 94a8c8d27e fix(cli): messages audit falls back to the canonical Convex stream
`joelclaw messages audit` has failed fleet-wide since cutover with
MESSAGE_JOURNAL_CONFIG_MISSING. The diagnosis "provision the reader
credentials" was wrong: the legacy ClickHouse journal has no listener on flagg
at all, and the events the command wanted were sitting in Convex the whole
time — the same stream `messages trace` already reads successfully.

Audit now falls back to the canonical stream when the legacy journal is
unconfigured, and labels which source answered. A journal failure that is not
a missing-credential problem still surfaces as an error rather than being
quietly papered over.

Verified live: audit --since 6h returns 100 events with source "convex".
2026-07-25 13:42:28 -07:00
shitratgit[bot] b31dc22716 fix(chains): assert-successor command + dispatcher retry persistence
Two chain deaths this week, two causes:

- 2026-07-21 campaign-pulse: the spawned run died on a WebSocket error before
  arming its heir. Fire-and-forget arming left no trace. `joelclaw wake
  assert-successor` now re-reads the registry, requires exactly one future
  successor, and alerts by chain name when verification fails.
- 2026-07-22 daily-flow (schedule 853efe38): the dispatcher logged "attempt 1 of
  3" and dropped the schedule. Pending schedules now survive failures 1-2 for the
  reconciler to re-emit; only exhaustion clears and alerts, exactly once.
2026-07-24 11:51:42 -07:00
shitratgit[bot] cc410bf260 cli: add canonical observer target commands 2026-07-22 09:25:30 -07:00
shitratgit[bot] 61422de8de agent-comms-gateway: land priority-lane stash + stream seams (readSince pagination, typed gateway events) — 2 steps closed 2026-07-21 12:30:02 -07:00
Joel Hooks 728614cf8c feat: observation reference contract — verified capture-conversation refs
Recall hits carry observerSessionReference (kind capture-conversation,
resolvableInSessionsDb verified per hit) and producerRunId; the
work-state-pass producer stops minting generic runId; a read-time
resolver joins sessions.db by conversation_id within the epoch window,
returning all candidate Runs. Live proof: 827/827 observation pages
resolve. Mint-side changes ride in joelclaw-observer.
2026-07-20 16:27:13 -07:00
Joel Hooks ae47ca1030 refactor: one shared freshness rule in @joelclaw/memory
evaluateCriticalDbFreshness + CRITICAL_DB_REQUIRED_SOURCES exported
from packages/memory; the port and the maintenance alert import it and
their duplicated copies are gone. Both fixture suites pass byte-
unchanged — behavior identical by construction. pnpm-lock entry for the
new cli->memory workspace dep rides with the pending message-event lock
update.
2026-07-20 16:15:23 -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
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 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
shitratgit[bot] e85688acec fix: recognize graceful gateway relaunches 2026-07-20 01:32:05 +00:00
Joel Hooks 7e9d556dee feat: gateway doctor — health, restart, and delivery truth in one obvious command
joelclaw gateway doctor prints PASS/FAIL for daemon (with crash-relaunch
detection against an operator restart marker), live gateway source
CLEAN/DIRTY (a running daemon plus dirty source is today's outage), and
transport state; --live proves delivery with a real probe that must
return a Telegram platformMessageId — confirmed telemetry alone fails.
Every FAIL prints its exact remediation command. gateway restart writes
the marker and ends with the doctor summary.
2026-07-19 13:13:37 -07:00
Joel Hooks f9fe273cda feat: button-native telegram actions ride message/action.requested
Joel rejected emoji reactions as the operator action API (2026-07-19).
Labeled inline keyboard buttons on outbound DMs publish
message/action.requested with kind: callback and stable learner-flow.*
action ids; the callback_query owner answers, authorizes, resolves
flowId, verifies the declared action, then publishes. Legacy reaction
consumer stays until the live Seen canary passes.
2026-07-19 09:50:50 -07:00
shitratgit[bot] ba3976b2ff messaging: explicit --kind for notify send; reaction actions in contract v2
joelclaw notify send now accepts --kind memory|alert|digest|ask|receipt,
passed through the Redis envelope and honored by the gateway compat shim
(invalid kinds are rejected instead of guessing a lane). Without --kind,
low/normal-priority sends are inferred as digest, which the Telegram
digest-lane classifier may silently suppress — that suppressed a
Joel-requested message twice on 2026-07-18. Operator-lane kinds
(ask/alert/memory) always deliver. CLI next_actions now point at otel
delivery verification instead of the ignored --telegram-only flag;
skills/messaging documents the flag and the verify rule.

Also lands the in-flight contract-v2 reaction-actions work from a
concurrent session (MessageAction schema in message-contract, telegram
adapter action messages, notify context.actions passthrough, inbound
reaction callback normalization) — entangled in the same files and
committed together deliberately.

81 tests pass across message-contract, chat-sdk, chat-sdk-inbound, sdk;
tsc clean. Live on flagg since 2026-07-18 (gateway restarted, CLI
rebuilt, kind=ask delivery confirmed via notify.compat_v2.confirmed).
2026-07-18 18:18:20 -07:00
Joel Hooks 9b1d85a157 feat(memory): retro writer — memory/retro.requested → condenser → .svx
joelclaw retro <brief-path> fires the event; memory-retro-writer reads
the closed brief + step Result sections, enforces the noise bar (<3
steps and no ledger → skip with OTel warn), condenses via pi, and
atomically writes dark-wizard .brain/resources/retros/<slug>-<yyyy-mm>.svx.
Per decide-retro-writer. 7 tests.
2026-07-17 17:00:30 -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
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 9b0dec533c bot identities provisioned: Discord app id + public key stored in secrets daemon and wired into gateway channel config (channel stays disabled); Telegram polling-mode + Slack reactions:read proven by API; one Joel item remains (Slack Event Subscriptions UI readback doesn't exist)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 12:47:01 -07:00
shitratgit[bot] 6bfc560ff0 cli: joelclaw messages audit + trace
New messages domain over the @joelclaw/message-journal query client.
Typed MESSAGE_JOURNAL_CONFIG_MISSING envelope until scoped reader
credentials exist. HATEOAS envelopes, otel.ts command pattern.

Step: .brain/projects/telegram-signal-system/cli-messages-commands.svx
2026-07-16 05:27:21 +00:00
shitratgit[bot] 48c8506ce9 fix(fleet): probe the local host without SSH 2026-07-15 16:46:47 +00:00
Joel Hooks 0effed099a feat: pane schedule bus side — durable WAKE/SPAWN/REVIVE clock on inngest
pane/schedule.requested contract, sleepUntil function with cancellation
waitForEvent race, Redis pending registry, joelclaw wake CLI. Emits
pane.schedule.due to the gateway with late flag past 5min. Worker-built,
steering-verified: tsc green, tests green, live enqueue+cancel receipts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks bd15ec0002 feat(video): thin cloud client leases + registry assertion + trace slug contract
Worker drops Mux/Garage/joelclaw-api leases for the video path (wzrrd
owns upload and durable state); host registry asserts only the thin
publish function; joelclaw video trace accepts wzrrd slugs and points
at wzrrd video trace for cloud history.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks 331799b3fa feat(video): joelclaw video trace command + wzrrd service token lease
joelclaw video trace <resourceId|slug> reconstructs a publish from
ClickHouse forensics + Inngest runTrace GraphQL (notes when coarse v1
status disagrees). Worker leases WZRRD_VIDEO_SERVICE_TOKEN for the
wzrrd push seam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks b71f5aa314 fix: machine-aware k8s health — k8s lives on panda, flagg reports not-hosted-here as healthy
Host→service placement as data (endpoint-resolver config), shared
probeK8sHealth for check/system-health and joelclaw status, hostname
normalized before lookup. On non-hosting hosts kubectl never executes
and k8s never enters degraded/criticalDown/system.fatal. Remote tailnet
probing deferred (flagg has no panda kubeconfig). Worker-built,
steering-reviewed: 23 targeted tests, tsc green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks 2d5c9a9ed9 reflector acceptance: first real dream — archive-aware briefing index, bench fixtures follow the substrate, question closed
memory-skill-index: reflector-archived originals go quiet (rollups rank
instead); rollups/dream-receipts never narrate the arc. Bench fixtures:
two dead wayfinder paths repaired to successor briefs; the archived
observation fixture follows its page into archive/ (identity survives
via canonicalPageKey normalization on the wiki side). Reflector question
closed with full acceptance receipts; nightly LaunchAgent + week/month
ladder graduated as its own question.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks 5f6660f539 joelclaw briefing: memory skill-index v1 — repo-scoped heading + budgeted unfoldable index (worker-built; question closed w/ receipts)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:54 -07:00
Joel Hooks 11ab119bc4 fix(cli): observations index skips invalid pages loudly instead of stranding the batch
One '[REDACTED]' tokens field (distiller redacted a count because the field is
named tokens) aborted the whole run, leaving 5 pages unpublished. Now: index
the valid, return skipped[] with per-file errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:53 -07:00
Joel Hooks a5e84e6f82 feat(cli): observation-layer recall — observations index + sessions search defaults to distilled layer
Built by pi worker (Knackered Stratford) per build-observations-recall-typesense;
reviewed by steering: 75 observations indexed (rebuildable projection, files are
truth); sessions search returns gists + canonical brain.joelclaw.com URLs with
sensitive labeling, --raw preserves chunk search; stale dark-wizard ssh default
fixed. tsc clean; biome clean on touched package (repo-wide blocked by
pre-existing unrelated import-order errors).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:25:53 -07:00
shitratgit[bot] e23d3c661f fix(cli): route session search to flagg 2026-07-12 22:09:41 +00:00
shitratgit[bot] f641cd1277 fix(cli): restore docs semantic vector search 2026-07-12 01:54:44 +00:00
shitratgit[bot] 6bf6c477b5 fix(ops): restore executable script modes 2026-07-11 02:42:22 +00:00
shitratgit[bot] 8e3dae1ec0 feat(fleet): add manifest-driven host status and diff 2026-07-11 02:39:04 +00:00
Joel Hooks 58ee00c49d feat(usage): pricing benchmark wiring, agent-source rollups, review fixes
- summarizeRollupCost: OpenRouter-benchmark cost for rows without provider
  cost, wired into joelclaw usage and the daily token report
- clickhouse-usage-query: source option (router|agents|all) so agent_usage.turn
  tailer events roll up alongside model_router.result; coverage % is router-only
- claude tailer parser: dedupe by message.id (Claude Code repeats usage per
  content-block line; counts inflated ~2x) — inflated rows purged, offsets reset
- inference: non-zero pi exit with empty output now fails for json callers too
  (was recorded as circuit success); --mode json event-stream soup no longer
  leaks into result.text; caller metadata can't clobber usage fields
- daily report: rollup widened to 5000 groups; agent-sessions line added
- k8s worker manifest published with SLOG_SYSTEM_ID (pod blocked by
  pre-existing flannel failure, see brain note follow-ups)
- brain notes + skills updated: langfuse decommission receipts, usage receipts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 09:55:32 -07:00