Changes touching this path
- Scaffold site/ + wire Vercel #2, loot. subdomain, install proxy (#257)
Thin end-to-end tracer for loot.millerbyte.com (spec docs/specs/loot-site.md
SS1-3): site/ = TanStack Start SSG consuming published @millerbyte/ui@^0.1.0
(theme.css at the root), five placeholder surface routes prerendered, deployed
on Vercel project #2 (root site/) at https://loot.millerbyte.com.
Install proxy: the spec's vercel.json external-rewrite mechanism was falsified
live (Vercel passes GitHub's releases/latest 302 through to the client), so
/install.sh and /install.ps1 are Start server routes that fetch upstream and
stream the bytes back 200 - spec SS2 amended in place.
site/** explicitly public in .lootattributes; .vercelignore allowlists site/
so .loot/ keys and docs/pitch/ can never reach the Vercel builder; site build
artifacts lootignored.
1931146c ·dbf3dbe6… - primary catch-up: checkout at the #291 squash (site/ scaffold) folded for the drift reconcile (#297)
e6f7079a ·diffdbf3dbe6… - Scaffold site/ + wire Vercel #2, loot. subdomain, install proxy (#257) (#291)
* Scaffold site/ + wire Vercel #2, loot. subdomain, install proxy (#257)
Thin end-to-end tracer for loot.millerbyte.com (spec docs/specs/loot-site.md
SS1-3): site/ = TanStack Start SSG consuming published @millerbyte/ui@^0.1.0
(theme.css at the root), five placeholder surface routes prerendered, deployed
on Vercel project #2 (root site/) at https://loot.millerbyte.com.
Install proxy: the spec's vercel.json external-rewrite mechanism was falsified
live (Vercel passes GitHub's releases/latest 302 through to the client), so
/install.sh and /install.ps1 are Start server routes that fetch upstream and
stream the bytes back 200 - spec SS2 amended in place.
site/** explicitly public in .lootattributes; .vercelignore allowlists site/
so .loot/ keys and docs/pitch/ can never reach the Vercel builder; site build
artifacts lootignored.
Landed via break-glass git branch: the loot-native lane land was blocked by
two live shared-store bugs (review-ferry folds a described WIP into a
reconcile finalize; describe/status disagree on the working change under
concurrent sessions) - tickets to follow.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Apply #291 review findings
Cache only successful upstream responses in the installer proxy (a transient
GitHub failure must not be CDN-cached for 5 minutes); extract the install
one-liners to one shared module (three copies drifted apart otherwise); fix
the vite.config "fully static" comment and spec SS0 framing to name the two
server-route exceptions; tighten the .lootattributes rationale (the interim
manual deploy is gated by .vercelignore, not the GitHub projection); drop the
cargo-culted overrides block (its pins targeted server deps the site lacks).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Git-Author: Connor Miller <53197564+Connor-Miller@users.noreply.github.com>
231eb5f8diff - the published index outflanks the metadata gate for exactly the published facts, and the site grows the anonymous read tier that serves it (#749)
8ed81d63 ·diffdbf3dbe6… - the browser mints the seed and the account binds the key: Clerk in the site's own routes, variant-B onboarding, and the account tier's one producer (#753)
Migration 0007 adds account_seed (the passphrase-wrapped envelope, opaque
ciphertext the server cannot open) and forge_identity, a NOLOGIN role scoped
to exactly the identity tier -- SELECT/INSERT on tenant, SELECT/INSERT plus a
column-scoped UPDATE of retired_at on account_key, the full row on
account_seed, and nothing else (pinned live by
forge_identity_is_scoped_to_the_identity_tier).
The producer lives in site/src/server/identity/ behind a verified Clerk
session (verifyToken in the site's own route handlers, reusing the millerbyte
Clerk instance and pattern, never the gateway service). Registration is one
transaction: upsert tenant on the verified clerk_user_id, add the key, store
the envelope, retire what rotation names -- and never zero live keys. The
Rust service still writes none of the tier; tests/account_tier.rs now guards
that boundary instead of a vacancy.
Onboarding is #487's variant B, the two-column contract: the app owns the 32
bytes (crypto.getRandomValues -> 24-word BIP39 over the ENTROPY, never the
64-byte derivation -> ed25519 pubkey via @noble/curves, held to the engine's
from_seed by the pinned RFC 8032 vector), a WebCrypto PBKDF2+AES-GCM envelope,
a .txt download that excludes the passphrase, and two consent checkboxes that
no download waives. Clerk mounts only under /account, which joins /k/ on the
prerender deny-list; every static surface stays static.
Follow-ons filed rather than folded: #926 (CLI raw-seed import, so BIP39
recovery reaches the CLI) and #927 (account-aware may_push, burn entitlement
via account, and the #506 historical-key 301s the anonymous read tier
deliberately cannot serve today).
278e1886 ·diffdbf3dbe6… - the override was holding esbuild on the vulnerable branch: site npm audit goes to zero, in range (#916)
Four advisories, all four in-range, and the interesting one was ours. `npm audit
fix` cleared js-yaml 4.3.0 -> 4.3.1, nanoid 3.3.16 -> 3.3.18 and postcss 8.5.19
-> 8.5.26, then went on reporting esbuild vulnerable with a fix supposedly
available via itself — because site/package.json OWN overrides block pinned
`esbuild: ^0.27.0`, the vulnerable branch. Every declarer accepts `^0.28.0`
(vite 8 peer `^0.27.0 || ^0.28.0`, vite 7 the same, unplugin `*`), so moving the
override to `^0.28.2` violates no constraint and needs no resolver force.
That override block is how the last three of these were fixed (path-to-regexp,
undici); it is the mechanism, and it needs re-reading at each bump or it becomes
the thing holding the vulnerability in place — which is what it was doing here.
The lockfile diff is 30 entries and all of them are these four packages: esbuild
and its 26 per-platform binaries, plus js-yaml, nanoid, postcss. No package
added, none removed, no unrelated resolver churn, package.json otherwise
untouched. `npm ci` succeeds in site/ now, so the #894 install-repair hazard did
not ride along.
Verified: `npm audit` 0 vulnerabilities, `npm test` 75 passed | 23 skipped,
`npm run build` typechecks and prerenders all 8 pages.
Reachability, since the ticket asked whether the two highs are urgent: all four
are build-time only — esbuild and postcss through vite, nanoid through postcss,
js-yaml through xmlbuilder2 inside @tanstack/start-plugin-core. None can reach a
served response. No audit gate: it is clean today, but its trigger is a third
party publishing an advisory, so a gate breaks unrelated builds on a schedule
nobody here sets — the #642 permanently-yellow objection with the yellow
arriving later. sdk/ is worse (7, one needing a vitest major) and is filed
as #951.
f77ce77e ·diffdbf3dbe6… - the browser opens what the forge cannot: own-private read ships an owner read tier, a once-per-device unlock, and a grant mailbox that never acks (#1043)
c8dd4da1 ·diffdbf3dbe6… - a land builds the site and weighs the eager bytes of every published surface, so a redesign cannot spend the byte lead in silence, and the four places that called site/ ungated now say what is true (#1241)
674361ad ·diffdbf3dbe6… - the site detector pinned the Node whose npm cannot read this repo lockfile, so 38 runs refused at npm ci without once reaching the gate they exist to re-run (#1371)
ed71532c ·diffdbf3dbe6… - the lockfile is regenerated by an npm every other npm can read, because pinning CI to the same major was a guess and the runner bundles npm 12 where the land gate bundles 11.6 (#1371)
782fc0f5 ·diffdbf3dbe6… - the shared classifier lands, and the review caught me pinning the exact defect 1625 filed a hard constraint against: I wrote curl into the BOTS list and asserted it IS a bot, which would report ZERO INSTALLS while installs were happening - a curl of install.sh is, per 1621, the only observable event in the middle island of the funnel. the cause was a research failure rather than a coding one: I built the ticket from 1625 resolution and the map memory and never read the comment carrying its hard constraint, so my own ticket body omitted the carve-out too.
the rule is therefore keyed on WHAT WAS REQUESTED and not on who requested it. a scripted client on install.sh, install.ps1 or dl is the product working and classifies unknown; the SAME agent on docs is a crawler and is filtered, which is the control that proves the carve-out is scoped rather than a blanket exemption. a real crawler on install.sh is still a crawler, because the carve-out covers scripted clients and not everything. the signature had to widen to take the path, which log-line now passes from the line it already holds - a classifier given only the user agent cannot express the constraint at all.
the tests caught a second bug that was mine: powershell anchored with word boundaries never matches WindowsPowerShell, since there is no boundary inside it, and that failure direction is the dangerous one - a missed scripted client is counted as a bot, which is the funnel deletion itself. the match is a substring now and the looser direction is argued rather than assumed.
agent becomes a family name, because isbotMatch returns Google for googlebot but the WHOLE user agent for bingbot and gptbot - storing that would put a raw UA in a column and make every per-family chart ungroupable. it is non-null exactly when class is bot, which is the privacy boundary: a crawler is not a natural person and which crawler is the analytic value, but the same derivation on an unmatched request keeps a piece of a real visitor UA under another column name. the supplement carries the path rules; its own-agents half is deliberately empty and says why, since the loot CLI sends no user agent at all and the install detector is excluded at the edge.
standards review landed four real ones: Verdict collided with the CONTEXT glossary term for a reconciliation outcome and becomes Classification; the header claimed three consumers in the present tense while none are wired, which is this repo own recurring doc defect written by me again; the classifier shape was declared three times and now lives once in the leaf that both importers name; and isbot was called twice where isbotMatch answers both questions (#1775)
8b1746c6 ·diffdbf3dbe6… - the shipper gets the entry point a timer will run, and the reviews caught three defects in it that no gate could: an unreadable log read as a CLEAN RUN, because open swallowed every error and the caller skipped the file - so an EACCES on www-data adm 0640, which is the precise hazard the whole runtime-home decision exists to handle, produced scanned zero, failed false, exit zero, indistinguishable from a fresh box. only absence is swallowed now and a permission error is rethrown, with a control asserting a genuinely missing file is still skipped, since every box before its first rotation has no .1.
the second was a rotation-sized race in the middle of the file source: stat by name then open by name lets logrotate rename between the two calls, so the read lands on the NEW inode bytes and they are committed under the OLD inode position - a double count and a misattribution at once, and scheduled rather than theoretical since rotation is unconditional and daily. a handle is bound to an inode rather than a name, so the source opens once and measures and reads through that same handle, which makes the race unrepresentable instead of unlikely.
the third would have broken every land and every deploy: build:shipper invokes esbuild, which was in overrides and in NEITHER dependency list, resolving only as vite transitive binary - and putting that step inside build made the gate depend on an undeclared one. declared now, matching the override range rather than pinned exact, which npm refuses as a conflict.
found by RUNNING the bundle rather than building it: bundled to esm it compiles clean and dies at startup on Dynamic require of pg, which is CommonJS - and external is no escape because the image has no node_modules at all since nitro bundles its own into server libs. it is cjs, pinned four ways including that the step runs AFTER vite build, since vite writes .output and an earlier step would have its artifact deleted silently.
two doc claims are narrowed rather than left standing, both mine and both the catalogued class: the entry said what the timer runs in the present tense with no timer anywhere, and credentials.ts said the site has no one entry point this module owns, which was true of the serving process and became false of the deployment the moment a one-shot binary existed. and two of my own assertions are DELETED rather than kept, because they were strict consequences of the set-equality above them and could not fail while it passed - decoration that read like coverage (#1756)
0c0385a8 ·diffdbf3dbe6… - the retention number becomes an OUTCOME: a daily rollup writes the marginal totals that survive forever and only then drops raw partitions that are both rolled up and past the window
loot#1759, decided by loot#1622 and amended by loot#1625. Until this, thirty
days was a sentence: nothing dropped a row and the raw table grew without bound
on the Postgres volume the relay, the forge and the site share.
The drop is gated on the watermark, never on time alone, and that is the
ticket whole thesis. event_drop_expired() in migration 0003 takes NO argument:
it reads rolled_up_through from the table, uses its own UTC clock, and applies
a retention CONSTANT - so the rollup role cannot widen the drop by lying to it,
and with no watermark it drops nothing. A partition is due only when its day is
at-or-below the watermark AND its whole day is outside the window, so a stalled
rollup ACCUMULATES partitions, which is the observable failure mode we want,
rather than deleting a day nobody aggregated.
The ticket acceptance test is pinned as written: freeze the watermark and
nothing is dropped however old the partitions are. The mutation that makes the
rule time-based reddens exactly that pin and its BOTH-conditions sibling and
leaves every time-only test green, which is the discrimination the ticket asked
for. A day that fails to roll up STOPS the run with the watermark at the last
success; skipping it would advance past a day with no aggregates, the silent
loss the watermark exists to prevent.
Every surviving table is MARGINAL and a test PARSES the CREATE TABLE statements
to prove it: at most one dimension beyond (day, class), never two
visitor-descriptive columns together, never one with path, and no table carries
visitor_key, account_ref or telemetry_id - which is what makes an erasure
complete once the raw rows go. class rides every aggregate and agent gets its
own per-family table (loot#1625); rule_versions reaches every row so rule
boundaries outlive the raw window. No country table, because nothing produces
country.
A THIRD role, metrics_rollup: SELECT on event, which the writer may never have;
write on the rollup tables and the watermark, which the reader may never have;
NO grant on daily_salt; and DDL only through two SECURITY DEFINER doors. The
partition door moves a day rows out of event_default in one transaction with an
explicit UTC bound - p_day::timestamptz would have taken the session time zone
and filed one row under two days depending on who created the partition.
The TypeScript twin of the drop rule PREDICTS what the database will drop and
the summary reports a disagreement loudly with a non-zero exit, because two
implementations of a retention rule parting silently is exactly how a retention
promise stops being true while every timer reads healthy. The bundle was RUN,
not just built: with no credential it starts, reaches main and fails naming the
cause, so the cjs/pg hazard the shipper found is absent here.
The notice moved with it, and a test that asserted the page must NOT claim a
database bound is now inverted: it must claim it, from the shared constant,
and must say the deletion is gated on the totals - a page saying only deleted
after 30 days would describe the time-based expiry loot#1622 rejected. The
account-reference sentences from loot#1758 shortened from as long as the
account to at most 30 days, which is stricter and simpler. Rendered and read.
One header claiming nothing installs a shipper timer yet, a week after one was
installed, is corrected while the rollup was given the same shape.
587 site tests, budget green with the notice raise on the record.
50fe5557 ·diffdbf3dbe6… - the error shipper (ADR 0101): every minute it reads the wide-event lines out of each named container Docker json-file log and writes them into loot_metrics, migration 0004: wide_event for 30 days, error_issue with no identifier, wide_counter where a minute printed twice adds, and wide_log_position, under a new errors_writer role, since the beacon writer role may never read an issue. issue.ts fingerprints by source, type and the top three in-app frames and regresses a resolved issue on an occurrence from another release after the resolve; db.ts applies events, issues, counts and the position in one transaction, so a batch read twice counts once; alert.ts posts to Discord at most once an hour per issue with the type, culprit, route, release and count and never the message; shipper-main.ts finds containers by the name in config.v2.json and fails when it finds none. bundled to .output/errors.cjs; ci/test-main.sh provisions the role. pinned in errors-ship.test.ts, 15 tests, and errors.pg.test.ts, 5 over Postgres 18; red under named mutations, each restored, failed and passed: a regression on the same release (1 and 13, and 1 and 8 on pg), the route in the fingerprint (1 and 13), vendor frames fingerprinted (1 and 13), the title in an alert (1 and 13), no hourly limit (1 and 13, and 1 and 8), a partial entry kept (1 and 13), consumed past the last line (1 and 13), a re-read counted again (1 and 8), a minute replaced not added (1 and 8), the beacon reading issues (1 and 8), and no expiry (1 and 8, after the test counted the rows left, where it first passed). an end-to-end run of the built bundle over the built server output made two issues and two Discord posts with no message. site gate green at 1063 passed. owes a site deploy with the scripts change (vuxxwrys)
9fdc1ae3 ·diffdbf3dbe6… - a browser error's frames are traced back to their source file, line and name before its stack is parsed, through the serving release's own source maps, which the client build writes hidden and tools/stash-maps.mjs moves out of the public directory, refusing a build that leaves one there, names one from a chunk, or writes none; so a browser fingerprint names source functions and holds across releases. only a bare hashed chunk name is looked up. ADR 0101 section 4 amended. pinned, red under named mutations, each restored (yyypksru)
Perf-Baseline: reset object_gets and graph_sorts moved with 587f93b, whose negotiation workload now builds the forge push a land makes (opywoozo); this change touches no Rust
d0d1df9d ·diffdbf3dbe6… - the site bundles @clerk/clerk-js 5.127.1 from the lockfile, pinned exactly at the version the installed clerk-react 5.61.9 was built with, and hands each ClerkProvider a Clerk that src/lib/clerk-instance.ts constructs once per document, through its Clerk prop, so clerk-react loads that instance at once where it inserted a CDN script with no integrity and polled window.Clerk every 100 ms. the clerk-js npm build is one module that carries its UI components and fetches no chunk at run time, 2.96 MB or 949 KB at gzip -9, which the private gate and /account load on demand; no public page fetches it, and on a build with a key each public surface weighs 21 to 29 B more for the import entry. the private CSP drops the Clerk frontend API from script-src and keeps it in connect-src. red under named mutations, each restored: the frontend API back in script-src (2 failed and 14 passed), a provider without the instance on the private gate or on /account (each 1 failed and 12 passed), clerkJSVersion beside the instance (1 and 12), a new Clerk per call or one kept across keys (each 1 and 12), /account constructing its own Clerk (1 and 12), clerk-js pinned at another version or at a range (each 1 and 12); on the built server, the frontend API in script-src and the instance imported eagerly by private.tsx (2 failed and 6 passed, one test each) and another expected version (1 failed and 7 passed). site gate green at 1142 passed; cargo test green, 5021 passed over 144 test result lines with 15 ignored. CONTEXT.md and ADR 0096 say so. owes a site deploy; also carries a comment on lnmntzxw with its live reading (svlsyqkr)
9388597a ·diffdbf3dbe6… - The migration pin test prints the line to pin; the site build regenerates routes before tsc
released_migration_statements_are_pinned_by_checksum now names each unpinned
migration's (version, "checksum") line in its failure, so appending a
migration no longer means pinning zeros and reading the left side back
(qvllnoxp and oprsutvp each did, 2026-10-05).
site's build runs vite build before typecheck. routeTree.gen.ts is tracked
and only the vite plugin regenerates it, so a new route file failed tsc until
something else ran vite first (oprsutvp's runner route did). The order dates
from the scaffold (#257) with no recorded reason; typecheck still gates the
build.
4a2cafa6 ·diffdbf3dbe6… - the site takes TanStack Start 1.168.60 past CVE-2026-102989, a reflected XSS in server-function responses (wwplqlly): react-start ^1.168.60 brings start-server-core 1.169.39 and pins react-router 1.170.41, whose getMatchedRoutes answers a tuple, so routeAt and the surface link read it by position, and whose defaultOnCatch takes unknown; the budget records about 1 KB a surface for the patched router; a three-host build matches main, whose one failure, the brochure answering an old /private repo address with a 500, is filed as rukvqypu
2e5e69ba ·diffdbf3dbe6… - the notification sender (ADR 0097 §5, §6): migration 0057's forge_notify_sender reads the outbox, settings and watches and only ids, keys and times elsewhere, never a name, message or comment, and keeps notify_email and notify_delivery; site/src/server/notify plans who hears what (parties and member watchers, toggles, own acts, a five-minute settle, 20 an hour then an hourly summary), names a public repo only through forge_read and nudges namelessly otherwise, reads the address from Clerk at send time, records each delivery so no one is told twice, and prunes after a week; Postmark behind a two-line interface; one-click unsubscribe at /api/notify/unsubscribe turns off exactly one toggle; bundled as .output/sender.cjs; pinned by unit tests and live as the real roles (zrpwpyyq)
e61fab21 ·diffdbf3dbe6… - the integration tests of loot-cli, loot-core, loot-net, loot-first and the database-free half of loot-forge link as one test binary each (tests/all.rs declaring the files in place, autotests = false, and emit_snapshot, wake_proxy, oplog_record_cost and the live-database forge files kept as binaries of their own because they set environment variables, install a global allocator or share a Postgres cluster), so the integration-test binaries drop from 82 to 25 and the test executables from 107 to 50 with every test kept (the same 389 integration tests by name and 2231 passed, 6 ignored, now 2232 with the new guard), a touch of loot-core then relinks 41 binaries instead of 98 in about 6 s against about 12 s on the Mac and the gate-style run of the units takes about 18 s against 19 to 37 s under load 20 and more; the site gate type-checks through tools/typecheck.mjs, one incremental tsc -p per referenced project beside the others with its build info in node_modules/.cache/tsc keyed on file content, taking the step from 7.8 s to 1.2 s on a repeat pass, and runs build:wasm through tools/build-wasm.mjs, which skips wasm-pack while src/wasm carries a stamp of the cargo-metadata closure of loot-wasm, the lockfile, the toolchain pin and the output hash, taking it from 1.1 s to 0.14 s, so a repeat site gate runs in about 9.8 s against about 16.6 s (medians of 4 interleaved runs, a cold pass unchanged within noise); orchestrator.rs is untouched because the gate is still npm run gate; test_files_run in loot-first fails the suite for a tests/*.rs that no binary builds, red with a stray file in loot-net (0 passed, 1 failed), typecheck.test.ts pins that a cached failure, an old-timed edit and an unreadable cache never turn a failing project green, red with a failure forgiven when a cache exists (1 failed), and build-wasm.test.ts pins what refuses the skip, red with the dependency closure dropped (7 passed, 1 failed) and with the output hash dropped (7 passed, 1 failed); the suite is green at 2232 passed in cargo test and 357 passed in the site gate (pvqwkyso)
572b273c ·diffdbf3dbe6… - the site takes @millerbyte/ui 0.1.1, published from millerbyte main as it stood (65cc20b, the version alone bumped), where 0.1.0 on npm trailed main by three commits (the slide deck system, ConfirmDialog, the glass blur outside Safari); before the publish the site built against main dist rendered 795 of 795 brochure and docs frame pairs on six targets, 172 of 172 docs frames on desktop and 337 of 337 forge frames byte-identical to 0.1.0, with body, headings, code and the Console bar in Geist and Geist Mono since the site own root tokens follow the theme and no glass class on the site; only the @millerbyte/ui entries of package.json and the lockfile move, a dependency bump owes no test, every surface stays under its ceiling at 51 to 58 B gzip more and the site gate is green at 365 passed, 92 skipped (olwklzxw)
3a4beacf ·diffdbf3dbe6… - the site takes @millerbyte/ui 0.2.0, published from millerbyte main (afa253d) with inline code in --font-mono at 0.875em and 0.25em side padding, color-scheme dark with a dark scrollbar, 400-step text tokens carrying badges and error text over 4.5:1, :active painting under a :where() hover, table and alert borders on --color-border, dark shadows from the loot elevation, and the CodeBlock on the mono token; the site drops the overrides the package makes redundant (color-scheme and scrollbar, the trust matrix border, the old mono note, the inline-code side padding) and keeps padding-block 0 since the package block padding grew the glossary from 4960 to 5064 px; millerbyte.com shot on 11 routes and five targets shows only the intended differences, loot.build keeps 590 of 699 frames pixel-identical with the rest docs table borders and code block first lines, heights, overflowX and small targets unchanged on both; a UI change is off the must-test list, so no test was owed; every surface stays under its ceiling, the site gate is green at 365 passed, 92 skipped and the suite is green at 2453 passed, 0 failed, 6 ignored (unlvmqwo)
188eb159 ·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.