fix(retire): the hello-lib tombstone must report what it read #598
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/hello-lib-tombstone-diagnostics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tombstone from #595 ran. It released the push mirror, proved
sean/hello-libempty at id 392, and proved the CR owns it — the identity fence worked. Then it refused four times:It was wrong. The flip had worked.
managedFieldsrecords managercurlsettingdeletionPolicyat19:28:06, which is the first attempt's own finish time, and attempts 2, 3 and 4 re-read an object that already saidDeleteand refused anyway.The defect is that the check could not say why
It threw the PATCH response away with
-o /dev/null, so a rejected PATCH and an accepted one looked the same. It then tested the GET body withgrep -q, which answers only yes or no and discards the evidence. An absent substring carries no information. These are one answer:RetainStatusobjectReplaying the exact line against the live object shows it does match, so the bytes the Job received at that step were not the object — and the Job had no way to report that.
Both policy checks now capture the HTTP status, read
.spec.deletionPolicyas a field withjq, and print the body when they refuse.The mirror check pointed the dangerous way
It asked whether the body contained
Deleteand refused if it did. For the mirror the two readings point opposite ways: an error body contains noDelete, so a failed read looked like consent and the mirror would be deleted with its guard never running. It now requiresdeletionPolicyto equalRetain.The repository CR is also read once instead of twice — the old code called
status_offor the status, thencall GETagain for the body.State right now
ForgejoPushMirror/hello-libForgejoRepository/hello-libdeletionPolicy: Deletesean/hello-libempty: true, size 0One act is left — delete the CR. If the next run still refuses, it will say what it saw.
Guard
Four new properties pinned, plus a refusal of any policy decision made by substring on an executable line (comments keep the history). Five mutations confirmed red: the field read removed, the PATCH status discarded, the read status discarded, the mirror check no longer requiring
Retain, and a substring policy decision added back.https://claude.ai/code/session_01TdW5FSvRJW8CtGnpd29Xp8