From 8eb866dee3b54beb4f42ae1768c80dcf1fadce44 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Wed, 20 May 2026 09:57:59 -0400 Subject: [PATCH] v0.8.2: fix grey background/text cosmetic issues - view-chat draw-text calls: change nil bg to (theme-color :bg) so text characters sit on explicit near-black instead of terminal default background (which appears as grey highlight) - cl-tty bump (v1.2.0: remove \n from draw-rect that caused scroll leaving the last row blank) --- docs/ROADMAP.org | 46 ++++++++++++++++++++++++++++++++++++++++ org/channel-tui-view.org | 14 ++++++------ 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/docs/ROADMAP.org b/docs/ROADMAP.org index 1b7ea5c..a9c9010 100644 --- a/docs/ROADMAP.org +++ b/docs/ROADMAP.org @@ -143,6 +143,52 @@ stabilization of the cl-tty TUI runtime. | Ctrl+Q | Quit | | ? | Help panel | +** v0.8.1: Hardening — Runtime Safety Fixes + +:PROPERTIES: +:ID: id-v081-hardening +:CREATED: [2026-05-20 Wed] +:END: + +Three small fixes that protect the runtime while the TUI stabilizes. Each is a single-session change (minutes, not days). + +*** Heartbeat error handling +:PROPERTIES: +:ID: id-v081-heartbeat +:CREATED: [2026-05-20 Wed] +:END: + +The heartbeat loop in ~core-pipeline.org~ has no error handler. An unhandled condition in any tick kills the thread — auto-save, cron, and background maintenance die silently. The daemon keeps running but the user sees no evidence. + +Wrap the loop body in ~handler-case~, log the error, continue. ~5 lines. + +*** Atomic memory save +:PROPERTIES: +:ID: id-v081-atomic-save +:CREATED: [2026-05-20 Wed] +:END: + +~save-memory-to-disk~ writes directly to the snapshot path. A crash or SIGINT mid-write truncates the file. Next boot reads garbage and starts with empty memory. + +Write to ~path.tmp~, then ~rename-file~. ~3 lines. + +*** Version string consistency +:PROPERTIES: +:ID: id-v081-versions +:CREATED: [2026-05-20 Wed] +:END: + +~passepartout.asd~ says ~0.4.3~, ~core-transport.org~ handshake says ~0.7.2~, ~core-reason.org~ config prompt says ~v0.7.2~, README and CHANGELOG and tags all diverge. Bring all four to ~0.8.0~. Better yet, define ~*version*~ once and reference it. + +| File | Line | Change | +|------|------|--------| +| ~passepartout.asd~ | 4 | ~:version "0.4.3"~ → ~"0.8.0"~ | +| ~org/core-manifest.org~ | 25 | same | +| ~org/core-transport.org~ | 157 | ~(make-hello-message "0.7.2")~ → ~"0.8.0"~ | +| ~org/core-reason.org~ | 260 | ~"v0.7.2"~ in prompt string → ~"v0.8.0"~ | + +~4 lines. + ** v0.9.0: Eval Harness — Safety Net First Every subsequent release ships with automated regression protection. The eval harness is the gate that makes self-modification safe — before any neurosymbolic component modifies the system, the harness verifies nothing broke. diff --git a/org/channel-tui-view.org b/org/channel-tui-view.org index 9543ec6..879597a 100644 --- a/org/channel-tui-view.org +++ b/org/channel-tui-view.org @@ -181,13 +181,13 @@ Returns a list of strings, one per line." do (let ((pairs (aref msg-lines i))) (dolist (pair pairs) (when (>= y panel-top) (return)) - (destructuring-bind (bstr bcolor tstr tcolor &optional rect-bg) pair - (when rect-bg - (cl-tty.backend:draw-rect fb 0 y 1 1 :bg rect-bg)) - (let ((has-border (and bstr (> (length bstr) 0)))) - (when has-border - (cl-tty.backend:draw-text fb hpad y bstr bcolor nil)) - (cl-tty.backend:draw-text fb (+ hpad (if has-border 2 0)) y tstr tcolor nil))) + (destructuring-bind (bstr bcolor tstr tcolor &optional rect-bg) pair + (when rect-bg + (cl-tty.backend:draw-rect fb 0 y 1 1 :bg rect-bg)) + (let ((has-border (and bstr (> (length bstr) 0)))) + (when has-border + (cl-tty.backend:draw-text fb hpad y bstr bcolor (theme-color :bg))) + (cl-tty.backend:draw-text fb (+ hpad (if has-border 2 0)) y tstr tcolor (theme-color :bg)))) (incf y)) ;; spacer between message blocks (when (< i (1- total))