Skip to content

fix(llm): drop Protocol Context section from gist report - #456

Merged
spalen0 merged 1 commit into
mainfrom
fix/remove-gist-protocol-context
Oct 27, 2026
Merged

spalen0 merged 1 commit into
mainfrom
fix/remove-gist-protocol-context

Conversation

@spalen0

@spalen0 spalen0 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the ## Protocol Context section from the AI gist report (utils/llm/report.py), along with the protocol_context field on ReportContext.
  • Protocol context is still sent to the LLM prompt, and adapter-resolved addresses still appear in the ## Reference table (role "Protocol context").
  • DETAIL prompt: drop the lines saying the report already publishes the Protocol Context section, which is no longer true.
  • Remove the now-unused report rendering: every adapter's format_*_report, the report-only helpers (_EFFECT, _hashed_label_report, _report_value, _history_cell, describe_controller_markdown), _Adapter.format_report, ResolvedProtocolContext.report, and the labels argument of resolve_protocol_context. Pendle's shared formatter loses its link-rendering parameters.
  • Tests: delete report-only tests and strip report assertions from mixed prompt/report tests. Prompt assertions are kept. The USDC parity test now checks unit_price_text.
  • utils/llm/README.md updated.

Notes

  • Pinned historical eval not run for the prompt wording change.

Test plan

  • uv run ruff format . / uv run ruff check . / uv run ty check
  • uv run pytest -q tests/: 2023 passed. The 5 failures also happen without this change: 4 TestSafeApiQuota (caused by a real SAFE_API_KEY in .env) and test_sd_notify_sends_datagram (fails on main).

🤖 Generated with Claude Code

The protocol context is still passed to the LLM prompt and its addresses
still feed the Reference table; only the standalone gist section is removed.
Prompt lines that relied on the report publishing that section are updated.

With nothing rendering it, the per-adapter report formatters, the
ResolvedProtocolContext.report field, the resolver's labels parameter and
their tests are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@spalen0
spalen0 marked this pull request as ready for review October 27, 2026 14:39
@spalen0
spalen0 merged commit e7674d0 into main Oct 27, 2026
3 checks passed
@spalen0
spalen0 deleted the fix/remove-gist-protocol-context branch October 27, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant