neo4jrb/activegraph
56.1
Adequate · 6 November 2026
9.7k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
Added bin/rake binstub
A new binstub for the Rake command-line tool has been added to the bin directory. This file facilitates running Rake as part of the local bundle, ensuring that the correct version of the gem is used by setting up the Bundler environment and loading the executable from the installed gem.
bin · high confidence
New Rails generators for models, migrations, and schema upgrades
Active Graph now provides built-in Rails generators to scaffold application components. Users can generate model files with configurable properties, relationships (has\_one/has\_many), indices, and timestamps, along with corresponding Neo4j migration files that handle UUID constraints. A dedicated generator is also included to create migration scripts for upgrading the database schema from version 8, automating the addition and removal of indexes and constraints based on the current model definitions.
lib/rails · high confidence
Behavioural changes
ActiveGraph 12.0.0 release with native driver and transaction support
ActiveGraph has been updated to version 12.0.0, introducing a native driver implementation that replaces the previous driver layer. This change brings explicit session and transaction management capabilities, allowing users to use \write\_transaction\, \read\_transaction\, and \session\ methods for better control over database operations. The release also includes a new ANSI module for colored console output, a refactored \AttributeSet\ class for handling model attributes, and updated migration helpers for managing ID properties and relationship styles. Additionally, the library now supports UUID generation with proper UTF-8 encoding and includes a new \Paginated\ class for handling query results.
_lib/active\graph · high confidence
ActiveGraph 12.0.0 release with native driver and transaction support
ActiveGraph has been updated to version 12.0.0, introducing a native driver implementation that replaces the previous driver layer. This change brings explicit session and transaction management capabilities, allowing users to use \write\_transaction\, \read\_transaction\, and \session\ methods for better control over database operations. The release also includes a new ANSI module for colored console output, a refactored \AttributeSet\ class for handling model attributes, and updated migration helpers for managing ID properties and relationship styles. Additionally, the library now supports UUID generation with proper UTF-8 encoding and includes a new \Paginated\ class for handling query results. Also in this area: ActiveGraph core library restructured with new Cypher error handling and schema management.
activegraph · high confidence
ActiveGraph core library restructured with new Cypher error handling and schema management
The core library has been reorganized into a new modular structure, introducing dedicated classes for Cypher error handling (CypherError and specific schema errors like ConstraintValidationFailedError) to provide detailed error codes and stack traces. Schema management is now handled through a new Element base class and its Label and Type subclasses, which implement methods for creating and dropping indexes and constraints using Neo4j's native Cypher commands. The query execution layer has been refactored with new modules for instrumentation (Instrumentable) and logging (Logging), integrating with ActiveSupport::Notifications to capture Bolt request and Cypher query events. Additionally, the library now includes native Result and Record wrappers to handle data wrapping and streaming, and a new Schema module to introspect database version, edition, and existing indexes/constraints.
_lib/active\graph/core · high confidence
Adopts Conventional Commits and git-cliff for automated changelog generation
The project now enforces Conventional Commits for all new commits and PR titles, with a new \rake changelog\ task that automatically generates the \\[Unreleased\]\ section of \CHANGELOG.md\ using \git-cliff\. This replaces the previous manual changelog maintenance, ensuring that only user-facing changes (features, fixes, performance improvements) are included in the release notes while excluding internal chores, CI, docs, and refactors. The configuration is defined in \cliff.toml\ and integrated into the development workflow via \CLAUDE.md\ conventions.
(repo-wide) · high confidence
Library renamed from Neo4j to ActiveGraph with new driver integration
The library has been renamed from Neo4j to ActiveGraph, replacing the legacy JRuby-based implementation in lib/main.rb with a new Ruby-native driver integration in lib/active\_graph.rb. This change updates the core module structure to use the neo4j-ruby-driver, prepending ActiveGraph modules to the driver's Result, Record, Transaction, and Entity classes to provide native Ruby object wrapping and behavior.
lib · high confidence
New ActiveGraph migration system with transaction control and schema synchronization
The library introduces a new migration framework under the \ActiveGraph::Migrations\ namespace, replacing the previous implementation. This new system provides a \Base\ migration class that supports optional transaction wrapping (with a \disable\_transactions!\ helper for operations that cannot run in transactions, such as schema modifications) and tracks migration status via a \SchemaMigration\ node. It includes a \Runner\ for executing pending migrations, handling incomplete states, and reporting status, as well as a \CheckPending\ middleware for development environments. Additionally, a \Schema\ helper module is added to synchronize database constraints and indexes between the application definition and the database, ensuring schema consistency.
_lib/active\graph/migrations · high confidence
New migration rake tasks and schema load compatibility fix
This change introduces a new \lib/active\_graph/tasks/migration.rake\ file that provides Rake tasks for managing database migrations, including \neo4j:migrate:all\, \up\, \down\, \status\, \rollback\, and \resolve\, as well as schema dump and load operations. It also updates the \neo4j:schema:load\ task to handle compatibility with Psych version 4.0.1 and later by using \YAML.safe\_load\ with \permitted\_classes: \[Symbol\]\, ensuring schema files load correctly on newer Ruby versions.
_lib/active\graph/tasks · high confidence
Refactor to ActiveGraph shared modules
The library has been refactored to use the ActiveGraph namespace, consolidating core model behaviors into shared modules. This change introduces dedicated modules for managing attributes, callbacks, Cypher query generation, and property declarations, while also adding support for enums, mass assignment, and relationship-specific type converters. These shared components provide the foundational behavior for nodes and relationships within the ActiveGraph framework.
_lib/active\graph/shared · high confidence
Refactored node architecture with modular components and UUID support
The node implementation has been restructured into a modular set of files (callbacks, dependent handling, enums, has\_n associations, id properties, persistence, etc.) to improve maintainability. A key behavioral change is the introduction of the \id\_property\ feature, allowing models to use custom identifiers (such as auto-generated UUIDs) instead of the default Neo4j internal ID, which also updates how records are found and indexed. Additionally, the \has\_n\ association logic has been refined with dedicated modules for dependent actions (delete, destroy, orphans) and relationship factory/wrapper classes, ensuring more robust handling of cascading deletes and relationship creation.
_lib/active\graph/node · high confidence
Relationship persistence and querying behavior updated for ActiveGraph
The relationship module has been refactored to improve persistence reliability and query clarity. Saving a relationship now strictly requires both \from\_node\ and \to\_node\ to be valid node objects, raising a \RelInvalidError\ if this precondition is not met. The \find\ method on relationship classes now accepts a standard \id\ (mapped to the \neo\_id\ property) rather than the legacy \neo\_id\ argument, and queries use the relationship's mapped element name for precise matching. Additionally, a new \RelatedNode\ wrapper enables lazy loading of associated nodes, ensuring that relationship queries do not trigger unnecessary database loads for node data until explicitly accessed.
_lib/active\graph/relationship · high confidence
Test coverage
Added custom RSpec matcher for validating model errors; Added end-to-end test suite for ActiveGraph core features; Added end-to-end tests for model and migration generators; Added integration tests for node label management and querying; Added integration tests for the ActiveGraph ORM adapter; Added integration tests for type converters; Added shared examples for schema operation interface; Added shared test suites for model lifecycle and behavior; Added test coverage for ActiveGraph base queries and transaction handling; Added test suite for ActiveGraph core and relationship persistence; Added tests for the shared QueryFactory; Added unit tests for ActiveGraph Node module components; Added unit tests for ActiveGraph core components; Added unit tests for HasN association wrappers and Cypher generation; Added unit tests for migration helpers and schema synchronization; Added unit tests for query parameter handling and proxy iteration; Added unit tests for relationship modules; Added unit tests for schema operation classes; Added unit tests for shared ActiveGraph property and attribute modules.
Dependencies
Initial gemspec and Gemfile for ActiveGraph
The project now includes an \activegraph.gemspec\ and a \Gemfile\ to define its structure and dependencies. The gem requires Ruby 3.4 or higher and declares runtime dependencies on \activemodel\, \benchmark\, \i18n\ (excluding version 1.8.8), \neo4j-ruby-driver\ (version 6.2.1), and \orm\_adapter\ (version 0.5.0 or higher). Development dependencies include testing tools like RSpec, Guard, Rubocop, and coverage reporters, as well as \railties\ for Rails integration testing.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 53 → 56 (+2.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 65 → 65 (+0.0)
- Architecture 85 → 83 (-1.4)
- Maturity 40 → 49 (+9.1)
- Readiness 60 → 60 (+0.0)
- Security 71 → 59 (-11.7)
Resolved (10)
- Both length and size are defined on AssociationProxy. In Ruby/ActiveRecord conventions, these often have different performance characteristics (count vs size), but without documentation, they appear as redundant aliases.
- Constraint management APIs are inconsistent. Element methods use create_constraint/drop_constraint with minimal args. Migration Helpers use add_constraint/drop_constraint with many more args including name and relationship. drop_uniqueness_constraint is a specific variant on Element that doesn't have a clear counterpart in Helpers (which use a generic drop_constraint).
- Documentation: no installation or build instructions (docs/index.rst)
- Documentation: no project overview (docs/README.md)
- Documentation: no usage examples (docs/index.rst)
- Duplicate definition of pretty_cypher as both a Property and a Method in ActiveGraph.Core.Query. This is redundant and potentially confusing for consumers expecting one or the other.
- Inconsistent indexing API across Element, Migration Helpers, and ModelSchema. Element uses create_index/drop_index with properties (plural) or property (singular). Migration Helpers use add_index/drop_index with explicit label and property. ModelSchema uses add_defined_index. The parameter names and object contexts differ significantly for the same underlying Neo4j operation.
- Inconsistent pluralization in helper methods. add_label vs add_labels, remove_label vs remove_labels. While this allows for single vs multiple operations, it creates a fragmented API surface where the user must choose the correct verb based on arity, which is error-prone.
- Multiple distinct entry points for executing Cypher queries with inconsistent naming and likely inconsistent argument handling. 'query' is used in Base, Helpers, and Migration, while 'magic_query' exists in Base. QueryBuilder also exposes 'query'. This creates confusion about which method to use for ad-hoc queries versus model-bound queries.
- Two methods with nearly identical names and likely identical intent (has_association? vs association?) on the same class. This is a direct duplication.
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 6 commits — 4 feature/other, 2 fixes
By area
- (root) — 6 commits
Notable commits
- fix: fix(type_converters): make JSON properties work with json >= 3.0 (#1748)
- fix: fix: update 'neo4j-ruby-driver' version to 6.3.0 (#1747)
- change: chore(release): ignore untracked files in the dirty-tree check (#1751)
- change: chore(release): one-command rake release (#1750)
- change: chore(release): v12.0.1
- change: chore: gitignore stray .mvn/ directory (#1746)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
neo4jrb/activegraph was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 51b2e983028c7ecbe5ca6a46d9a3e3ee7a813d43 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.