Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented Aug 4, 2025

Prevent messages from depending on non-commit nodes by adding validation in Service.validateClientInfo method to reject node IDs ≥ 100

The Service.validateClientInfo method in service.go now validates that messages cannot depend on node IDs ≥ 100, which represent non-commits, returning an error message "A message can not depend on a non-commit" when such dependencies are detected. A new test TestPublishEnvelolopeDependsOnOriginator has been added to publish_test.go to verify this validation behavior, and an existing test has been updated to use node ID 97 instead of 1600.

📍Where to Start

Start with the validateClientInfo method in the Service struct in service.go to understand the new validation logic for non-commit dependencies.


Macroscope summarized 851c9f3.

@mkysel mkysel requested a review from a team as a code owner August 4, 2025 23:41
@graphite-app
Copy link

graphite-app bot commented Aug 4, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

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

Straightforward way to prevent trouble

@mkysel mkysel merged commit 3e2469f into main Aug 5, 2025
10 checks passed
@mkysel mkysel deleted the mkysel/no-non-commits branch August 5, 2025 00:30
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