fix(repo-monitor): honor AUTOMATION_MODEL profile - #606
onatozmenn wants to merge 1 commit into
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
|
👋 This PR needs a couple of things fixed before OpenHands can review it:
Push an update once this is addressed and this check re-runs automatically. This is an automated check - no AI was used to generate this comment. |
1 similar comment
|
👋 This PR needs a couple of things fixed before OpenHands can review it:
Push an update once this is addressed and this check re-runs automatically. This is an automated check - no AI was used to generate this comment. |
There was a problem hiding this comment.
🟡 Changes recommended
The new tests cannot import github_client in a clean checkout because its shared-client directory is not added to sys.path.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates github-repo-monitor to honor the configured AUTOMATION_MODEL profile, with fallback to the active profile.
Changes:
- Adds profile resolution through the Agent API.
- Adds fallback handling for unset or missing profiles.
- Adds regression tests for profile selection.
File summaries
| File | Description |
|---|---|
tests/test_github_repo_monitor.py |
Adds tests for profile resolution and fallback behavior. |
skills/github-repo-monitor/scripts/main.py |
Resolves profiles and forwards the selected LLM configuration. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| def load_repo_monitor_helpers(): | ||
| source = SCRIPT_PATH.read_text(encoding="utf-8") | ||
| namespace: dict = {"__name__": "repo_monitor_main"} | ||
| exec(compile(source, str(SCRIPT_PATH), "exec"), namespace) | ||
| return namespace |
|
Regarding the |
HUMAN:
I ran the targeted github-repo-monitor tests and confirmed the profile-resolution case fails on base but passes with the fix, with no new ruff findings beyond the existing ones.
Why
github-repo-monitorbuilds its conversation payload from the agent server's active profile and never readsAUTOMATION_MODEL, so monitor automations silently run on whatever profile is active in the UI instead of their configured one.Summary
_get_agent_dictnow resolvesAUTOMATION_MODELviaGET /api/profiles/{name}(plaintext secrets) and forwards that config withusage_id: profile:<name>; falls back to the active profile when unset or on 404.tests/test_github_repo_monitor.pywith 3 tests. Scoped to repo-monitor only per maintainer note on PR reviewer and repo monitor skills ignore AUTOMATION_MODEL — automations run on the active profile, not their configured one #428.Issue Number
Fixes #428
How to Test
python -m pytest tests/test_github_repo_monitor.py -q→ 3 passed. On base, the profile-resolution test fails (no profile request is made).python -m ruff checkon touched files: no new findings (2 pre-existing F541s on base);scripts/sync_extensions.py --checkfails identically on base (locale decode issue in this env), unrelated.Companion reproduction record with template sections: #605.
Type
Bug fix