Skip to content

01a035df - Serve GET /v1/statistic/status from the cached list root - #15

Merged
TaprootFreak merged 1 commit into
developfrom
01a035df-statistic-status-cache
Aug 25, 2026
Merged

01a035df - Serve GET /v1/statistic/status from the cached list root#15
TaprootFreak merged 1 commit into
developfrom
01a035df-statistic-status-cache

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

EN:
Listed nested GET /v1/statistic/status was answered with 503 not served even when the list-root cache held a status object. This change stores that object under the nested cache key whenever GET /v1/statistic is cached with HTTP 200. A miss stays 503 and is never forwarded. Keyword monitors that look for ONLINE on this path can succeed again after deploy.

DE:
Der gelistete nested GET /v1/statistic/status antwortete mit 503 not served, obwohl der List-Root-Cache bereits ein status-Objekt hatte. Diese Änderung legt dieses Objekt unter den nested Cache-Key, sobald GET /v1/statistic mit HTTP 200 gecacht wird. Ein Miss bleibt 503 und wird nie weitergeleitet. Keyword-Monitore, die auf diesem Pfad nach ONLINE suchen, können nach dem Deploy wieder grün werden.

Details

The list root GET /v1/statistic is a CACHE_PREFIXES entry and is filled in the background. Nested /v1/statistic/status is already isServedPath (prefix match) so a miss is local 503, never a backend fetch. The list-root JSON embeds status: { buy, sell, … }, which is the body of the nested path.

putCache('GET /v1/statistic', 200, …) now copies a non-array object status field to GET /v1/statistic/status. Invalid JSON, a missing/null/array/non-object status, or a non-200 parent does not fan out. Replacing the parent with a body that has no status object deletes the nested key so a stale status is not served.

Pins in test/server.test.js cover fan-out, drop-on-replace, HTTP 200 x-front-api: hit after refresh, and 503-not-forwarded on miss. test/test-server.sh greps the production helper. Catalog: the /v1/statistic usedIn note was updated; no new catalog row.

REVIEW item 11: the /v1/statistic e2e pointer stays unidentified. There is no public frontend flow that hits /v1/statistic/status. The behaviour is pinned in this repository. Written grant requested to land without a new consumer e2e.

@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 1 review pass.
Serves GET /v1/statistic/status from the cached GET /v1/statistic status object.

DE:
Bereit nach 1 Review-Durchlauf.
Liefert GET /v1/statistic/status aus dem gecachten status-Objekt von GET /v1/statistic.

Details

Gates at head db00b574b7260e55fb9b2cf8a4c50a58a3dedb1b:

  • Quality and logic reviews: 0 findings on pass 1 (no follow-up commits).
  • CI test: SUCCESS on that head.
  • Mergeable: MERGEABLE against develop.
  • Issue comments, reviews, inline comments, and review threads: none open.
  • Required status checks: none on develop (no classic protection, no ruleset required checks). Visible check: test.
  • REVIEW item 11: /v1/statistic e2e remains unidentified; a written grant is requested in the PR body.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 24, 2026 23:21
@TaprootFreak
TaprootFreak merged commit 8116959 into develop Aug 25, 2026
1 check passed
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