Skip to content

chore: back-merge main into develop (v3.18.0) - #856

Merged
fraseragain merged 5 commits into
developfrom
chore/back-merge-v3.18.0
Oct 26, 2026
Merged

fraseragain merged 5 commits into
developfrom
chore/back-merge-v3.18.0

Conversation

@fraseragain

Copy link
Copy Markdown
Contributor

What

Brings the v3.18.0 release commits on main (#845, #846 and the release commit) into develop. The back-merge after the 14 October release never happened, so the release PR #855 (develop → main) currently conflicts in CHANGELOG.md and package.json, and its auto-merge cannot proceed.

Conflict resolution, following the v3.17.0 back-merge (#840):

  • package.json: version taken from main (3.18.0).
  • CHANGELOG.md: both sections kept, newest first: 3.18.0-develop.6 (23 October), then 3.18.0 (14 October).

No code changes.

Important

Merge with a merge commit, not squash. A squash would not record main's commits in develop's history, and #855 would still conflict. After this merges, #855 merges cleanly (checked with git merge-tree), and its auto-merge can complete once it is approved.

🤖 Generated with Claude Code

fraseragain and others added 5 commits October 14, 2026 16:53
**DRAFT. Do not merge until the checklist below is done.** Release of
`develop` to `main`: expected version **3.18.0** (minor, from the `feat`
commits).

## What's included
Faucet quota stack plus two follow-ups (44 commits on `develop` since
v3.17.0):
- **API keys on the faucet** (#819): `POST /account/faucet` works with
an API key (`request:faucet:testnet` scope). Per-customer **monthly
quota** `FAUCET_MONTHLY_LIMIT_CHEQ` (default 100,000 CHEQ, UTC calendar
month) and a per-address **cap** `FAUCET_ADDRESS_CAP_CHEQ` (defaults to
the monthly limit). `GET /account/balances` now returns a `faucet` block
(cap, quota used, reset date) that the portal reads.
- **Cost, burst limiting, reservations** (#829): cached Stripe lookup,
`FAUCET_MIN_INTERVAL_SECONDS` (10s) between requests, reservation
status.
- **Hardening** (#830): address-cap check under the per-customer lock,
request-history retention (13 months), structured logging, faucet call
timeout, handler-level tests.
- **Fund any address** (#839): any valid lowercase `cheqd` address, not
only owned ones. The initial top-up runs only when a testnet account is
created.
- **Default amount** (#841/#842): with no `amount`,
`FAUCET_DEFAULT_REQUEST_CHEQ` (default 10,000) is sent, limited by the
cap and quota left.
- **Swagger fix**: the faucet doc comment was invalid YAML, which
silently dropped `/account/faucet` from the generated docs. Fixed in
#839; the generated spec has all 59 paths.

## Deploy notes
- **Three new migrations** (a new `faucetRequest` table with its index
and FK, then `status`/`completedAt` columns and a `createdAt` default on
that same table; nothing touches existing tables): `1791500000000`,
`…001`, `…002`. The production "Database migrations" workflow runs `npm
run migrate` on push to `main` and applies them. Old code ignores them,
so a rollback of the image is safe.
- **Behaviour changes that need production env vars checked before
merge:**
- `TESTNET_FAUCET_UPPER_CAP_CHEQ` is no longer read. The initial top-up
now comes from `TESTNET_INITIAL_TOPUP_CHEQ` (default 10,000) and the
per-address cap from `FAUCET_ADDRESS_CAP_CHEQ` (default 100,000; it was
10,000).
- `TESTNET_MINIMUM_BALANCE` default in the Dockerfile changes from 1000
to 10000 (applies only if production does not set it).
- Intended production values: `TESTNET_INITIAL_TOPUP_CHEQ=10000`,
`FAUCET_ADDRESS_CAP_CHEQ=100000`. Remove
`TESTNET_FAUCET_UPPER_CAP_CHEQ`.
- No other new variables are required; all new `FAUCET_*` settings have
defaults (see `example.env`).

## Before merging (checklist)
- [ ] Production DigitalOcean app: env vars set as above; check whether
it still has a PRE_DEPLOY `database-migrations` job (staging's hung on
every deploy and was removed; see below)
- [ ] Manual staging pass: Balances page (via the portal), a faucet
request with a session and with an API key, a brand-new testnet account
gets 10,000 CHEQ
- [ ] An approving review (`main` requires 1)

## How to merge
- **Use a merge commit, not squash.** Semantic Release derives the
version from the conventional commits since the last tag; a squash would
collapse them into one `chore(release)` commit and release a patch
(3.17.1) instead of 3.18.0, and `main` would diverge from `develop`
again.
- On merge: Semantic Release (version, changelog, tag), the production
Docker image is built and pushed, and production migrations run. There
is no manual approval gate on the `production` environment.
- **Release the portal after this one**: its Balances page reads the new
`faucet` block from Studio.
- Afterwards open a `main` into `develop` back-merge PR (merge commit),
because Semantic Release commits `chore(release): X.Y.Z [skip ci]`
straight to `main`.

## Verification done on staging (`develop` at e748f7c)
- Deployed and serving the new code; live Swagger matches `develop` (59
paths).
- Handler-level integration tests: 37/37 pass against Postgres. Unit
tests: 209 pass.
- Unauthenticated sweep of 24 GET endpoints: no unexpected 5xx. Bad
credentials return 500 on every authenticated endpoint on both staging
and production (pre-existing, not part of this release).
- Not yet verified: authenticated flows and the portal UI (needs a
login).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
The merge of #845 did not start any workflows on main, so no release, image or production migrations ran. The cause was wording in the PR description that GitHub reads as an instruction not to run workflows.

This commit is empty. It only gives main a new push so the release workflows run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Empty commit that gives `main` a new push, so the release workflows run
for v3.18.0.

## Why
#845 was merged into `main` (merge commit `6020d4a`), but no workflows
started. GitHub builds the merge commit message from the PR description,
and the description contained wording that GitHub reads as an
instruction not to run workflows on push. As a result there was no
Semantic Release run, no production image and no production migrations.
Production is unchanged (still v3.17.0).

## What this does
- No file changes. The only change is one empty commit.
- Merging it triggers the normal pipeline on `main`: Semantic Release
(expected version 3.18.0, because the `feat` commits from #845 are
already in `main`'s history since the last tag), the production Docker
image, and the production database migrations (three new ones, all
additive to the new `faucetRequest` table).

## Before merging
- Production env vars are set (`TESTNET_INITIAL_TOPUP_CHEQ`,
`FAUCET_ADDRESS_CAP_CHEQ`) and the production `database-migrations` job
has been removed from the app spec.
- Keep the merge commit message plain: it must not contain any wording
that tells GitHub to bypass workflows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
## [3.18.0](3.17.0...3.18.0) (2026-10-14)

### Features

* add a minimum interval between faucet requests per customer ([2d3ebf5](2d3ebf5)), closes [#821](#821)
* add monthly faucet quota service and helpers ([7eef4f7](7eef4f7)), closes [#818](#818)
* allow API keys on POST /account/faucet with monthly quota ([6ed02c8](6ed02c8)), closes [#818](#818)
* allow API keys on the faucet endpoint with a monthly CHEQ quota ([#819](#819)) ([17dcb04](17dcb04)), closes [cheqd/studio-portal#258](https://github.com/cheqd/studio-portal/issues/258)
* apply monthly quota as the per-request limit for explicit faucet amounts ([6979f42](6979f42)), closes [#818](#818)
* **db:** add faucetRequest table for monthly faucet quota ([ef43cb1](ef43cb1)), closes [#818](#818)
* debit the initial testnet top-up from the monthly faucet quota ([15c8d8c](15c8d8c)), closes [#818](#818)
* delete faucet request history past a retention period ([038a079](038a079)), closes [#824](#824)
* faucet address-cap race, retention, logging, tests and entity tidy-ups (follow-ups to [#829](#829)) ([#830](#830)) ([766b1cd](766b1cd)), closes [#823](#823) [#824](#824) [#825](#825) [#826](#826) [#827](#827) [#823](#823) [#824](#824) [#825](#825) [#826](#826) [#827](#827) [#828](#828) [#819](#819)
* faucet cost, burst limiting and reservation status (follow-ups to [#819](#819)) ([#829](#829)) ([e7d7b67](e7d7b67)), closes [#820](#820) [#821](#821) [#820](#820) [#821](#821) [#822](#822) [#828](#828)
* **faucet:** allow funding any valid cheqd testnet address ([7a95c5d](7a95c5d))
* **faucet:** fund any cheqd address; top up new testnet accounts once (follow-up to [#830](#830)) ([#839](#839)) ([1558ccf](1558ccf)), closes [#819](#819) [#829](#829)
* **faucet:** send a default amount when none is requested ([#841](#841)) ([7864611](7864611))
* **faucet:** send a default amount when none is requested ([#841](#841)) ([#842](#842)) ([18223ce](18223ce))
* log faucet quota decisions as structured events ([b21176b](b21176b)), closes [#825](#825)
* return faucet cap and monthly quota usage from GET /account/balances ([3ba590d](3ba590d)), closes [#818](#818)
* track whether each faucet quota reservation completed ([a371bec](a371bec)), closes [#822](#822)
* use a single 100k CHEQ cap for faucet balance and monthly quota ([4612b1f](4612b1f)), closes [#818](#818)

### Bug Fixes

* enforce the faucet address cap under the quota lock ([eed180b](eed180b)), closes [#823](#823)
* **faucet:** keep the initial top-up at 10,000 CHEQ by default ([dc2c0c6](dc2c0c6))
* **faucet:** top up only newly created testnet accounts; skip on quota ([56d3f25](56d3f25))
* **swagger:** make the faucet description valid YAML so the endpoint is documented ([7f2f6ac](7f2f6ac))
* time out the faucet call and warn on invalid faucet config ([9b14df1](9b14df1)), closes [#818](#818)
* use the database clock for every faucet quota decision ([cb6c856](cb6c856)), closes [#827](#827)

### Performance Improvements

* cache the Stripe subscription lookup and skip the balance read when quota is used up ([dd408e2](dd408e2)), closes [#820](#820)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fraseragain
fraseragain merged commit 419da06 into develop Oct 26, 2026
5 checks passed
@fraseragain
fraseragain deleted the chore/back-merge-v3.18.0 branch October 26, 2026 12:51
@cheqd-bot

cheqd-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.19.0-develop.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@cheqd-bot

cheqd-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@cheqd-bot cheqd-bot Bot added the released label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants