---
title: "Heal Decay Bug"
method: POST
path: "/api/admin/memories/heal-decay-bug"
tags: ["admin-memories"]
---

# Heal Decay Bug

`POST /api/admin/memories/heal-decay-bug`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/admin/memories/heal-decay-bug`
- Auth: none declared

Restore rows soft-deleted by the pre-fix consolidator decay bug.

Before 2026-04-26, `_decay_stale_rows` halved confidence on any row
where `last_recalled_at IS NULL`, treating freshly-inserted rows
identically to 30-day-stale ones. Within a few 6h cycles new
memory_dir / memory_md rows decayed below the 0.1 floor and were
soft-deleted via `expires_at = now()`.

This endpoint reverses that for rows that were unfairly decayed:
rows where `expires_at IS NOT NULL AND last_recalled_at IS NULL`.
A genuine 30-day-stale row would have `last_recalled_at` set (or
`created_at` predating the threshold and last_recalled_at NULL,
which we guard with a created_at floor).

Restores `expires_at = NULL` and resets confidence to the source's
initial value (0.9 for memory_md, 0.5 for memory_dir, else 0.4).
Idempotent — re-running on already-restored rows is a no-op.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
