Rewrite handlers.llm module - #694
Open
eb8680 wants to merge 276 commits into
Open
Conversation
This was referenced Jun 20, 2026
eb8680
force-pushed
the
eb-doctest-synthesis
branch
from
June 20, 2026 17:11
e1a8b8b to
1eaa685
Compare
This was
linked to
issues
Jul 1, 2026
datvo06
added a commit
that referenced
this pull request
Jul 19, 2026
- mypy: annotate _INSPECTION_DUNDERS as tuple[str, ...] (the += widened a fixed-length tuple type); drop a now-unused type: ignore in test_effects. - ruff: import Callable from collections.abc (UP035); use favorite_city in the reader test so it is not an unused local (F841); ruff format the two touched test/impl files. Also scrub a stale branch/#694 line from the test docstring. mypy + ruff check + ruff format --diff all clean; 20 tests pass.
datvo06
added a commit
to datvo06/effectful
that referenced
this pull request
Jul 19, 2026
…(no LLM) Off-by-default handler on Template.__apply__: when a template declares Uses[tool, ...] on its return type, a per-call handler intersects the lexical tools reaching call_assistant with the allow-list, so the LLM is offered ONLY the declared tools (the in-scope but unlisted tools are withheld). No Uses -> unrestricted (backward-compatible). Sound by construction: an unlisted tool is never offered and the decode boundary rejects a call to an unoffered tool, so the model cannot invoke it. This is the plan's L1 on BasisResearch#694's call_system/tool_types model (not a .tools mutation), using eb8680's per-call-handler pattern; handler-injected tool_types are left untouched. Two law-based tests (allow-list enforced; unrestricted unchanged), captured at the call_assistant seam with no model request. 8 governance + effects pass, BasisResearch#694 template suite 112 pass, mypy+ruff 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.
Addresses #433 #701 #700 #697 #493 #513 #526 #549 #610 #590 #699 #581 #605 #603 #573 #576 #577 #586 #660 #748 #732 #757 #533 #489 #505 #608