Skip to content

Decision records

Short records of the decisions that shape Horde and are expensive to reverse. Each one has the same three parts: Context (the forces at the time), Decision (what the code does now) and Consequences (what that costs and what it allows). They describe behaviour that exists in the code; when a decision is replaced, add a new record and mark the old one Superseded rather than rewriting history.

For the system as a whole see the architecture map.

# Decision Status
0001 SQLite with WAL, Alembic in batch mode, and a frozen legacy migrator Accepted
0002 One process with in-process worker threads, not Celery or Redis Accepted
0003 Accounts: sessions, scrypt, admin and member permissions, signed media tokens, trusted-proxy mode Accepted
0004 CSRF defence by request header and Sec-Fetch-Site, with no CSRF tokens Accepted
0005 One error envelope, cursor pagination, and no /api/v1 prefix yet Accepted
0006 The downloader becomes the services/downloads/ package (the temporary facade was removed in 1.1.0) Accepted
0007 FTS5 and the tag table maintained by triggers; an incremental vector index cache Accepted
0008 Releases, update channels, and rollback in update.sh Accepted
0009 Live streams through a server-side HLS proxy with a probed DVR window Accepted
0010 AI results for streamed videos are kept per YouTube id, for a while Accepted
0011 In-app updates: a request file in the data folder, run by a host cron job Accepted
0012 Forgotten passwords: a one-time code in the server log Accepted
0013 Deleted videos wait in a trash: a tombstone row and moved files, not a soft-delete flag Accepted
0014 Playlists belong to a user and are App-wide or Private; a private one answers 404 to everyone else Accepted
0015 Watch time is counted from progress saves, stored per UTC hour, and outlives the video Accepted
0016 Two-step sign-in: TOTP from the standard library, a signed ticket between the steps, recovery codes Accepted
0017 One OpenAI-compatible AI provider instead of Ollama plus OpenRouter Accepted
0018 Ask about Horde answers from shipped docs and source by keyword retrieval Accepted
0019 Recommended+: a mixed feed of four kinds of picks, fed by a slow YouTube gatherer Accepted
0020 YouTube history comes from Takeout and is kept apart from Horde's own Accepted
0021 Ask about Horde links and acts through tokens the user confirms Accepted
0022 Ask: channels' captions as a knowledge base in SQLite, cited to the moment Accepted
0023 Saved comments: the top threads per video, fetched slowly, read live past that Accepted
0024 Recommended+ is tuned per user, with every value on show Accepted
0025 History shows every watch, and each can be removed or kept out of recommendations Accepted
0026 One Recommended tab: the Recommended+ feed, the old "For you" ranker removed Accepted
0027 Invite links let new members choose their own password Accepted
0028 One Ask: a single name, with the source on show and pickable Accepted
0029 Questions about a video go to Ask Accepted
0030 Ask routes each question itself; no source menu Accepted
0031 Published release image by default; building is opt-in Accepted
0032 Parental controls are an allowlist enforced on the server Accepted
0033 Ask sends a question that names no channel to the channels that cover it Accepted
0034 Ask leaves sponsor reads out of answers using SponsorBlock Accepted
0035 Ask indexes every subscription, up to a limit; only Ask is called indexed (the catalog is listed, the library embedded) Accepted
0036 Chat replay is read from YouTube around the playback position and never saved Accepted
0037 Live chat is polled once per broadcast into a buffer and follows the viewer's position Accepted
0038 Live 1440p and 2160p come from a separate extraction that runs Deno Accepted
0039 Deno runs only as a fallback for videos the JS-less clients cannot open, not for all of yt-dlp Accepted
0040 A stream plays AV1, then VP9, then H.264 by what the device decodes in hardware Accepted
0041 A related list keeps one place in four for the viewer's other interests Superseded by 0043
0042 Desktop apps: an Electron shell around the same server, with a real bundled Python Accepted
0043 A related list mixes in other interests by how crowded the topic is, as far as the viewer's algorithm says Accepted
0044 Recommended's categories are each user's own interests, listed from everything Horde knows and topped up in the background Accepted
0045 Horde is licensed under the AGPL-3.0, from the next release Accepted

Writing a new record

Copy the shape of an existing one: a number one higher than the last, a short title, Status, then Context, Decision, Consequences. Link the code or the page that carries the detail instead of repeating it, and add the record to the table above and to the nav in mkdocs.yml.