Route API discovery through tool ACL (prevent direct network probes in find_api)#500
Closed
cdayAI wants to merge 1 commit into
Closed
Route API discovery through tool ACL (prevent direct network probes in find_api)#500cdayAI wants to merge 1 commit into
cdayAI wants to merge 1 commit into
Conversation
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.
Motivation
learn_capability op=find_apipath from performing direct network fetches inside self-learning, which bypassed the tool ACL, rate limits, and hooks.Description
learn_capability(packages/maverick-core/maverick/tools/learn.py) to generate OpenAPI candidate URLs but validate them by calling the registeredopenapi_runnertool (via normalagent.tools.run) instead of direct fetches.openapi_spec_candidates()topackages/maverick-core/maverick/self_learning.pyto produce candidate spec URLs from abase_urlor search text without performing network I/O.docs/self-learning.mdto state thatfind_apigenerates candidates and uses the registeredopenapi_runnerfor validation so ACLs/hooks/rate limits remain in effect.packages/maverick-core/tests/test_self_learning.pyto assert candidate generation and thatfind_apidoes not probe whenopenapi_runneris unavailable.Testing
PYTHONPATH=packages/maverick-core pytest packages/maverick-core/tests/test_self_learning.py -q, which passed (41 passed).PYTHONPATH=packages/maverick-core pytest packages/maverick-core/tests/test_q3_2026_batch9.py -q, which passed (31 passed).python -m ruff check packages/maverick-core/maverick/tools/learn.py packages/maverick-core/maverick/self_learning.py packages/maverick-core/tests/test_self_learning.py, which succeeded with no issues.pytest-asyncio,httpx) in the execution environment; those were installed and the full test suite was re-run successfully.Codex Task