Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Replace vultisig_validator by verifier package#152

Merged
evgensheff merged 3 commits into
mainfrom
replace/vv
Aug 6, 2025
Merged

Replace vultisig_validator by verifier package#152
evgensheff merged 3 commits into
mainfrom
replace/vv

Conversation

@evgensheff

@evgensheff evgensheff commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Updated a core dependency to a newer version.
    • Extended plugin options with a new identifier for enhanced compatibility.

@coderabbitai

coderabbitai Bot commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The changes update the source of the validator used in the API server, switching from an internal package to a shared verifier package. The validator wrapper code is removed from the internal directory, and the go.mod file updates the verifier dependency to a newer version. Additionally, the PostgreSQL schema adds a new enum value for plugin identifiers. No functional or control flow changes are introduced.

Changes

Cohort / File(s) Change Summary
Validator Import Source Update
api/server.go
Changes the import path for the validator from the internal directory to the shared verifier package and updates its alias.
Dependency Update
go.mod
Updates the github.com/vultisig/verifier dependency to a newer version.
Validator Wrapper Removal
internal/vultisig_validator/validator.go
Deletes the internal validator wrapper, removing the VultisigValidator struct and its validation method.
Schema Update
storage/postgres/schema/schema.sql
Adds a new enum value 'vultisig-copytrader-0000' to the plugin_id enum type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A validator hops from place to place,
No longer hidden in a burrowed space.
The code is trimmed, dependencies new,
Cleaner fields for carrots to chew!
A plugin sprouts a fresh new name—
Our project grows, in code and game! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 203ad79 and b2e2c2c.

📒 Files selected for processing (1)
  • storage/postgres/schema/schema.sql (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • storage/postgres/schema/schema.sql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: migration-test
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch replace/vv

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
go.mod (1)

20-23: Consider pinning to a tagged release

Using a pseudo-version ties us to an arbitrary commit. If the verifier repo supports tags, prefer a semantic tag (e.g. vX.Y.Z) to improve reproducibility and allow go get -u to pick up patch releases automatically.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9eafcad and 584f23c.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • api/server.go (1 hunks)
  • go.mod (1 hunks)
  • internal/vultisig_validator/validator.go (0 hunks)
💤 Files with no reviewable changes (1)
  • internal/vultisig_validator/validator.go
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: webpiratt
PR: vultisig/plugin#141
File: plugin/payroll/transaction.go:208-267
Timestamp: 2025-07-24T19:34:47.441Z
Learning: In the vultisig/plugin codebase, duplicate transaction prevention for the payroll plugin has been moved to the verifier side, so the local `IsAlreadyProposed` check in plugin/payroll/transaction.go is no longer needed. The validation flow has changed and is now handled by the verifier rather than within the plugin itself.
Learnt from: RaghavSood
PR: vultisig/plugin#36
File: api/server.go:21-33
Timestamp: 2025-05-07T08:23:45.882Z
Learning: The import path `github.com/vultisig/verifier/plugin` refers to an external dependency that provides the plugin interface, and should not be changed to `github.com/vultisig/plugin/plugin` as these are distinct packages with different purposes.
Learnt from: webpiratt
PR: vultisig/plugin#127
File: internal/keysign/api_emitter.go:12-21
Timestamp: 2025-07-19T11:09:26.190Z
Learning: In the vultisig/plugin codebase, URL formatting and validation for endpoints like the verifier emitter is handled at the configuration level, so additional URL validation in individual functions is not needed.
Learnt from: webpiratt
PR: vultisig/plugin#125
File: plugin/payroll/policy.go:160-160
Timestamp: 2025-07-09T22:23:17.348Z
Learning: In plugin/payroll/policy.go, the "token" case in the checkRule method intentionally does not call validateToken() as this is a temporary implementation that will be replaced with generic schema validation. The missing validation call is expected behavior during this transition period.
📚 Learning: the import path `github.com/vultisig/verifier/plugin` refers to an external dependency that provides...
Learnt from: RaghavSood
PR: vultisig/plugin#36
File: api/server.go:21-33
Timestamp: 2025-05-07T08:23:45.882Z
Learning: The import path `github.com/vultisig/verifier/plugin` refers to an external dependency that provides the plugin interface, and should not be changed to `github.com/vultisig/plugin/plugin` as these are distinct packages with different purposes.

Applied to files:

  • go.mod
📚 Learning: in the vultisig/plugin codebase, duplicate transaction prevention for the payroll plugin has been mo...
Learnt from: webpiratt
PR: vultisig/plugin#141
File: plugin/payroll/transaction.go:208-267
Timestamp: 2025-07-24T19:34:47.441Z
Learning: In the vultisig/plugin codebase, duplicate transaction prevention for the payroll plugin has been moved to the verifier side, so the local `IsAlreadyProposed` check in plugin/payroll/transaction.go is no longer needed. The validation flow has changed and is now handled by the verifier rather than within the plugin itself.

Applied to files:

  • go.mod
📚 Learning: in the vultisig/plugin repository, the team maintains both the main repository and the go-wrappers d...
Learnt from: johnnyluo
PR: vultisig/plugin#108
File: Dockerfile.Payroll.server:14-19
Timestamp: 2025-07-02T04:55:36.331Z
Learning: In the vultisig/plugin repository, the team maintains both the main repository and the go-wrappers dependency repository, so they are comfortable downloading from the master branch rather than pinning to specific commits.

Applied to files:

  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
go.mod (1)

22-22: Verify compatibility with the new verifier pseudo-version
Our automated run hit build-constraint warnings for the go-wrappers session packages and didn’t produce clear go test or go mod tidy results. Please manually confirm that:

  • All tests pass:
    go test ./...
  • The module graph is clean:
    go mod tidy && git diff --exit-code go.mod go.sum
api/server.go (2)

90-90: LGTM – validator wired through Echo correctly

The Echo validator is now instantiated from the shared verifier package; the struct literal matches the external type’s exported Validator field. No further action needed.


18-21: No stale imports of the old validator path remain
I ran rg --line-number --no-heading 'internal/vultisig_validator' across the repository and found no occurrences.
No further action is needed.

webpiratt
webpiratt previously approved these changes Aug 5, 2025
webpiratt
webpiratt previously approved these changes Aug 6, 2025
@evgensheff
evgensheff merged commit 60df06a into main Aug 6, 2025
3 checks passed
@evgensheff
evgensheff deleted the replace/vv branch August 6, 2025 11:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants