Skip to content

Conversation

@ice-dionysos
Copy link
Contributor

No description provided.

@ice-dionysos ice-dionysos self-assigned this Feb 6, 2026
@ice-dionysos ice-dionysos requested a review from a team as a code owner February 6, 2026 15:04
Copilot AI review requested due to automatic review settings February 6, 2026 15:04
@ice-ares ice-ares merged commit 222375d into master Feb 6, 2026
7 of 8 checks passed
@ice-ares ice-ares deleted the fix_validator branch February 6, 2026 15:06
Copy link
Contributor

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 modifies validation rules for tokenized community actions and updates the expired events cleanup query along with several dependency version bumps. The changes aim to make certain validation fields optional temporarily while improving the database cleanup process.

Changes:

  • Made "k" and "token_symbol" fields optional for CustomIONKindTokenizedCommunityAction validation (with a TODO to make them required later)
  • Enhanced deleteExpiredEvents query to filter out hidden and deleted events, changed DELETE syntax to use USING clause, and added ordering by lookup_created_at
  • Updated multiple Go dependencies including google.golang.org/api, google.golang.org/genproto packages, github.com/dundee/gdu/v5, github.com/dgraph-io/badger/v4, and github.com/googleapis/gax-go/v2

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
validation/validate.go Made "k" and "token_symbol" optional fields for tokenized community action validation instead of required
database/query/query.go Modified expired events cleanup to exclude hidden/deleted events, improved DELETE syntax, added ordering, and enhanced context cancellation handling
go.mod Updated direct and indirect dependency versions for gdu, genproto, googleapis/gax-go, dgraph-io/badger, and google.golang.org/api
go.sum Corresponding checksum updates for all modified dependencies
Comments suppressed due to low confidence (3)

go.mod:338

  • The version timestamps show a date of 2026-02-03, which is in the future. These appear to be pseudo-versions with incorrect dates. Pseudo-versions should follow the format v0.0.0-yyyymmddhhmmss-abcdefabcdef where the timestamp represents when the commit was made. Future dates could cause issues with Go module versioning and caching. Please verify these are the correct commit hashes and regenerate the pseudo-versions with the actual commit timestamps.
	google.golang.org/genproto v0.0.0-20260203192932-546029d2fa20 // indirect
	google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
	google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect

database/query/query.go:126

  • Off-by-one index comparison against length may lead to out-of-bounds read.
				if len(tag) >= 3 && tag[3] != "" {

database/query/query.go:126

  • Off-by-one index comparison against length may lead to out-of-bounds read.
    Off-by-one index comparison against length may lead to out-of-bounds read.
				if len(tag) >= 3 && tag[3] != "" {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

if len(events) < batchSize {
if len(events) < batchSize || ctx.Err() != nil {
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The context cancellation check ctx.Err() != nil on this line is redundant. The loop condition on line 1388 already checks ctx.Err() == nil, and there's another context cancellation check in the select statement at lines 1405-1407. If the context is cancelled, the loop will exit on the next iteration due to the loop condition. This redundant check adds unnecessary complexity without providing additional benefit.

Suggested change
if len(events) < batchSize || ctx.Err() != nil {
if len(events) < batchSize {

Copilot uses AI. Check for mistakes.
Comment on lines +1365 to +1366
and hidden = false
and deleted = false
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The new filtering conditions hidden = false AND deleted = false change the behavior of expired event cleanup by excluding hidden and deleted events from being deleted based on expiration. This means that events marked as hidden or deleted will persist even if they have expired, which could lead to accumulation of expired events that were previously marked for deletion. If this is intentional to prevent double-processing of already-deleted events, this should be documented. Otherwise, this could lead to a buildup of expired events in the database that were marked as hidden or deleted but never actually removed.

Suggested change
and hidden = false
and deleted = false

Copilot uses AI. Check for mistakes.
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.

2 participants