The auth UI and encrypted-URL flows have zero Go tests — only a manual shell script #77
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verified against
mainat61f42e6.Neither of these has a single Go test:
HandleImageEnc(internal/handlers/imageenc.go) — the/v1/e/{token}encrypted-URL routeHandleRoot,handleLoginPost,HandleLogout,HandleGenerateURL(internal/handlers/auth.go) — the whole login, session, and URL-generation surfaceThe only verification these flows have ever received is the manual pass recorded in
TODO.mdunder 2026-08-07 (closing #49) andscripts/manual-test.sh. A manual pass against one build is not a regression test: it verified the code that existed that day and cannot fail in CI when someone breaks it tomorrow.The code under test is cryptographic — CBOR + NaCl secretbox + HKDF across
internal/encurl,internal/seal, andinternal/session. A silent failure here is not a 500; it is either a token that should not validate validating, or session cookies that do not do what they claim. The recent #47 fix (Secure/HttpOnly/SameSite on session cookies) is exactly the kind of property that should have a test asserting it forever.Definition of done
/v1/e/tests: a valid token serves the image; an expired token returns 410; a corrupt or truncated token returns 400; a token sealed with a different key does not validate.GET /renders the login form; a wrong key re-renders with an error and sets no session cookie; the correct key sets a session cookie carryingSecure,HttpOnly, andSameSite=Strict(pinning #47);GET /logoutclears the cookie withMax-Age=0; an unauthenticatedPOST /generateis rejected.POST /generateproduces a token that the/v1/e/route accepts — round-trip, in-process.t.Parallel()where the test does not uset.Setenv/t.Chdir.make checkgreen.Note
Once these exist, the manual checklist in
TODO.mdbecomes a starting point for automation rather than the primary evidence. Consider whetherscripts/manual-test.shstill earns its place afterwards, or should be reduced to the parts that genuinely need a running daemon.