Changes touching this path
- installer: serve the R2 base first, and turn the curl | sh gate back on (#808)
The hero one-liner has been returning 404 in production. The site's /install.sh proxy
fetched the installer from GitHub anonymously, and the repo is private permanently
(ADR 0045), so there was nothing to fetch. #807 put the artifacts on R2; this points
the installer at them.
The proxy now reads upstream from dl.millerbyte.com and rewrites the generated
ARTIFACT_DOWNLOAD_URLS default to list the R2 base FIRST and GitHub second. dist's
installers already try each base in order, so the fallback costs nothing and keeps
working for anyone with credentials.
⭐ The rewrite derives the version from the line it is rewriting. The anchor already
contains the release tag, so capturing it means the site needs no version knowledge,
no 'latest' pointer to resolve and no credential — a test moves the tag and the R2
base follows.
⚠ The two installers genuinely differ and one regex would have silently matched
neither: sh builds a space-separated string, ps1 builds an array. The ps1 anchor is
pinned to the ASSIGNMENT rather than the URL, because the same URL also appears in
that script's help text — a loose match would rewrite the comment, leave the real
download list GitHub-only, and still pass every check that greps for the R2 base.
The rewrite THROWS if the anchor is absent. A silent no-op is the current bug wearing
a different hat: it would ship an installer pointing only at URLs that 404 for exactly
the audience the one-liner exists for, while the route returns 200 and the bytes look
like a real script. Nine tests cover both installers, both drift cases, and the
help-text trap; the anchors were also validated against the real 54 KB v0.4.2 scripts.
publish-r2 now also writes unversioned installer copies to /installers/. That is the
one deliberately mutable object in the bucket — every v{VERSION}/ prefix stays
immutable and year-cached, but 'latest' has to move or the one-liner pins itself to
whichever release shipped first. It carries max-age=300, matching the proxy.
smoke-install.yml loses its `if: false` and now defaults to the hero path rather than
a GitHub-direct URL. Testing a URL no user is told to run proved nothing; this
exercises the whole chain — proxy, rewrite, R2. The skip comment is kept as history,
because why it was disabled is why the gate is worth having.
6bf1df11 ·dbf3dbe6… - the download hop lands as a counted redirect that cannot be steered, and the two things 1647 asks for that do not exist yet are named rather than faked: GET /dl/tag/asset records a start and 302s to R2. the target is CONSTRUCTED from two validated segments and no byte of the request appears in it, because /dl sits on the hostname that also hosts the identity flow and the install one-liner - a redirect an attacker can steer is a phishing primitive wearing our provenance, a link that genuinely starts at our domain and ends wherever they chose. validating and then echoing is one refactor away from that; building from a fixed base plus two matched shapes is not.
the segments are read from the RAW pathname rather than decoded route params, so this route decides what decoding means instead of inheriting it. every refusal is 404 rather than 400, because a 400 separates malformed from no-such-thing and telling a prober which guess was closer is free help. sha256.sum and the installer scripts are refused even though they are real files at that prefix: the hop counts download STARTS, and the land-time site gate fetches sha256.sum from R2 on every land - admitting it would make every land a download.
⭐ a mutation found one of my own guards doing nothing. deleting the explicit percent check turned NO test red, because the anchored patterns already reject percent - so the comment claiming it comes first because patterns are the fragile direction was describing a guard by what it looks like rather than by what it does. the code stays as a second fence and the comment now says it is one. unanchoring the tag pattern turns two tests red, which is the anchors earning their place, and the absolute-URL cases stay green under that mutation because the slash check is what catches them - a more precise picture than I had.
the write-behind queue is built here because 1647 is blocked on it and it does not exist; 1757 shares it. enqueue is synchronous and never awaits, because this path serves the install one-liner where the caller is a shell script already piped to sh - a database stall there is the most expensive on the site and the least recoverable. bounded, drops the NEWEST so a burst cannot evict what preceded it, counts every drop because a silently discarded row makes the dashboard wrong in the direction that looks like not much traffic, and a failed flush puts the rows BACK rather than losing a batch to a blip.
⚠ NO visitor_key, and that is a deviation stated rather than a gap missed. 1647 asks for one derived from X-Real-IP as the beacon does - but the beacon owns the daily salt and neither exists, and deriving one here would make the privacy notice statement that these records carry no address, no cookie, no key FALSE the day it deploys. downloads-per-day needs no identifier; uniques do, and they arrive with 1757.
⚠ only ONE of the two internal arms is reachable. a request with no X-Real-IP never passed nginx so it is ours by definition, which covers the deploy probes. the edge computes loot_internal for our own hosts but forwards only Host, X-Real-IP, X-Forwarded-For and X-Forwarded-Proto, so install-detect - which runs the real one-liner through the public URL once per release - is counted as an ordinary download. a handful of rows per release rather than a distortion, and naming it beats a comment implying both arms work.
EventRow source widens from log to the set migration 0001 actually permits. it said log while the shipper was the only producer, which read as a fact about the schema and was a fact about the caller. /dl joins the prerender deny list, or crawlLinks follows the new links off /install and the BUILD counts a download per platform per land (#1647)
db35af90 ·diffdbf3dbe6… - every compiled-in and current-tense loot host moves to loot.build (map #2412, ADR 0099): loot --help names security@loot.build and https://loot.build/trust, ALPHA_PROMISE_URL is https://loot.build/install and the telemetry DEFAULT_ENDPOINT https://loot.build/api/telemetry, so the next release carries them; the site install one-liners, R2_BASE and HOP_BASE (https://dl.loot.build, https://loot.build/dl), the metrics SITE_SCOPE and own-host referrer, the disclosure links on trust, terms, privacy and known-issues, and the install, quickstart and guides pages follow, with the privacy and terms markers moved to 25 September 2026 and re-pinned since readers see the new address; README, CONTEXT.md (the forge door now forge.loot.build), the release checklist, site CI and test fixtures follow, and the two specs carry a note instead of a partial rewrite. the destination census gains build in WEB_TLDS, without which security@loot.build would be invisible to its bare-host clause, and exempts the two shipped lines that tld makes read as hosts (state.build, r.build()) by their exact text; ADR 0074 section 9 says twelve-entry to match. 37 lines still name millerbyte.com outside ADR bodies, evidence, research and scratch, each kept on purpose: dated history, millerbyte.com the site and its @millerbyte/ui tokens, the two noted specs, and relay-era tooling with no successor host, filed as #2438. census red with build dropped from WEB_TLDS, restored; site gate 819 passed and within budget; workspace suite 4559 passed over 142 binaries, 13 ignored (#2418)
c5663115 ·diffdbf3dbe6… - a test is kept only for a bug whose damage outlives its detection (ADR 0105, docs/agents/testing.md): disclosure, durable bytes, signed history, silent-pass refusals and machine contracts keep their tests, everything else is trusted or fixed fast, and assertions are on outcomes, never prose. the implementer brief asks that question before a test is written and owes a mutation proof only for a must-test pin. the suite is cut to it in one pass, Rust test functions 4848 to 1665, site vitest cases 1307 to 258 and SDK cases 160 to 64, with the living docs and comments that named deleted tests corrected and ADRs, tickets and released migrations left as history. cargo test green at 1945 passed with 6 ignored, the site gate green at 240 passed, the SDK at 75 passed with its one known macOS path failure from before the cut (ruwknvpw)
61f0184b ·diffdbf3dbe6… - site and sdk production comments cut by 71% to the docs/agents/writing.md standard: history, ticket numbers, rosters and ADR retellings removed, security reasoning, browser quirks and directives kept; comment-only, the TypeScript AST without comments identical, built bundles unchanged but for the build stamp (yrkykmsn)
d8c01375 ·diffdbf3dbe6… - docs/agents/writing.md is the standard for comments and docs: a comment says only the why the code cannot, rg and loot log answer who-calls, which-members and when-changed better than a cached comment, and history, ticket numbers, rosters and emphasis are deleted on sight. AGENTS.md links it. CONTEXT.md, AGENTS.md, docs/agents, the skills, specs, READMEs, research and evidence are cut by about 65% to it, every cited heading, § number and test-pinned string kept; files the yrkykmsn ticket (yrkykmsn)
8e3c7b83 ·diffdbf3dbe6… - the ADRs are cut by 71% to the docs/agents/writing.md shape: Context, Decision and Consequences in about a page each, amendments folded into the decision they amend, function tours, test counts, sweeps and ticket archaeology removed; every title, Status section, cited § and numbered decision kept. ADR 0103 folds in the vmusyoxz, snmzospn and xrqwmovz amendments and restores the operator rulings of 3e1a10ce that the loot-core comment land reverted (yrkykmsn)
0fc947d9 ·diffdbf3dbe6… - the login token: an unlocked browser stores the seed under a paste line's secret in login_token (migration 0045, identity role alone, the session's own live key, ten minutes), loot login --token redeems it once with DELETE … RETURNING and installs it in the repo and on the machine, the installers take --token/--init/--clone (sh) or LOOT_TOKEN/LOOT_INIT/LOOT_CLONE (ps1) after dist's install, and a signed-in loot init sets origin; red without the live-key or key-match checks (moowksxl)
a148f72f ·diffdbf3dbe6… - the installer paste-line tests in site/test/installerProxy.test.ts find Git for Windows sh on Windows instead of spawning a bare sh, which only Git Bash puts on PATH: they take bin\sh.exe under an ancestor of where git, then under the Program Files Git root, so a land started from PowerShell runs them; when no sh can start they fail naming the missing sh and Git for Windows instead of with expected null to be 0 and Received []; the ticket saw 2 failed, 4 passed from PowerShell without Git usr\bin on PATH, and from PowerShell with every Git dir off PATH the file now passes 6 and the site gate passes at 348 passed, as it does from Git Bash; with the sh lookup broken the two tests fail with the named message (2 failed, 4 passed); a test helper fix owes no new test, the gated counters do not move, and the suite is green at 2098 passed (xowrulnu)
f94669fe ·diffdbf3dbe6… - files the two amend edges xysopyyo left open: a non-root amend gates its capture against its parent tree rather than the version it replaces (vzuzpspr), and loot edit of a root change on a pinned position loses the pin (vlsmounz)
4d1ef5fb ·diffdbf3dbe6… - restore the 71 files 430a057a reverted to 385bcb40's bytes: a tickets-only land (vzuzpspr, vlsmounz) recorded stale copies in the Mac primary, which held the desktop's newer versions sealed with keys it had not pulled, and a loot fetch there had left the disk behind loot's view; the keys are pulled now, the lane equals 385bcb40 outside tickets/ but for that land's benchmark entry, and mmzxtyyt records the mechanism
Perf-Baseline: reset 430a057a's baseline measured the reverted code; restoring 385bcb40's brings object_gets, store_file_reads and graph_sorts back down
7806746e ·diffdbf3dbe6… - a .lootattributes that is not UTF-8, such as the UTF-16 Windows PowerShell 5.1 writes with >, is now a malformed rule naming its encoding at the disk load, the ferry ingest and the recorded-tree vet, so loot new and a ferry ingest of a self-authored commit refuse instead of signing plan.txt internal with exit 0, and a line opening with a byte-order mark, which made the first rule match nothing, is malformed too; the unreadable recorded rules refusals carry the code unreadable_attrs, which the SDK classes as a guard error and the tests assert, and ADR 0038 states the costs of passing over a signed parent rules file and an unsigned ingested parent, and its wrap is fixed; the new cases went red without the fix (0 passed, 2 failed), again with the disk load reading text (1 passed, 1 failed), with the ferry reading text (1 passed, 1 failed) and with the byte-order mark unrecorded (1 passed, 1 failed), the code assertions went red without the code (0 passed, 3 failed), the gated counters do not move, the SDK typecheck passes, and the suite is green at 2103 passed (ymmvvvxq)
9d623289 ·diffdbf3dbe6… - /install serves both platforms' commands in its document and gains three sections, From a script or an agent, Update and Uninstall, which are also its Markdown twin: llms.txt links docs.loot.build/install.md in place of the HTML page and llms-full.txt carries it (lzzxswnq, and the documented half of ylpqyyuq); both served installers print LOOT_BIN=<absolute path> once the binary is in place, by dist's own install-dir precedence, and the page names LOOT_CLI_NO_MODIFY_PATH, LOOT_CLI_INSTALL_DIR and LOOT_CLI_UNMANAGED_INSTALL (qtqpzwlz); under an execution policy that blocks script modules the served PowerShell installer runs itself in a child PowerShell with a process-scope Bypass instead of reaching dist's refusal, which names a persistent Set-ExecutionPolicy, so the forge paste line is unchanged and works under the Windows 11 default (ltnyqozs); the installer tests went red before the change (6 passed, 2 failed) and the rewritten v0.4.39 install.sh printed the line in a throwaway HOME on macOS; the PowerShell half is unrun on Windows; site gate green at 407 passed with /install's ceiling raised about 2.8 KB on the record; files uqyvqvqv for the status fix in scripts (lzzxswnq)
1a9e6df6 ·diffdbf3dbe6… - Windows correctness: on a filesystem that folds case a tree write keeps one spelling of names that differ only in case, records the rest never-materialized, says so after the verb and doctor fails naming them (mqzorvmp); a file another process holds open is retried, then left held back while the rest of the tree is written, and the verb names it and exits 1 until surface finishes it (wkuvwpxq); a name Win32 rewrites, such as one ending in a dot, is read and written through its verbatim path (wroorswy); every machine shape prints tree paths with / (uykmwpkm); --passphrase-file refuses a file whose access list lets others read it (sqyqkkrq); ci/install-smoke.ps1 runs its loot calls under Continue (xtryrwrm); AGENTS.md, the issue-tracker doc and the CLI page name the Windows PowerShell 5.1 pipe and stderr traps (xryxuzzl) (novqmmmy) and the escape hazard of editing through scripts (tumpytwl); and the pre-land suite runs green on Windows: path allow-lists by component, the fake spawner by file stem, the installer proxy tests in sh's own path spelling, gate programs without the in-turn switch, the config watch off inside its own unit tests, an hour for the packing tests and 120 s for the site's vitest; red before on the desktop each (tree_write_hazards 0 passed, 1 failed per case with its fix out; the verdict and passphrase-file tests 0 passed, 1 failed; guards 1 passed, 2 failed; installerProxy 3 failed; the beside-rows test under the switch 0 passed, 1 failed), green after; with tickets filed for the Windows audit under zxqkmrny and for landing from the desktop under wmputmok (ylwumypm) (nptlnmxl) (vuusszqt)
Perf-Baseline: reset this desktop host's baseline is its last land, 2026-10-08 (a8d827fe49b4); landed main has since moved offer_addresses_delta1 24 -> 1 and store_file_reads 21 -> 20 through the Mac's lands (nutxovpx)
062262da ·diffdbf3dbe6… - loot.build/install.sh and install.ps1 take ?version=0.4.43 and install that release: the route fetches the tag's own installer from dl.loot.build/v<tag>/ and applies the same rewrite to the hop and R2, so every published tag installs with no republish, where the per-tag installers download from GitHub and 404 for this private repo; the PowerShell child that re-runs under Bypass fetches the same pinned address; a version no release has answers 404 naming it, and a value that is no version answers 400 and fetches nothing; the install page gains A particular release with both commands; the proxy tests went red before the change (9 passed, 3 failed), the site gate 430 passed (usplslyw)
eac542e3 ·diffdbf3dbe6… - the served install.ps1 drops, in Windows PowerShell, module paths that hold another PowerShell's built-in modules before its first autoloaded cmdlet, so an older loot update run from pwsh 7, which hands pwsh 7's module path to the installer, gets past Get-ExecutionPolicy; the pin runs the guard in a real PowerShell and goes red with it removed or its rewrite disabled (xxrqzyus)
ab31ac87 ·diffdbf3dbe6… - Pin installs with LOOT_VERSION, not a ?version= cradle Defender flags (pvnprnsl)
0219126b ·diffdbf3dbe6… - Fix pinned ps1 relaunch command line and sh option forwarding (pvnprnsl)
ea53fae9 ·diffdbf3dbe6…
Renames are not followed. loot's tree maps a path to an address, so a rename is a delete and an add. This list is the history of the name, not of the bytes.