v0.7.6
What's new
- Two RustSec advisories fixed in the template.
url2.5.9 andcookie0.18.3 (RUSTSEC-2026-0592, RUSTSEC-2026-0594);cargo denyfails on both in an app made from 0.7.5. Every app should run the one-line update below. - A webhooks part.
cargo offrails add-part webhooksaddsPOST /webhooks/{provider}for Stripe- and GitHub-style signed webhooks: the signature is checked over the raw body before anything else, a replayed delivery is stored once and does nothing, and the work runs in a job. The framework's parts now match the samples repo exactly, and CI fails if they drift. - Upgrade steps that hold up for older apps. Two real upgrades (an app from 0.6.2 and the samples host from 0.7.0, both to 0.7.5) found gaps in the steps; they're filled in, including how to compare an app from before 0.7.1 with the template.
- No false drift notice after installing with the installer, and stack.md's version table matches the template again.
- CI runs weekly and tests the installer on macOS, so a crate release that breaks a part fails here within a week, without a push.
Breaking changes
None.
Upgrading
Upgrading an app to 0.7.6, in order (each step's Detect/Converge/Prove is in the entry it names below; upgrade is the whole procedure):
- Dependencies:
cargo update -p url -p cookie(url2.5.9 andcookie0.18.3, below). On Windows, check how the app builds SQLite file URLs (same entry). - Move to the template's patch versions,
cargo update -p anyhow -p clap -p sha2 -p pin-project-lite(Template dependency updates, below). Required ifcargo denyreportspin-project-liteas yanked; otherwise optional. - Optional, apps with the
jobspart that want webhooks:update-part jobs, thenadd-part webhooks(Parts resynced from samples, below). - Optional tidying:
rm .offrails/.sha256if it exists (Drift notice on identical docs, below). cargo offrails verify --fast.
Full list of changes
-
Drift notice on identical docs (
hooks/fingerprint.sh,tools/offrails-gen/src/newapp.rs; #15).install.shwrites the tarball checksum to~/.offrails/<version>/.sha256, vendoring from there copied it into.offrails/, and the fingerprint counted it, so the session-start hook said ".offrails/ and the installed plugin are both , but their docs differ" when they didn't (found upgrading a real app from 0.6.2 to 0.7.5). The fingerprint now skips a top-level.sha256, and vendoring (offrails-gen vendor,new, and thersyncline in upgrade) no longer copies it. Tests:tools/ci/test-hooks.sh(the fingerprint ignores.sha256andVERSION, and still sees a changed doc) andvendoring_skips_the_installer_checksum. App migration (optional): Detect:test -f .offrails/.sha256. Converge:rm .offrails/.sha256(the next re-vendor drops it anyway). Prove it: a new session prints no drift notice when the app vendors the installed release. -
Upgrade steps for apps built from the guides before 0.7.1 (#16). Two migration steps assumed the template's file layout (found upgrading a real app from 0.6.2 to 0.7.5). 0.7.4's IPv6 rate-limit step grepped one file (
src/controllers/application.rs) forrate_limit_ip; it now searchessrc/and says to add the function wherever the app definesClientIp, importing it from there in the copied test. 0.7.2's ordered list never added thecargo offrailsalias, which every later Prove it step runs; it is now step 1 for apps from before 0.7.1. CONTRIBUTING.md gains a rule for migration steps: Detect searchessrc/, not one file, and Converge names the symbol as well as its template path. App migration: none (docs only). -
stack.md: "Verified against" re-dated to template 0.7.5 (#22). The table still said 2026-10-12 and listed sqlx 0.9.0 and axum-server 0.8.0. The rows the template uses now show its 0.7.5 lock (sqlx 0.9.1, axum-server 0.9.2, tokio 1.54.1, uuid 1.29.3, clap 4.6.8, rand 0.10.4, rustls 0.23.46), which
test-template.shbuilds and tests on both databases; the paragraph says which rows still come from the 2026-10-12 reference app and what the date means. The README's release steps now say to update a row when a release moves its crate to a new major or minor version. App migration: none (docs only; the table is orientation, not a pin). -
url2.5.9 andcookie0.18.3 (template/app/Cargo.lock; #27). RUSTSEC-2026-0592 (url) and RUSTSEC-2026-0594 (cookie, through axum-extra) were published after 0.7.5, andcargo denyfails on both.url2.5.9 also rejects a SQLite URL with a Windows path in backslashes (sqlite://C:\...isInvalidPort), so the dev-dashboard part and three file-database tests now buildsqlite://C:/...with forward slashes, which SQLite on Windows accepts. App migration: Detect:cargo deny --locked check advisoriesnames either advisory, orgrep -A1 '^name = "url"$' Cargo.lockshows 2.5.8 or older. Converge:cargo update -p url -p cookie. On Windows, if the app builds a SQLite URL from a path (grep -rn 'sqlite://{' src tests), add.to_string().replace('\\', "/")after.display(); the dev dashboard's is insrc/kernel/dashboard/history.rs(cargo offrails update-part dev-dashboard --framework $FW). Prove it:cargo deny --locked checkpasses andcargo offrails verify --fastis green (on Windows too, if the app runs there). -
Upgrade steps: eight gaps from upgrading the samples host from 0.7.0 to 0.7.5 (upgrade, and the 0.7.1, 0.7.3 and 0.7.5 entries below). upgrade step 3 now says how to compare an app from before 0.7.1 with the template: generate a reference app of the new release with the app's names and parts, and diff against that (the old diff was empty, or every renamed file). Step 7 settles the decision line: one
YYYY-MM-DD: upgraded to framework <version>per release crossed, which is what the CHANGELOG's Prove it steps look for. Step 8 reconciles every section ofAGENTS.mdwith the blueprint, not onlyNEVERand Post-upgrade checks, so Quick commands stop going stale. In 0.7.3, step 11 (security review) gets a Detect/Converge/Prove for each change (APP_ENV refusal, proxy hops,/staticimmutability, escaped cache prefixes) and names the right file for the old APP_ENV test (src/config.rs, nottests/app/kernel_test.rs); Layouts and components lists the files it left out (_nav.html, thegalleryandcomponents_testmods, the/devtile, theapp.cssandapp.jschanges, regeneratingdocs/routes.md); Brand says to deleteassets/brand/og.html. In 0.7.5,cargo update -p randwas ambiguous (the lock file has three versions ofrand): it is-p rand@0.10, andaxum-server@0.9.2matches the template. 0.7.1's Spans by default gets a Detect/Converge. App migration: none (docs only). -
Parts resynced from samples, with a webhooks part and a CI check (#28; parts from samples main as of rust-off-rails/samples#10).
template/parts/SOURCEnamed samples 393408b, but the dev-dashboard and jobs parts held later samples changes copied by hand, and samples had a part the framework didn't ship.tools/sync-parts.shnow brings them in from samples main:webhooks(new, depends onjobs).POST /webhooks/{provider}verifies the provider's HMAC over the raw body (GitHubX-Hub-Signature-256, StripeStripe-Signature), compares in constant time, refuses timestamps over 5 minutes old, stores each event once under a unique(provider, event_id)taken from signed bytes, answers 2xx and hands the work to aprocess_webhookjob;handleis the app's one extension point. A provider withoutAPP_WEBHOOK_<PROVIDER>_SECRETanswers 404, every refusal is the same bare 401, and repeated failures from one client get 429. It adds thehmacandconstant_time_eqcrates. It is the rule in security → CSRF, built and tested; the template, the samples and parts tables, the interview, new and upgrade step 7b list it.jobs: foursamples:anchors insrc/jobs/mod.rs(worker mods,worker dispatch,worker config,worker names) and one insrc/jobs/recurring.rs(recurring), so a part can ship a worker and a cron entry.- CI:
tools/ci/check-parts-source.sh(indocs-and-plugin) re-runs the sync from the samples commit inSOURCE, fails whentemplate/parts/differs, and fails when that commit isn't on samples main. A part changes in samples first, then gets synced.
App migration (an app with the
jobspart that wantswebhooks): Detect:grep -rn 'samples: worker mods' src/jobs/mod.rsfinds nothing. Converge:cargo offrails update-part jobs --framework "$FW"(it adds the five anchors), or add them by hand where the template'ssrc/jobs/mod.rsandsrc/jobs/recurring.rshave them; thencargo offrails add-part webhooks --dry-run. Prove it:cargo offrails add-part webhooks, thencargo offrails verify --fast. Apps withoutjobs, or that don't want webhooks: nothing to do. -
CI and release chores (#20, #21, #24, #25). CI also runs every Monday and on demand, so a crate release that breaks a part or a snippet fails here without a push; the scheduled run skips the docs, secrets and installer jobs, which change only with the repo.
template-osno longer retries failed tests: the shared dev-dashboard state it covered for was fixed in 0.7.3, and a retry hid any new flaky test on macOS and Windows. A newinstaller-macosjob runstest-install.shwith the systemopenssl,curlandshasumfirst onPATH, as on a new Mac.release.shprints the steps that update rustoffrails.org after a release, and its dirty-tree error says how to release from a clean worktree. CONTRIBUTING says which database runs on which OS in CI, and to cite samples changes by PR, not by commit hash. App migration: none. -
bin/setup-tailwindretries the download (template/app/bin/setup-tailwind, frontend-htmx). GitHub's release downloads failed now and then in CI (curl exit 22, HTTP 618); bothcurlcalls now pass--retry 4 --retry-all-errors. App migration (optional): Detect:grep -c 'retry-all-errors' bin/setup-tailwindprints 0. Converge: add--retry 4 --retry-all-errorsaftercurl -sSLfon both lines. Prove it:rm bin/tailwindcss && bin/setup-tailwindfetches and verifies it. -
Template dependency updates (
template/app/Cargo.lock). Patch releases from Dependabot: anyhow 1.0.105, clap 4.6.10, sha2 0.11.3 (Dependabot proposed 0.11.2, which was yanked), and pin-project-lite 0.2.19 (0.2.17 was yanked on 2026-12-04, andcargo denyfails on a yanked crate); the template's suite passes unchanged on both databases. CI's pinned actions move to codeql-action 4.39.5 and install-action 2.90.11. App migration: optional; nothing is fixed by it. Detect:cargo tree -i clap --depth 0shows 4.6.8 or older;cargo deny --locked check advisoriesreporting a yankedpin-project-litemakes this step required. Converge:cargo update -p anyhow -p clap -p sha2 -p pin-project-lite. Prove it:cargo offrails verify --fast.