Repository navigation
Feat/multi 710 711 712 713 - #770
Open
Feyisara2108 wants to merge 4 commits into
Open
Feyisara2108 wants to merge 4 commits into
Feyisara2108 wants to merge 4 commits into
Conversation
…col#710) Redis previously relied on ioredis' background retryStrategy, so a failed initial connection never surfaced as a startup error and could reconnect indefinitely without a clear signal. Add a dedicated startup handshake: create the client with lazyConnect, retry the first connection with exponential backoff, capped delay, jitter and a per-attempt timeout, and fail startup with one actionable host:port error (without leaking credentials). Once connected, runtime reconnection is handed back to ioredis. Retries are tunable via REDIS_STARTUP_MAX_ATTEMPTS, REDIS_STARTUP_INITIAL_DELAY_MS, REDIS_STARTUP_MAX_DELAY_MS and REDIS_STARTUP_ATTEMPT_TIMEOUT_MS; invalid values fail config validation.
…-Protocol#711) Express advertises the stack via X-Powered-By, and reverse proxies/upstreams can add Server, X-Runtime, Via and ASP.NET version headers. These give attackers an easy fingerprint of the technology in use. Disable X-Powered-By at the framework level, keep helmet applied, and strip the leaky headers at the header level (wrapping res.setHeader/res.writeHead so it also covers headers added after the middleware runs). Extra header names can be stripped via extraHeadersToStrip.
…arashield-Protocol#712) Trigger evaluation scaled product thresholds with parseFloat(threshold) * 1e7. Binary floating point cannot represent most decimal fractions, so low-order digits could be lost and a reading sitting exactly on the threshold could land on the wrong side of the comparison — paying out (or not) incorrectly. Add exact decimal helpers (src/common/utils/decimal.ts) that parse decimal strings/numbers into BigInt scaled by 10^7, expanding scientific notation and rounding only beyond the 7th decimal place. Use them in both evaluation paths (claims autoProcess and the policy-state cache), keeping the strict boundary semantics: 'LessThan' triggers strictly below, otherwise strictly above, and a reading equal to the threshold never triggers. Also surface OracleReading.bucketStart from database reads so the cache's reading timestamp is available; fall back to the reading timestamp when absent.
…ol#713) The version header was only set from the interceptor's tap callback, so it was missing on error responses and could be absent from streamed responses (SSE / NDJSON) whose headers flush before tap runs. Centralise version resolution in src/common/versioning/api-version.ts and emit the header before the handler executes. Also stamp it from the global exception filter for error responses and from an early middleware for responses that never reach either (CORS preflights, request timeouts). Expose the header (plus Deprecation/Link) via CORS so browser clients can read it.
|
@Feyisara2108 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #710
Closes #711
Closes #712
Closes #713