Skip to content

Conversation

@pinebit
Copy link
Collaborator

@pinebit pinebit commented Oct 23, 2025

remaining packages errors revamp with claude.

category: refactor
ticket: #3882

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors error messages across remaining packages to follow a consistent style guideline: removing conversational prefixes like "cannot", "can't", "couldn't", "doesn't" and rephrasing messages to be more concise and direct. The changes standardize error messages to use imperative mood without unnecessary prefixes and clarify configuration requirements.

  • Simplified error message phrasing by removing conversational language
  • Standardized flag-related error messages to use consistent format
  • Improved clarity of verification and validation error messages

Reviewed Changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testutil/obolapimock/obolapi_exit.go Simplified JSON marshaling error message
testutil/genchangelog/main.go Removed "can't" prefix from tag parsing errors
testutil/compose/define.go Reworded environment variable error for clarity
testutil/compose/auto.go Changed "couldn't" to "could not" in alert polling error
dkg/protocol.go Standardized verification error messages
dkg/exchanger.go Simplified context error message
dkg/dkg_internal_test.go Standardized keymanager flag error messages in tests
dkg/dkg.go Updated keymanager and test flag error messages
dkg/disk_internal_test.go Changed "doesn't" to "does not" for consistency
dkg/disk.go Standardized directory and verification error messages
dkg/bcast/impl.go Simplified signature verification error
cmd/testmev_internal_test.go Standardized beacon node endpoint error in test
cmd/testmev.go Updated beacon node and load test flag error messages
cmd/testbeacon.go Clarified POST request error message
cmd/run_internal_test.go Simplified nickname length error in test
cmd/run.go Updated nickname validation error message
cmd/relay/relay.go Removed "failed to" prefix from conversion errors
cmd/manifest_tools.go Simplified verification error messages
cmd/edit_removeoperators_internal_test.go Updated private key load error in test
cmd/edit_recreateprivatekeys_internal_test.go Simplified validator keys directory error in test
cmd/edit_recreateprivatekeys.go Updated validator keys directory validation error
cmd/edit_addvalidators_internal_test.go Standardized validation error messages in tests
cmd/edit_addvalidators.go Updated num-validators and validator keys validation errors
cmd/createdkg_internal_test.go Simplified threshold validation errors in tests
cmd/createdkg.go Updated threshold validation error messages
cmd/createcluster_internal_test.go Standardized flag conflict and validation errors in tests
cmd/createcluster.go Updated threshold, keymanager, and validation error messages
cmd/combine/combine.go Removed "cannot"/"can't" prefixes from file operation errors
cluster/manifest/load_test.go Changed "don't match" to "mismatch" for consistency
cluster/manifest/load.go Simplified manifest loading and hash comparison errors
cluster/lock.go Clarified signature verification error message
cluster/helpers_internal_test.go Updated directory validation error in test
cluster/helpers.go Simplified non-empty directory error
cluster/definition.go Removed "the" prefix and standardized version support errors
CLAUDE.md Added knowledge base section with documentation links

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 40.67797% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.79%. Comparing base (8ad288b) to head (02ccc1e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/combine/combine.go 23.07% 10 Missing ⚠️
cluster/definition.go 0.00% 4 Missing ⚠️
cmd/relay/relay.go 0.00% 3 Missing ⚠️
dkg/protocol.go 0.00% 3 Missing ⚠️
cluster/manifest/load.go 33.33% 2 Missing ⚠️
cmd/createcluster.go 71.42% 2 Missing ⚠️
cmd/manifest_tools.go 0.00% 2 Missing ⚠️
dkg/disk.go 60.00% 2 Missing ⚠️
cluster/lock.go 0.00% 1 Missing ⚠️
cmd/edit_addvalidators.go 66.66% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4050      +/-   ##
==========================================
+ Coverage   53.81%   54.79%   +0.97%     
==========================================
  Files         242      242              
  Lines       39425    31040    -8385     
==========================================
- Hits        21217    17007    -4210     
+ Misses      15965    11793    -4172     
+ Partials     2243     2240       -3     

☔ 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.


if resp.StatusCode/100 != 2 {
return 0, errors.New("post failed", z.Int("status", resp.StatusCode))
return 0, errors.New("post request failed", z.Int("status", resp.StatusCode))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return 0, errors.New("post request failed", z.Int("status", resp.StatusCode))
return 0, errors.New("POST request failed", z.Int("status", resp.StatusCode))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cannot start error with capital letter, we have this rule in the pre-commit

@sonarqubecloud
Copy link

@pinebit pinebit added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 23, 2025
@obol-bulldozer obol-bulldozer bot merged commit 7e84819 into main Oct 23, 2025
11 checks passed
@obol-bulldozer obol-bulldozer bot deleted the pinebit/remaining-errors-revamp branch October 23, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge when ready Indicates bulldozer bot may merge when all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants