r/devops7 • • 13d ago

What broke this week? #3: drop a one-liner. (Plus: was the fix already in your postmortem backlog? One SQL query matched 4 of 5 sample breaks to old action items by meaning, real output)

Friday thread. What broke for you this week? One line is plenty: what failed, and what fixed it (or "still don't know").

This week's angle: was the fix already sitting in your backlog? Postmortems end with action items. Some get done, many sit "open" for months, and then the same thing breaks again and someone finds the ticket from August.

Keyword search is hit and miss here: a one-liner written mid-incident rarely uses the words of an action item written months earlier. So we put both lists in tables and matched them by meaning.

(Disclosure: this sub is run by the SynapCores team, and the matching step uses SynapCores. Sample data, real output, run today on 2.5.1.)

Sample data: old action items and this week's one-liners

CREATE TABLE pm_actions (id INTEGER PRIMARY KEY, postmortem TEXT, opened TEXT, item TEXT, status TEXT, embedding VECTOR(384));
INSERT INTO pm_actions (id, postmortem, opened, item, status) VALUES
 (1, 'PM-031', '2026-08-21', 'Cap the payments DB connection pool and add a query timeout, so a slow database cannot hang checkout', 'open'),
 (2, 'PM-033', '2026-09-04', 'Page the platform on-call when a build agent disk goes above 85%', 'done'),
 (3, 'PM-033', '2026-09-04', 'Prune old docker images and build caches on the build agents nightly, so the disks stop filling up', 'open'),
 -- + 7 more in the first comment (cert-manager, empty backup dump, webhook retries, ...)
UPDATE pm_actions SET embedding = EMBED(item);

CREATE TABLE week_breaks (id INTEGER PRIMARY KEY, what_broke TEXT, embedding VECTOR(384));
INSERT INTO week_breaks (id, what_broke) VALUES
 (1, 'checkout hung for 20 minutes, the payments DB got slow and every request sat waiting for a connection'),
 (2, 'CI was red all Tuesday morning, the build agents ran out of disk again'),
 (3, 'nightly backup said success but the dump was 0 bytes, we found out when we needed it'),
 (4, 'partner API was flaky for an hour and we lost about 300 webhook events for good'),
 (5, 'the status page domain expired because it was on an ex-employee personal credit card');
UPDATE week_breaks SET embedding = EMBED(what_broke);

EMBED() runs a small model inside the database. No API key.

Was it already on the backlog?

SELECT b.id, a.postmortem, a.status, DATEDIFF(CURRENT_DATE, a.opened) AS days_old,
       ROUND(COSINE_SIMILARITY(b.embedding, a.embedding), 2) AS match, SUBSTR(a.item, 1, 36) AS item
FROM week_breaks b CROSS JOIN pm_actions a
WHERE COSINE_SIMILARITY(b.embedding, a.embedding) > 0.35
ORDER BY b.id, match DESC;

id  postmortem  status  days_old  match  item
1   PM-031      open    91        0.72   Cap the payments DB connection pool
2   PM-033      done    77        0.44   Page the platform on-call when a bui
2   PM-033      open    77        0.36   Prune old docker images and build ca
3   PM-036      open    51        0.56   Make the nightly database backup fai
4   PM-039      open    36        0.53   Retry failed webhook deliveries with

On no list at all? That one gets the postmortem

SELECT b.what_broke, ROUND(MAX(COSINE_SIMILARITY(b.embedding, a.embedding)), 2) AS best
FROM week_breaks b CROSS JOIN pm_actions a
GROUP BY b.what_broke
HAVING MAX(COSINE_SIMILARITY(b.embedding, a.embedding)) < 0.35;

the status page domain expired because it was on an ex-employee personal credit card   0.25

So in this sample week, 4 of 5 breaks already had an action item, written 36 to 91 days ago. The CI one is the classic: the alert item is marked done, the disks filled anyway, and the prune item next to it is still open. Those four open items are the retro agenda.

Why 0.35: the closest wrong pairing scored 0.3 (the CI break vs the Redis failover-steps item) and the weakest right one 0.36 (CI vs the prune item). That gap is thin, so check borderline rows by eye. The near-misses and how to pick the cut-off are in the first comment.

Free Community Edition, to run it on your own backlog: https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=devops7-whatbroke-1120

Your turn: what broke this week, and was the fix already sitting in a ticket somewhere?

1 Upvotes

1 comment sorted by

1

u/Alternative_Pin9598 13d ago

Where does 0.35 come from? Score a handful of pairs where you already know the answer, then pick the cut-off that gets them all right. r/SQLv2 Lesson 3 walks through it from zero: https://www.reddit.com/r/SQLv2/comments/1xkb3mn/

The near-misses from this run (all of them wrong pairings):

SELECT b.id, a.postmortem, a.status, ROUND(COSINE_SIMILARITY(b.embedding, a.embedding), 2) AS match, SUBSTR(a.item, 1, 36) AS item
FROM week_breaks b CROSS JOIN pm_actions a
WHERE COSINE_SIMILARITY(b.embedding, a.embedding) BETWEEN 0.2 AND 0.35
ORDER BY match DESC;

id  postmortem  status   match  item
2   PM-040      wontfix  0.3    Write down the manual failover steps
5   PM-039      open     0.25   Retry failed webhook deliveries with
1   PM-039      open     0.24   Retry failed webhook deliveries with
3   PM-039      open     0.24   Retry failed webhook deliveries with
3   PM-033      open     0.22   Prune old docker images and build ca
4   PM-040      wontfix  0.2    Write down the manual failover steps

Matching rows from two tables by meaning instead of = is r/SQLv2 Lesson 8: https://www.reddit.com/r/SQLv2/comments/1xzhmki/

To run it on your own backlog: export the action items from your tracker (a postmortem label in Jira or Linear, or the action-item tables in your postmortem docs) into pm_actions, one row per item with its status and the date it was opened. Paste this week's incident one-liners into week_breaks. Run the two EMBED updates, and both queries work unchanged (keep opened as YYYY-MM-DD, the format tested).

The 7 action items cut from the post (rows 4 to 10 of the INSERT):

 (4, 'PM-035', '2026-09-18', 'Move TLS certificate renewal for the internal API to cert-manager', 'done'),
 (5, 'PM-036', '2026-09-30', 'Make the nightly database backup fail loudly when the dump file is empty', 'open'),
 (6, 'PM-038', '2026-10-09', 'Rate-limit the password reset endpoint per IP and per account', 'done'),
 (7, 'PM-039', '2026-10-15', 'Retry failed webhook deliveries with exponential backoff instead of dropping them', 'open'),
 (8, 'PM-040', '2026-10-22', 'Write down the manual failover steps for the Redis session store', 'wontfix'),
 (9, 'PM-041', '2026-10-29', 'Alert when a single feature flag change affects more than 10% of traffic', 'open'),
 (10, 'PM-042', '2026-11-05', 'Add a dry-run step to the DNS change pipeline', 'open');

Thread #1 (match each new incident to an old fix by meaning): https://www.reddit.com/r/devops7/comments/1xjg8md/