Add Infinifi escrow context to LLM reports - #340
Merged
Conversation
- add a User-Agent header to the Infinifi farm API request, consistent with the existing protocol monitor's request convention - log previously-silent context-resolution skips (non-ERC20 accounting asset, empty farm records, unknown farm, farm/escrow mismatch, non-ERC20 whitelist target) so transient enrichment failures are visible instead of vanishing - extend unit coverage for _candidate_addresses, _looks_like_escrow, _farm_by_address, _fetch_farm_records parsing, _token_label, the empty-configured-tokens report, and the non-ERC20 accounting asset path Verification: pytest tests/ (803 passed, 4 skipped), ruff check, ruff format --check, mypy on utils/llm/infinifi_context.py all clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
uv run pytest -q tests/test_infinifi_context.py tests/test_ai_explainer.py tests/test_llm_report.py tests/test_timelock_alerts.py(132 passed, 2 subtests passed)uv run ruff checkon changed Python filesuv run ruff format --checkon changed Python filesuv run mypy --follow-imports=skip utils/llm/infinifi_context.pyuvx prek run