Correct the docs the gallery work made wrong

Housekeeping, not new behaviour. The status table still said the WebUI was
"nothing beyond the Vite scaffold" and the server was "Phases 1 and 2" at 194
tests, all of which stopped being true three commits ago. A status table that
is wrong is worse than no status table: it is the first thing read and the last
thing checked.

Endpoint lists in server/README.md were taken from the app's own OpenAPI
schema rather than from memory, which is how the last round of this found that
/ingest was documented as multipart when it is a raw body. The operator half is
now listed separately from the device half, because the two authenticate in
ways that must not be mixed up -- bearer token and no cookies on one side,
session cookie plus CSRF on the other.

Ticked auth-checked image serving, which shipped in 735cbcc, and recorded why
there are two delivery paths and only one authorization path.

The test count is 308 because the suite was run, not because 308 was the number
I remembered.

Two comments in api/app.py contradicted the code beside them. One said the
enroll-secret warning was "not fatal at Phase 1 -- no device endpoint exists
yet", six lines above the device endpoints being mounted; it now says the real
reason the API starts anyway, which is that an enrolled camera keeps working
and refusing to start would take the gallery down too. The other said the
Phase 3 UI endpoints were still to come, directly below the two lines that
mount them.

Left alone deliberately: the "12/12 tests" in docs/reviews/**. Those are
point-in-time review snapshots, and updating them to current numbers would
destroy the only thing they are for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Thomas KarnerandClaude Opus 5 committed 2026-09-21 22:01:35 +02:00
1 parent 29c8cf6bfe
commit f9d0b09d2f
4 files changed
+46 -22

No files matched your search

+5 -5
View File
@@ -34,8 +34,9 @@ async def lifespan(app: FastAPI):
extra={"version": __version__, "image_root": str(settings.image_root)},
)
if not settings.enroll_secret_is_set:
# Not fatal at Phase 1 -- no device endpoint exists yet -- but it will
# be the first thing to break in Phase 2.
# A warning rather than a refusal to start: an existing camera keeps
# working with the token it already holds, and taking the whole API
# down would also take down the gallery. Only enrollment breaks.
log.warning("POORBIRD_ENROLL_SECRET is not set; device enrollment will refuse requests")
yield
log.info("poorbird api stopping")
@@ -75,9 +76,8 @@ def create_app() -> FastAPI:
app.include_router(firmware.router, prefix=API_PREFIX)
# The device contract (firmware/API.md) is complete apart from /stream,
# which is Phase 6. Still to come: the admin-facing POST /firmware, which
# needs user auth, and the Phase 3 UI endpoints.
# Phase 3 mounts the UI endpoints.
# which is Phase 6. Still to come on the operator side: the admin-facing
# POST /firmware and device management, both Phase 4.
return app