Rask
Rask
v0.23.1-alpha.0.738
You're reading the Rask v0.23.1-alpha.0.738 guides. Updated .View source
All guides

Development workflow

How changes are made, verified, and shipped in this repo. GitHub is the single source of truth; everything here is committed. AI assistants encode these as playbooks under .claude/skills/ (see AGENTS.md / CLAUDE.md).

The inner loop

Run the app you're changing with rask dev. It wraps dotnet watch run, so an edit to a component's Render(), a scoped .css/.ts, a [Route] template or a CQRS handler is applied to the running process and every open session repaints in place — a "Hot reload applied" pill confirms it. Edits the runtime can't apply (adding a type, changing a signature) restart the app instead, and the page reloads itself. What hot-reloads has the full list, including what doesn't. WASM is covered — the host serves the client's build output for the session, since a published bundle is trimmed and could never apply an update.

When something breaks, it says what broke. A save that doesn't compile shows the compiler errors in the page — not "Reconnecting…" — and clears itself once the code builds; an exception from a handler or an async lifecycle hook shows over the running app, which stays mounted with its state intact. See when the build fails.

The framework side of that loop has its own gate, scripts/run-watch-e2e.sh — it scaffolds an app, runs it under a real dotnet watch, edits a file, and asserts the change reached the open live session without it being torn down. Run it when you touch the hot-reload coordinator, the scoped-asset registry, the generated registries, or rask dev. CI runs it before a release and on a ci/release/** branch, not on every push (see CI).

There used to be a browser half, scripts/run-wasm-watch-e2e.sh, driving a WASM sample under dotnet watch. It is gone with the app it edited, so Mono applying a metadata delta to a live WASM runtime is covered by nothing.

The definition-of-done gate

Every change passes this gate before it lands on main (the rask-ship skill). No hook enforces it: CI runs the format check, the build, the tests and the browser journeys after the push (see CI), so what you skip here you find out there, on main.

  1. Format + analyzers — dotnet format src/Rask.X/Rask.X.csproj --include <the files you changed>: the project you touched, never the solution. CI's analyzers K/N jobs run the --verify-no-changes after the push, each over the files the change touched in its own projects (every file of its projects when the change touched the rules).

  2. Clean build, warnings-as-errors — of the project you touched, never the solution: dotnet build src/Rask.X -c Release -warnaserror. Enforced in Directory.Build.props (TreatWarningsAsErrors, EnableNETAnalyzers, EnforceCodeStyleInBuild), so a plain build enforces it too. See code-analysis.md. The same build runs the public-API gate: anything public you added, renamed or removed fails until it is recorded in src/<Project>/PublicAPI/<tfm>/PublicAPI.Unshipped.txt. That diff is the API review — read it against api-style.md before you commit.

  3. Tests — unit-test every feature/fix (tests/Rask.*.Tests); add E2E only when a unit test can't reach the path. Every src/Rask.Site change gets an E2E journey update (tests/Rask.Site.E2E.Tests). Locally, test only the project you touched — the solution and the gate scripts are CI's (ci.yml after the push, full.yml daily). Inner loop — build once, then test with --no-build (test execution itself is fast; the build dominates):

    dotnet build tests/Rask.Core.Tests -c Release
    dotnet test tests/Rask.Core.Tests -c Release --no-build

    Narrow further to one class (--filter FullyQualifiedName~ATests) while iterating. The build runs in parallel by default — don't add -m:1 (the former WASM copy-race workaround is fixed at the source in Rask.Spa.Hosting.targets, which skips a referenced client's nested publish under RaskWasm=false).

    Directory.Build.rsp turns MSBuild node reuse off for every build started from the repository root. That is deliberate and load-bearing: the scoped-asset bake is not safe across reused workers (#650), so with reuse on, publishing two different WASM apps in a row fails the second one. It costs about a fifth of a second per incremental build. If you are working on Rask.Wasm.Tasks itself, note that a reused node also pins the task assembly — run dotnet build-server shutdown before judging any change to it, or you are measuring the previous build's DLL.

  4. Benchmarks — any render/live-runtime hot-path change runs tests/Rask.Benchmarks before/after and quotes the Allocated delta in the commit body.

  5. Docs & the site — user-facing changes update src/Rask.Site, the relevant docs/*.md, README.md, NUGET.md, llms.txt, and docs/ai-agents.md. Add a CHANGELOG.md [Unreleased] entry (Keep a Changelog).

  6. Review — security, performance, and memory held together with UX; prefer standard .NET APIs over hand-rolled code; refactor duplication you touch (the rask-review skill).

  7. Land on main — Conventional Commit type(scope): subject (enforced by .githooks/commit-msg and, on a pull request, commitlint.yml — both scripts/lib/conventional-commit.sh), then merge origin/main in and git push origin HEAD:main. Own work never goes through a pull request — PRs are reserved for external contributions, which arrive from forks. ci.yml runs on the push; a red main is fixed forward. See the land-on-main skill.

The shared files merge by themselves when two branches only add to them (.gitattributes, proved by scripts/tests/merge-friendly-files.test.sh). Two CHANGELOG.md bullets added under one heading are both kept, whole (.githooks/merge-append, which the first dotnet build configures as it does the hooks); two branches changing the same existing line still conflict. Two blocks appended to client-bundle-size.csv are both kept, and the bundle gate reads the newest-dated one, so their order does not matter — open each block's comment with its date, as every block does. llms.txt is written one sentence per line (a list item continues on lines indented two spaces), so edits to different sentences of a guide merge; keep new text that way.

Versioning & releases

  • Versions come from git tags via MinVer (vX.Y.Z); assemblies carry AssemblyVersion, FileVersion, and InformationalVersion automatically.

  • Stable release: promote CHANGELOG.md [Unreleased] to a dated section, tag vX.Y.Z, push — release.yml runs every gate, the release-only ones included, and only then packs the NuGets and publishes to nuget.org + a GitHub release (the cut-release skill). Try those gates ahead of the tag on a ci/release/** branch.

  • Nightly: nightly.yml starts when a push run of ci on main starts, packs that commit as X.Y.(Z+1)-alpha.0.N while the run builds it, and pushes it the moment the run's build job (the build and the unit tests) is green — to GitHub Packages first, restorable within seconds (Nightly builds), then to nuget.org (prerelease), which validates for another five to twenty-five minutes. A commit whose build did not pass publishes nothing, and neither does a run dispatched by hand on any branch but main; the completed run and an hourly schedule are the backstop (scripts/lib/nightly_pick.sh). N is scripts/lib/nightly_version.py's, handed to the pack as MinVerVersionOverride — see One version, one commit.

  • Both publish through one script, dependencies first — scripts/lib/publish_packages.py; see How a version reaches nuget.org.

  • The released version is the only one left listed. After publishing, release.yml runs scripts/unlist-old-versions.sh, which unlists every older version of each package it just pushed — previous stables and the nightly prereleases alike. A nightly cadence puts hundreds of -alpha versions on the gallery between releases (Rask.Server reached 478 versions, only 23 of them stable), and a version list nobody would install is noise on every package page.

    Unlisting is not deletion. nuget.org gives an owner no way to delete a published version, by design, so an unlisted version still restores by exact reference and a pinned PackageReference keeps building — it is removed from search and the gallery, not from the feed.

    Two deliberate limits. The step is continue-on-error and every path in the script exits 0: the packages are already pushed by the time it runs, and a tidy-up must never red a released tag. And it spends a budget of ~240 calls then stops, because nuget.org rate-limits unlisting to roughly 250 before a 403 whose retry-after runs to tens of minutes — the remainder is picked up by the next release, which supersedes it anyway. The key in NUGET_API_KEY needs the Unlist scope; a push-only key makes the step a no-op with a warning.

    Which versions are superseded is decided by scripts/lib/unlist_select.py under real semver ordering, table- tested in scripts/tests/unlist-old-versions.test.sh. Two rules there are load-bearing: nothing newer than the released version is ever touched, and a prerelease never retires a stable (by semver 0.21.0 is older than 0.21.1-alpha.0.1, so without that rule a prerelease tag would unlist the current release).

    Candidates come from scripts/lib/listed_versions.py, which reads the registration index, not the obvious v3-flatcontainer/<id>/index.json. Flat-container reports every version ever pushed, unlisted ones included — rask.native has all 209 of its versions unlisted and flat-container still returns all 209 — so selecting from it would spend the entire quota budget re-unlisting finished work and never reach the rest of the backlog. Only the registration index carries listed per version, and a missing listed field means listed.

  • A retired package is unlisted whole, by hand. A package Rask stops shipping (Rask.External, Rask.Blazor and their tasks packages, Rask.Spa.Tasks) has no newer version for a release to keep, so no release ever tidies it. Run the unlist-retired workflow with the ids (gh workflow run unlist-retired.yml -f packages="Rask.Blazor Rask.External"): it runs scripts/unlist-retired-packages.sh, which unlists every listed version and, unlike the release step, waits nuget.org's quota out instead of stopping, so one run finishes — tested in scripts/tests/unlist-retired.test.sh.

CI

Nothing blocks a commit or a push. The git hooks take seconds and build nothing; the gates run in GitHub Actions after the push, each as its own job. Own work still lands on main directly, and ci.yml says afterwards whether it should have. A red main is fixed forward.

They used to run in the hooks, under a one-minute budget that only held on an idle machine: with several worktrees gating at once each run shrank to two cores and took ten minutes and more. CI is free for a public repository and nobody waits on it.

What runs where

When What
commit-msg hook Conventional Commits (scripts/lib/conventional-commit.sh) and the attribution guard.
pre-commit hook scripts/tests/front-doors.test.sh, only when README.md or NUGET.md is staged; scripts/tests/prose-comments.test.sh over the staged src/*.cs files.
pre-push hook The attribution guard again, over the commits being pushed.
CI, every push to main or a ci/** branch and every pull request — ci.yml, SCOPED The gates of the push set the change can reach: build (the build with the analyzers off, then the unit tests it reaches — the nightly is pushed the moment it is green) and analyzers 1/4 … analyzers 4/4 (the same build with the analyzers on, cut by project in scripts/lib/analyzer-shards.txt, each shard skipped when the change reaches none of its projects; each shard also runs the formatter over the .cs files the change touched in its projects' directories — every file there when it touched the rules — and shard 1 the gate script tests and the files in no project's directory), the browser journeys when what they draw is reached, the benchmark budgets when what they measure is reached, the CLI build and templates when the CLI, a template, the kit or a project file changed. scripts/lib/affected_gates.py decides, from the push's OWN change — on main, from the head of the newest earlier run that started its gates, green or red; on a ci/** branch, from its merge-base with main; a change to the CI itself, a gate script or the package pins runs the whole set.
CI, once a day against main, and by hand — full.yml The whole push set, unscoped: build with the unit tests over its output, and the analyzer build (run-unit-local.sh; no formatter — no change to check, restore at 1.0), browser E2E in three shards over one site publish job and the Rask.Server journeys (run-e2e-local.sh), devtools E2E, browser SQLite E2E, data demo E2E, WASM E2E (run-wasm-e2e-local.sh), CLI build (run-cli-build-e2e.sh), templates (run-template-e2e.sh), the benchmark byte and allocation budgets (run-benchmarks-local.sh).
CI, before a release — release.yml on a v* tag, and ci.yml on a ci/release/** branch The push set plus the release set, which needs containers or a real host: watch hot reload (run-watch-e2e.sh), deploy, storage providers, installer, providers.
Only when you ask BenchmarkDotNet timings, the SQLite load gate (run-sqlite-load-local.sh), the Linux dev-host gate (run-devhost-linux-local.sh). No hook, no workflow.

The list of gates lives once, in .github/workflows/gates.yml, which ci.yml, full.yml and release.yml all call, so they cannot drift. Jobs do not fail fast: one red gate says nothing about the others, and every one reports.

Enable the hooks with git config core.hooksPath .githooks (the first dotnet build does it for you); bypass one with --no-verify.

A red job

Every job runs one script from scripts/, the same one you run by hand. The job's last step is that command; run it in a worktree at that commit:

scripts/run-unit-local.sh                    # the build and analyzers jobs (RASK_UNIT_PART=build | analyzers | analyzers-K runs one)
scripts/run-e2e-local.sh                     # the "browser E2E" jobs (RASK_E2E_SITE=publish is the "site publish" job; prebuilt drives what it published)
scripts/run-all-gates.sh --only 'E2E|CLI'    # several, by label
scripts/run-all-gates.sh --list              # every gate, and what it needs

On main every push gets its own run, started at once, so "which push broke it" has an answer. Each run checks its own push and only it: it is measured from the head of the newest earlier run that started its gates, green or red (scripts/lib/green_base.sh main), so a red push is named once and fixed forward, not run again under every push after it. A run that has not started a gate when a newer push's run starts is cancelled by it (scripts/lib/cancel_superseded.sh): the newer run is measured from before it, so its scope holds the older push's change.

Trying a change first

Push to a ci/** branch to run the push set without landing anything; only the newest push to a branch is kept running. It is scoped by its OWN commits, measured from git merge-base origin/main HEAD (scripts/lib/green_base.sh branch) — what main did since is main's runs' business, so a CI file changed on main does not send every branch to the whole set (60% of the runner minutes until 2026-11-03). A change of the branch's own that reaches the CI itself, a gate script or the package pins still gets the whole set. For the whole set on any branch: gh workflow run ci.yml --ref <branch>. A ci/release/** branch runs the whole set and the release set too — the way to find out before tagging rather than from a failed release.

git push origin HEAD:refs/heads/ci/my-change
gh run watch          # pick the run
git push origin --delete ci/my-change

What a red main stops

Publishing. pages.yml triggers when a PUSH run of ci completes on main and does nothing unless it concluded success, then deploys the newest commit such a run passed. nightly.yml does not wait that long: it starts with the run, packs while it builds, and publishes once the run's build job is green (scripts/lib/nightly_wait.sh) — a later red gate is fixed forward by the next push. A newer push's nightly cancels an older one that has not started pushing. The completed run and an hourly schedule are its backstop. A pull request or a manual ci run says nothing about main and publishes nothing. Main runs ONCE: until 2026-11-03 publishing followed full, the whole set, which ran a second time behind every push — see Loosened until 1.0.

The price of a scoped push is named here once: a break the scoped run could not see is published, and found by the next whole run — full, once a day — with green pushes on top of it. full red and ci green means exactly that. release.yml's publish job needs its gates job (both sets). A manual workflow_dispatch of nightly or pages publishes whatever main holds, verdict or not.

Loosened until 1.0

Until 1.0, CI speed comes before caution (decided 2026-11-03: 15,473 runner-minutes in 48 hours). Every loosening is marked restore at 1.0 where it is made, and listed here so the 1.0 release puts each back:

Loosened Where Restore at 1.0
main runs once: full.yml no longer runs behind every push, only daily and by hand. full.yml the push: branches: [main] trigger (and its half of scripts/lib/cancel_superseded.sh)
Publishing follows main's scoped ci run, not the whole set. nightly.yml, pages.yml, upstream.yml, scripts/upstream/main-already-red.sh workflow_run of full, and pick querying full.yml's green runs
main's run is measured from the newest earlier run that STARTED its gates, red or green — a red gate is not run again under the pushes after it. scripts/lib/green_base.sh main measure from the newest GREEN push run (status=success)
Flux UI is followed weekly, not daily: flux and flux-parity run Mondays (and by hand). upstream.yml (the '41 4 * * 1' schedule) both jobs on the daily schedule, with the followers
No soak: the release set no longer runs against main every three hours (soak.yml deleted), so an image or a download that disappears is found on a ci/release/** branch or at the release. — soak.yml (schedule: '23 */3 * * *', gates.yml with set: release), from the history
A nightly is pushed in one wave: a package can be served ahead of a dependency while nuget.org validates. nightly.yml (--waves 1 --jobs 8) level by level: drop --waves/--jobs, as release.yml
Finished work lands directly on main after its local targeted tests — no ci/** pre-run, however risky — except a change to CI itself, a Linux-only risk the Mac cannot check, and the release-only gates (ci/release/**). CLAUDE.md, the land-on-main and rask-ship skills risky changes go through a ci/** branch first
The formatter checks only the .cs files a change touched (every file when it touches an .editorconfig, a Directory.*.props/.targets or global.json), inside the analyzers K/N jobs, each over its own projects' files; with no scope base — the daily whole run, a release — it checks nothing. scripts/run-unit-local.sh (the analyzers-K parts), scripts/lib/format-scope.sh the whole tree in the daily full run: a job there running dotnet format Rask.slnx --verify-no-changes
A nightly is pushed the moment main's ci run has a green build job, not when the run has passed: browser E2E, templates and the CLI build may still be going, and a red one is fixed forward. It is packed while the run builds. nightly.yml (workflow_run requested), scripts/lib/nightly_pick.sh, scripts/lib/nightly_wait.sh workflow_run completed of full, and pick taking only a commit whose whole run passed
The build job builds with the analyzers off (-p:RunAnalyzers=false) and runs the unit tests; the analyzers, the formatter and the gate script tests are the analyzers K/N jobs beside it, which no publish waits for, cut by project (scripts/lib/analyzer-shards.txt, -p:RaskAnalyzerShard=K in Directory.Build.targets) so none is longer than build. The nightly pack skips the analyzers too. gates.yml (build, analyzers K/N), scripts/run-unit-local.sh (RASK_UNIT_PART), Directory.Build.targets (RaskAnalyzerShard), scripts/lib/analyzer-shards.txt, scripts/lib/nightly_pack.sh one build job, analyzers on, ahead of the tests; the pack with the analyzers

How a version reaches nuget.org

nightly.yml and release.yml pack the solution and hand ./artifacts to scripts/lib/publish_packages.py. Nothing else pushes a package.

python3 scripts/lib/publish_packages.py plan   ./artifacts --projects src   # level, id, version — pushes nothing
python3 scripts/lib/publish_packages.py push   ./artifacts --source … --trusted-publisher pal-tamas --gate-index nuget.org
python3 scripts/lib/publish_packages.py verify ./artifacts                  # waits until every package is served, from this commit
  • The set is checked first. One version, one commit, every dependency of ours packed, and (--projects src) exactly the projects under src/ that are not <IsPackable>false</IsPackable>. A set that fails is not pushed at all (exit 2).
  • Order. Read from the packed nuspecs: a package with no dependency in the set is level 0, and every other one sits a level above the deepest thing it depends on. Today that is eight levels, from Rask.Wire to Rask.Server. There is no list to keep.
  • Gate. A level is pushed only when nuget.org serves everything it depends on. Accepted is not served: validation takes four to eleven minutes and finishes in no particular order, so without the gate Rask.Server can be restorable before Rask is. This is what makes a publish take the better part of an hour; removing --gate-index from the workflow trades it back for that window.
  • Waves. --waves N folds the levels into at most N pushes, and the gate waits only between them. --waves 1 pushes the whole set at once (--jobs at a time) and waits for nothing until verify — the check before the first push and the verify still refuse a version from another commit. nightly.yml publishes that way until 1.0 (Loosened until 1.0); release.yml goes level by level.
  • Retry. One package per dotnet nuget push, --timeout 900, five attempts with a doubling wait. A timeout, a 5xx or anything unrecognised is tried again; a 429 waits what the feed asks, or a minute; a 400/401/403/413 fails at once; a duplicate is success. The key is struck out of everything printed.
  • Key. --trusted-publisher <nuget.org profile> trades the job's GitHub OIDC token for nuget.org's temporary key (trusted publishing; no secret stored, nothing to renew). That key lives one hour and the gate makes a publish longer, so a new one is asked for before a level once the one in hand is older than --key-life (40 minutes). --api-key-env NAME still pushes with a fixed key — GitHub Packages does.
  • Verify. The job is green only when the flat container — what restore reads to resolve a version and to download; search and registration lag it — lists every package at the new version. Otherwise it fails and names what is missing.
  • One commit. Before the first push, every package nuget.org already serves at the version must have been packed from this commit — its nuspec's <repository commit="…"> — and the gate and verify ask the same of every package they wait for. One from another commit stops the run at once (exit 3, MIXED VERSION on the run page, naming each package and its commit).
  • A failed publish is finished by running it again. Re-run failed jobs packs the same commit, so it gets the same version, and --skip-duplicate passes over what is already there. Whatever stopped it, nothing above the failure was pushed, so the half that exists restores. A nightly that is left unfinished is not waited for: the rolling nightly release moves only after the verify step, so the next run publishes the newest green commit, whole.

Which commit is version X? A nightly's number counts the commits since the last tag, which no run list shows — and a nightly run is listed under main's head, not under the commit it packed. Three places say it:

# the package itself: <repository commit="…"> in its nuspec
curl -s https://api.nuget.org/v3-flatcontainer/rask/0.23.1-alpha.0.271/rask.nuspec | grep -o 'commit="[^"]*"'
gh release view nightly --json name                     # the newest nightly: "Nightly <version> (<sha>)" (the tag may sit below <sha>: scripts/lib/nightly_anchor.sh)
gh run view <run-id>                                    # the run's summary: version, commit, and why it was picked

And the other way round — does a nightly hold commit X: take that version's commit from its nuspec and ask git, git merge-base --is-ancestor X <commit> && echo yes. The number alone does not say which commit, only which came later.

One version, one commit

0.23.1-alpha.0.526 is on nuget.org from two commits: Rask, Rask.Cqrs and Rask.Api from 1ecef2685, the rest from cc68a07dd, the merge on top of it. Both nightlies were green.

Cause What prevents it now
MinVer's height is the depth at which its first-parent-first walk meets the tag. Landing on main ends in a merge whose FIRST parent is the worktree branch, so the walk goes down the branch — and cc68a07dd came out at 1ecef2685's height, 526. (Counting the first-parent chain ties too: 529 for both.) The nightly's N is git rev-list --count <tag>..<commit>, every commit the tag does not reach. A commit counts all its ancestors, and main's next head descends from the last, so N is distinct and only grows: 2236 and 2238 for those two.
The second run's pushes were "duplicates", and a duplicate is success; verify asked only that every id was listed. The served nuspec's commit is compared with the set's, before the first push and at every wait; a stranger fails the run.

2026-10-12: a nightly that left Rask.Server ahead of Rask

0.23.1-alpha.0.273 was on nuget.org for Rask.Server, Rask.Dashboard, Rask.Postgres and three more while Rask, Rask.Ui, Rask.Data and the rest were still at .271. Every app floating 0.*-* failed restore with NU1102, a production deploy among them. Three things made it possible:

Cause What prevents it now
One dotnet nuget push "./artifacts/*.nupkg": file-name order, so hosts went before what they depend on. Even a clean nightly served Rask.Server 37 seconds before Rask (.271). Order from the nuspecs, and the gate: nothing is pushed until its dependencies are served.
No retry, and the CLI's 300-second default: one stalled request ended the publish where it stood. A push per package, a longer timeout, bounded retries; a failure stops below everything that depends on it.
"Done" meant the push command exited. Nothing asked whether the version was whole, and no run said which version or commit it was. The verify step, the summary on the run page, and a nightly release that moves only after both.

The rule that a nightly comes only from a commit full passed (the rule until 2026-11-03) held throughout, on the schedule as on the completed run: both ask the same question in the pick job. The scheduled run that looked like a publish from a red commit had published nothing — the commit had passed full on a second, scheduled try three days earlier, and its nightly already existed. pick now writes what it decided on the run page.

The workflows

  • ci.yml — the gates a change reaches, on every push to main or a ci/** branch and every pull request; the whole set and the release set on a ci/release/** branch. By hand: gh workflow run ci.yml --ref <branch> -f only='CLI build' (only is a pattern over job names).
  • full.yml — the whole push set against main, once a day and by hand (fourteen jobs at once so a push's own run finds runners). It gates nothing.
  • gates.yml — the reusable list of gate jobs the others call.
  • commitlint.yml — Conventional Commits and the attribution guard on PRs: the commits and the PR title, which is the squash subject and passes through no local hook.
  • nightly.yml — prerelease publish of a commit whose push run of ci on main has a green build job: GitHub Packages, then nuget.org.
  • pages.yml — rask.sh, from a commit a push run of ci passed on main.
  • release.yml — tag-triggered: every gate, then the stable publish.
  • upstream.yml — daily (Flux UI weekly, Mondays: flux and flux-parity); follows what Rask is generated from. scripts/upstream/follow.sh moves the MDN snapshot to the latest stable data, records the public surface that moved with it (scripts/public-api/record.py), and moves every pin Dependabot cannot read to its newest stable release (the followers listed under What updates itself). Each follower is a job of its own (upstream-follow.yml, follow.sh <follower>): its commit is gated by what it can reach and THEN landed on main, with nobody watching — so a release the gates refuse holds back that source only. A refusal for a gate main is already red on (scripts/upstream/main-already-red.sh) is not upstream's: the commit waits on upstream-waits/<follower> and is followed again when main's ci next passes on a push. Every source keeps ONE issue, opened only when it needs a person — the gates refused what it shipped, or Flux UI moved — and closed by its next green run. The Flux lock (tests/Rask.Ui.Tests/Flux/flux.lock.json) is measured on its runner, so it is relocked there: gh workflow run upstream.yml -f relock=true.
  • dependabot-merge.yml — merges a Dependabot pull request once ci has passed it. What must not move on its own is in .github/dependabot.yml's ignore lists.

The gate scripts

True of the scripts wherever they run — a CI job or your terminal.

  • Format + unit tests: scripts/run-unit-local.sh. It builds the solution once, then runs the full dotnet format Rask.slnx --verify-no-changes (whitespace + style + analyzers) concurrently with every test except the browser E2E, and reports both statuses: a run that is red for formatting still tells you whether your tests pass. The full pass earns its place — import ordering is enforced by dotnet format alone, not by the warnings-as-errors build (#584). Before formatting it builds src/*.Generators in Debug: dotnet format evaluates the solution in the default configuration and resolves the analyzer references to bin/Debug/, and without those DLLs no source generator runs and the routing tests fail to bind with CS1503. The gate's own bash tests (scripts/tests/*.test.sh) run first, and every run ends with one line per phase saying where the time went.
  • In CI each analyzer shard formats its own share. scripts/lib/format-scope.sh deals a file to the shard of the project whose directory holds it — the projects that shard already builds and analyses, by the same scripts/lib/analyzer-shards.txt — and a file in no project's directory (the source-linked src/*.Shared/ and tests/Shared*/ files) to shard 1. A change that touches the rules (.editorconfig, Directory.*.props/.targets, global.json) has every shard check every file of its projects, so the tree is checked once, a part in each job: it was one 1140-second dotnet format over the whole solution in shard 1, after a whole-solution build (29 minutes). There a shard runs dotnet format whitespace over its share and dotnet format style (import ordering and the code-style fixers) over its projects' directories, side by side, and not the analyzers pass: that is the analyzer build the same job has just run over the same projects, warnings as errors, and it was most of the formatter's time (316 of 550 s on shard 2, 476 of 687 on shard 4, CI run 41785916921). The source-linked files in no project's directory get the whitespace pass only: dotnet format analyses every project that compiles a file it is given, and the style pass over them analysed about 100 projects (206 s); their code-style rules are the build's, in every project that compiles them. Those runs print the formatter's workspace load and per-pass timings; scripts/tests/format-scope.test.sh holds that every shard has a share and that between them they hold every project in Rask.slnx.
  • dotnet format never gets --no-restore. With it, dotnet format Rask.slnx --verify-no-changes modified 57 files it was only asked to check: without a restore the workspace cannot resolve the source generators, every generated symbol goes missing, the usings look dead, and it writes. Check git status after any format run.
  • A hand run can be scoped to what changed. RASK_TEST_SCOPE=affected scripts/run-unit-local.sh builds and tests only the projects the staged files can reach (or a range's, with RASK_SCOPE_RANGE=origin/main...HEAD); RASK_FORMAT_SCOPE=staged|range narrows the formatter the same way. scripts/lib/affected_projects.py walks ProjectReference, the ..\… items a project pulls in, and every test's <RaskTestReads/> declarations, and answers FULL for anything it cannot map precisely (a repo-root import, the solution, a gate script, a hook, .editorconfig, a file no project owns). The run prints which it chose and why. A project that passed is stamped with the tree it passed on (scripts/lib/gate_stamps.py), and the next scoped run skips it when nothing in reach changed; RASK_GATE_REUSE=0 runs everything. Unscoped is the default, and it is what CI runs.
  • A test that reads a file from disk declares it. A contract test on another project's rask.ts, a walk of docs/**/*.md: no reference carries that edge, so the test's csproj names it —
    <ItemGroup Condition="false">
      <RaskTestReads Include="..\..\src\Rask.Server\Resources\**" />
    </ItemGroup>
    The group is Condition="false" so MSBuild never expands the glob (the scoper reads it as text; scripts/tests/affected-projects.test.sh enforces this). Forget the declaration and a scoped run skips the test that pins the file. The gate's own tests declare theirs on a # gate-inputs: header line, an ERE over repo-relative paths; a change under scripts/ or .githooks/ runs all of them.
  • Every script opts out of .NET CLI telemetry. scripts/lib/dotnet-env.sh exports DOTNET_CLI_TELEMETRY_OPTOUT=1: the CLI walks and locks its spool under ~/.dotnet/TelemetryStorageService on every exit, and a gate's hundreds of dotnet processes queue on a large one with the cores idle.
  • The scaffold templates compile in the unit gate. src/Rask.Templates is in no project the solution builds, so tests/Rask.Generators.Tests/TemplatesCompileTests.cs materialises each template the way rask new does and compiles the C# in memory with the real generators. Restore, the project file, the MSBuild targets and publish stay with scripts/run-cli-build-e2e.sh. A using that a package's build/*.props adds for an app is listed in that test by hand.
  • run-all-gates.sh is every gate in one local run. --only 'E2E|CLI' narrows it to the gates whose label matches. --parallel runs two lanes: the CLI build, template and watch gates pack with MinVer on and everything else builds with MinVerSkip, so in one tree they recompile each other's obj/Release; it checks out a second worktree at HEAD for that group and refuses a dirty tree.
  • A red gate names the culprit it actually found. The CLI build and browser gates build browser targets, so they can fail for a reason that has nothing to do with your branch — most often NETSDK1147, the wasm-tools workload resolving as missing. scripts/lib/build-failure.sh classifies the build log — code (error CS, your branch), workload, sdk, unknown — and the gate prints the matching explanation. CS wins when both appear.
  • Attribution trailers are rejected, at both boundaries. Commit messages carry no Co-authored-by:, no Claude-Session: and no "Generated with …" footer: GitHub's contributor list credits co-authors, and taking two such accounts back off cost a rewrite of all 970 commits. The rule lives once, in scripts/lib/attribution.sh, consulted by .githooks/commit-msg and again by .githooks/pre-push over the commits being pushed — the first only runs once core.hooksPath is set, which a fresh clone has not done. It is the one check CI cannot take over for own work: by the time CI sees the commit it is on main. A human Signed-off-by: passes. commitlint.yml makes one allowance the hooks do not: on a pull request Dependabot opened, Dependabot's own sign-off is dropped before the check.
  • Hooks in a worktree run the worktree's own copy. core.hooksPath is the relative path .githooks, resolved against the pushing worktree's top level. If a branch does not contain .githooks/ at all, no hook runs and nothing says so.
  • A public rename is one command. scripts/tools/RaskRename renames a symbol across Rask.slnx the way an IDE does, then rewrites Type.Old in the templates, docs and agent guides. .claude/skills/rename-public-member is the playbook.

The gates, one by one

  • Browser E2E — scripts/run-e2e-local.sh (push set). The Playwright journeys in tests/Rask.Site.E2E.Tests and tests/Rask.Server.E2E.Tests. It publishes src/Rask.Site and builds the leaf test projects — the graph the suite runs, not the solution; that the whole solution compiles is the unit gate's claim. It passes MinVerSkip=true like the unit gate, so the two do not recompile each other's obj/; that is safe only while no fixture launches a published host out of process. While iterating on one journey, narrow it: RASK_E2E_FILTER='FullyQualifiedName~WasmExampleTests' scripts/run-e2e-local.sh — it says loudly that the run was filtered, because a narrowed green is not the gate.
  • Devtools E2E — scripts/run-devtools-e2e-local.sh (push set). Rask DevTools against real pages (tests/Rask.DevTools.E2E.Tests): the pill, the dock and every tab. A gate of its own because the devtools exist only in a Debug build. It sets DOTNET_MODIFIABLE_ASSEMBLIES=debug; a Release build, or a run without the variable, fails naming the script rather than passing on nothing.
  • WASM E2E — scripts/run-wasm-e2e-local.sh (push set). The browser host's own journeys (tests/Rask.Wasm.E2E.Tests) over tests/Rask.Wasm.Fixture.Wasm, served from an ASP.NET host inside the test process that issues the sign-in cookie: a gate of its own because nothing else publishes the fixture.
  • Browser SQLite E2E — scripts/run-browser-sqlite-e2e-local.sh and data demo E2E — scripts/run-data-demo-e2e-local.sh (push set). The only gates that link e_sqlite3 natively into a WebAssembly bundle, so they need the wasm-tools workload and refuse to start without it. The first drives full-text search over tests/Rask.SQLite.Browser.Fixture.Wasm; the second drives src/Rask.Site.DataDemo, the notes demo served at /demos/data/.
  • CLI build — scripts/run-cli-build-e2e.sh (push set). The only thing proving the code the CLI writes compiles: it packs this commit's packages to a local feed, scaffolds every rask new flag combination and the tutorial walk-through, and builds each with -warnaserror. The script exports RASK_CLI_BUILD_E2E=1; without it every case reports SKIPPED rather than passing silently.
  • Templates — scripts/run-template-e2e.sh (push set). Scaffolds server, wasm and wasm-hosted through the dispatch rask new uses and builds what it wrote. Exports RASK_TEMPLATE_E2E=1, with the same SKIPPED rule.
  • Watch hot reload — scripts/run-watch-e2e.sh (release set). See the inner loop.
  • Deploy — scripts/run-deploy-e2e-local.sh (release set). Points the real rask deploy at a throwaway privileged container standing in for a bare VPS and asserts on the host: an image built over SSH, a container answering its health check, a blue-green swap, a Caddyfile a real Caddy accepted, a volume that outlived its container. Every other deploy test is mocked. Not covered: real DNS and Let's Encrypt — the gate uses a .test domain.
  • Installer — scripts/run-install-e2e-local.sh (release set). Runs the working tree's rask.sh in containers that lack a .NET SDK and tools, then asserts a working rask and dotnet-ef, plus a scaffolded project that builds. Its cheap half, scripts/tests/install-script.test.sh, is one of the unit gate's own tests: the pure helpers, POSIX sh, truncation safety (by running prefixes of the file) and the install URL byte-identical everywhere it is written. Not covered: a real Windows host.
  • Storage providers — scripts/run-storage-providers-local.sh and providers — scripts/run-providers-local.sh (release set). Rask.Storage's S3 and Azure signing against MinIO and Azurite, and the database batteries against real servers, all in containers; a provider fact whose server is not reachable reports SKIPPED, never PASSED.
  • Linux dev host — scripts/run-devhost-linux-local.sh (on request, RASK_DEVHOST_E2E=1, in no CI job). Verifies the Linux half of https://<name>.test in a throwaway container where the CA anchors, NSS databases, /etc/hosts and the port sysctl are really modified, ending with a curl TLS handshake with no --cacert. Not covered: macOS and Windows.
  • Benchmarks — scripts/run-benchmarks-local.sh (push set). Checks both wire-byte baselines — the standalone codec and the head-to-head against Blazor — byte-for-byte, holds a live update to its allocation budget (Baselines/allocation-budget.csv, exact; measured with DOTNET_TieredCompilation=0 DOTNET_TieredPGO=0, which the script sets on that one process, so the count is the same on every run), and smoke-runs the three live-session capacity reports; session-churn --smoke asserts that 100 create→dispose cycles leave nothing behind. Every check runs even when an earlier one fails. A regression means one of two opposite things: the render/diff path got heavier (fix the code, leave the baseline), or a scenario's own markup changed (refresh the baseline in the same commit and say why) — the vs-Blazor report tells them apart, because Blazor's numbers move by the same amount in the second case. Build before --check: the baseline is read from bin/.

Sharing one machine

A CI runner has its machine to itself and skips all of this. By hand, several worktrees share one box, so scripts/lib/machine-lane.sh gives it a budget of 10 slots (the performance cores) that the unit and browser gates claim against:

gate what it does waits?
run-unit-local.sh takes whatever is left, floor 2, and shrinks into it; prints the size it chose never
a browser gate — build and publish a partial claim; several worktrees may build at once never
a browser gate — the suite claims the whole budget; two browser suites never overlap yes, oldest first

A unit gate younger than a waiting browser suite is not waited for, so "exclusive" is not "an empty machine". Contention produces boot timeouts and dead fixtures, never a false assertion pass: a green under contention is trustworthy; a red is not — re-run it alone (ps -Ao pid,etime,command | grep -E '[r]un-(e2e|unit)-local' shows what else is live). Every other gate, and any plain dotnet build, is invisible to the budget; a red browser suite that finds a heavy build still running names it (#850).

variable effect
RASK_LANE_SLOTS the budget (default 10).
RASK_LANE_DISABLE=1 switch the mechanism off: every gate gets its maximum and nothing waits.
RASK_E2E_QUEUE_TIMEOUT seconds to wait before giving up (default 5400); the gate then exits 1 and names what holds the slots.
RASK_E2E_QUEUE_POLL seconds between checks (default 20).
RASK_E2E_QUEUE=0 do not wait; refuse immediately.
RASK_E2E_ALLOW_CONCURRENT=1 do not wait; run alongside. Treat a red from that run as suspect until re-run alone.

Dependencies

The standing rule is the latest LTS — .NET and every tool a build fetches. Nothing in the repo, the build or a scaffolded app needs Node or npm: TypeScript and esbuild arrive as native binaries, and so does Tailwind. A scaffolder is a recommendation every new project inherits, so a maintenance-only pin hands users a runtime that has stopped getting security patches.

What updates itself. .github/dependabot.yml covers, weekly: NuGet (the repo's central versions and scripts/tools/RaskRename's and scripts/tools/KitBundle's own), GitHub Actions (the workflows and the shared .github/actions/setup) and the base images of every template Dockerfile and scripts/devhost (.NET held to its 10.0 LTS line). Everything Dependabot cannot read is moved daily by a follower under scripts/upstream/, run by follow.sh in upstream.yml, each with a self-test over saved upstream answers (scripts/tests/upstream-*.test.sh). The followers, their commands and the files each writes are ONE list, scripts/upstream/followers.json; its manual part names what is still generated by hand, and why. scripts/tests/upstream-registry.test.sh fails a change that adds a file whose header names a generator under scripts/{upstream,flux,mdn} that is on neither list — a new generator gets a follower:

Follower Pins Upstream
images.py CurlImage, the backup's alpine, the E2E's images, the scripts' postgres:NN-alpine — each to the newest tag of the same shape Docker Hub
litestream.py RaskLitestreamVersion, its seven SHA-256s (downloaded and checked against checksums.txt), the templates' litestream/litestream image GitHub releases
tools.py RaskEsbuildVersion, RaskTsgoVersion (TypeScript 7's native compiler), RaskTailwindVersion, with every digest in TypeScriptToolPins.cs / TailwindPins.cs recomputed from the download the npm registry's tarball URLs, GitHub releases
chrome.py RaskPdfChromeVersion and its per-platform SHA-256s (Rask.Pdf.ChromePin.props) — the newest Stable a week old Chrome for Testing
actions.py the action majors in the deploy workflow rask deploy scaffolds GitHub releases

Not followed, on purpose: Roslyn (held to the SDK's compiler). The runner image (runs-on: ubuntu-26.04) is moved by hand: the workflow token may not push a change to .github/workflows.

Families that must move together are grouped (microsoft-extensions, test-tooling, spectre-console, sqlitepclraw); the two Microsoft.CodeAnalysis.CSharp* packages are ignored on purpose, because an analyzer referencing a newer Roslyn than the running csc is CS9057 and raises the compiler floor for every downstream consumer.

What does not. The runner image, by hand (above); the holds named in .github/dependabot.yml's ignore lists; and anything new. A pin added outside both is a pin nobody moves, so give it a follower (or a Dependabot entry) in the same change — the check-dependency-updates skill lists what exists.

What keeps the copies honest. A version stated twice is a version that can drift, so the pairs that matter most are asserted by an offline unit test rather than by a comment:

Test Holds together
PackagePinFamilyTests the Spectre and SQLitePCLRaw pairs, the one-version platform stack, and that every SQLite project can still reach the patched SQLitePCLRaw
EfToolProbeTests the dotnet-ef floor the CLI checks for vs. the EF Core version in Directory.Packages.props
ResolveTypeScriptToolTaskTests reads RaskTsgoVersion/RaskEsbuildVersion out of Rask.Core.targets instead of restating them

They need no network and run in the ordinary unit gate — CI's build job, on every push and every pull request — so the gate that runs for a version bump is the one that checks it was complete.

Landing a Dependabot PR. ci.yml runs the short deps set on the pull request (build, the analyzers K/N shards with the formatter, CLI build, templates — the browser suites run on main after the merge), and dependabot-merge.yml squash-merges the pull request once that run has passed. A red one waits for a person: main has no required checks, so a red run does not disable the merge button — read the run first. Then land it locally, not from the web UI — check the branch out and push it.

A green commitlint check on a Dependabot PR means its title and commits are Conventional and carry no trailer other than Dependabot's own sign-off, which CI lets through on those PRs only. The hooks do not: pre-push refuses the commit until that line is gone, so landing one starts with git commit --amend --reset-author and deleting the Signed-off-by: line.

Vulnerability scanning is manual. dotnet list Rask.slnx package --vulnerable --include-transitive is the only scan that runs anywhere; no workflow runs it.

Confirm