Skip to content

fix: accept omitted liveHashes field in AccountInfoQuery test - #688

Merged
Fantomasa merged 1 commit into
mainfrom
fix-account-info-livehashes
Aug 13, 2026
Merged

fix: accept omitted liveHashes field in AccountInfoQuery test#688
Fantomasa merged 1 commit into
mainfrom
fix-account-info-livehashes

Conversation

@Fantomasa

@Fantomasa Fantomasa commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

AccountInfoQuery test (#19) Query account info and verify liveHashes is returned fails against JS SDK v2.87.0:

AssertionError: expected { accountId: '0.0.1466', ...(22) } to have property 'liveHashes'

Live hashes are a retired network feature. hiero-ledger/hiero-sdk-js#4269 (shipped in v2.87.0) removed the long-deprecated live hash API from the SDK and, with it, the liveHashes field from the TCK server's getAccountInfo response. Other SDKs still expose the field, so the TCK must accept both shapes.

This PR applies the same pattern as #673: the test validates that liveHashes is an array when the field is present and accepts its absence for SDKs that removed the retired API. The spec document is updated to match.

First observed in the consensus-node XTS dry run validating hiero-ledger/hiero-consensus-node#26820 (SDK TCK Regression panel, JS SDK v2.87.0): 2396 tests, 2162 passed, 1 failed, the only failure being this assertion.

Related Issues

Summary by CodeRabbit

  • Documentation

    • Clarified that live hashes are a retired network feature.
    • Documented SDK-specific behavior when the liveHashes field is omitted or returned.
  • Tests

    • Updated account information validation to support SDKs that omit liveHashes.
    • Continued validating liveHashes as an array when provided.

Signed-off-by: Fantomasa <ivailoinfo@gmail.com>
@lfdt-bot

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 08efba95-49df-4029-852e-f934287b60f4

📥 Commits

Reviewing files that changed from the base of the PR and between 7160869 and 9c420bd.

📒 Files selected for processing (2)
  • docs/test-specifications/crypto-service/AccountInfoQuery.md
  • src/tests/crypto-service/test-account-info-query.ts

📝 Walkthrough

Walkthrough

The account-info specification and test now support SDKs that omit the retired liveHashes field. SDKs that return the field must provide an array.

Changes

Account-info liveHashes handling

Layer / File(s) Summary
Document and validate liveHashes handling
docs/test-specifications/crypto-service/AccountInfoQuery.md, src/tests/crypto-service/test-account-info-query.ts
The specification documents retired liveHashes behavior. The test allows the field to be absent and validates it as an array when present.

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

Mergeability Score: ⚪ Minimal · up to 9c420

This change updates the account-information test and specification to accept SDKs that omit the retired liveHashes field; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: accepting an omitted liveHashes field in the AccountInfoQuery test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-account-info-livehashes

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.

@Fantomasa
Fantomasa merged commit ec45c8d into main Aug 13, 2026
22 of 23 checks passed
@Fantomasa
Fantomasa deleted the fix-account-info-livehashes branch August 13, 2026 08:22
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.

3 participants