Skip to content

A write token can rename, delete, re-extract and sweep the push sources it can create - #1474

Open
gedaiu wants to merge 1 commit into
deeplethe:devfrom
re-cinq:token-manages-push-sources
Open

gedaiu wants to merge 1 commit into
deeplethe:devfrom
re-cinq:token-manages-push-sources

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Hi! A write token can already create a statements or api source, but keeping it tidy afterwards (renaming it, deleting it, re-extracting it, cleaning up missing documents) still needed a session. A service mirroring a repo had no way to do those without holding someone's seven day login.

This lets those four routes take a write token too, for push sources only, with the same guards as creating one. Url, rss and custom sources stay session only and answer token_source_kind, so a leaked token still can't point the server at a new address. The audit rows carry the token id, and ADR 0014 has a dated note.

Two tests cover it, one per side, and both fail without the change.

Thank you for taking a look!

…es it can create

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
gedaiu added a commit to re-cinq/lore that referenced this pull request Nov 2, 2026
Bumps the Utopia pin to `0.1.0-re.28` (digest `sha256:4ddd146f…`), the
re-dev head after one fork merge:

- re-cinq/utopia#47: a write token may rename, delete, re-extract and
clean up the missing documents of a `statements` or `api` source. Those
routes took only a session, so Lore's personal token got a 401 on them:
the history source split, the history extraction switch and the
missing-item sweep (#4079) never ran. Other source kinds stay
session-only (`token_source_kind`). Upstream: deeplethe/utopia#1474.

No new migration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant