Repository navigation
Inbox list, details and delete; the full inbox JSON (#24) - #28
Merged
Merged
Conversation
GET /v1/inboxes, GET and DELETE /v1/inboxes/{name}, and PUT now answer
with the inbox as PROTOCOL.md documents it: ISO dates, `oldest` (head + 1
when nothing is kept) and `subscriptions`.
DELETE takes the subscriptions back from their RepoHubs first (503 with
nothing deleted if one fails), then deletes the inbox, its events and
index rows, remembers its numbering in deleted_inboxes, and closes its
sockets with 4004. RepoHub's deliveries no longer make inboxes, so an
event already in its outbox can't bring a deleted inbox back; /debug
injection and debug subscriptions still make them.
PROTOCOL.md now says what the server does with idle inboxes (deleted
only to make room; their subscriptions expire), and the server README's
"Not yet" list is current.
Fixes #24.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- DELETE /v1/inboxes/{name}: when a RepoHub can't give up a
subscription, the ones that did end leave the index too, so it still
says what RepoHub has; the 503 keeps the inbox and the rest.
- A long poll's bridge no longer makes the inbox: one opened after a
delete answers 404.
- An inbox that never had an event leaves no deleted_inboxes row, so
making and deleting empty ones costs no storage.
- Stale comments; PUT's "touch"; tests for the late save, the subscribe
race against DELETE, the debug subscribe route, and `oldest` after
trimming.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #24.
The server now has every route and field in PROTOCOL.md's "Inboxes" section.
Routes
GET /v1/inboxeslists the account's inboxes, ordered by name.GET /v1/inboxes/{name}returns one inbox. Looking at an inbox doesn't count as reading it, solast_read_atis unchanged.DELETE /v1/inboxes/{name}deletes the inbox along with its events and subscriptions, and answers 204.Retry-After.inbox.gap.Inbox JSON
PUTand bothGETs return the fullInboxInfo: ISO dates,oldestandsubscriptions. Before this,PUTreturned the raw database row.oldestis the oldest event still kept, orhead + 1when there are none.A deleted inbox stays deleted
deleted_inboxesrow, so that table can't grow without bound.Docs
ttl_seconds.Tests
Typecheck is clean. All tests pass: CLI 234, server 175, selfhost 32.
Known leftovers
🤖 Generated with Claude Code