[api] implement endpoints per openapi.yaml #1

Closed
opened 2026-10-23 21:24:58 -05:00 by nicolas_naranjo · 1 comment
Owner

status: starting.

  • branch agent/api (worktree)
  • scope: crates/rgxr-api/ + migrations/
  • plan: axum 0.8 + sqlx (runtime queries), identity extractor (Remote-* headers, dev-mode fallback), automata CRUD with owner scoping, engine endpoints validating via rgxr_core::Fa::validate then 501 interim until the core PR lands, /readyz with real SELECT 1, openapi.json + docs UI at /api-docs.

Will post progress here.

status: starting. - branch `agent/api` (worktree) - scope: `crates/rgxr-api/` + `migrations/` - plan: axum 0.8 + sqlx (runtime queries), identity extractor (Remote-* headers, dev-mode fallback), automata CRUD with owner scoping, engine endpoints validating via `rgxr_core::Fa::validate` then 501 interim until the core PR lands, `/readyz` with real `SELECT 1`, openapi.json + docs UI at `/api-docs`. Will post progress here.
Author
Owner

status: done — PR opened, awaiting review/merge.

  • PR: #8 (agent/api → master)
  • Scope: crates/rgxr-api/ + migrations/0001_automata.sql (+ Cargo.lock from the crate-scoped dep additions)
  • Gates: cargo fmt --check clean; cargo clippy --workspace --all-targets clean; cargo test --workspace green — 47 tests (40 in rgxr-api, 7 in rgxr-core)
  • Live smoke test: throwaway postgres:17 container — migrations apply, full CRUD round-trip with owner scoping (foreign row = 404), readyz ok/unconfigured/down all observed, prod 401 envelope, dev-mode CORS allowlist verified (matching origin gets ACAO, foreign origin none)
  • Engine endpoints: validate via rgxr_core::Fa::validate then 501 internal / "engine pending — see core PR"; each handler is a one-line swap once the core PR lands. Latex gate (503 render_unavailable) already live per openapi.
  • Semantic decisions (9, all documented in the PR body): 501+internal interim, latex gate shipped early, non-UUID path id → 404, readyz unconfigured → 200, CRUD without pool → 500, serde failures → invalid_request, saved documents not structurally validated (mid-edit saves), openapi.yaml served as-is (yaml content-type), prod header trust per contract

No blockers.

status: done — PR opened, awaiting review/merge. - **PR**: https://git.yhkze.net/k8s-services/rgxr/pulls/8 (`agent/api` → `master`) - **Scope**: `crates/rgxr-api/` + `migrations/0001_automata.sql` (+ `Cargo.lock` from the crate-scoped dep additions) - **Gates**: `cargo fmt --check` clean; `cargo clippy --workspace --all-targets` clean; `cargo test --workspace` green — 47 tests (40 in rgxr-api, 7 in rgxr-core) - **Live smoke test**: throwaway postgres:17 container — migrations apply, full CRUD round-trip with owner scoping (foreign row = 404), readyz ok/unconfigured/down all observed, prod 401 envelope, dev-mode CORS allowlist verified (matching origin gets ACAO, foreign origin none) - **Engine endpoints**: validate via `rgxr_core::Fa::validate` then 501 `internal` / "engine pending — see core PR"; each handler is a one-line swap once the core PR lands. Latex gate (503 render_unavailable) already live per openapi. - **Semantic decisions** (9, all documented in the PR body): 501+`internal` interim, latex gate shipped early, non-UUID path id → 404, readyz unconfigured → 200, CRUD without pool → 500, serde failures → `invalid_request`, saved documents not structurally validated (mid-edit saves), openapi.yaml served as-is (yaml content-type), prod header trust per contract No blockers.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
k8s-services/rgxr#1
No description provided.