Skip to content

chore: post-release audit fixes (Go backend)#389

Merged
tomasz-tomczyk merged 1 commit intomainfrom
audit/go-fixes
Apr 29, 2026
Merged

chore: post-release audit fixes (Go backend)#389
tomasz-tomczyk merged 1 commit intomainfrom
audit/go-fixes

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

Post-v0.10.1 audit fixes for the Go backend.

  • P0 auth: lock global config writes (race on lazyBackfillAuthUserID)
  • P0 auth: log clearAuthIdentity save failures instead of swallowing
  • P1 main: extract handleShareAuthError, dedup 4 copies (divergent exit-vs-fallthrough behavior preserved intentionally)
  • P1 share: collapse identical loadCommentsForUpsert into loadCommentsForShare
  • P1 aider_install: remove unused writeFileMkdir
  • P1 github: replace testing.Testing() with fetchGHUserName function-variable seam
  • P1 github: log gh api failures once per login (cached fallback prevents spam)

Test plan

  • go vet ./...
  • go test ./...
  • make e2e-share

🤖 Generated with Claude Code

- auth: lock global config writes to prevent race on identity backfill
- auth: log clearAuthIdentity save failures to stderr
- main: extract handleShareAuthError, collapse 4 401-handler copies
- share: collapse loadCommentsForUpsert into loadCommentsForShare
- aider_install: remove unused writeFileMkdir helper
- github: replace testing.Testing() with fetchGHUserName seam
- github: log gh api lookup failures once per login

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 5f8bb2b into main Apr 29, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the audit/go-fixes branch April 29, 2026 14:52
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 30.43478% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.57%. Comparing base (49d4201) to head (c6b230b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
config.go 52.00% 9 Missing and 3 partials ⚠️
main.go 0.00% 9 Missing ⚠️
github.go 11.11% 8 Missing ⚠️
auth.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
- Coverage   66.58%   66.57%   -0.02%     
==========================================
  Files          19       19              
  Lines        8176     8197      +21     
==========================================
+ Hits         5444     5457      +13     
- Misses       2310     2314       +4     
- Partials      422      426       +4     
Flag Coverage Δ
e2e 33.98% <0.00%> (-0.09%) ⬇️
unit 62.59% <30.43%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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