generic python backend server
  • Python 95.9%
  • Makefile 3.5%
  • Dockerfile 0.6%
Find a file
example-bot 36f178ef68
All checks were successful
build-publish-deploy / test (push) Successful in 13s
build-publish-deploy / publish (push) Successful in 53s
chore(ci): add Telegram main-failure alerts
2026-07-10 09:02:44 +00:00
.agents/skills/repo-backend chore: add repo-backend pointer skill 2026-06-02 01:01:26 -07:00
.claude chore: scrub coily references for coily retirement 2026-07-04 17:54:52 +00:00
.forgejo/workflows chore(ci): add Telegram main-failure alerts 2026-07-10 09:02:44 +00:00
.github/workflows chore(ci): add Telegram main-failure alerts 2026-07-10 09:02:44 +00:00
.vscode workon otel 2025-03-26 00:12:50 -07:00
.ward chore: scrub coily references for coily retirement 2026-07-04 17:54:52 +00:00
backend chore: clean up code-comments violations (agentic-os v0.2.8) 2026-05-25 20:29:47 -07:00
deploy Remove direct postgres tailnet exposure; in-cluster access only 2026-06-13 13:23:14 -07:00
docs fix build-publish docker host probe 2026-07-09 17:01:03 +00:00
tests chore: clean up code-comments violations (agentic-os v0.2.8) 2026-05-25 20:29:47 -07:00
.dockerignore docker time 2025-04-03 20:47:20 -07:00
.gitignore chore: commit coily lockdown baseline, gitignore host-local Claude state 2026-04-24 15:42:18 -07:00
.pre-commit-config.yaml chore: refresh agentic-os pre-commit pin v0.17.0 -> v0.65.0 2026-07-02 02:27:29 +00:00
.python-version cleanup: align backend with sister repos 2026-04-23 04:13:45 -07:00
AGENTS.md chore: scrub coily references for coily retirement 2026-07-04 17:54:52 +00:00
CLAUDE.md Convert CLAUDE.md symlink to @AGENTS.md import 2026-04-23 13:35:34 -07:00
Dockerfile Drop requirements.txt, use uv.lock directly in Docker 2026-05-14 06:20:22 -07:00
Makefile chore: scrub coily references for coily retirement 2026-07-04 17:54:52 +00:00
pyproject.toml chore(code-comments): clean YAML comment-discipline violations, pin v0.17.0 2026-06-08 16:57:18 -07:00
README.md backend: publish image only 2026-07-09 16:43:18 +00:00
uv.lock chore: repoint coilysiren/* GitHub refs to new org after move 2026-05-30 23:47:56 -07:00
ward.yaml chore: scrub coily references for coily retirement 2026-07-04 17:54:52 +00:00

backend

A generic data-accessibility framework. An internal operational backend with Postgres behind it, exposing a small set of uniform modes, each a FastAPI router with a generic endpoint and a self-documenting sentinel record. Internal-only - reachable on the tailnet via an in-Pod Tailscale sidecar, no public ingress. Design: coilysiren/backend#77, coilysiren/backend#65, coilysiren/agentic-os-kai#657.

The source CI builds and publishes the image. The Kubernetes rollout lives in coilyco-bridge/deploy, which owns the runtime manifest for this service.

Modes

Each mode lives in backend/modes/, owns one table, and ships an APIRouter plus an async init(pool) that creates its schema and upserts a sentinel row. Adding a mode is a new module plus an entry in ALL_MODES - nothing else changes.

  • health - GET /health: DB connectivity, the mounted modes, and every sentinel. The only unauthed route - it is the liveness probe.
  • document - append-only jsonb document store keyed by (namespace, key). POST /document, GET /document/{namespace}, GET /document/{namespace}/{key}, DELETE /document/{namespace}/{key}.
  • queue - SELECT ... FOR UPDATE SKIP LOCKED work queue. POST /queue/{namespace} enqueue, POST /queue/{namespace}/claim claim, DELETE /queue/{namespace}/{id} ack. visible_at carries enqueue delay and post-claim visibility timeout.
  • sql - generic relational mode. POST /sql/tables creates a real typed table sql_<name> from a column spec, GET /sql/tables lists the registry, POST /sql/tables/{name}/rows and GET /sql/tables/{name}/rows CRUD its rows.
  • file - temp-tier file storage. POST /files/temp writes a raw body to an ephemeral emptyDir, returns an id. Write-only by design.

Sentinel pattern

A shared sentinels(mode, shape jsonb, note, created_at) table. Each mode upserts one row on init describing its record shape - the ".keep-of-schemas" exemplar that keeps the framework self-documenting. GET /health returns them all.

Auth

Every mode route except /health requires an Authorization: Bearer <DATASTORE_TOKEN> header. The token lives in AWS SSM at /coilysiren/backend/datastore-token. Auth fails closed - with no token configured the routes return 503 rather than open up.

Develop

Install, run, and test instructions live in docs/dev.md. Dev commands are declared in .ward/ward.yaml; run them as ward exec <verb>.

See also

Cross-reference convention from coilysiren/agentic-os-kai#313.