Side B fixes a runtime bug by defining `GITHUB_API_BASE_URL` with a sensible default, preventing a `NameError` during the GitHub OAuth callback when the API base URL was otherwise undefined. Side A improves test maintenance by replacing manually enumerated `:ns-patterns` with a single auto-discovered `^test\..+` suite, reducing future configuration work, but it primarily streamlines test configuration rather than correcting application behavior.
constitution · epochs · watch · epoch 3
c_28dfd8015c8a (tommy-mor) vs c_4ed2e2cca39b (tommy-mor)
download prompt · raw event · cmp_fef83acd41fe26
council reasoning
Side B fixes a runtime NameError by defining GITHUB_API_BASE_URL with a sensible default, restoring the GitHub OAuth callback’s functionality. Side A improves test configuration by replacing hardcoded namespace lists with a catch-all pattern, reducing maintenance, but it doesn’t fix a breaking issue.
Side B fixes a concrete runtime error by defining `GITHUB_API_BASE_URL` with a default and `.rstrip("/")`, resolving a NameError in the GitHub OAuth callback path. Side A improves test maintainability by replacing hand-enumerated suites with a single auto-discovered `:all` suite, but it’s a configuration refactor rather than a direct functional bugfix impacting production behavior.
B fixes an actual runtime bug (NameError crashing the OAuth callback) by defining the missing GITHUB_API_BASE_URL constant, providing immediate functional correctness. A is a reasonable test-config simplification that reduces maintenance friction but carries risk of silently picking up unintended test.* namespaces and isn't fixing a live defect.
B fixes a real NameError by defining the missing GITHUB_API_BASE_URL used in the OAuth path, restoring correct runtime behavior. A is a worthwhile tests.edn simplification (auto-discover vs hand-enumerated suites) but is tooling ergonomics, not a production correctness fix.
sides
A — c_28dfd8015c8a (tommy-mor)
message
[0bebe819] Unify kaocha test discovery to one auto-discovered suite. Replace the two hand-enumerated suites (:http-integration, :browser) with a single :all suite that picks up every test.* namespace under test/. New test files now run automatically without touching tests.edn — needed for the test.ranking namespace added alongside the #146 fix, and for any future tests. Both ./TEST.sh and CI (.github/workflows/ci.yml) invoke `clojure -M:kaocha`, so both pick up the new suite without changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
diff preview
diff --git a/tests.edn b/tests.edn
index 5e2b0433a66c51806d08ef38d691259cfccd1fe0..e51ffcc81eeae6f41c85d1bfc5ba32f592cc5818 100644
--- a/tests.edn
+++ b/tests.edn
@@ -1,30 +1,14 @@
#kaocha/v1
-{:tests
- [{:id :http-integration
- :test-paths ["test"]
- :source-paths ["."]
- :ns-patterns ["^test\\.integration$"
- "^test\\.auth$"
- "^test\\.grants$"
- "^test\\.invites$"
- "^test\\.room-list$"]
- :kaocha.filter/skip-meta [:skip]
- :parallel? false}
- {:id :browser
- :test-paths ["test"]
- :source-paths ["."]
- :ns-patterns ["^test\\.browser-sse$"
- "^test\\.browser-ui-morph$"
- "^test\\.browser-post-redact$"
- "^test\\.browser-room-delete$"
- "^test\\.browser-public-garden$"
- "^test\\.browser-redact-thread-index$"
- "^test\\.browser-garden-pin$"
- "^test\\.browser-vote-compare$"
- "^test\\.browser-github-resolver$"]
- :kaocha.filter/skip-meta [:skip]
- :parallel? false}]
- :plugins [:kaocha.plugin/junit-xml]
- :kaocha.plugin.junit-xml/target-file "target/kaocha-junit.xml"
- :kaocha.plugin.junit-xml/add-location-metadata? true
- :reporter kaocha.report.progress/report}
+ {:tests
+ [{:id :all
+ :test-paths ["test"]
+ :source-paths ["."]
+ ;; Pick up every test.* namespace under test/. New files don't need to be
+ ;; enumerated here — drop them in test/ with `(ns test.foo …)` and they run.
+ :ns-patterns ["^test\\..+"]
+ :kaocha.filter/skip-meta [:skip]
+ :parallel? false}]
+ :plugins [:kaocha.plugin/junit-xml]
+ :kaocha.plugin.junit-xml/target-file "target/kaocha-junit.xml"
+ :kaocha.plugin.junit-xml/add-location-metadata? true
+ :reporter kaocha.report.progress/report}
B — c_4ed2e2cca39b (tommy-mor)
message
[0d3270d1] Fix GitHub OAuth callback NameError on missing API base URL. Co-authored-by: Cursor <cursoragent@cursor.com>
diff preview
diff --git a/constitution.py b/constitution.py
index f819007252f435680b8356fb4da83469b21e33af..4dd5b9dfbba231d46289c490f91b1dd5b1018bcf 100644
--- a/constitution.py
+++ b/constitution.py
@@ -119,6 +119,9 @@ JSONL_PATH = pathlib.Path(os.environ.get("JSONL_PATH", "/data/ledger.jsonl"))
GITHUB_CLIENT_ID = os.environ.get("GITHUB_CLIENT_ID", "")
GITHUB_CLIENT_SECRET = os.environ.get("GITHUB_CLIENT_SECRET", "")
+GITHUB_API_BASE_URL = os.environ.get(
+ "GITHUB_API_BASE_URL", "https://api.github.com"
+).rstrip("/")
OPENROUTER_API_KEY = os.environ.get("OPENROUTER_API_KEY", "")
OPENROUTER_BASE_URL = os.environ.get("OPENROUTER_BASE_URL", "https://openrouter.ai").rstrip("/")
Hardlinks — judgments / attempts / prompt
judgments
- openai/gpt-chat-latest: B (3:2)
- openai/gpt-5.3-chat: B (3:2)
- openai/gpt-5.2-chat: B (3:2)
- ~anthropic/claude-sonnet-latest: B (6:4)
- ~x-ai/grok-latest: B (2:3)
attempts
- openai/gpt-chat-latest #1
- openai/gpt-5.3-chat #1
- openai/gpt-5.2-chat #1
- ~anthropic/claude-sonnet-latest #1
- ~x-ai/grok-latest #1
Prompt text is loaded only by the download route.