- architecture/: overview, technology stack, auth (OIDC + built-in IndieAuth), syndication (POSSE) rewritten; new database.md, deployment.md and indieweb-protocols.md; legacy stack marked historical - decisions/: reconstructed ADR-060 and ADR-063; 31 status corrections (superseded auth ADRs, proposed -> accepted); INDEX rebuilt - design/: reconstructed the v1.6.0 documents the webmention code cites; reports for 18 v2 releases without a design folder; INDEX rebuilt - projectplan/: BACKLOG rewritten (shipped items removed, open issues from the reviews added); RELEASE.md for v2.0.0-v2.10.1; INDEX - standards/: development setup (uv, tests, DEV_MODE), testing (CI test stage), git and release flow, versioning, coding standards, cookies - README, CLAUDE.md, .env.example (every setting the code reads, with defaults) brought up to date - 137 broken links repaired (old absolute paths, moved files); stale ADR references in code comments corrected (comments only) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
v2.4.0: Micropub update, delete/undelete, drafts, replies
Reconstructed on 2026-11-03 from the changelog and git history. Commit
0d3a5cd. Design: ADR-067.
Summary
The Micropub endpoint could only create published notes. It now supports
update, soft delete and undelete, drafts, replies, photos in multipart
requests and from remote URLs, and the q=source / q=category queries
editing apps need.
Changes
starpunk/micropub.py(largely rewritten):handle_create:post-status(extract_post_status),in-reply-to(extract_in_reply_to), multipart uploads (_save_uploads), remote photos (_fetch_remote_photo: public addresses only, 20 MB, max 4;_public_address), own media URLs mapped back to media rows (_media_id_for_url); unsupportedh=types rejected (_check_type).handle_update(JSON,updatescope): delete, then replace, then add, forcontent,name,category,photo,in-reply-to,post-status; other properties 400; success 204.handle_delete(deletescope), withundelete=Truefor undelete.handle_query:q=sourcewith or withouturl(list incl. drafts,limit/offset,properties[]), vianote_to_mf2;q=category(_all_categories,filter);q=configlists queries and post types._require_scope; the media endpoint accepts themediascope.
starpunk/notes.py:undelete_note(slug)restores a soft-deleted note and its file from.trash/; crossposts removed on delete and re-posted on undelete.starpunk/routes/micropub.py: dispatch onaction; the media endpoint is served at both/micropub/media(advertised) and/media.
Tests
tests/test_micropub_v240.py (23 tests: each update operation, scopes,
delete/undelete, drafts, replies, multipart and remote photos, queries);
tests/test_micropub.py updated for the new responses.
Notes
publishedcan be set on create but not changed by update.- Remote photo fetching here used its own public-address check; v2.9.0 moved it onto the webmention SSRF fetcher (every redirect checked, pinned connection).