Repository navigation
Image: ghcr.io/justin-stanley/feather-reader@sha256:cb0c0fa0426bba38a9d1128445de6ddd3015579cb98fc0cbb1b402207da77d0b (deploy by digest; verify with gh attestation verify oci://ghcr.io/justin-stanley/feather-reader@sha256:cb0c0fa0426bba38a9d1128445de6ddd3015579cb98fc0cbb1b402207da77d0b --repo justin-stanley/feather-reader).
Crate: feather-reader 0.5.2.
Article bodies are now stored compressed only (#336, step 2 of 2), and a one-time sweep after boot converts the older rows. Bodies take about 2.8× less space, and they are most of the database, so the same space holds far more feeds. Nothing a reader sees changes. Roll back to 0.5.1, not 0.5.0. Also clears three RustSec advisories, among them a non-constant-time bignum in the OAuth signing key's curve crate (#354), and brings the build and CI images and actions up to date. Fixes sign-in, which did nothing in Chrome and on iOS: the sign-in form's redirect to the PDS was blocked by the app's own CSP. Shipped to staging first (#294) as v0.5.2-rc.1, where the sign-in bug was found, then v0.5.2-rc.2.
Upgrade notes
- Bodies are stored compressed only (#336, step 2 of 2). Roll back to 0.5.1, not 0.5.0. New bodies go into
entries.content_zalone, tagged as the only copy, withcontent_htmlNULL. A one-time sweep, three minutes after boot, converts every older row the same way and then reclaims the space.- Rolling back to 0.5.1 works: it reads compressed-only rows (step 1 already did), and its own writes go back to storing both copies, which this release sweeps again on its next boot.
- Rolling back to 0.5.0 is not supported once 0.5.2 has run at all, not only once the sweep has: from the first poll, every body 0.5.2 stores is compressed-only, and 0.5.0 never reads
content_z. Under 0.5.0 those bodies show as empty. It doesn't crash and deletes nothing, but a re-poll doesn't reliably bring a body back: a304changes nothing, and an item that has left its feed is never re-stored. The recovery is upgrading again (to 0.5.1 or 0.5.2), which shows every body. One thing is not undone: a body the publisher removed while 0.5.0 ran reappears, because 0.5.0 leaves the compressed copy behind and a sole copy can't be told from a current one. The upgrade-boot gate tests 0.5.1, which is where production is. - Cost: one short write per stored body, in batches of 200 with a pause between, and one compression each (~70 µs). On feather-reader.com that is a few thousand rows and seconds. Leftover copies are cleared first, in a separate pass of 200-row windows. A boot with no plain body left to convert does neither, so a converted database pays one scan of the entries' row headers per boot and reads no bodies.
- A plain body over 2 MiB stays plain. Only a row stored before the ingest bound (#205) can be that large. The reader decodes a compressed body only up to that bound, so converting one would destroy it.
- Where the space comes back: in an
auto_vacuum = INCREMENTALdatabase (new databases, or after--migrate-auto-vacuum),reclaimshrinks the file. InNONEmode the freed pages stay on the freelist and are reused by later writes; the DB-size watermark measures used pages, so the capacity comes back either way, but the file on disk only shrinks in INCREMENTAL.
Changed
- Stored bodies are compressed only (#336, step 2 of 2).
insert_entrieswritescontent_zwithbody_codec::encode_sole(tag2, "the only copy") andcontent_htmlNULL. A one-shot task (run_body_compaction, not a loop: once every row is converted there is nothing left to do) first checks that any plain body is left to convert (store::compressible_plain_bodies_exist) and otherwise does nothing. It then clears leftover beside-copies whose plain copy is gone, in id windows of 200 (store::clear_beside_copies_batch; telling the tags apart reads each compressed body, so one statement would read nearly the whole table under the write lock), then pages through rows that still have a plain body within the 2 MiB bound withstore::compact_bodies_batch: it re-derives each compressed copy from the plain one (an existing tag-1 copy may be stale from a rollback), compresses on the blocking pool, and converts a row only if its plain copy is still the one it read, so a concurrent poll's write wins. It checks for shutdown between batches and resumes on the next boot; when it finishes it runsreclaim. A test plants a poll's write between the sweep's read and its write and checks the newer body survives; without the guard it doesn't. Seven mutations of the write path and the sweep each fail a test, and three more for the review fixes (no size bound, no gate, an empty clearing window). Tests that read stored bodies now read them throughEntry, the way the reader does; two whose fixtures assumed plain storage were adjusted (an over-size body is planted as a plain row, which is the only way one can exist; the reclaim test uses incompressible bodies).
Fixed
- Sign-in did nothing after "Continue" in Chrome, and on iOS (WebKit).
POST /loginanswered with a303straight to the PDS's authorization endpoint, and the CSP'sform-action 'self'applies to where a form submission ends up, redirects included. So the browser refused the cross-origin hop silently and the sign-in page stayed put. A comment instart_oauthhad assumed the directive ignores redirects. It now answers with a page (continue_to_pds,login_continue.html) that sends the browser on with a meta refresh, plus a link. A refresh is a new navigation, not the form's, so the CSP stays as strict as it was. The page isno-store, since its URL carries the login'srequest_uri.- Found on staging (2026-10-31): each attempt pushed its authorization request, and the PDS accepted it (
201), but no callback ever came back. In Chrome, the page'ssecuritypolicyviolationevent reportedform-action, enforced. - Checked in Chrome against the same CSP: the
303is blocked, and the rendered page goes through to the URL with its query intact. - Production (0.5.1) has the same code and CSP, so the same failure is expected there for new sign-ins in these browsers. Existing sessions are unaffected.
- Tests drive
oauth_started, the success branch ofstart_oauth: the answer is200with noLocation, it carries theSameSite=Laxbrowser-binding cookie, both the refresh and the link decode to exactly the PDS's URL, it isno-store, and a hostile URL stays inside its attributes.GET /login?handle=takes the same path.
- Found on staging (2026-10-31): each attempt pushed its authorization request, and the PDS accepted it (
Security
- RUSTSEC-2026-0385, -0386 and -0387 (#354).
cargo auditfailed every run from 2026-10-25.crypto-bigint0.5.5 (-0387, timing variability in operations meant to be constant-time) came in throughp2560.13, the OAuth client's ES256 signing key.p2560.13 → 0.14, oncrypto-bigint0.7.ctutils0.4.2 → 0.4.7 (-0385, viadigest).tokio1.53.0 → 1.54.1 in the invite bot (-0386).
p2560.14 dropped thejwkfeature, so the key file's JWK encoding moved intosrc/oauth/keys.rs. Coordinates are decoded anddencoded with constant-timebase64ct, as 0.13 did, and a private JWK whosex/ydon't matchdis still refused. The key file format is unchanged. Tests pin the encoding byte-for-byte to a keyjoseexported, and cover leading-zero coordinates, non-canonical and padded base64, and every malformed member. The signing code compiled unchanged.
CI
- The upgrade-boot gate starts from 0.5.1 (#343), the release production runs.
- The upgrade-boot gate now checks that bodies render, not just that the app boots. Step 2 seeds a plain body as releases before 0.5.2 stored it. After the candidate migrates, a compressed-only body is planted as 0.5.2 stores it. The candidate boot and the rollback boot must each serve both entry pages with their bodies, fetched as
FEATHERREADER_DEV_DID(given beta access and a cachedsub_ref, since the gate has no network). Before this, the seeded entry had no body and the scheduler was off, so nothing read a stored body. Checked both ways: 0.5.1 → 0.5.1 passes, and with 0.5.0 as the previous release it fails on the compressed-only body, which is the unsupported rollback the upgrade notes describe. The compressed-only row is written by the script (Python'szlib, raw deflate), so the gate checks the stored format a rollback must read, not this build's own encoder; unit tests coverencode_sole. Each page fetch now has a timeout.
Dependencies
- Build images (#350):
rust1.94 → 1.99 (bookworm),caddy2 → 2.11.7 (alpine),debian:bookworm-slimre-pinned, all by digest. Dependabot now watches them. tokio1.53.3 → 1.54.1,flate21.1.9 → 1.1.10,libc0.2.190 → 0.2.191 (#351).- Actions (#352):
taiki-e/install-action2.87.29 → 2.87.32,github/codeql-action4.39.0 → 4.39.1,rust-lang/crates-io-auth-action1.0.5 → 1.0.6,docker/login-action4.6.0 → 4.7.0.Swatinem/rust-cachere-pinned (#353).
Full engineering detail: CHANGELOG.md.