← all branches

feat/api-dx2

safeviewing older commit
d82dbe8 · incrementalPR #262reviewed 2026-07-06 18:16 UTC0H · 0M · 0L
The branch
Purpose
Public-API DX round 2 — close gaps surfaced by a real Tiendas Neto customer request (send me the latest PDFs for these 4 RPUs) through the API end-to-end.
Goal
Improve public-API ergonomics across four areas: force_refresh/period_count discoverability, ZIP filename collision fix, collection-health visibility on /v1/monitoring, and latest_only filter on /v1/files.
Sub-goals
  • SG-1: Document force_refresh + period_count on POST /v1/jobs
  • SG-2: Fix ZIP filename collisions for multi-RPU bundles
  • SG-3: Add last_collection + latest_period_end to GET /v1/monitoring rows
  • SG-4: Add GET /v1/files?latest_only=true
  • SG-5: Add admin-required justification comments to loadHealthByRpu service-role reads
The changes (whole branch)
What
This incremental commit adds two inline admin-required comments inside loadHealthByRpu in the monitoring handler, justifying why the service-role DB is used. Machine JWTs have no Postgres auth.uid(), so RLS wrapping is architecturally impossible for this surface.
Why
The auth-implementation skill mandates justification comments on every service-role read that cannot use createRLSDb. BAT-124 flagged these two reads as unjustified — this commit satisfies that requirement.
Areas
apps/platform/src/api/contracts/public-v1+91apps/platform/src/api/handlers/public-v1+633apps/platform/src/api/utils+423domains/utility/src/bill+81packages/api/src/schemas/public+109packages/api/src/types/public+190
Blast
10 files, +161/-20 across public-API contracts, handlers, utils, schemas, and types. All wire changes additive — no migrations.
ci· No CI checks reported for this PRcoderabbit· No .coderabbit.yaml in repo

Findings · 0

No findings.

History · 6 commits

  1. d2ff8e5needs attentionincremental1H · 2M · 4L2026-07-07 21:51
  2. 2ad6e01safeincremental0H · 1M · 1L2026-07-07 21:15
  3. 4ea2976needs attentionincremental0H · 1M · 4L2026-07-07 20:20
  4. fe4cf9fneeds attentionincremental3H · 8M · 7L2026-07-07 14:53
  5. d82dbe8safeincremental0H · 0M · 0L2026-07-06 18:16current
  6. 7113f2eneeds attentionfull5H · 6M · 7L2026-07-06 18:01