Skip to content

Release: develop -> main - #2

Open
github-actions[bot] wants to merge 14 commits into
mainfrom
develop
Open

Release: develop -> main#2
github-actions[bot] wants to merge 14 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.
It is the only path from develop onto main for this repository.
Merging it publishes the production image tag and is a human decision.
Do not merge until develop has been checked on the development hub.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* feat: add front-api HTTP layer and image workflows.

This layer answers /version, a filtered swagger snapshot, short-TTL
GET cache, optional Postgres reads, and optional in-memory quotes.
The swagger snapshot is an allowlist of those served routes only.

* fix: tighten test permissions and startup log.

Test workflow declares contents: read. Startup no longer prints the
backend URL.

* fix: remember swap quotes by source and target name.

Matches the buy/sell variant set so a name/name swap body hits RAM.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 22, 2026 21:20
TaprootFreak and others added 13 commits August 23, 2026 09:53
* Add CONTRIBUTING, REVIEW, and main-from-develop gate

* Align auto-release PR body and tighten main-from-develop pins

* Pin auto-release details close and EN/DE blank lines

* Ignore fork PRs when detecting an existing release PR
)

* Require 100% c8 coverage on all production JavaScript

* Harden coverage pins, lockfile image install, and poller-off child

* Move coverage gate pins out of the self-grep script

* Cover boot error exit and drop unused os import

* Pin REQUEST_TIMEOUT_MS env read and default

* Require a usage and frontend E2E catalog for every offered route

* Stop treating placeholder catalog pointers as usage or E2E

* Drop non-frontend catalog pointers for version swagger and asset smoke

* Point widget E2E at services and allowlist public consumer repos

* Reject mixed unidentified pointers and require exact GET names
* 01a02b56 - Remove in-memory quotes and stale cache fallback

Buy/sell/swap and RealUnit quotes go through the backend proxy.
A down backend always returns 503; expired cache is never served.

* 01a02b56 - Tighten quote-proxy tests and document cache misses

Quote routes are asserted against a mock backend. README states
that only expired or missing cache entries become 503.

* 01a02b56 - Align coverage suite after dropping RAM quotes

Remove quote and RealUnit rows from the offered-routes catalog.
Pin quote proxy bodies and expired-cache 503 in the c8 suite.
* 01a02b56 - Pin quote forwarding and real TTL cache expiry

Record mock-backend method, path, body, and content-type.
Expire GET /v1/asset via CACHE_TTL_MS instead of injected cache rows.

* 01a02b56 - Require exactly one forwarded request per quote route

The quote_forward pin must fail on duplicate upstream PUTs or GETs.

* 01a02b56 - Use nullish coalescing for recorded content-type

Match CONTRIBUTING: ?? not || when defaulting a missing header.

* 01a02b56 - Assert cache hit before TTL expiry in the asset pin

Prime GET /v1/asset must be a cache hit before the mock is closed.

* 01a02b56 - Widen CACHE_TTL_MS window for the expiry pin

Two seconds of TTL leaves room for the immediate hit check without
a 200ms race, then the mock is closed after expiry.
CACHE_TTL_MS falls back to 300000. The expiry pin still overrides
that in tests so it does not wait five minutes.
* Cap every HTTP response at 100ms

Production cuts a late response, emits an ERROR log, and forbids code that cannot meet that bound. The upgrade handshake stays in budget until a completed 101.

* Cut leftover responses at 100ms and reject a zero outbound timeout

A deadline 503 that has not finished flushing is destroyed at the cap. Invalid REQUEST_TIMEOUT_MS values no longer disable the outbound wait.
npm start boots a 127.0.0.1 stub and then this process so the public
repo can run locally without an upstream backend. Setting BACKEND_URL
skips the stub. Production server.js is unchanged.
* Stop forwarding client requests to the backend

A live wait on BACKEND_URL cannot guarantee 100ms. Uncached, unknown,
and quote requests now return 503 not served immediately. The GET cache
fills only off the request path. WebSocket upgrades are refused.

* Drop periodic swagger snapshot console.log

CONTRIBUTING allows console.log only as a boot log. refreshSwagger
also runs on a timer, so the success line is production-path output.

* Use nullish coalescing for request URL fallbacks

CONTRIBUTING requires ?? rather than || for value fallbacks. Empty
query-stripped paths still default to / when url is nullish.

* Forward unknown routes; keep known GETs local and 100ms

Known routes stay local (cache, swagger, optional Postgres) and must
finish in 100ms with no live backend wait. Everything else, including
quotes and WebSocket upgrades, is forwarded with no 100ms rule.

* Pair proxy and upgrade sockets on client close

Destroy the outbound request when the client finishes, closes, or
aborts. Tear down both sides of an upgrade tunnel on close. Pin the
known-vs-unknown split in the test-server arms list.

* Cap the test helper at 100ms only for known routes

Unknown forwards have no 100ms rule. The suite helper now takes an
optional maxMs so quote and other forwarded round-trips are not
rejected for taking longer than 100ms.

* Clarify auth forwarding and pin DB-null as not served

Authenticated cache-prefix GETs stay forwarded. Version and swagger
stay local even with Authorization. A null DB read must 503 not served,
not a truthy status.

* Forward parameterized GETs instead of answering 503

Known local GETs are exact list roots plus concrete swagger paths.
GET /v1/asset/1 is unknown and is forwarded so the rest of the API
still works.

* Catalog exact served paths; drop prefix subpath claims

Offered routes for cache list roots are exact. Parameterized swagger
templates are not served here. GET /v1/setting/infoBanner is catalogued
as its own concrete path.

* Keep known GETs to exact list roots

Nested paths such as /v1/setting/infoBanner and /v1/asset/1 are
unknown and forwarded. Cache refresh only fills / and the list roots.
The catalog matches that exact set.
* Never name unknown routes

Unknown traffic is only the complement of the known allowlist. Docs,
catalog notes, and the local stub no longer list those routes.

* Pin swagger snapshot drop of non-exact list paths

refreshSwagger must keep only exact known GET paths. The fixture now
includes a child path and a template under a list root and asserts both
are filtered out.

* Assert each unknown probe actually hit the backend

The forward pin now checks PUT/GET /v1/other and GET /v1/asset/x in
the backend seen log instead of a count that coverage probes could
satisfy.
* Forbid forwarding listed routes to the backend

A route this process lists is completed from local state. Nested prefix
paths, HEAD, and authenticated listed GETs are no longer forwarded.
Client requests never wait on BACKEND_URL; background refresh may ping it.

* Align unknown-route probes with the unnamed complement

Keep listed nested swagger paths in the local fixture and stop naming
unlisted product routes in the suite.

* Fail closed listed WebSocket upgrades

A listed GET/HEAD must not be tunnelled to the upstream HTTP backend.
Unknown upgrades stay forwarded.

* Point offered-route E2E at live widget and KYC specs

Asset list coverage includes the smoke fetch. Country coverage uses the
KYC personal-data country dropdown. Setting usedIn names the public hook.
The backend answers GET / with 302, so the JSON cache never filled and
clients got 503 not served. Serve the redirect from local state inside
the known-route budget.
…#16)

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.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.

2 participants