feat(admin): shelf lifecycle + A2A channel admin surface - #153
Conversation
Adds the admin surface per the taOS#774 contract and the long-standing
A2A channel cleanup ask. Six new POST endpoints, all fail-closed behind
the configured server token (403 when no token is set).
Shelf lifecycle: POST /shelves creates or returns an existing shelf
(idempotent by shelf_id, validated against ^[a-z][a-z0-9_-]{0,62}$).
POST /shelves/{id}/archive soft-hides vector rows via valid_to with a
hidden_by:shelf-archive:<ts> metadata marker so unarchive restores only
those rows. expect_empty=true returns 409 when the shelf has active rows.
Archive/unarchive events recorded to the zero-loss archive.
A2A channel admin: delete-channel hides a channel from /a2a/channels and
/a2a/messages feeds; rename-channel adds an alias (sends to old name are
redirected, reads of new name include old history); supersede-message hides
one message by id. State persisted in data/a2a-admin-state.json via atomic
tmp+os.replace writes. The a2a_feed, a2a_channels, and a2a_send service
functions all consult the sidecar at query time.
28 new tests in tests/test_admin_surface.py. Full suite 746 tests green.
|
Warning Review limit reached
More reviews will be available in 36 minutes and 44 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
POST /shelves(idempotent create),POST /shelves/{id}/archive(soft-hides vector rows viavalid_to, withhidden_bymarker for selective restore),POST /shelves/{id}/unarchive(restores only shelf-archive-hidden rows, never resurrects correction-superseded rows)POST /a2a/admin/delete-channel(hides from channels/messages feeds),POST /a2a/admin/rename-channel(alias map for redirect + history merge),POST /a2a/admin/supersede-message(hides one message by id)data/a2a-admin-state.jsonvia atomic tmp+os.replace; thea2a_feed,a2a_channels, anda2a_sendservice functions consult it at query timetests/test_admin_surface.py; full suite 746/746 greenTest plan