Emit ticket descriptions as markdown, and convert past tickets in Tinker #38

Open
opened 2026-11-23 01:01:45 -05:00 by jared · 1 comment
Owner

Why

Tinker is switching ticket descriptions from plain text to rendered markdown (LotusGuild/tinker_tickets#114). Gandalf, MCP and manual tickets already write markdown and currently show it raw.

hwmonDaemon builds its descriptions as a fixed-width box layout (┏━┃┣┗, │ column separators, space-padded to 80 characters) in _generate_detailed_description() (hwmonDaemon.py, around line 1433). Once descriptions render as markdown, that alignment is lost: runs of spaces collapse, lines that start with - become list items, and _/* can turn into emphasis. The tickets will look jumbled.

Prod has 154 hwmonDaemon tickets in this format (all [auto] titles whose description contains box-drawing characters).

1. Generate markdown

Replace the box layout with plain markdown, for example:

## Hardware monitoring alert
| | |
|---|---|
| **Host** | monitor-02 |
| **Generated** | 2026-11-23 00:01:57 |
| **Priority** | P3 - Medium |
| **Issue type** | Ceph cluster issue |
| **Impact** | Warning - action needed soon |

## Ceph cluster status
...

## What to check
1. ...
  • Use ## sections in place of boxed headers.
  • Use two-column tables for key/value blocks (the banner, executive summary and drive details).
  • Use lists for SMART attribute notes and recommended actions.
  • Use fenced code blocks (```text) for raw command output (smartctl, ceph health detail, ...), which keeps it aligned.
  • Avoid em and en dashes (house style).
  • Keep the title format unchanged: Tinker's dedup hash depends on it.

2. Convert past tickets in Tinker's database

  • Open tickets: no action needed. Tinker's create API replaces the description of an open ticket on every report, so they convert themselves on the first run after the new generator is deployed.
  • Closed tickets: these need a one-off rewrite of tickets.description in ticketing_system (CT132).
    • Either convert them with the same formatter from the old fields where they can be parsed, or at minimum wrap the old text in a ```text fence so the box layout stays readable.
    • Select rows with title LIKE '%[auto]%' and box-drawing characters in description.
    • Back up the old text first.
    • Write one audit_log row per ticket, e.g. {"reason": "description converted to markdown (hwmonDaemon#<this>)"}.

Timing

The Tinker change will be merged to development (beta) first. Its merge to main (prod) should wait until this ships, or at least until the closed-ticket rewrite is done, so prod doesn't show jumbled hwmonDaemon tickets in between. The beta and prod sites share one database, so the DB rewrite is done once for both.

🤖 Generated with Claude Code

## Why Tinker is switching ticket descriptions from plain text to rendered markdown (LotusGuild/tinker_tickets#114). Gandalf, MCP and manual tickets already write markdown and currently show it raw. hwmonDaemon builds its descriptions as a fixed-width box layout (`┏━┃┣┗`, `│` column separators, space-padded to 80 characters) in `_generate_detailed_description()` (`hwmonDaemon.py`, around line 1433). Once descriptions render as markdown, that alignment is lost: runs of spaces collapse, lines that start with `- ` become list items, and `_`/`*` can turn into emphasis. The tickets will look jumbled. Prod has **154** hwmonDaemon tickets in this format (all `[auto]` titles whose description contains box-drawing characters). ## 1. Generate markdown Replace the box layout with plain markdown, for example: ```markdown ## Hardware monitoring alert | | | |---|---| | **Host** | monitor-02 | | **Generated** | 2026-11-23 00:01:57 | | **Priority** | P3 - Medium | | **Issue type** | Ceph cluster issue | | **Impact** | Warning - action needed soon | ## Ceph cluster status ... ## What to check 1. ... ``` - Use `##` sections in place of boxed headers. - Use two-column tables for key/value blocks (the banner, executive summary and drive details). - Use lists for SMART attribute notes and recommended actions. - Use fenced code blocks (```` ```text ````) for raw command output (`smartctl`, `ceph health detail`, ...), which keeps it aligned. - Avoid em and en dashes (house style). - Keep the title format unchanged: Tinker's dedup hash depends on it. ## 2. Convert past tickets in Tinker's database - **Open tickets:** no action needed. Tinker's create API replaces the description of an open ticket on every report, so they convert themselves on the first run after the new generator is deployed. - **Closed tickets:** these need a one-off rewrite of `tickets.description` in `ticketing_system` (CT132). - Either convert them with the same formatter from the old fields where they can be parsed, or at minimum wrap the old text in a ```` ```text ```` fence so the box layout stays readable. - Select rows with `title LIKE '%[auto]%'` and box-drawing characters in `description`. - Back up the old text first. - Write one `audit_log` row per ticket, e.g. `{"reason": "description converted to markdown (hwmonDaemon#<this>)"}`. ## Timing The Tinker change will be merged to `development` (beta) first. Its merge to `main` (prod) should wait until this ships, or at least until the closed-ticket rewrite is done, so prod doesn't show jumbled hwmonDaemon tickets in between. The beta and prod sites share one database, so the DB rewrite is done once for both. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

The Tinker change is LotusGuild/tinker_tickets#119. Screenshot 4 there shows how the current box layout renders once it lands. Its main merge is on hold until this issue is done.

The Tinker change is LotusGuild/tinker_tickets#119. Screenshot 4 there shows how the current box layout renders once it lands. Its `main` merge is on hold until this issue is done.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/hwmonDaemon#38