Improve GitHub CI - #1
Merged
Merged
Conversation
The recursive build never bundles the backend worker (no build script), so a worker.ts that fails to bundle or a broken wrangler.toml was first caught at deploy time. wrangler deploy --dry-run validates both without credentials. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
format / format:check now live in the root package.json and cover every package (they previously only ran in frontend/app, so core, koios, verifier and the backend could drift unformatted without failing CI). The config and ignore files move to the root; git submodules under backend/deps are excluded. The reformat itself is line-wrapping only — type-check and all tests pass unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mpizenberg
added a commit
that referenced
this pull request
Aug 6, 2026
Vite loads .env and .env.local in every mode, builds included. The READMEs
told developers to put VITE_INDEXER_URL=http://localhost:8787 in .env.local,
and .env.preprod/.env.mainnet leave the key commented out — so
`deploy:preprod` shipped a bundle pointing at the developer's own machine
(reproduced: localhost:8787 in dist/ after `vite build --mode preprod`). Only
.env.preview escaped, because it defines the key and mode files outrank
.env.local.
Decisions:
- The local backend URL lives in the dev scripts, not an env file. Not taken:
an explicit blank VITE_INDEXER_URL= in each mode file — a per-key guard
needing a new line in every mode file for every future dev-only key, and the
very pattern deleted below. Nothing a build mode loads now carries a
dev-only value.
- .env.local deleted rather than repurposed. It held only this key, and
leaving it (plus the README advice to create it) preserves the trap for the
next deploy-relevant key. .env and .env.*.local stay ignored and available.
- The dev scripts defer to an inherited value:
VITE_INDEXER_URL=${VITE_INDEXER_URL-http://localhost:8787}. A plain
assignment was written first and proved wrong on test — it overrides the
caller's prefix, so the default could not be moved off :8787 and the
direct-mode escape hatch silently did nothing. ${VAR-default}, not
${VAR:-default}: an explicitly empty value must stay empty, since that is
what selects direct mode. Assumes a POSIX shell for `pnpm run`, as the
backend's `NETWORK=… tsx` scripts already do.
- Residual risk accepted, not guarded: a contributor with a pre-existing
git-ignored .env.local still leaks it into deploy:*, since a pull cannot
remove the file. Not taken: a vite.config.ts assertion rejecting localhost
URLs in non-development builds — added complexity for a hazard the repo no
longer creates or documents. Reversible.
- VITE_KOIOS_TOKEN removed. ARCHITECTURE.md §1 listed it as defect #1 (a
shared credential in a public bundle) and all three deploy modes set it
blank so it could never ship — a feature whose only remaining function was
a guard against itself. The Settings/localStorage token, per-user and
per-network, already covers direct mode and stays. §1's defect is reworded,
not deleted: a Koios credential still has to live in the browser at all.
Verified: 795 tests pass, type-check and format:check clean; all three deploy
builds free of localhost (preview keeps its Worker URL, preprod/mainnet have
no indexer, matching their comments); dev, dev:preprod, a port override, and
an empty override each resolve as documented against a live dev server.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mpizenberg
added a commit
that referenced
this pull request
Aug 11, 2026
The plan folder held nine documents: mostly narrative of work already landed and already described where it belongs. What was not captured anywhere else is folded in here, then the folder is emptied. - ARCHITECTURE gains a §10 "Weighed and rejected": nine cheaper-looking alternatives that were measured or reasoned through and turned down (preview cron cadence, digest ETags, edge-caching the list, the snapshot blob, the credential index, a Durable Object lease, Analytics Engine, retention as a read lever, read replicas). They were the densest surviving content in the D1 study and every one of them is the obvious next idea. Appended as §10 rather than inserted, so no existing section renumbers. - §9 gains the two open items that had no home: full-text search — the one per-request cost that still grows with the archive, and so the one place §0's invariant does not hold — and the reusable results element, without which a host embedding the widget has to fork seven question methods to show an outcome. §8 gains what the design does not claim (sealed is not anonymous, a link is not an endorsement, a session is not a proof, the artifact is a Tessera profile), and §5 the epoch-boundary consequence of keying pparams on the stored snapshot: a transaction built in that window is rejected at submit. - OPERATIONS gains the workload study the collector was built for — the scenarios worth separating, the rule that a cost proportional to retained history is a defect rather than a number, and the instruction not to settle the question against a threshold invented in-house. - interop/preprod.md gains the honesty half of the host contract and names the operating question as its remaining deliverable. - CLAUDE.md gains the cross-reference convention this session paid for twice: design-doc section numbers are a public interface, published packages name the rule instead of a coordinate, READMEs never cite a section. Deliberately not kept: the measured D1 and Cloudflare baselines (they describe the pre-windowed-refresh code and would now mislead), the superseded optimization ideas #1/#5/#8, and the DRepTalk-side product ranking, which the report itself assigns to DRepTalk's own repository. Note: seven of the nine documents were git-ignored, so this deletion is their only record — the two tracked ones remain recoverable from history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.