Skip to content

Answer under the Agentry name, keep browser's names until 5.0 - #69

Merged
czj merged 9 commits into
mainfrom
own-agentry-namespace
Nov 22, 2026
Merged

czj merged 9 commits into
mainfrom
own-agentry-namespace

Conversation

@czj

@czj czj commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Agentry still lives under browser's name: require "browser", the Browser constant, the browser helper. Apps can't tell from their code which gem they run, and the name ties Agentry to a gem it has outgrown.

Agentry now answers under its own name: require "agentry", Agentry.new, Agentry::Bot, the agentry helper, config.agentry. Until 5.0, browser's names keep working through the browser/* require paths, each one warning once under RUBYOPT=-W:deprecated. A new migration page on the site walks humans through the switch and gives a prompt for coding agents.

  • Breaking for 4.0: a bare require "agentry" no longer defines Browser. Apps that call Browser write gem "agentry", require: "browser" (or keep require: "browser/browser").
  • Old names kept: browser, browser/browser, browser/aliases, browser/testing, browser/rails, the browser helper, browser in a middleware block, config.browser, and @browser (silent, the guide lists it). Other browser/* files (browser/middleware…) are gone.
  • No shared bundle yet: Agentry 4 ships the same lib/browser* files as the browser gem, so it can't sit next to it; 5.0 drops them.
  • Upstream tests unmodified: browser's suite still calls Browser, through the shim; our tests call Agentry.
  • Middleware URL options: Middleware url helpers honour config.browser.default_url_options #68 (the fix for config.agentry.default_url_options is ignored by url helpers in middleware blocks #67) is merged in and reads config.agentry.
Proof
  • bundle exec rake test: 683 runs, 0 failures; rubocop clean; rake docs:render:check docs:highlight:check clean.
  • Corpus diff against browser dd88933: 20,328 user agents, 2,592 differences, all expected (the namespace prefix is stripped in script/corpus_snapshot.rb).
  • Fresh-process tests: require "agentry" defines no Browser and prints nothing; each agentry/* entry point works alone; each kept browser/* path defines Browser == Agentry with exactly one deprecation linking the migration guide, and stays silent under -W:no-deprecated.
  • The migration grep uses git grep -P: -E ignores \b on macOS and found no Browser call.

czj added 4 commits November 21, 2026 14:05
…ases

Assisted-by: Claude Opus 5.5 [Claude Code]
…arns, standalone entry points

Assisted-by: Claude Opus 5.5 [Claude Code]
…fe deprecations

Assisted-by: Claude Opus 5.5 [Claude Code]
…test the -W0 guard

Assisted-by: Claude Opus 5.5 [Claude Code]
Comment thread test/agentry_rails_test.rb Fixed
czj added 4 commits November 22, 2026 14:35
…from agentry, wider leftover grep

Assisted-by: Claude Opus 5.5 [Claude Code]
… migration grep

Assisted-by: Claude Opus 5.5 [Claude Code]
Carries #68 into lib/agentry: prepend UrlMethods, the action_mailer guard, config.agentry.

Assisted-by: Claude Opus 5.5 [Claude Code]
…3 breaks

Assisted-by: Claude Opus 5.5 [Claude Code]
@czj
czj enabled auto-merge (squash) November 22, 2026 14:07
Assisted-by: Claude Opus 5.5 [Claude Code]
auto-merge was automatically disabled November 22, 2026 21:01

Pull Request is not mergeable

@czj
czj merged commit e273346 into main Nov 22, 2026
18 of 19 checks passed
@czj
czj deleted the own-agentry-namespace branch November 22, 2026 21:53
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