Skip to content

Improve GitHub CI - #1

Merged
mpizenberg merged 5 commits into
mainfrom
ci
Jul 5, 2026
Merged

Improve GitHub CI#1
mpizenberg merged 5 commits into
mainfrom
ci

Conversation

@mpizenberg

Copy link
Copy Markdown
Owner

No description provided.

mpizenberg and others added 5 commits July 5, 2026 16:57
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
mpizenberg merged commit 33fcfbc into main Jul 5, 2026
1 check passed
@mpizenberg
mpizenberg deleted the ci branch July 5, 2026 15:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant