Skip to content

Add integrity check for owner relationships#592

Merged
vinistock merged 1 commit intomainfrom
02-23-add_integrity_check_for_owner_relationships
Mar 4, 2026
Merged

Add integrity check for owner relationships#592
vinistock merged 1 commit intomainfrom
02-23-add_integrity_check_for_owner_relationships

Conversation

@vinistock
Copy link
Member

@vinistock vinistock commented Feb 23, 2026

Note: this PR starts running resolution on our top 100 gems check, which fails until #505 is shipped.

This PR adds an integrity check back, so that we can perform more expensive validation of the graph to catch bugs early.

This first iteration only validates ownership relations. The implemented rules are:

  • Only Object and BasicObject can own themselves
  • All owners are namespaces
  • All singleton classes are eventually attached to a namespace that isn't a singleton class (which would create infinite recursion in certain parts of the algorithms)

I exposed this API to Ruby, so that we can start running it against the top 100 gems.

@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 38141a5 to e688ae1 Compare February 23, 2026 21:18
@vinistock vinistock self-assigned this Feb 23, 2026
@vinistock vinistock marked this pull request as ready for review February 23, 2026 21:20
@vinistock vinistock requested a review from a team as a code owner February 23, 2026 21:20
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from e688ae1 to bb35710 Compare February 27, 2026 18:14
@vinistock vinistock force-pushed the 01-12-remove_temporary_constant_skips_in_resolution branch from 4c602d8 to 4d2f41e Compare February 27, 2026 18:14
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch 3 times, most recently from c7c5135 to 8d0687a Compare February 27, 2026 20:38
@vinistock vinistock force-pushed the 01-12-remove_temporary_constant_skips_in_resolution branch from 4d2f41e to 5666886 Compare February 27, 2026 20:38
@vinistock vinistock requested review from Morriar and st0012 February 27, 2026 20:42
Base automatically changed from 01-12-remove_temporary_constant_skips_in_resolution to main February 27, 2026 20:42
@vinistock vinistock changed the base branch from main to graphite-base/592 March 2, 2026 19:04
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 8d0687a to 5496a9d Compare March 2, 2026 19:04
@vinistock vinistock changed the base branch from graphite-base/592 to 03-02-avoid_creating_singleton_classes_for_non-namespace_targets March 2, 2026 19:04
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 5496a9d to f0e9c0a Compare March 2, 2026 19:12
@vinistock vinistock force-pushed the 03-02-avoid_creating_singleton_classes_for_non-namespace_targets branch from 9431446 to 8f9a3c1 Compare March 2, 2026 19:12
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from f0e9c0a to 298bde0 Compare March 2, 2026 19:37
@vinistock vinistock requested a review from st0012 March 2, 2026 19:37
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

We should rename error.rb as well. Otherwise looks good

@vinistock vinistock force-pushed the 03-02-avoid_creating_singleton_classes_for_non-namespace_targets branch from 8f9a3c1 to 2d6e58d Compare March 2, 2026 19:59
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 298bde0 to 9989cff Compare March 2, 2026 19:59
@vinistock vinistock force-pushed the 03-02-avoid_creating_singleton_classes_for_non-namespace_targets branch from 2d6e58d to aecab13 Compare March 4, 2026 14:49
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 9989cff to 8790ac3 Compare March 4, 2026 14:49
@vinistock vinistock force-pushed the 03-02-avoid_creating_singleton_classes_for_non-namespace_targets branch from aecab13 to 383aa1e Compare March 4, 2026 20:45
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 8790ac3 to 6863542 Compare March 4, 2026 20:45
@vinistock vinistock force-pushed the 03-02-avoid_creating_singleton_classes_for_non-namespace_targets branch 2 times, most recently from da688ab to 25ac4f0 Compare March 4, 2026 20:55
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 6863542 to eb1ad09 Compare March 4, 2026 20:55
@vinistock vinistock changed the base branch from 03-02-avoid_creating_singleton_classes_for_non-namespace_targets to graphite-base/592 March 4, 2026 21:05
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from eb1ad09 to 710ee51 Compare March 4, 2026 21:05
@graphite-app graphite-app bot changed the base branch from graphite-base/592 to main March 4, 2026 21:05
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 710ee51 to 520bf5c Compare March 4, 2026 21:05
@vinistock vinistock force-pushed the 02-23-add_integrity_check_for_owner_relationships branch from 520bf5c to e2b9d62 Compare March 4, 2026 21:07
@vinistock vinistock merged commit 4265bc7 into main Mar 4, 2026
36 of 37 checks passed
Copy link
Member Author

Merge activity

@vinistock vinistock deleted the 02-23-add_integrity_check_for_owner_relationships branch March 4, 2026 21:15
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.

4 participants