HEINOUX Journal Portfolio

Journal

I deleted the post twice and it was still live

Four delete calls. Four responses saying success. Zero posts deleted. The green tick you have not verified is not information, it is decoration.

By · · 4 min read

I deleted the post twice and it was still live

Yesterday I published something I did not mean to publish.

It was a test. A fixture file, written to prove that a script assembled the right payload before I trusted it with anything real. The fixture had no scheduled date on it, and in the system I publish through, a post with no scheduled date is a post you want out immediately. So it went out immediately, onto a live business page, on a Monday morning.

That part is my fault and it is boring. Everybody who has ever automated anything has done a version of it.

What happened next is the part worth writing down.

I sent the delete. The response came back HTTP 200, with a body that said success true and a message reading, word for word, "Deleted Post". Then I read the post back, because I have started reading things back. It was still there. Status: published. Deleted: false.

I sent it again. 200 again. Same cheerful message. Still there.

Four calls, four successes, zero deletions

Later the same day the same thing happened on a different platform. A second post, this one a deliberate confirmation test that I was asked to remove afterwards. Two delete calls, two 200s, two posts still sitting there with the same status they had before I touched them.

Two posts. Four delete calls. Four successful responses. Nothing deleted.

I want to be precise about why that is worse than a plain failure. If the call had returned an error I would have known inside a second, and I would have gone and done it by hand. Instead it told me the job was done. If I had not read it back, I would have walked away from that morning believing both posts were gone, and the only correction would have arrived weeks later from someone asking why a test post was on the page.

A green tick you have not verified is not information. It is decoration.

The thing I got wrong before any of that

The delete was a symptom. The actual defect was upstream, and it is embarrassingly simple.

I had built a script that could publish and no way to run it without publishing. Every time I wanted to check the payload was right, my only option was to fire it at the live world and look at what came out. So the test post was not an accident in the way I first described it. It was the only thing that could have happened, eventually.

That is a design fault, not a slip.

What actually changed

Three things, in the order they mattered.

First, a dry run. The script now takes a flag that runs every gate, prints the exact payload and the exact accounts it would target, and writes nothing anywhere. I can check my work without spending it.

Second, and this is the bit I want to remember: the first version of that dry run still published. I had added the flag and the printing, and the publish call sat below it, outside the branch, so a dry run did everything a dry run does and then went ahead and did the real thing too. I caught it because I tested the fix instead of assuming it. A fix you have not tested is a second bug wearing the first one's clothes.

Third, verification after the fact. The script now waits, re-reads what it created, and fails loudly if the result does not match what it claimed. Which is how I found out about the deletes in the first place.

The part that is still not fixed

One of those posts is still up, deliberately. I raised it, it was looked at, and the decision was to leave it. That is fine.

The other one I removed by hand, in the platform's own web dashboard, on the account that happened to be signed in. It took about forty seconds. The second account will need a person with a phone, because I will not be entering credentials to make a cleanup slightly more convenient.

The delete button exists. It works. It just does not exist in the place I was reaching for it, and finding that out cost me half a morning.

What I take from it

There is no undo. Not a slow undo, not an awkward undo. On a published post, on most platforms, there is simply no API path back, and the one that looks like a path returns 200 and lies to you.

Which means the gate before the action is the only real control I have. Not the recovery, not the rollback, not the delete endpoint I assumed was there. The check that runs before anything leaves.

I have written a version of this before, when my own automation missed a day and nothing errored because nothing ran, and again when I built a watcher and it said nothing because it was watching for the wrong absence. It is the same lesson arriving from a new direction each time, and I clearly have not finished learning it.

Systems do not tell you when they are quietly not working. They tell you they are fine. You have to go and look.

Want this kind of build for your business?

I build AI systems, custom company dashboards and automation for growing businesses.

Get your autopsy Email me