Skip to content

harden startup: ipv4 redis default, zero ready flag, await reset#58

Merged
wanwiset25 merged 1 commit intomasterfrom
fix-coderabbit
Apr 24, 2026
Merged

harden startup: ipv4 redis default, zero ready flag, await reset#58
wanwiset25 merged 1 commit intomasterfrom
fix-coderabbit

Conversation

@wanwiset25
Copy link
Copy Markdown
Collaborator

  • Pin Redis host to 127.0.0.1 in server.ts and base.ts with REDIS_HOST/REDIS_PORT overrides. Fixes ECONNREFUSED on ::1 when Node resolves localhost as IPv6 against an IPv4-only redis bind.
  • Await Promise.all over per-mode resets in processors.reset() so per-branch failures propagate to the bootstrap retry loop instead of becoming unhandled rejections.
  • Add a ready flag to Zero and ReverseZero: flip true only after zeroService.init() resolves; short-circuit processEvent() with a skip message until ready. Prevents TypeErrors when Bull fires jobs before viem clients are constructed. Log string also goes from "Fail to init" to "Failed to init".
  • Wrap processors.init(serverAdapter) in try/catch with explicit logger.error + process.exit(1). Sync init throws no longer leak as unhandled rejections; bootstrap's async retry loop still runs on success.

- Pin Redis host to 127.0.0.1 in server.ts and base.ts with
  REDIS_HOST/REDIS_PORT overrides. Fixes ECONNREFUSED on ::1 when
  Node resolves localhost as IPv6 against an IPv4-only redis bind.
- Await Promise.all over per-mode resets in processors.reset() so
  per-branch failures propagate to the bootstrap retry loop instead
  of becoming unhandled rejections.
- Add a ready flag to Zero and ReverseZero: flip true only after
  zeroService.init() resolves; short-circuit processEvent() with a
  skip message until ready. Prevents TypeErrors when Bull fires
  jobs before viem clients are constructed. Log string also goes
  from "Fail to init" to "Failed to init".
- Wrap processors.init(serverAdapter) in try/catch with explicit
  logger.error + process.exit(1). Sync init throws no longer leak
  as unhandled rejections; bootstrap's async retry loop still runs
  on success.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@wanwiset25 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 15 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 15 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ecd8af0-49f6-46b3-ba98-df6e7c474709

📥 Commits

Reviewing files that changed from the base of the PR and between 6d6f448 and 40c3a1e.

📒 Files selected for processing (5)
  • src/processors/base.ts
  • src/processors/index.ts
  • src/processors/reverseZero.ts
  • src/processors/zero.ts
  • src/server.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-coderabbit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wanwiset25
Copy link
Copy Markdown
Collaborator Author

#56

@wanwiset25 wanwiset25 merged commit a20e9b8 into master Apr 24, 2026
3 checks 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