Skip to content

chore: improve CI integration test logs#1049

Merged
tuliomir merged 4 commits intomasterfrom
chore/improve-ci-logs
Apr 7, 2026
Merged

chore: improve CI integration test logs#1049
tuliomir merged 4 commits intomasterfrom
chore/improve-ci-logs

Conversation

@tuliomir
Copy link
Copy Markdown
Contributor

@tuliomir tuliomir commented Mar 30, 2026

Summary

  • Defaults console log level to warn for quieter CI output, while keeping file logs at silly for complete debugging via artifacts
  • Adds winston as a devDependency to replace the placeholder logger, enabling actual log level filtering
  • Replaces direct console.* calls in wallet-precalculation.helper.ts with LoggerUtil

References

Acceptance Criteria

  • CI console output only shows warn and error level logs
  • Full verbose logs remain available in the uploaded tmp/ artifacts

Summary by CodeRabbit

  • Tests

    • Separate console and file log levels for test runs; console defaults adjusted to reduce noisy output
    • Replaced ad-hoc console output in test helpers with a structured test logger for consistent logs
    • Improved verbose progress reporting and clearer parse/error messages during tests
  • Chores

    • Added a logging library to development dependencies to support enhanced test logging

Reduce CI console noise by defaulting console output
to 'warn' level while keeping full verbose logs in
artifact files. Adds winston as devDependency to
replace the placeholder logger, separates console
and file log levels, and replaces direct console
calls with the LoggerUtil.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c12e37f8-61cc-4e1e-addb-6b8b4c8406aa

📥 Commits

Reviewing files that changed from the base of the PR and between 81d9b94 and a4edf80.

📒 Files selected for processing (1)
  • __tests__/integration/helpers/wallet-precalculation.helper.ts

📝 Walkthrough

Walkthrough

Replaced a placeholder test logger with Winston, added a separate file log level export, changed default console log level to "warn", updated test logger initialization to use the new fileLevel, and replaced direct console calls in wallet precalculation tests with the centralized test logger.

Changes

Cohort / File(s) Summary
Logging implementation & deps
__tests__/integration/utils/logger.util.ts, package.json
Swapped placeholder logger for direct winston import; added winston to devDependencies. Console transport now uses testConfig.consoleLevel (no fallback) and file transport uses testConfig.fileLevel.
Test configuration
__tests__/integration/configuration/test.config.ts
Changed consoleLevel default from 'silly''warn'; added exported fileLevel from `process.env.TEST_FILE_LEVEL
Logger usage in tests
__tests__/integration/helpers/wallet-precalculation.helper.ts
Replaced console.log/console.error with loggers.test!.log/loggers.test!.error for benchmark messages, JSON parse errors, and verbose progress output.

Sequence Diagram(s)

(omitted — changes are focused on logger replacement and configuration, not a new multi-component control flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pedroferreira1
  • r4mmer
  • raul-oliveira

Poem

🐰 I hopped through tests to fix each log,

traded noisy prints for Winston's cog.
Console quiet, files still bright,
carrots crunch in evening light. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: improve CI integration test logs' directly reflects the main change—improving CI integration test logging by adjusting log levels and implementing proper logging infrastructure.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/improve-ci-logs

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.

@tuliomir tuliomir moved this from Todo to In Progress (WIP) in Hathor Network Mar 30, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@__tests__/integration/helpers/wallet-precalculation.helper.ts`:
- Line 150: Replace the optional chaining uses of loggers.test (e.g.
loggers.test?.log and loggers.test?.error) in wallet-precalculation.helper.ts
with direct access (loggers.test.log and loggers.test.error); update each
occurrence where loggers.test?. is used so it matches other test helpers and
relies on the logger initialized by setupTests-integration.js.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c028e6e6-7fba-4b27-8482-1cc70a401944

📥 Commits

Reviewing files that changed from the base of the PR and between 1991f55 and 71a7e4d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • __tests__/integration/configuration/test.config.ts
  • __tests__/integration/helpers/wallet-precalculation.helper.ts
  • __tests__/integration/utils/logger.util.ts
  • package.json

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.93%. Comparing base (5a08f53) to head (a4edf80).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1049       +/-   ##
===========================================
+ Coverage   66.30%   87.93%   +21.62%     
===========================================
  Files         114      114               
  Lines        8910     8910               
  Branches     2020     2030       +10     
===========================================
+ Hits         5908     7835     +1927     
+ Misses       2975     1047     -1928     
- Partials       27       28        +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Aligns with codebase convention used in other
helpers (genesis-wallet, wallet-tracker, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@__tests__/integration/helpers/wallet-precalculation.helper.ts`:
- Around line 172-177: The catch block currently logs only a static message and
loses the parse error details; update the catch to pass the caught error (err)
into the logger call so the JSON.parse failure is logged with its error
information (e.g., change the loggers.test!.error call to include err or a
combined message), locating the change around the JSON.parse(strData) try/catch
and the loggers.test!.error invocation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7f18f906-9c7f-467c-b8c6-cf72534a75cb

📥 Commits

Reviewing files that changed from the base of the PR and between 71a7e4d and 81d9b94.

📒 Files selected for processing (1)
  • __tests__/integration/helpers/wallet-precalculation.helper.ts

Pass the caught error to the logger so the JSON
parse failure details are visible in the log output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tuliomir tuliomir requested review from luislhl and r4mmer March 30, 2026 20:29
@tuliomir tuliomir moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Mar 30, 2026
@tuliomir tuliomir moved this from In Progress (Done) to In Review (WIP) in Hathor Network Mar 31, 2026
@luislhl luislhl moved this from In Review (WIP) to In Review (Done) in Hathor Network Apr 7, 2026
@tuliomir tuliomir merged commit 0ccc910 into master Apr 7, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Apr 7, 2026
@tuliomir tuliomir deleted the chore/improve-ci-logs branch April 7, 2026 16:05
raul-oliveira added a commit that referenced this pull request Apr 10, 2026
* feat: export all types and utils from public API (#1034)

* Test: Shared tests for `start` (#1032)

* Merge pull request #1046 from HathorNetwork/refact/fee-test-suite

refact: move fee test suite to the right folder

* test: add new fee template integration tests (#1048)

* refact: move fee test suite to the right folder

* review changes

* refact: keep only moved tests, remove new template tests

* test: add new fee template integration tests

* fix: native token version defaulting to deposit (#1054)

* test: Shared tests for internal wallet methods (#1047)

BREAKING CHANGE: HathorWallet.changeServer now returns
Promise<void> instead of void, matching the service
facade signature. Added changeServer to IHathorWallet.

* fix: precalculated wallet address derivation bug (#1056)

* feat: single address policy (#1038)

* feat: single address policy

* chore: improve CI integration test logs (#1049)

---------

Co-authored-by: André Abadesso <andre.abadesso@gmail.com>
Co-authored-by: Tulio Miranda <tulio.mir@gmail.com>
Co-authored-by: André Carneiro <andreluizmrcarneiro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Waiting to be deployed

Development

Successfully merging this pull request may close these issues.

3 participants