Set lib on the load path at the entry point, not in app.rb
Move the load-path setup out of app.rb (a library file shouldn't mutate
$LOAD_PATH) and into config.ru, which both puma and `rake dev` load.
`rake test` already runs with lib/ on the path, so CI is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N92HLTepkg3AtRpDUyZ54o
change
commit 68502f437947c79dd37d04bba0581c5939bfcf9e
author Claude <noreply@anthropic.com>
date
parent 4f95cf0f
diff --git a/config.ru b/config.ru
index 672db98..042a8ea 100644
--- a/config.ru
+++ b/config.ru
@@ -1,3 +1,8 @@
+# Put lib/ on the load path so Sequel can load our dataset extensions by name
+# (e.g. db.extension(:sole) -> require "sequel/extensions/sole"). `rake test`
+# already adds lib/ for the test run.
+$LOAD_PATH.unshift(File.expand_path("lib", __dir__))
+
 require_relative "lib/app"
 require_relative "lib/web"
 require "sequel/extensions/migration"
diff --git a/lib/app.rb b/lib/app.rb
index 1f6c224..59b1247 100644
--- a/lib/app.rb
+++ b/lib/app.rb
@@ -3,10 +3,6 @@
 require "sequel"
 require_relative "config"
 
-# Put lib/ on the load path so Sequel can find our dataset extensions by name
-# (e.g. db.extension(:sole) requires "sequel/extensions/sole").
-$LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
-
 module Domus
   class App
     attr_reader :config, :db