mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
`.gitattributes` declares `*.py text eol=lf` and `*.sh text eol=lf`, but 74 files (73 .py, 1 .sh) are stored in the index with CRLF line endings, violating that contract. Every macOS/Linux clone reports these files as "modified" on fresh checkout because git's diff engine sees the stored bytes don't match the attribute contract, even though the working tree and index match byte-for-byte. Running `git add --renormalize .` rewrites each affected blob so the stored form matches the attribute declaration. No semantic changes — every affected file's diff is "N insertions, N deletions" with inserts and deletes being the same lines modulo line endings. Follow-up commit adds `.git-blame-ignore-revs` so `git blame` / GitHub blame skip this mechanical commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
1 KiB
Python
33 lines
1 KiB
Python
from __future__ import annotations
|
|
|
|
from headroom.providers.aider.install import build_install_env
|
|
from headroom.providers.aider.runtime import build_launch_env
|
|
|
|
|
|
def test_aider_build_launch_env_sets_proxy_urls_without_mutating_input() -> None:
|
|
# Arrange
|
|
source_env = {"EXISTING": "value"}
|
|
|
|
# Act
|
|
env, lines = build_launch_env(port=9999, environ=source_env)
|
|
|
|
# Assert
|
|
assert source_env == {"EXISTING": "value"}
|
|
assert env["EXISTING"] == "value"
|
|
assert env["OPENAI_API_BASE"] == "http://127.0.0.1:9999/v1"
|
|
assert env["ANTHROPIC_BASE_URL"] == "http://127.0.0.1:9999"
|
|
assert lines == [
|
|
"OPENAI_API_BASE=http://127.0.0.1:9999/v1",
|
|
"ANTHROPIC_BASE_URL=http://127.0.0.1:9999",
|
|
]
|
|
|
|
|
|
def test_aider_build_install_env_returns_only_persistent_proxy_variables() -> None:
|
|
# Arrange / Act
|
|
env = build_install_env(port=8787, backend="ignored")
|
|
|
|
# Assert
|
|
assert env == {
|
|
"OPENAI_API_BASE": "http://127.0.0.1:8787/v1",
|
|
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8787",
|
|
}
|