Commit Graph

1968 Commits

Author SHA1 Message Date
Joel Hooks aaab249089 docs: log live growth alert (ack-loss class, fix in QA) for dedupe 2026-07-20 16:02:17 -07:00
Joel Hooks 07de590f36 docs: rephrase keying verification task after model content flag 2026-07-20 16:00:22 -07:00
Joel Hooks 5da6b163db docs: record keying rework result, spawn its verifier 2026-07-20 15:56:29 -07:00
Joel Hooks bd8cf91071 docs: spawn replication verifier 2026-07-20 15:54:25 -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 335bfe0f47 fix: make replica server.py world-readable in image
COPY preserved the staged 0640 joel-owned mode as root-owned in the
image, so the non-root runtime UID crash-looped on Errno 13 on both
NAS hosts.
2026-07-20 15:48:29 -07:00
Joel Hooks 71db9dd392 docs: charter ack-loss conflict-keying fix from reboot-fallout handoff
Growth alert true positives, root cause 32e6e13a: lost ack after
server commit lets a fresh run_id bypass run-keyed prefix-resync.
Fix step (source_identity+from_offset keying) launched; dedupe and
legacy outbox drain chartered behind it.
2026-07-20 15:38:44 -07:00
shitratgit[bot] 32e6e13ae4 reboot-hardening: capture-replay root cause filed — ack-loss defeats run_id-keyed conflict detection; handoff to typesense-recovery 2026-07-20 15:36:46 -07:00
shitratgit[bot] e2b7a69a21 reboot-hardening: err log truncated (35.3GB freed) with pre-truncation census; rotation decision handed to resilience effort 2026-07-20 14:34:41 -07:00
shitratgit[bot] 482473ae59 fix(alerts): capture-growth DM quiet window 60m → 24h — hourly re-alerts across ~90 replaying sources were sustained spam
Detection unchanged: incident store + fatal OTEL record every finding.
The replay itself (post-outage capture catch-up / Typesense recovery
backfill) still needs its cursor fixed — that work belongs to the
typesense-recovery effort; this stops the pager noise.
2026-07-20 13:37:48 -07:00
shitratgit[bot] 8fb28dba27 reboot-hardening: purge step closed — 597+9 dequeued, lease spam zeroed (was ~23k/10min) 2026-07-20 13:21:42 -07:00
Joel Hooks 44188ebb61 herdr-reboot-triage: voice judge lane resolved — pointer to diagnosis receipts 2026-07-20 12:05:35 -07:00
Joel Hooks 08c00cd9e1 call-tuning-loop: judge scheduling diagnosed CLOSED — idempotency-by-room removed, proof landed
Scheduling was never broken. Room-keyed idempotency (24h window) swallowed
every same-day re-drive (07-13: 30 NO-RUN; 07-16 probes NO-RUN 46min after
the room's run) while the flapping GQL API hid the successful 07-16 batch.
Fix: idempotency dropped from voice-call-judge (re-judging is a feature).
Proof: event 01KY0EJ88046NDQZBM10321MZH -> run 01KY0EJ8CAARKPA8N651SCSWM9
COMPLETED -> analysis row 1784574252721 via callTelemetry:sessionDetail.
Retro + A/B unblocked.
2026-07-20 12:05:17 -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
Joel Hooks 276d6a0da8 fix(system-bus): hard-alert receipt timeout must not re-send the alert
sendHardAlert threw when the terminal delivery receipt timed out, AFTER
the platform send succeeded. Callers (capture-growth, startup-budget,
critical-db) retried the whole notify path, re-sending the same Telegram
alert on every event/retry — the 2026-07-20 spam incident. Receipt
failure now returns {sent, receiptConfirmed:false} and emits a warn
otel event; only a failed send throws.

NOTE: takes effect on next system-bus worker publish. Do not publish
from a dirty tree — other sessions have uncommitted system-bus work.
2026-07-20 11:58:15 -07:00
shitratgit[bot] 8ec0793cad fix(system-bus): campaign-pulse button acks append to ack-log.jsonl, not pulse-log.jsonl — the pulse log is one line per pulse (Joel, 2026-07-20); existing ack rows migrated so rawEventId dedup history carries over 2026-07-20 11:32:14 -07:00
shitratgit[bot] 79eb848069 reboot-hardening: minter step closed — scoped recovery installed, hours of clean passes 2026-07-20 11:29:55 -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
Joel Hooks f283e87cc3 herdr-reboot-triage: record workspace consolidation — 52 panes closed, 6 live remain 2026-07-20 10:35:56 -07:00
Joel Hooks 0397833e68 herdr-reboot-triage: 37 workspaces triaged, report + 15 continuation prompts
Five pi workers investigated every post-reboot workspace. Verdicts:
15 shipped, 11 blocked-on-Joel, 6 active, 4 interesting with
uncommitted work at risk, 1 deliberately abandoned. Report with
inline continuation prompts at
.brain/projects/herdr-reboot-triage/herdr-reboot-triage-report.svx
2026-07-20 10:27:30 -07:00
shitratgit[bot] f3b3e7f68e reboot-hardening: three steps closed live-verified; purge authorization voided at 597 (bounces mint poison)
Dispatcher gate fix, wake reconciler, and both chain revives proven with
live receipts. Purge re-blocked on the minter fix (e40dd493) deploying
and a fresh stable count.
2026-07-20 08:32:11 -07:00
shitratgit[bot] e40dd49362 fix(session-index-health): scope recovery to the failing target, stamp cooldown at attempt time
recover() restarted BOTH Inngest and the host worker for every actionable
reason and advanced the cooldown only when both kicks succeeded — a
failing worker kick meant every 60s pass re-killed healthy Inngest (54
forced replacements after the 2026-07-19 reboot; boot-timeline asset in
.brain/projects/reboot-hardening). Now: only inngest_unavailable touches
the event server; worker_unavailable/index_lag_exceeded kick the worker
alone; the cooldown stamps before success evaluation because kickstart -k
is destructive the moment it runs. Bounces also mint envID-less poisoned
queue items (595→597 across one bounce), so stopping storm restarts
chokes the poison source. Tests updated to the new doctrine + an
inngest-scoping case.
2026-07-20 08:29:46 -07:00
shitratgit[bot] d1a37e8977 feat(system-bus): wake-registry late-fire reconciler — overdue pane schedules re-emit instead of rotting
pane/schedule.reconcile: cron */5 + startup event; quarantines malformed
registry entries, re-emits pane.schedule.due (existing scheduleId,
late/recovered flags) past a 10-min grace, hdel only after emit succeeds
(separate memoized steps, replay-safe). onFailure on pane/schedule is
observability-only and never deletes the pending entry — that entry is
what recovery needs (the de16dde1 reboot case). 6 tests.

Part of .brain/projects/reboot-hardening; verified by adversarial review
in the reboot-automation-fixes workflow.
2026-07-20 07:56:00 -07:00
shitratgit[bot] f7baf7c889 reboot-hardening: boot-gap step closed — no gap; session-index-health killed healthy Inngest 54 times
recover() only advances the cooldown when both Inngest and worker kicks
succeed, so a failing worker kick re-kills Inngest every 60s pass; plus
index-lag wrongly restarts the event server. New step charters the fix.
2026-07-20 07:51:26 -07:00
shitratgit[bot] b936152365 charter: reboot-hardening brief — dispatcher gate, wake reconciler, 595-item purge, boot smoke check
Chartered from the 2026-07-19 reboot fallout diagnosis. Finish line and
purge/exec authorizations confirmed by Joel 2026-07-20. Two steps in
flight via the reboot-automation-fixes workflow; notify-wait step closed
(stale binary, rebuilt 07-19).
2026-07-20 07:43:48 -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 61b8103519 feat: keep critical.db fresh — scheduled rebuilds and staleness alerts
Six-hour rebuild through the hardened builder with stored-incident
failure alerts (no error-text keying), 8h build and 24h high-water
budgets, and a freshness contract behaviorally locked to the port's
rule by fixtures on both sides. Refuted twice by adversarial
verification (text-keyed IDs, split contract), reworked, re-verified
CONFIRMED behaviorally; the remaining rule duplication is chartered as
unify-freshness-rule, blocked on the replication worker's territory.
2026-07-19 22:39:18 -07:00
Joel Hooks eecfb438d9 docs: record freshness rework, spawn re-verifier 2026-07-19 22:33:47 -07:00
Joel Hooks b465dd0f4f docs: reopen freshness step — text-keyed alert IDs, split freshness contract 2026-07-19 22:24:30 -07:00
Joel Hooks 3906cfe182 docs: spawn freshness verifier; observer pages fixed in dark-wizard 362e662 2026-07-19 22:19:14 -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 c0299e6b77 docs: fan out final four typesense-reboot-recovery steps
NAS replication, scheduled freshness + staleness alert, observation
identity reconciliation (analysis-only), fleet capture-client deploy.
Territories partitioned; claims stamped.
2026-07-19 22:04:38 -07:00
Joel Hooks a9b85e0a54 docs: close cutover review — run_chunks_dev retired
Joel approved. Writer retired, collection dropped (3.57M docs), post-drop
canary clean. Restart-time receipt rides the reboot gate.
2026-07-19 21:41:06 -07:00
Joel Hooks 2dd747de22 feat: retire run_chunks_dev write path
Joel-approved cutover (2026-07-20): sessions.db is the only
full-transcript chunk index. The index-chunks Typesense import is
removed, ensureCollections no longer recreates run_chunks_dev, and the
stale web polling hint now points at joelclaw sessions search. Typesense
keeps runs_dev metadata for provenance and health.
2026-07-19 21:38:00 -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 aecae18c5e docs: launch cutover wiring worker 2026-07-19 21:08:31 -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 336a0aa797 docs: charter session-index cutover wiring step
Typesense recovered (~04:00), so real parity replaces the raw-truth
waiver. Wiring step owns WAL flip, append consumer under real retries,
grep-proven reader inventory and switch, parity vs healthy
run_chunks_dev, rollback plan, and the review packet. Cutover review
now blocks on it.
2026-07-19 21:05:25 -07:00
Joel Hooks 539bcaac5c docs: spawn critical-port re-verifier 2026-07-19 21:03:23 -07:00
Joel Hooks 30d8997a54 feat: add capture growth and startup-budget alerts with truthful health
search/capture-prefix-growth-alert: source-scoped incidents (one alert
per incident, explicit clear + quiet-period reset), bounded Redis range
ledger. search/typesense-startup-budget: tracks typesense:runs_dev via
a real projection query; outage clock clears only on query success;
strict budget parsing. /api/runs/health fails truthfully (503) on
stale, empty, outage, and monitor-error states.

Refuted once by adversarial verification (per-Run-pair storms,
process-only budget clock, ok:true on monitor error); reworked and
re-verified CONFIRMED on all five counts. Receipts:
.brain/projects/typesense-reboot-recovery/alerts-verification.svx
2026-07-19 21:02:59 -07:00
Joel Hooks 0b5c0e2881 docs: record critical-port rework result
Fallback via Effect.catchAll with compiled-binary failure tests,
exclusive builder lock, 80% count-collapse publication gate (refused a
real rebuild over five malformed live pages), per-source freshness,
observerRunId label replacing the false runBacklink claim.
2026-07-19 21:00:18 -07:00
Joel Hooks 18a0940a57 docs: charter failure-mode steps from the 2026-07-20 grilling
New steps: keep critical.db fresh (scheduled rebuild + staleness
alert), fleet-wide capture client deploy, observation/Run identity
reconciliation. Replication step gains continuous synthetic reads and
no-NFS rule; cutover gains reader inventory and retry-idempotency
preconditions; gateway-dependent alerting recorded as accepted.
2026-07-19 20:59:41 -07:00
Joel Hooks 9aeb8da0e3 docs: record alerts rework result, spawn focused re-verifier 2026-07-19 20:58:33 -07:00
Joel Hooks 48d9d345b5 docs: reopen alerts step after adversarial verification
Verifier confirmed the July 19 signature fires and patched paths stay
quiet, but found per-Run-pair dedup storms on continued incidents, the
budget clock clears on process health while runs_dev is still 503, and
/api/runs/health hides monitor failure. Conditions 5-7 added; worker
re-engaged.
2026-07-19 20:44:25 -07:00
Joel Hooks b551f76f74 docs: reopen critical-search port after adversarial verification
Verifier confirmed the happy path but found the fallback crashes on
missing/corrupt critical.db, the builder can replace a healthy db with
an empty one, concurrent builds clobber, aggregate freshness masks
stale data, and runBacklink does not resolve into runs-dev. Conditions
5-8 added; worker re-engaged.
2026-07-19 20:43:01 -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 de65e74624 docs: spawn alerts verifier 2026-07-19 20:38:47 -07:00
Joel Hooks 5ae8ac902f docs: record critical-search port result, spawn its verifier 2026-07-19 20:33:09 -07:00