quilt kernel P5-ops: the ledger reports its own health - #5
Closed
SuperInstance wants to merge 1 commit into
Closed
SuperInstance wants to merge 1 commit into
SuperInstance wants to merge 1 commit into
Conversation
Review finding #2 (code half): every WAL projection failure reduced to a console.warn and nothing in production reads quilt_wal — the mirror could die at deploy and nobody would know for a week. - src/quilt/ops.ts: failure counters per kind (recordWalFailure), rows-committed gauge (recordWalCommit), getWalFailureCounts / getWalRowsCommitted / resetWalOps (test hook), and reconcileTick — a cron-ready wrapper around the reconciliation pass that returns a summary and never throws (a failed tick is itself a counted failure). - All five silent catch sites (nominations.ts, lobsterEncounters.ts x4) now count through recordWalFailure; commit.ts counts lock exhaustion (was a bare warn) and successful rows. - Posture unchanged: the user path never sees a mirror exception — drift is now a NUMBER you can alert on, not a rumor. Alert wiring: failureCounts.reconcile_tick > 0 or mismatchCount > 0 in the ReconcileTickSummary; schedule via wrangler [triggers] crons. Suite: 398 tests (5 new ops proofs incl. the real deploy-time failure mode — WAL table missing, vote still records, counter increments). Only the 4 pre-existing artwork/env failures (identical on clean main). Refs openclaw#48
SuperInstance
added a commit
that referenced
this pull request
Sep 20, 2026
Took HEAD's commit.ts (with all accumulated guards + projections).
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Review finding #2 (the code half): every WAL projection failure reduced to a
console.warn, and nothing in production readsquilt_wal— the mirror could die at deploy and nobody would know for a week.What
src/quilt/ops.ts: failure counters per kind, rows-committed gauge, andreconcileTick— a cron-ready wrapper around the P3 reconciliation pass that returns a summary and never throws (a failed tick is itself a counted failure)recordWalFailure;commit.tscounts lock exhaustion (was a bare warn) and successful rowsfailureCounts.reconcile_tick > 0ormismatchCount > 0; schedule via wrangler[triggers] crons(e.g. every 15 minutes)Posture unchanged: the user path never sees a mirror exception. Drift is now a number you can alert on, not a rumor.
Verification
nomination_projectioncounter incrementsmain)tsc --noEmitcleanMerge order: after PR #4. Independent of the tidepool PR (disjoint files).
Refs openclaw#48