session-sink: tiny tailnet-only Flask app that receives session-file POSTs #32

Closed
opened 2026-05-23 20:54:31 +00:00 by coilysiren · 1 comment
Owner

Originally filed by @coilysiren on 2026-05-21T08:54:55Z - https://github.com/coilysiren/infrastructure/issues/226

Goal - Component 2 of the cross-machine session-aggregation pipeline (#224). A tiny, private, tailnet-only Flask app on kai-server that accepts arbitrary file POSTs from the per-machine session watchers and writes them to a write-only mount on /tmp.

New repo. This wants its own private repo (coilysiren/session-sink or similar). First task is creating it. Tracking lives here on infrastructure until the repo exists, since infrastructure is the homelab source of truth.

Scope.

  • Flask app, one ingest endpoint. No processing at first - just receive and write. Serious business comes later, not now.
  • Accepts multipart/form-data per the watcher's POST contract (see docs/claude-session-watcher.md):
    • form field machine, form field relpath, file part file, header X-Session-Machine.
    • Store each upload at <machine>/<relpath> under the write-only /tmp mount so colliding session UUIDs across machines stay distinct.
  • Tailnet-only. k8s Deployment + Tailscale sidecar, or a systemd unit on kai-server - match existing homelab patterns.
  • The ingest URL embeds a tailnet FQDN (opaque id) - publish it to SSM at /coilysiren/session-sink/url so the watcher installers resolve it.

Part of #224. Unblocks the watcher end-to-end and feeds repo-recall once /tmp is a repo-recall source.

_Originally filed by @coilysiren on 2026-05-21T08:54:55Z - [https://github.com/coilysiren/infrastructure/issues/226](https://github.com/coilysiren/infrastructure/issues/226)_ **Goal** - Component 2 of the cross-machine session-aggregation pipeline (#224). A tiny, private, tailnet-only Flask app on kai-server that accepts arbitrary file POSTs from the per-machine session watchers and writes them to a write-only mount on `/tmp`. **New repo.** This wants its own private repo (`coilysiren/session-sink` or similar). First task is creating it. Tracking lives here on `infrastructure` until the repo exists, since infrastructure is the homelab source of truth. **Scope.** - Flask app, one ingest endpoint. No processing at first - just receive and write. Serious business comes later, not now. - Accepts `multipart/form-data` per the watcher's POST contract (see `docs/claude-session-watcher.md`): - form field `machine`, form field `relpath`, file part `file`, header `X-Session-Machine`. - Store each upload at `<machine>/<relpath>` under the write-only `/tmp` mount so colliding session UUIDs across machines stay distinct. - Tailnet-only. k8s Deployment + Tailscale sidecar, or a systemd unit on kai-server - match existing homelab patterns. - The ingest URL embeds a tailnet FQDN (opaque id) - publish it to SSM at `/coilysiren/session-sink/url` so the watcher installers resolve it. Part of #224. Unblocks the watcher end-to-end and feeds repo-recall once `/tmp` is a repo-recall source.
Author
Owner

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: burndown-2026-06.

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: `burndown-2026-06`.
coilysiren 2026-06-17 08:22:56 +00:00
Sign in to join this conversation.
No description provided.