aboutsummaryrefslogtreecommitdiff
path: root/working/triage-telegram-down-launch/proposed.diff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-24 17:42:54 -0500
committerCraig Jennings <c@cjennings.net>2026-07-24 17:42:54 -0500
commitb19d420b11af77e991b4bf14ef5a312c70cbfa3e (patch)
treecbda5af7f2afd1d1523a65b002f4a1aaa48c5ad6 /working/triage-telegram-down-launch/proposed.diff
parentf0c1bc40708615d5b423922c08c1f27e6cf96259 (diff)
downloadrulesets-b19d420b11af77e991b4bf14ef5a312c70cbfa3e.tar.gz
rulesets-b19d420b11af77e991b4bf14ef5a312c70cbfa3e.zip
chore(inbox): park lint-org and telegram fixes from home and .emacs.d
Diffstat (limited to 'working/triage-telegram-down-launch/proposed.diff')
-rw-r--r--working/triage-telegram-down-launch/proposed.diff57
1 files changed, 57 insertions, 0 deletions
diff --git a/working/triage-telegram-down-launch/proposed.diff b/working/triage-telegram-down-launch/proposed.diff
new file mode 100644
index 0000000..72b9cd4
--- /dev/null
+++ b/working/triage-telegram-down-launch/proposed.diff
@@ -0,0 +1,57 @@
+--- claude-templates/.ai/workflows/triage-intake.telegram.org 2026-07-09 13:57:29.819324933 -0500
++++ working/triage-telegram-down-launch/triage-intake.telegram.org.proposed 2026-07-24 17:26:36.349127827 -0500
+@@ -30,6 +30,20 @@
+ unless Craig has Telegram open in Emacs. The scan therefore runs the full
+ lifecycle every time, never skips because the server is down:
+
++⚠ *DOWN / not-loaded is the TRIGGER to launch, never a reason to skip or fail.*
++This is the exact mistake two projects (work + home, 2026-07-24) made: they
++probed telega, saw =(telega-server-live-p)= nil or telega not =featurep=, and
++reported =SCAN FAILED: telegram — not loaded= or a silent SKIP — a *blind*
++sweep — instead of running Step 1 to start it. A down or unloaded telega is the
++normal entry state; =(telega t)= both LOADS the package and STARTS the docker
++server (work confirmed: down → =(telega t)= → Ready, 18 chats). So the plugin
++MUST run Step 1's launch whenever telega is down/unloaded, wait for Ready, then
++scan. =SCAN FAILED= is reserved for a launch that was actually ATTEMPTED and did
++not reach Ready (image missing, server crash on start, daemon unreachable) —
++never for the pre-launch down state itself. The =:ENABLED:= guard above tests
++whether telega is INSTALLED (=fboundp=), not whether the server is up; a down
++server never disables the source.
++
+ 1. Record prior state: TELEGA_WAS_RUNNING via (telega-server-live-p).
+ 2. Launch (only if not running):
+ emacsclient -e "(progn (setq telega-use-docker t) (telega t) 'started)"
+@@ -48,10 +62,13 @@
+ Verify: telega-server-live-p → nil, no zevlg/telega-server container in
+ docker ps. If Craig had it running, leave it untouched.
+
+-If any lifecycle step fails (docker image missing, server crash, daemon
+-unreachable), the sweep reports it as SCAN FAILED at the top of the summary
+-per the engine's failure rule — never as a silent skip. Craig gets real
+-traffic here.
++If any lifecycle step fails *after the launch was attempted* (docker image
++missing, server crash on start, daemon unreachable, Ready never reached), the
++sweep reports it as SCAN FAILED at the top of the summary per the engine's
++failure rule — never as a silent skip. This does NOT cover the ordinary
++pre-launch down state: a down server means "run Step 1," not "SCAN FAILED."
++Craig gets real traffic here, so a blind sweep that skipped the launch is worse
++than a clean failure — it hides real unread messages behind a false all-clear.
+
+ ** Scan
+
+@@ -88,7 +105,15 @@
+ # `(telega t)` starts without popping the root buffer. Docker mode (the stable
+ # path — see the SEGFAULT gotcha) reconnects the persisted ~/.telega session in
+ # ~2s. Then load the main chat list so telega--chats populates.
++#
++# The `(setq telega-use-docker t)` is mandatory and must come BEFORE `(telega t)`:
++# tdlib segfaults in native mode (SEGFAULT gotcha below), and the daemon's default
++# is nil unless something (e.g. an Emacs-config :custom) has already forced it. It
++# was missing here while the Quick Reference and the gotcha both require it —
++# a session that started telega without it on a native-mode daemon would crash the
++# server, surfacing as a triage SCAN FAILED. Match the Quick Reference exactly.
+ emacsclient -e "(progn
++ (setq telega-use-docker t)
+ (unless (and (fboundp 'telega-server-live-p) (telega-server-live-p)) (telega t))
+ 'started)"
+ # Poll until Ready with chats synced, or a crash/timeout. Background this with an