Skip to content

Default RPC pool: add techcoderx.com and hiveapi.actifit.io back; SSR route: tag upstream failures UPSTREAM - #126

Merged
feruzm merged 4 commits into
mainfrom
fix/default-pool-add-nodes
Nov 19, 2026
Merged

feruzm merged 4 commits into
mainfrom
fix/default-pool-add-nodes

Conversation

@feruzm

@feruzm feruzm commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Closes #125. Closes #127.

What

Adds https://techcoderx.com and https://hiveapi.actifit.io back to the end of HiveClients.DefaultNodes, which is also the SSR read-through cache's pool. The code comment keeps the history and the check to run.

Also (#127): a lookup that fails because the node pool failed now answers 502 tagged X-Ssr-Cache: UPSTREAM. That covers every node exhausted by a timeout, an unreachable node, an HTTP error or an unusable body. The proxy's own failures keep 502 UNAVAILABLE: fill queue full, fill expired in the queue, or an unexpected exception. Before, both answered UNAVAILABLE, so the SDK breaker (ecency/vision-web#2150) could not open on an overloaded proxy without also opening on a partly down pool. Stats still count both under error. Until the SDK change ships, the new tag is counted as a plain 502, as today.

Malformed node replies now count as node failures, so they get UPSTREAM rather than UNAVAILABLE:

  • Valid JSON that is not a JSON-RPC object ([], 5, null) used to throw InvalidOperationException while the reply was read.
  • An object with neither error nor result ({}) used to be read as a null result. The SSR fill cached that as a successful answer, and no other node was asked. An explicit "result": null is still an answer.
  • Both shapes skip the same-node retry, as the existing malformed-result path does.
  • An error in any shape (non-string message, bare string) is the node's own RPC error, relayed as before instead of throwing.

Why

Three of the six nodes answer a busy host's calls with 429 almost every time, so its per-IP rate falls on the other three. Two more nodes spread it.

Both were removed for stripping posting_json_metadata. Re-checked 2026-11-19 against api.hive.blog:

  • metadata identical for 113 of 113 accounts, 32 of them carrying wallet tokens
  • 20 of 20 calls answered in a concurrent burst, no throttling

Risk

  • Wallet and portfolio reads: they go through GetAccounts, which still prefers a node that serves metadata (a bounded probe).
  • SSR read-through cache: its condenser_api.get_accounts and bridge.get_profile(s) reads carry no such preference. If either node regressed, rendered profile pages would show blank metadata. A preference there costs extra calls on accounts that have no metadata, and those calls go to an already throttled pool, so it is left out on purpose.
  • Nothing depends on the pool's size or order (checked).

Tests (test first)

  • HiveRpcFailoverTests.DefaultPool_CarriesTheReverifiedNodes was red before the change (dotnet test --filter DefaultPool: 1 failed) and is green after.
  • SsrRpcTests.A_failed_node_pool_answers_502_UPSTREAM_and_the_proxys_own_failure_502_UNAVAILABLE and Unreachable_node_is_reported_as_an_upstream_failure failed to compile before (no Upstream outcome) and pass after.
    • Mutation check: never classifying a failure as upstream, and classifying every failure as upstream, are each caught (2 and 3 failing tests).
  • Malformed replies (SsrRpcTests):
    • A_well_formed_JSON_answer_that_is_not_an_RPC_envelope_is_an_upstream_failure (6 cases)
    • An_RPC_error_in_an_unexpected_shape_is_still_the_nodes_own_error (2 cases)
    • All 8 were red before and are green after.
    • An_explicit_null_result_is_still_an_answer and A_node_that_stalls_mid_body_is_an_upstream_timeout guard the neighbouring cases.
  • AllNodesMalformed_ThrowsNamingTheNode now asserts "unusable" plus the node URL, since the result-less reply is caught before validation.
  • Full suite: 894 passed.

Both were removed for serving accounts with posting_json_metadata
stripped. Re-checked 2026-11-19: metadata identical to api.hive.blog
across 113 accounts, 32 with wallet tokens. Listed last; a wider pool
spreads the host's per-IP request rate.

Closes #125
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T19:32:45.897252Z 52e554a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Restore two reverified Hive RPC nodes to the default pool

🐞 Bug fix 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Restores two reverified nodes to spread requests across a wider default RPC pool.
• Retains the metadata-regression history and adds a test guarding pool membership.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: Hive account/profile/portfolio integration, SSR RPC rendering integration.
  • The changed enum, fill resolution, and HTTP response header/status form one end-to-end SSR proxy behavior.
  • The response is consumed by the SSR/web tier as the rendering data path; this is one bounded integration rather than separate capabilities for the RPC client, cache, and route.
  • These callers use the shared account RPC operation to produce account data and token/profile visibility.
  • They are one bounded account integration, even though exposed through multiple handlers; the source explicitly connects metadata availability to portfolio reads.
  • The SSR cache independently consumes the shared default pool and returns rendered-page data through its own HTTP contract.
  • The source explicitly states that this path does not apply the account metadata preference, making it a distinct end-to-end behavior from direct account/profile reads.
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before: node transport/body failures and proxy failures were not separated by the new Upstream outcome, and valid JSON shapes without an envelope could be returned or treated differently.
  • After: the exception and response-shape branches distinguish node failure, RPC-level error, timeout, and proxy failure, while preserving a 502 HTTP response but changing the externally visible tag.
  • New correctness conditions: every reachable node failure must be wrapped as NodeUnavailableException; an explicit result:null must remain a valid miss; malformed objects must fail over without being cached; and external consumers must receive the correct failure tag.
  • The added branches interact with existing failover and response mapping rather than being a simple direct transformation.
Potential damage 🟡 Medium 🩹 Temporary loss

  • A misclassification can cause the SSR consumer to apply the wrong retry, fallback, or breaker policy and temporarily lose rendered data.
  • Reverting the code restores the previous taxonomy, but any already-open external breaker or in-flight failed render must expire or be retried.
  • No persistent application-state corruption or irreversible external effect is evident.
  • Recoverable by retry, breaker expiry, or configuration/code rollback.
  • The exact automatic recovery timing and breaker eligibility are outside this repository.
Assessed commit 1d04fec
Diagram

graph TD
  RPC["Reverified RPCs"] --> Pool["Default node pool"] --> Client["Shared RPC client"] --> Reads["Wallet and portfolio"]
  Pool --> SSR["SSR RPC client"] --> Cache["Read-through cache"] --> Pages["Profile pages"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add metadata preference to SSR reads
  • ➕ Could avoid blank profile metadata if either restored node regresses.
  • ➖ Adds upstream calls for accounts with legitimately empty metadata, increasing load on an already throttled pool.

Recommendation: Restore the reverified nodes without changing SSR routing. This widens the pool while preserving its current call volume; the documented SSR regression risk warrants monitoring.

Files changed (2) +22 / -6

Bug fix (1) +13 / -6
HiveRpcClient.csRestore two RPC endpoints to the default pool +13/-6

Restore two RPC endpoints to the default pool

• Appends techcoderx.com and hiveapi.actifit.io to DefaultNodes. Revises the comment to record the metadata recheck, the reason for widening the pool, and the remaining SSR metadata-regression risk.

dotnet/EcencyApi/Infrastructure/HiveRpcClient.cs

Tests (1) +9 / -0
HiveRpcFailoverTests.csGuard membership of the restored default nodes +9/-0

Guard membership of the restored default nodes

• Adds a test asserting that both reverified RPC URLs appear in HiveClients.DefaultNodes. The test guards against their accidental removal.

dotnet/EcencyApi.Tests/HiveRpcFailoverTests.cs

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Expands the default RPC pool and separates node failures from proxy failures in SSR responses.

  • Two rechecked Hive nodes join the shared RPC pool.
  • Malformed Hive replies now fail over to another node.
  • The SSR route labels node-pool failures separately from proxy failures.

The earlier malformed-reply finding is addressed. No new actionable issues were found.

Reviews (4) · Last reviewed commit: "Treat a node reply without a result as a..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The default Hive RPC node pool now includes https://techcoderx.com and https://hiveapi.actifit.io. The code comment records their recheck and metadata observations. A test asserts that both nodes are in the pool.

Changes: Hive RPC node pool

Layer / File(s) Summary
Update and verify the default node pool
dotnet/EcencyApi/Infrastructure/HiveRpcClient.cs, dotnet/EcencyApi.Tests/HiveRpcFailoverTests.cs
The comment records the nodes’ recheck and metadata observations. DefaultNodes adds both URLs, and a test asserts that both are present.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other · Severity of issue fixed: Medium

Merge Risk: Minimal · up to 52e55

This adds two additional Hive RPC nodes to the end of the default pool to spread per-IP request load. No concrete defect was found in the change, and reverting it is straightforward. Metadata parity on the new nodes was checked by the author only on a sample of accounts and only for account reads, so it is worth watching after rollout.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #125 requires: (1) add https://techcoderx.com and https://hiveapi.actifit.io to the end of HiveClients.DefaultNodes; (2) keep the removal history in a code comment; (3) `HiveRpcFailoverTes… Make the HiveClients.DefaultNodes declaration and the HiveRpcFailoverTests file readable at the reviewed head (or restore the changed blobs in the checkout). Confirm that the tests assert (a) both nodes are present and last, (b) no dupl…
Passed Passed checks: 3 passed

Check name Status Explanation
Out of Scope Changes check Passed Per the AI-generated summary, the PR changes two files: dotnet/EcencyApi/Infrastructure/HiveRpcClient.cs (node list entries and the explanatory comment) and `dotnet/EcencyApi.Tests/HiveRpcFailoverTe…
Title check Passed The title names two changes: adding techcoderx.com and hiveapi.actifit.io back to the default RPC pool, and tagging SSR route upstream failures as UPSTREAM. The changeset summary covers only the defau…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Out of Scope Changes check

Explanation

Per the AI-generated summary, the PR changes two files: dotnet/EcencyApi/Infrastructure/HiveRpcClient.cs (node list entries and the explanatory comment) and dotnet/EcencyApi.Tests/HiveRpcFailoverTests.cs (one new test). Both changes are tied to issue #125: the node list change implements the request, and the test supports it. The summary reports no public or exported declaration changes. No unrelated change is reported. The diff could not be read directly, so this verdict rests on the summary. It does not rule out changes the summary omits.

Full details: Title check

Explanation

The title names two changes: adding techcoderx.com and hiveapi.actifit.io back to the default RPC pool, and tagging SSR route upstream failures as UPSTREAM. The changeset summary covers only the default pool change: DefaultNodes gains both nodes, a comment is updated, and a test is added. No SSR route or UPSTREAM tagging change appears in the provided summaries, so the second clause is not supported by the visible changes. The first clause does match the main change, so the title is partially related.

Full details: Linked Issues check

Explanation

Issue #125 requires: (1) add https://techcoderx.com and https://hiveapi.actifit.io to the end of HiveClients.DefaultNodes; (2) keep the removal history in a code comment; (3) HiveRpcFailoverTests verifies the pool contains both nodes, has no duplicates, and still excludes unreachable nodes. The AI-generated summary states that both nodes were appended after the existing nodes, that the comment was replaced with a 2026-11-19 recheck note, and that DefaultPool_CarriesTheReverifiedNodes asserts that both nodes are present. The repository diff tool returned no content (changed blobs missing from the checkout), so the code and test changes were not read directly. The file read of HiveRpcClient.cs at head was truncated before DefaultNodes. Unverified: the exact list order and placement, and whether any test checks for duplicates or for exclusion of unreachable nodes. The summary describes only the presence check. The PR's DefaultPool test was reported red before and green after, which supports the change but does not confirm the other two acceptance criteria. The pool-membership requirement appears met on summary evidence. The no-duplicates and unreachable-exclusion criteria remain unconfirmed.

Resolution

Make the HiveClients.DefaultNodes declaration and the HiveRpcFailoverTests file readable at the reviewed head (or restore the changed blobs in the checkout). Confirm that the tests assert (a) both nodes are present and last, (b) no duplicate entries, and (c) unreachable nodes remain excluded. Then re-assess.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the node list twice,
Two links return, both neat and nice.
The pool now holds a wider row,
A test confirms the links are so.
Then hops away through fields of snow.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d38e31ca-09c6-4cab-b3a8-64c0444cabc1
Commits

Reviewing files that changed from the base of the PR and between 02c220f and 52e554a.

Files selected for processing: 2

  • dotnet/EcencyApi.Tests/HiveRpcFailoverTests.cs
  • dotnet/EcencyApi/Infrastructure/HiveRpcClient.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

…n failures

A lookup that fails because every node failed (timeout, unreachable, HTTP
error, unusable body) now answers 502 X-Ssr-Cache: UPSTREAM. The proxy's
own failures (fill queue full, fill expired in the queue, an unexpected
exception) keep 502 UNAVAILABLE, so a consumer's breaker can open on an
overloaded proxy without opening on a partly down pool.

Closes #127
@feruzm feruzm changed the title Add techcoderx.com and hiveapi.actifit.io back to the default RPC pool Default RPC pool: add techcoderx.com and hiveapi.actifit.io back; SSR route: tag upstream failures UPSTREAM Nov 19, 2026
A node answering valid JSON that is not a JSON-RPC object ([], 5, null)
threw InvalidOperationException while the reply was read, and an error
with a non-string message or a bare string error threw too. Neither was a
node failure, so the SSR route tagged them UNAVAILABLE (the proxy's own
failure) instead of UPSTREAM. A non-object body is now a node failure; an
error in any shape is the node's own RPC error. Unexpected local
exceptions stay separate.
{} or an envelope with neither error nor result read as a null result,
which the SSR fill cached as a successful answer and no other node was
asked. A missing result is now a node failure; an explicit
"result": null is still an answer. Both malformed shapes skip the
same-node retry, as the existing malformed-result path does.
@feruzm
feruzm merged commit b16ee4f into main Nov 19, 2026
5 checks passed
@feruzm
feruzm deleted the fix/default-pool-add-nodes branch November 19, 2026 19:55
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.

SSR route: tag upstream node failures distinctly from the proxy's own failures Add techcoderx.com and hiveapi.actifit.io back to the default RPC pool

1 participant