Skip to content

feat!: require Monarch session cookie auth - #96

Merged
eshaffer321 merged 1 commit into
mainfrom
feat/monarch-cookie-auth
Sep 24, 2026
Merged

eshaffer321 merged 1 commit into
mainfrom
feat/monarch-cookie-auth

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

Summary

Monarch no longer accepts the legacy bearer token, so MONARCH_TOKEN stopped working. This switches itemize to cookie-based auth.

  • Bump monarch-go to v2.1.0 (adds NewClientWithCookie)
  • MONARCH_COOKIE / monarch.cookie is now required; MONARCH_TOKEN / monarch.api_key are removed
  • Startup fails fast with a clear error when the cookie is missing (instead of failing on the first Monarch call)
  • README, AGENTS.md, config.yaml, and CLI help updated with instructions for copying the cookie from DevTools

Breaking change

Users must replace MONARCH_TOKEN with MONARCH_COOKIE (sessionid=...; csrftoken=...). Release as v0.3.0.

Test plan

  • New tests for newMonarchClient (config cookie, env fallback, missing-cookie error)
  • Config tests updated for Cookie
  • go test ./... -race passes

Monarch no longer accepts the legacy bearer token, so MONARCH_TOKEN is
removed and MONARCH_COOKIE (or monarch.cookie) is now required. Startup
fails fast with a clear error when the cookie is missing.

Bumps monarch-go to v2.1.0 for NewClientWithCookie.
@eshaffer321
eshaffer321 merged commit c97b7e0 into main Sep 24, 2026
12 checks passed
@eshaffer321
eshaffer321 deleted the feat/monarch-cookie-auth branch September 24, 2026 02:41
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.98%. Comparing base (c2a737a) to head (8bb29d6).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/adapters/clients/clients.go 83.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   64.95%   64.98%   +0.03%     
==========================================
  Files          51       51              
  Lines        6979     6983       +4     
==========================================
+ Hits         4533     4538       +5     
+ Misses       2108     2107       -1     
  Partials      338      338              
Flag Coverage Δ
unittests 64.98% <85.71%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/infrastructure/config/config.go 81.08% <100.00%> (ø)
internal/adapters/clients/clients.go 76.27% <83.33%> (+3.54%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant