Railway Deployment #42169e fix: skip scripts in indexer runtime stage - #10
Open
railway-app[bot] wants to merge 1 commit into
Open
Railway Deployment #42169e fix: skip scripts in indexer runtime stage#10railway-app[bot] wants to merge 1 commit into
railway-app[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mertcicekci0
added a commit
that referenced
this pull request
Jun 24, 2026
#6 (contract): reduce-only limit/stop-limit orders are risk-OUT — execute_order and should_execute_order now use the lenient oracle read for them too (bit 8 of time_in_force), so a protective offset isn't blocked during a deviation window. #7/#8 (keeper): corroboration now RAISES the jump bound to a hard ceiling (CORROBORATED_MAX_JUMP_PCT, default 50%) instead of removing the breaker, so a glitch correlated across Binance + the index can't publish an extreme wick; and a baseline older than MAX_BASELINE_AGE_MS (default 5m) is treated as expired so the breaker can never freeze the feed permanently (sustained move / persistent ref divergence re-seed instead of wedging). #9 (keeper): the K-8 mainnet guard now also flags an RPC_URL that looks like mainnet, so the admin key can't target a mainnet RPC under a testnet passphrase. #10 (keeper): REFERENCE_DIVERGENCE_PCT (and the new bounds) parse through a validated parseFloatEnv that falls back to a default + clamps, so a bad/empty env value can't silently disable or invert a guard. (#3 OI-decrement: the existing 'if total > size {..} else {0}' is already equivalent to saturating_sub for the non-negative domain — no change needed.) 45 market tests pass, keeper type-clean, clippy clean.
y4hyya
added a commit
that referenced
this pull request
Jul 9, 2026
…rror boundary
Phase 2 of the error-handling pass: consolidate the duplicated error decoders
and give render-time crashes a branded recovery screen.
- lib/utils/userError.ts: new toUserMessage(err, {contract?}) — the single
funnel that maps ApiError (gateway status/code) to friendly copy and
delegates contract codes to decodeContractError with the right table.
- Replace the 5 copy-pasted humanize/humanizeError helpers and the inline
referral-code maps (CreateCodeCard, BindCodeCard, ReferralBanner,
LeaderTradePanel, ApiKeyIssueCard) with toUserMessage. DepositWithdrawModal
keeps its mode-aware #10-on-deposit carve-out, delegates the rest.
- ReferralSignIn detects closed-beta via ApiError.code === 'not_in_beta'
instead of regexing the raw error string.
- app/error.tsx + app/global-error.tsx: route + root error boundaries replace
Next's default error overlay with a branded "Something went wrong" card.
- Friendly copy for the existing load-error displays (vaults page,
ReferralDashboard, ApiKeysList) via toUserMessage instead of raw messages.
Net -38 lines. tsc --noEmit + eslint clean. decodeContractError and the
Phase-1 primitives are unchanged.
y4hyya
added a commit
that referenced
this pull request
Jul 23, 2026
…l (audit #12, #19) - market (#12): position/order DATA entries extended TTL only to the shared 30-day window on write, and funding is lazy (no writes refresh them), so an idle position or a long-resting limit order archived at ~30 days and blocked its own close/liquidate/execute. They now get a dedicated ~150-day window (extend_ttl caps at the network max, so an over-large target never traps); the per-trader/global INDEX lists keep the 30-day window since market activity refreshes them. - referral (#19): the identity getters (lookup_code, referrer_of, is_revoked, load_info) read without extending, so a code, a referee link, a revocation or a referrer's accrued stats archived ~30 days after the last write even while in active use (a lapsed revocation would let a revoked referrer earn again). They now re-extend TTL on read, guarded by presence, keeping a live relationship alive. 2 new regression tests using get_ttl (a fresh position's window exceeds the 30-day one; a resolved code's TTL is refreshed after decaying near expiry). market 177, referral 20 pass. The complete cure for a truly-idle entry that does archive is the off-chain restorePreamble handling (#7/#10); this reduces the on-chain frequency.
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.
Problem
The indexer Docker build fails at the runtime stage with
sh: husky: not found(exit code 127). Thenpm ci --omit=devcommand still runs the rootpackage.jsonpreparelifecycle script ("prepare": "husky"), buthuskyis a devDependency excluded by--omit=dev. TheENV HUSKY=0workaround only works when the husky binary is present to read the variable — when the binary is missing entirely, the shell returns 127 before husky can run.Solution
Added
--ignore-scriptsto the runtime stagenpm cicommand inindexer/Dockerfile. This tells npm to skip all lifecycle scripts (includingprepare) during installation. It is safe here because all build artifacts are already compiled and copied from the builder stage — no build steps need to run at install time.Changes
indexer/DockerfileContext
bddf6bbGenerated by Railway