Commit bedec91
committed
fix(tests): pass target_person/target_repository to LLM contribution agent
Two tests in `test_llm_contribution_agent.py` regressed when CI started
running them (they were previously masked by an import-time crash):
- `test_llm_contribution_agent_validates_payload_and_exposes_model_metadata`
- `test_llm_contribution_agent_records_strict_schema_warnings`
Both hit the fail-closed branch added in commit 6700f6f (orphan-
Contribution drop): if `target_person`/`target_repository` are missing
from the agent context the agent emits `{}` instead of a half-built
Contribution. In production the orchestrator always sets these fields
before invoking the agent; the tests bypass the orchestrator and call
`agent.run()` directly with minimal context.
Add `_person_and_repo_context()` helper that supplies the minimum
context the orchestrator passes today, and inject it into both
failing tests. The other three tests in the file already exercise
pre-LLM-call paths (timeout / runtime error / capture), so they don't
need it.1 parent cc3df92 commit bedec91
1 file changed
Lines changed: 29 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
64 | 86 | | |
65 | 87 | | |
66 | 88 | | |
| |||
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 96 | + | |
78 | 97 | | |
79 | 98 | | |
80 | 99 | | |
| |||
138 | 157 | | |
139 | 158 | | |
140 | 159 | | |
141 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
142 | 166 | | |
143 | 167 | | |
144 | 168 | | |
| |||
0 commit comments