Skip to content
CAI
Software that uses CAICheck a score

rails/globalid

60.9

Adequate · 20 September 2026

828

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is the GlobalID library, which provides a standardized mechanism for generating, signing, and locating persistent references to domain objects across different contexts. It enables applications to create secure, signed global identifiers with expiration and purpose scoping, while supporting bulk resolution and structured URI encoding for complex model relationships. The library integrates with Rails to handle verification and configuration, ensuring consistent object identification and retrieval.

Features

GlobalID 1.4.0: Signed Global IDs, Locator API, and Fixture Support

This release introduces Signed Global IDs (SGIDs) that support expiration and purpose-based verification to prevent token reuse, along with new locator methods (\locate\_many\, \locate\_many\_signed\, \fetch\) for efficient bulk model resolution and distinct error handling for missing vs. unavailable records. It also adds \GlobalID::FixtureSet\ helpers (\global\_id\, \signed\_global\_id\) for use in Rails fixtures, exposes URL-safe Base64 encoding for GID parameters, and configures default app names and SGID expiration via the Rails Railtie.

_lib/global\id · high confidence

Introduce URI::GID for structured Global ID encoding

Adds a new URI::GID class that encodes Global IDs into a structured URI format (gid://app/model\_name/model\_id) with support for optional query parameters. This allows applications to store simple metadata, such as database identifiers, directly within the Global ID string, and supports composite model IDs delimited by slashes.

_lib/global\id/uri · high confidence

Removals

Removal of ActiveModel GlobalID integration

The ActiveModel integration for GlobalID has been removed. The files defining \ActiveModel::GlobalID\, \ActiveModel::GlobalIdentification\, \ActiveModel::GlobalLocator\, \ActiveModel::SignedGlobalID\, and the associated Railtie have been deleted. This eliminates the ability to generate global IDs, locate models via global IDs, or sign global IDs directly through ActiveModel modules within this library.

_lib/active\model · high confidence

Behavioural changes

GlobalID library restructured with deprecation support and Rails integration

The GlobalID library has been reorganized to support a migration from the previous ActiveModel namespace. A new main entry point (lib/global\_id.rb) defines the GlobalID class with eager loading for core components like Locator, Identification, and Verifier, and introduces a deprecator to warn users about the upcoming 2.1 release. A compatibility shim (lib/globalid.rb) ensures the old require path still works by loading the new library and conditionally loading the Rails Railtie, ensuring existing applications continue to function while preparing for the namespace change.

lib · high confidence

Repository maintenance and documentation overhaul

This update restructures the project's documentation and build configuration. The legacy README.rdoc has been replaced with a comprehensive README.md that details usage, including Signed Global IDs, expiration, purpose scoping, and bulk location via \locate\_many\. A new CONTRIBUTING.md guide has been added to standardize the contribution workflow. On the build side, the Rakefile now requires bundler's gem tasks and enables test warnings, while .gitignore has been updated to exclude Ruby version/gemset files and lock files.

(repo-wide) · high confidence

Test coverage

Added comprehensive test coverage for GlobalID core features; Expanded test fixtures for complex model scenarios; Update test infrastructure and configuration.

Dependencies

Expanded CI matrix with new Rails and Ruby versions

The gemfiles directory now includes dedicated lockfiles for testing against Rails 6.1, 7.0, 7.1, 8.0, and the main development branch, alongside Ruby 3.3 and 3.4. Each file explicitly pins activemodel and railties to the corresponding version (or source branch) and includes railties as a test dependency, ensuring the library is validated against a broader range of Rails environments.

gemfiles · high confidence

GlobalID gem upgraded to 1.4.0 with Rails 8 and Ruby 2.7+ support

The GlobalID gem has been updated to version 1.4.0, raising the minimum required Ruby version to 2.7.0 and the Active Support dependency to 6.1 or higher. This change drops support for older Ruby and Rails versions, aligning the library with modern Rails 8 dependencies (including ActionPack, ActionView, and Railties 8.0.3) and removing the legacy 'activemodel-globalid' gemspec in favor of the unified 'globalid' package.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 61.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 55
  • Readiness 57
  • Security 71

Changes since last survey

  • 300 commits — 272 feature/other, 28 fixes

By area

  • (root) — 109 commits
  • (repo) — 92 commits
  • lib/global_id — 61 commits
  • test/cases — 16 commits
  • .github/workflows — 10 commits
  • test/helper.rb — 5 commits
  • test/models — 3 commits
  • .devcontainer/devcontainer.json — 1 commit
  • gemfiles/rails_4.2.gemfile — 1 commit
  • gemfiles/rails_5.2.gemfile — 1 commit
  • gemfiles/rails_6.0.gemfile — 1 commit

Notable commits

  • fix: Encode model_id using CGI.escape. Fixes #69.
  • fix: Fix ReDoS vulnerability in name parsing
  • fix: Fix cache_format for Rails 8
  • fix: Fix person_gid to person_sgid in README.md [ci skip]
  • fix: Fix ambigous argumeent warning.
  • fix: Fix app not being configured properly when using Railties 4.2.
  • fix: Fix ruby-head support
  • fix: Fix some rounding errors in expiration tests.
  • fix: Fix test
  • fix: Fix test broken by #travel losing subsecond precision.
  • fix: Fixed that purpose should be passed on when using Locator.locate_many_signed(strings, for: 'purpose')
  • fix: Fixes #48. Require bundler's gem tasks in Rakefile.
  • fix: Merge pull request #148 from ooooooo-q/fix/prevent_double_find
  • fix: Merge pull request #180 from duffuniverse/fix-typos-in-readme
  • fix: Merge pull request #193 from alexcwatt/fix-spelling-model
  • fix: Merge pull request #195 from elia/elia/fix-ci
  • fix: Merge pull request #200 from tylerwillingham/twilling/locate-arity-warning-fix
  • fix: Merge pull request #207 from byroot/fix-ci
  • fix: Merge pull request #210 from djmb/fix-fetch-on-models-without-where
  • fix: Merge pull request #55 from kaspth/fix-2.2-params
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rails/globalid 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 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit aac369fde581d6841ae4d2b7322b879ac5e5f8ee — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.