mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 18:33:15 +00:00
* Replace hardcoded GitHub-email map with Store-backed user mapping Move the static GITHUB_USER_EMAIL_MAP to a Store-backed bidirectional mapping (GitHub login <-> work email <-> optional Slack ID) with an in-process cache, self-service onboarding, and admin management. - agent/dashboard/user_mappings.py: Store CRUD + login/email/slack-id indexes, sync cache readers for hot paths, async fallthrough, and a bulk_import that preserves existing richer records. - Migrate all read sites (auth.py, agent_overrides.py, authorship.py, github_comments.py, webapp.py x2) off the dict. - Unmapped Slack tags now run on the GitHub App installation token (use_installation_token_fallback) and get an ephemeral "link your GitHub account" prompt carrying the Slack id + email via a signed account-link token threaded through the OAuth state. - OAuth callback completes a self-service (org-gated) mapping from that token, falling back to the verified GitHub email. - Admin CRUD endpoints + one-time legacy import; dashboard UI section. - Legacy dict retained only as the import payload (no longer read). Tests: mapping store, account-link round-trip + completion, mapped vs unmapped Slack flows; existing trust-gate tests updated to prime cache. * Address review: cold-cache email resolution + stale alias de-indexing - agent_overrides: add resolve_login_from_email_async that falls through to the Store on a cold cache; use it at the async repo-resolution call sites (Slack repo config, Linear comment, owner-metadata) so a mapped user still resolves to their GitHub login + dashboard default_repo on a fresh worker. - user_mappings.upsert_mapping: de-index the existing login before re-indexing so a changed email/Slack id no longer leaves stale aliases resolving to the login in-process. - Tests for both fixes; update Slack repo-config test to patch the async resolver. |
||
|---|---|---|
| .. | ||
| middleware | ||
| conftest.py | ||
| test_account_link.py | ||
| test_account_link_completion.py | ||
| test_agent_subagent_models.py | ||
| test_analyzer_cron.py | ||
| test_analyzer_skills.py | ||
| test_anthropic_effort.py | ||
| test_auth_sources.py | ||
| test_dashboard_message_adapter.py | ||
| test_dashboard_org_login_gate.py | ||
| test_daytona_integration.py | ||
| test_encryption.py | ||
| test_ensure_no_empty_msg.py | ||
| test_github_comment_prompts.py | ||
| test_github_feedback.py | ||
| test_github_issue_webhook.py | ||
| test_github_oauth_refresh.py | ||
| test_github_token_ttl.py | ||
| test_google_model.py | ||
| test_http_security.py | ||
| test_langsmith_sandbox_config.py | ||
| test_model_fallback_middleware.py | ||
| test_model_fallback_resolution.py | ||
| test_multimodal.py | ||
| test_normalize_repo.py | ||
| test_notify_step_limit_middleware.py | ||
| test_pr_ready_auto_review.py | ||
| test_proxy_auth.py | ||
| test_public_repo_org_gate.py | ||
| test_recent_comments.py | ||
| test_refresh_slack_status_middleware.py | ||
| test_repo_extraction.py | ||
| test_review_style_collector.py | ||
| test_review_style_sync.py | ||
| test_review_styles_store.py | ||
| test_reviewer.py | ||
| test_reviewer_diff.py | ||
| test_reviewer_eval_run.py | ||
| test_reviewer_eval_target.py | ||
| test_reviewer_findings.py | ||
| test_reviewer_outcomes.py | ||
| test_reviewer_publish.py | ||
| test_reviewer_reconcile.py | ||
| test_reviewer_tools.py | ||
| test_reviewer_watch.py | ||
| test_sandbox_paths.py | ||
| test_sanitize_thinking_blocks.py | ||
| test_sanitize_tool_inputs.py | ||
| test_slack_assistants_status.py | ||
| test_slack_context.py | ||
| test_slack_feedback.py | ||
| test_slack_thread_reply_tool.py | ||
| test_stale_sandbox_creating.py | ||
| test_user_mappings.py | ||