Co-Authored-By: Claude Opus 5 <[email protected]>
6.0 KiB
Outstanding work
Follow-on from the documentation + fix pass on branch docs/readability-pass
(commits 64df70e docs, 25ac1cd fixes). Everything below is not done.
Verify with: cd backend && go build ./... && go vet ./...,
cd vue && npx vite build (NOT npm run build — needs wasm-pack, not
installed), cd python && python3 -m py_compile app/*.py,
docker compose -f docker-compose.yml config -q.
1. Must do before the next production deploy
1.1 Verify the TLS reload chain end to end
Renewal was changed from "not served until nginx restarts" to a sentinel +
watcher: certbot/entrypoint.sh passes --deploy-hook which touches
/etc/letsencrypt/.nginx-reload; nginx/entrypoint.sh polls for it, deletes
it, runs nginx -t and reloads. This has never run against real certbot.
Test on the Pi before trusting it:
docker compose exec certbot touch /etc/letsencrypt/.nginx-reload
docker compose logs -f nginx # expect a reload within CERT_WATCH_INTERVAL (60s)
docker compose exec nginx nginx -t
A failed nginx -t deliberately skips the reload, leaving the old config
serving — check the logs actually say so rather than silently doing nothing.
1.2 TokenVersion migration
GORM AutoMigrate adds the column with DEFAULT 1. Existing rows should land
on 1, and tokenVersionOf normalises 0 to 1, so old tokens keep working.
Confirm on first boot that existing sessions are not all logged out:
docker compose exec db psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" \
-c 'select id, username, token_version from users;'
If any row is NULL rather than 1, set it: update users set token_version = 1 where token_version is null;
1.3 ProcessedEmail gains attempts and received_at
Same story — AutoMigrate adds them. received_at is zero for old rows, which
is handled (those rows just cannot rewind the fetch window). No action unless
the first sync after deploy behaves oddly; watch for
[EmailSync] Rewinding window to ... in the logs.
1.4 Pin the autoheal digest
docker-compose.yml pins a tag, not a digest — a digest could not be verified
without network access. On the Pi:
docker pull willfarrell/autoheal:<tag>
docker image inspect willfarrell/autoheal:<tag> --format '{{index .RepoDigests 0}}'
then replace the tag with image: willfarrell/autoheal@sha256:....
2. Known bugs still open
Timer.vuehas no Resume button.pauseTimer's un-pause branch is unreachable from the UI — the Paused screen only offers Reset. Pre-existing; fixing it means adding DOM, which was out of scope.python:abandonedusesanyacross a hotel's two TfL queries, notall. A hotel where one query was abandoned reports "not priced (time limit)" even if the other genuinely had no route. Judgement call, commented in place — flip toallif you'd rather bias the other way.- Scraper fails silently. Every upstream Travelodge field is read with a
tolerant
.get(), so a schema change on their side degrades to "no hotels available" — indistinguishable from genuine sold-out inventory. There is no alerting signal. Consider logging a warning when a response parses but yields zero priced rows. - Room prices can be 30 minutes stale (
TL_CACHE_TTL_S) before a user clicks through to book. TfL fares can be 2 hours stale (TFL_CACHE_TTL_S).
3. Security, still open
- No rate limiting on the GraphQL mutation surface specifically. The
graphqlzone exists in prod only; dev has none. /uploads/filenames remain the only access control for public attachments. That is intended, but note an attachment posted to a public message that is later deleted stays fetchable — deletion is soft and does not unlink the file. A cleanup job for orphaned uploads would close this.- Icecast source password grants stream takeover and the harbor port is published on the host. The admin UI is now gated, but the source port is not — it cannot be without breaking liquidsoap.
- Rate-limit zones key on direct client IP. If a CDN or proxy is ever put
in front, every request collapses into one bucket. Switch to
$http_x_forwarded_for(withset_real_ip_from) at that point. - Gitea's
app.iniholds live secrets (JWT secrets, DB password, secret key, internal token). Correctly gitignored and untracked — nevergit add -fit.
4. Refactors deliberately not attempted
nginx.conf.template's:80and:443blocks are still duplicated. Only the dev template was de-duplicated intonginx_dev_common.conf.template. Doing the same for prod is the obvious follow-up, but prod is the one that carries TLS and the auth gates, so it wants doing carefully and testing properly.main.py's cache andtravelodge.py's two caches now shareTTLCachebut keep three different eviction configurations. They could plausibly converge on one policy; nobody has established which is correct.Storeis a god object — DB, auth, Spotify, Claude, Gitea, Steam caches and now OAuth nonces. Splitting it per-domain would be a large but mechanical change.- No test suite anywhere. The highest-value first tests, in order:
services/auth.gotoken version logic,travelodge.py's pure functions (round_5p,parse_guests,haversine_km,sort_rows), and the NDJSON event contract inmain.py.
5. Dead code awaiting a decision
Documented with STATUS: headers, kept per instruction, tree-shaken out of
the build so it costs nothing at runtime. Delete when you're ready:
views/home/Intro.vue, Gym.vue, BadApple.vue, the seven unlisted CV
templates, views/unused/Notes.vue, components/util/wasm/AutoScroll.vue,
MusicPlayer.vue, ObjectTable.vue, components/elle/Elle.vue,
components/borders/UtenaFrame.vue, stores/models.js,
js/mobile-automata.mjs.
Two traps: views/unused/CoverLetters.vue is live (the Cover Letter tab
on /cv, just misfiled — move it out of unused/), and Home2.vue is
reachable at /stp2 but is a static mock unlinked from any UI.