Skip to content

Add sgov feed#4

Open
Siddharth2207 wants to merge 5 commits into2025-09-26-stox-price-pusherfrom
2026-04-19-sgov
Open

Add sgov feed#4
Siddharth2207 wants to merge 5 commits into2025-09-26-stox-price-pusherfrom
2026-04-19-sgov

Conversation

@Siddharth2207
Copy link
Copy Markdown
Collaborator

@Siddharth2207 Siddharth2207 commented Apr 19, 2026

Add sgov feed

Summary by CodeRabbit

  • New Features

    • Added Docker image build and deployment workflow for containerized deployment.
    • Added Dockerfile for containerized application support.
    • Extended price feed configuration with additional asset pairs (GOOG, AMZN, AAPL, MSFT, TSLA, NVDA, META, GME, MSTR, BRKB, SPLG, IAU, COIN, SIVR, CRCL, BMNR, PPLT, RKLB, SGOV and variants).
    • Enhanced logging and startup sequencing for better observability during initialization.
  • Chores

    • Updated development environment dependencies and platform-specific configuration.
    • Added test fixtures.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 48e5c9a8-9698-456c-811f-ae83e3a4c09b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR introduces Docker containerization for the price-pusher application with a new GitHub Actions workflow for automated image building and pushing. It enhances the PythPriceListener with startup sequencing and debug logging, updates asset configuration with additional trading pairs and standardized trigger parameters, improves gas price handling in the EVM module, and refactors development dependencies for cross-platform Nix shell support.

Changes

Cohort / File(s) Summary
Docker & CI Infrastructure
.github/workflows/rainix-docker.yml, Dockerfile
Added GitHub Actions workflow (rainix-docker.yml) that triggers on push and manual dispatch, installing Nix dependencies and using pnpm/turbo to build the price-pusher package. New Dockerfile builds a Node.js 22.14 container image with build-time arguments for GIT_SHA and DOCKER_CHANNEL, configured to run the npm run start evm command with environment variable defaults for frequency, multiplier, and other runtime parameters.
Price Listener Enhancements
apps/price_pusher/src/pyth-price-listener.ts, apps/price_pusher/src/evm/command.ts
Enhanced PythPriceListener.start() to await startListening() and added comprehensive debug logging (request details, stream status, price age calculations, skip decisions). New public method waitForFirstPriceUpdate(timeoutMs) polls until initial prices arrive or timeout. Updated startup sequencing in command.ts to await both start() and waitForFirstPriceUpdate(15000) on handler initialization.
EVM Module Improvements
apps/price_pusher/src/evm/evm.ts
Enhanced gas price handling with explicit gasLimitToUse computation (ceiling of configured limit or 1,000,000 default) and consistent passing of gas parameter to simulation requests. Added debug logging for gas price initialization, final computed values (including nonce and update fee), and updated message wording from "Using gas price" to "Final gas price".
Configuration & Asset Expansion
apps/price_pusher/price-config.stable.sample.yaml
Replaced three initial asset entries (BTC/USD, BNB/USD, PYTH/USD) with a new comprehensive set of 26+ aliases covering equities, commodities, and crypto (GOOG, AMZN, AAPL, MSFT, TSLA, NVDA, META, GME, MSTR, BRKB, SPLG, IAU, COIN, SIVR, CRCL, BMNR, PPLT, RKLB, SGOV, and variants with .PRE/.POST suffixes). Standardized all new entries to use time_difference: 300, price_deviation: 0.05, confidence_ratio: 200, with uniform early_update blocks (time_difference: 150, price_deviation: 0.03).
Development Environment
flake.nix
Refactored devShells.default.buildInputs from fixed package array to conditional structure using with pkgs; expression. Removed unconditional Linux-only dependencies and added platform-specific handling: Linux adds udev and libusb1; macOS adds libusb1, IOKit, and CoreFoundation frameworks. Changed Python dependency from distutils to setuptools.
Test Fixtures
test.json
Added new JSON test fixture with two price update objects, each containing binary-encoded hex data and parsed structured representation (id, price, ema_price with confidence/exponent/publish_time, and metadata including slot and proof timing).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is nearly identical to the title ('Add sgov feed') and does not follow the repository's required template structure. It lacks Summary, Rationale, and testing information sections. Provide a complete description following the template: add a Summary of all changes, Rationale explaining why (including infrastructure updates), and document how testing was performed.
Title check ❓ Inconclusive The title 'Add sgov feed' is vague and overly generic. The changeset includes significant infrastructure changes (Docker CI, Dockerfile, Nix configuration, price listener logic, gas handling) that extend far beyond adding a single feed entry. Clarify whether the main change is the sgov feed addition or the broader infrastructure overhaul. Consider a more descriptive title like 'Add sgov feed and refactor price-pusher infrastructure' if multiple concerns are equally important.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-04-19-sgov

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.

@Siddharth2207 Siddharth2207 changed the base branch from main to 2025-09-26-stox-price-pusher April 19, 2026 13:03
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