Repository source: docs/plans/retraction_target_id/retraction_target_id_step3_development_plan.md
Debug mode: enabled
Effort study: railspike-effort / v3/retraction_target_id; host ledger (source unavailable). Standing P2 enrollment. Child of v3/post_records; not an independent outcome.
Extended estimates: enabled
Cycle estimate: 0.40
Completion Contract
Normal entry: retract a post from its page, through the API with
target_idorpost_id, or with./v3 delete-record <post-id>.End-to-end outcome: every new request and receipt carries
Target-IDand contains noPost-ID. Old files still read. The post shows its removal notice.Recovery: replay returns
already_retracted: trueas today. A file with both headers, or neither, is rejected with an error that names the file.Deployment: the maintainer deploys to zenmemes.com. Before that, a scan of
records/posts/must find no IDs starting withpost-reaction-orthread-label-. A partial scan of the live root thread IDs throughlist_indexfound none.Release condition: smoke tests and the tests for the changed parts pass, and one post is retracted on zenmemes.com, with its request and receipt checked in the repository.
Key Risks
High risk: Rollback. Older versions reject the new receipts, because v1 refuses unknown fields. Rollback path: deploy a version that reads both forms, or remove the receipts written since this deploy and run a full rebuild. A full rebuild treats a missing receipt as no removal, and the deleted posts stay deleted because their files are gone. Stage 3 documents this in the release notes and
v3_cli.md.A missed reader would silently drop a retraction. Mitigation: all five readers go through one shared lookup, and Stage 1 runs both fixture forms through each of them.
Stage 1
Estimate: 0.12
Goal: everything that reads retractions accepts both header forms, and posts can't use reaction prefixes.
Dependencies: none.
Expected changes: planned helper
RemovalTarget::fromHeaders(array $headers): array{id: string, created_at: ?string}. It acceptsTarget-ID(withTarget-Created-Aton receipts) orPost-ID(withPost-Created-At), and rejects a mix or neither.PostRetractionRecordParsertakes one of the two required sets.RemovalReceipt::decodeaccepts either field list.RetractionReceiptandLabelRemovaldecode through the helper.PostRecordParserrejects the two prefixes.Verification approach: parser tests for the new form, the old form, a mix and neither, for both the request and the receipt. Guard tests. A full rebuild over old fixtures is unchanged.
Estimate details: driver: one shared lookup and five callers; uncertainty: low.
Risks or open questions:
RemovalReceiptchecks the exact field set in two places, lines 17 and 39. Both must change.Canonical components/API contracts touched:
Canonical/PostRetractionRecordParser.php,Canonical/PostRetractionRecord.php,Canonical/RemovalReceipt.php,Canonical/RetractionReceipt.php,Canonical/LabelRemoval.php,Canonical/AcceptedRemoval.php,Canonical/PostRecordParser.php.
Stage 2
Estimate: 0.12
Goal: new retractions are written in the new form, and the API takes
target_id.Dependencies: Stage 1.
Expected changes: the request builder in
LocalWriteService(around line 945) writesTarget-ID.RetractionReceipt::encodeandLabelRemoval::encodewriteTarget-IDandTarget-Created-At.prepareRetractionandfinalizePreparedRetractionreadtarget_id, then fall back topost_id; sending both with different values is rejected. Responses keeppost_idand addtarget_id.browser_signing.jssendstarget_id.Verification approach: API smoke tests with
target_id, withpost_id, with both, and with replay. An author and operator retraction test checks the written bytes. Rebuild equivalence over a mix of old and new files. Adelete-recordCLI test.Estimate details: driver: three writers and the API alias; uncertainty: low.
Risks or open questions: other clients send
post_id, such aspublic/frm.pyand Claude's posting skill. The alias covers them.Canonical components/API contracts touched:
Write/LocalWriteService.php,Http/WritePostAndIdentityApiController.php,public/assets/browser_signing.js,scripts/delete_record.php.
Stage 3
Estimate: 0.08
Goal: the specs, docs and agent instructions describe the new form, and the change is released.
Dependencies: Stage 2.
Expected changes:
post_retraction_record_v1.mdandremoval_acceptance_record_v1.mdgain theTarget-IDheader set and a compatibility section modeled onreaction_record_v1.md. Updates toagent_api.md, thellms.txtretraction line inLlmsTxtRenderer.php(line 139),docs/concepts/post_retraction.md, and the rollback note inv3_cli.md. Then the pre-deploy scan, the deploy, and one live retraction.Verification approach: concept and spec links resolve,
llms.txtrenders, and the live files are checked.Estimate details: driver: documentation plus a release check; uncertainty: low.
Risks or open questions: the scan needs a shell on the server:
ls ~/v3/records/posts | grep -E '^(post-reaction|thread-label)-'.Canonical components/API contracts touched: the specs above,
docs/reference/agent_api.md,docs/reference/v3_cli.md,Http/LlmsTxtRenderer.php,docs/concepts/post_retraction.md.
Concepts touched: post retraction (changed: target header). Inventory updated in Stage 3.
Study checkpoint
2026-11-12T02:10:00Z, railspike-effort / v3/retraction_target_id, Step 3 handoff. Scope v1, unchanged since the Step 2 approval. Planning revision 273bf937. R1, P2, single exposed Claude rater. Projected total reaffirmed at 0.40. Stage estimates 0.12, 0.12 and 0.08 are stage work only and don't add up to the cycle. Ledger update pending: fresh clone.
— Claude · 2026-11-12 UTC · Model: claude-opus-5-5