Repository source: docs/plans/retraction_target_id/retraction_target_id_step2_feature_description.md
Debug mode: enabled
Effort study: railspike-effort / v3/retraction_target_id; host ledger (source unavailable). Standing P2 enrollment. Split from v3/post_records Step 2 scope v7 at the maintainer's request on 2026-11-11. This is a child cycle, not an independent outcome. The parent's original scope and estimate are kept in post_records Step 2 (source unavailable).
Extended estimates: enabled
Cycle estimate: 0.40
Step 1 skipped: the maintainer chose the direction during post_records planning. Context: post_records Step 1 (source unavailable).
Problem
In a retraction request and its receipt, Post-ID names the post being removed, while in a post record the same header names the post itself. The header means two different things, and a reader of the files can't tell which without knowing the record type.
User stories
As anyone reading the repository, I want a retraction to name its target in a header called
Target-ID, so that I don't confuse the target with the record's own identity.As an author or operator, I want retracting a post to work exactly as it does today, so that the rename changes nothing I do.
As an agent or script author, I want existing calls with
post_idto keep working, so that my client doesn't break.
Core requirements
New signed retraction requests use
Target-IDinstead ofPost-ID. The other headers are unchanged:Record-ID,Created-At,Operation: retract,Author-Identity-ID, and optionalActor-Identity-IDandRetraction-Class.New receipts, both signed and local operator ones, use
Target-IDandTarget-Created-Atinstead ofPost-IDandPost-Created-At.Thread-IDandParent-IDkeep their names.Existing requests and receipts with
Post-IDstay valid and are read as before. A file uses one form or the other, never both. Signed bytes are never rewritten, and nothing is migrated.The post parser rejects Post-IDs that start with
post-reaction-orthread-label-, so a target's family can always be read from its ID. This guard has no effect yet in this cycle;post_recordsrelies on it.prepare_retractionacceptstarget_idand keepspost_idas an alias. Paths and thepost-retraction-prefix don't change.
Delivery scope
Work type: application change. Targets stay posts only. Reaction targets belong to
post_records.No feature flag. The change is internal to the record format, and retraction keeps behaving the same.
Completion boundary
Normal entry: retract a post from its page, or run
./v3 delete-record <post-id>.End-to-end outcome: the new request and receipt carry
Target-ID, the post shows its removal notice, and a full rebuild over a mix of old and new files gives the same result as before.Recovery: replays and retries behave as today. A file that mixes the two headers is rejected with a clear error.
Release condition: deployed to zenmemes.com, with one post retracted there and the new files checked in the repository.
Risks
High risk: Rollback. Older app versions reject the new receipts, because v1 refuses unknown fields. Impact: after rolling back, rebuilds fail on any receipt written since the deploy. Earliest validation: Step 3 names the rollback path. Mitigation: the release notes say a rollback must go to a version that reads both forms, or must first restore the old receipts from git.
A missed reader. Five classes read these fields. Impact: an old or new retraction is silently ignored somewhere. Earliest validation: a fixture set with both forms run through each reader. Mitigation: one shared header lookup used by all of them.
Existing posts with a reaction prefix. Impact: the new guard would reject an existing post. Earliest validation: scan zenmemes.com's
records/posts/for those prefixes before deploying. Mitigation: if any exist, return here before release.
Shared component inventory
Request:
Canonical/PostRetractionRecordParser.php,Canonical/PostRetractionRecord.php, and the request builder inWrite/LocalWriteService.php. Extend for the new header.Receipts:
Canonical/RemovalReceipt.php,Canonical/RetractionReceipt.php,Canonical/LabelRemoval.phpandCanonical/AcceptedRemoval.php. Extend for the new header, still reading the old form.Post guard:
Canonical/PostRecordParser.php. Extend.API and clients:
Http/WritePostAndIdentityApiController.php,Http/ApiRouteCatalog.php,Http/LlmsTxtRenderer.php,public/assets/browser_signing.js,docs/reference/agent_api.md. Add thetarget_idparameter and keep the alias.Specs:
docs/specs/post_retraction_record_v1.mdanddocs/specs/removal_acceptance_record_v1.md. Add the new header and a compatibility section, modeled onreaction_record_v1.md.No new components.
Concepts touched: post retraction (changed: target header renamed). No inventory additions.
User flow
An author retracts their post from its page.
The browser signs a request that names the post as
Target-ID.The site deletes the post, writes a receipt with
Target-ID, and shows the removal notice.
Success criteria
New requests and receipts contain
Target-IDand noPost-ID.A full rebuild over a mix of old and new retractions gives the same read model as today's code does on the old files alone, plus the new removals.
An API call with
post_idstill retracts the post.A post file whose ID starts with
post-reaction-orthread-label-is rejected.
Approval: Approved Step 2 by the maintainer, 2026-11-12T02:02:00Z, scope v1.
Study checkpoint
2026-11-11T23:40:00Z, railspike-effort / v3/retraction_target_id, intake and Step 2 handoff. Scope v1: rename the retraction target header for posts, with dual-form reading, an API alias and the post-ID prefix guard. Starting revision 273bf937. R1, P2, single exposed Claude rater, who is also the parent's rater; pristine intake missing because the readers were inspected before rating. Projected total 0.40. Child of v3/post_records; not an independent outcome. Ledger update pending: fresh clone.
— Claude · 2026-11-11 UTC · Model: claude-opus-5-5