render+deploy: align latex gate with api, non-root api image #22

Merged
nicolas_naranjo merged 1 commit from integrator/lane-followups into master 2026-10-23 23:39:52 -05:00
Owner

What

Lane-followup round for #20 (my lanes: render + deploy):

  1. Latex gate alignment — render's RGXR_LATEX_ENABLED parsing was a denylist (enabled unless 0/false/no/off) while the api gate is an allowlist (true/1/yes/on); render now mirrors the api's parse_flag exactly, so both gates share one truthy set (the api gate evaluates first; this removes the divergence class entirely). No api changes needed.
  2. Non-root api image — useradd rgxr (uid 1000) + chown + USER rgxr; render scratch lives in /tmp, 8080 unprivileged. Verified live in the built image: id → uid 1000, healthz ok, fast render returns SVG, full latex pipeline (dot2tex → pdflatex → dvisvgm 3.0.3) returns SVG as non-root.
  3. Un-ignored the ε render test staged in !17 — core validates ε since !14; it passes (13/13 render tests).

Gates

  • cargo fmt --check, cargo clippy --workspace --all-targets clean.
  • cargo test --workspace: 96 passed, 0 failed (44 core + 28 core-acceptance + 11 api + 13 render).
  • docker build -f deploy/api.Dockerfile green + live non-root verification above.
## What Lane-followup round for #20 (my lanes: render + deploy): 1. **Latex gate alignment** — render's `RGXR_LATEX_ENABLED` parsing was a denylist (enabled unless `0/false/no/off`) while the api gate is an allowlist (`true/1/yes/on`); render now mirrors the api's `parse_flag` exactly, so both gates share one truthy set (the api gate evaluates first; this removes the divergence class entirely). No api changes needed. 2. **Non-root api image** — `useradd rgxr (uid 1000)` + `chown` + `USER rgxr`; render scratch lives in `/tmp`, 8080 unprivileged. Verified live in the built image: `id` → uid 1000, healthz ok, fast render returns SVG, full latex pipeline (dot2tex → pdflatex → dvisvgm 3.0.3) returns SVG as non-root. 3. **Un-ignored the ε render test** staged in !17 — core validates ε since !14; it passes (13/13 render tests). ## Gates - `cargo fmt --check`, `cargo clippy --workspace --all-targets` clean. - `cargo test --workspace`: 96 passed, 0 failed (44 core + 28 core-acceptance + 11 api + 13 render). - `docker build -f deploy/api.Dockerfile` green + live non-root verification above.
render+deploy: align latex gate with api, non-root api image
Some checks failed
ci / rust (pull_request) Failing after 23s
ci / web (pull_request) Failing after 1m21s
7315ec4910
- rgxr-render's RGXR_LATEX_ENABLED gate becomes an allowlist
  (true/1/yes/on) mirroring the api's parse_flag exactly — one truthy
  set across both gates, per the env var table in docs/CONTRACT.md.
- api image drops to a non-root user (uid 1000): binary chowned,
  render engines scratch in /tmp, 8080 unprivileged. Verified live:
  healthz, fast render, and the full latex pipeline (dot2tex →
  pdflatex → dvisvgm) all run as uid 1000.
- un-to_do: to_dot_renders_epsilon_glyph un-ignored — core validates
  ε since !14; 13/13 render tests pass.
Author
Owner

Review clarifications (both non-blocking):

  1. Behavior change headline: values that previously enabled latex under the old denylist (y, enabled, any junk) now disable it — the one thing a deployer scanning env diffs could trip on. The contract table only pins false → disabled + default false, which the allowlist satisfies.
  2. The diff also carries a one-line Cargo.lock sync: f1cef9c added rgxr-render to the api package deps without committing the lockfile row; this PR commits it.
Review clarifications (both non-blocking): 1. **Behavior change headline:** values that previously *enabled* latex under the old denylist (`y`, `enabled`, any junk) now *disable* it — the one thing a deployer scanning env diffs could trip on. The contract table only pins `false` → disabled + default false, which the allowlist satisfies. 2. The diff also carries a one-line **Cargo.lock sync**: f1cef9c added `rgxr-render` to the api package deps without committing the lockfile row; this PR commits it.
nicolas_naranjo deleted branch integrator/lane-followups 2026-10-23 23:39:52 -05:00
Sign in to join this conversation.
No reviewers
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!22
No description provided.