Repository navigation
Conversation
mirage-haystack pinned mirage-ai==0.0.3 and failed at import with mirage-ai 0.1.0. Move to the 0.1.0 APIs (build_vfs, known_vfs_names, Workspace.shell, CacheConfig) and pin mirage-ai==0.1.0, which requires Python 3.12. - Refuse a resource that is not a Mirage registry name; build_vfs also loads "module:Class" references. - Run run_async on the integration's background loop, so a sync close() after it does not wait on the caller's loop. - The Google Drive integration test passes the CI token as Mirage's access_token config instead of patching refresh_access_token.
Contributor
|
Heads-up for maintainers This PR is from a fork and touches integrations whose integration tests require API keys. Affected integrations:
Please run the integration tests locally ( |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Coverage report (mirage)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
This branch has not been deployed
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.
Related Issues
mirage-haystackfails to import withmirage-ai0.1.0 #4366Proposed Changes:
mirage-haystackpinsmirage-ai==0.0.3; withmirage-ai0.1.0 it fails at import. This moves the integration to Mirage 0.1.0 and the pin tomirage-ai==0.1.0.API moves:
mirage.resource.registry.build_resource→mirage.vfs.registry.build_vfs;MirageMount.available_resources()returnsknown_vfs_names()Workspace.execute(command)→Workspace.shell(command)Workspace(cache_limit=...)→Workspace(cache=CacheConfig(limit=...))Behaviour kept the same on 0.1.0:
resourcetakes only Mirage registry names.build_vfsalso loads a"module:Class"reference, so other values are refused withUnknown Mirage resourcebefore building.run_asyncruns on the integration's background loop, asrundoes. Mirage 0.1.0 ties a workspace to the event loop that first drives it, so a syncclose()afterrun_asyncin a running loop waited 10 s for its own loop.Python:
mirage-ai0.1.0 requires Python 3.12, sorequires-python, the classifiers, the ruff target and the CI matrix move from 3.11 to 3.12, asllama_stackdoes.Tests: the Google Drive integration test passes the CI token as Mirage's
access_tokenconfig, which 0.1.0 accepts, instead of patchingrefresh_access_token; the read-only test matches Mirage'sRead-only file system; new tests cover the refusedmodule:Classresource,close()afterrun_async, andcache_limitreaching Mirage.The integration's own API is unchanged (
MirageMount,MirageWorkspace,MirageShellTool).mirage-ai0.1.0 no longer depends onjq, which #4110 lists as Mirage's blocker for Python 3.15.Breaking for users:
linear.workspace,postgres.default_search_limit), so a saved pipeline with one fails at warm-up withMirageConfigError.How did you test it?
In
integrations/mirage:hatch run test:unit: 48 passed on Python 3.12 and 3.14hatch run fmt-checkandhatch run test:typeson 3.12: cleanhaystack-ai2.23.0,mirage-ai0.1.0): 48 passedNotes for the reviewer
I work on Mirage. As a follow-up (a separate PR, after this one), we'd like to propose:
shell,read,write,edit,ls,grep,glob) as aToolset, in the shape of the E2B integration's.allowed_commandsanddenied_paths. Mirage enforces it on each command as it runs, soeval "rm x",xargs rmandbash -c "rm x"are refused, and a hidden path is closed to every tool. The existing parameters can map onto a profile, and a Mirage "ask" could surface through Haystack's human-in-the-loop confirmation.Happy to open an issue to discuss it first.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.