## Turn 1

The problem is that `save_user` normalizes the email by stripping whitespace and converting to lowercase (`email.strip().lower()`), but `get_user` in `routes.py` does not normalize the email before looking it up. This means if a user is saved with an email like "  Test@Example.COM  ", it will be stored as "test@example.com". However, if a login attempt is made with "Test@Example.COM", `get_user` will look for "Test@Example.COM" in the `USERS` dictionary, which won't be found, causing the login to fail.

To fix this, `get_user` needs to normalize the email in the same way as `save_user`.

Let's look at the files:
`store.py`:
```python
USERS = {}
def save_user(email, password_hash):
    USERS[email.strip().lower()] = password_hash
def get_user(email):
    return USERS.get(email)
```

`routes.py`:
```python
def login(email, password_hash):
    stored = get_user(email)
    return stored == password_hash
```

The fix is to modify `get_user` in `store.py` to normalize the email:
```python
def get_user(email):
    return USERS.get(email.strip().lower())
```

Alternatively, we could modify `routes.py` to normalize the email before calling `get_user`, but it's better to keep the normalization logic in `store.py` where the data is stored, to ensure consistency across all access paths.

Let's write the patch plan:
1. Edit `store.py`: Modify the `get_user` function to normalize the email by calling `.strip().lower()` on the `email` argument before using it as a dictionary key.
2. Regression test: Write a test that saves a user with a non-normalized email (e.g., "  User@Example.COM  ") and then attempts to log in with the same non-normalized email, ensuring the login succeeds.

Let's refine the patch plan to be concise and exact.

Patch Plan:
1. **File: `store.py`**
   - **Function: `get_user`**
   - **Edit:** Change `return USERS.get(email)` to `return USERS.get(email.strip().lower())`

2. **Regression Test:**
   - Create a test that calls `save_user("  Test@Example.COM  ", "hash123")` and then calls `login("  Test@Example.COM  ", "hash123")`, asserting that the result is `True`.

Wait, the prompt says "Return a concise patch plan with exact file/function edits and one regression test."

Let's format it clearly.

**Patch Plan:**

1. **File: `store.py`**
   - **Function: `get_user`**
   - **Change:** Update the return statement to normalize the email before lookup.
     - *Before:* `return USERS.get(email)`
     - *After:* `return USERS.get(email.strip().lower())`

2. **Regression Test:**
   - Test that a user saved with a non-normalized email can be retrieved using the same non-normalized email.
   - Example:
     ```python
     def test_login_with_non_normalized_email():
         save_user("  User@Example.COM  ", "password_hash")
         assert login("  User@Example.COM  ", "password_hash") == True
     ```

This covers the exact file/function edits and provides one regression test.