Repository navigation
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ding The import scan only matched lines starting with using/import, so the `@eval using X` + Base.invokelatest workaround hid every package a script loaded. Now the scanner matches per ;-separated statement, accepts an @eval / begin prefix, and fails closed on Base.require, quoted :(using X), Expr(:using, ...) and @eval Mod using X. The multi-line continuation fail-closed behavior is unchanged. Refs #2124 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jacktrnr
marked this pull request as ready for review
November 23, 2026 22:03
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.
Closes #2124
What
The run gate's Julia import scan (
packages/amico-run/src/import_scan.ts) had two defects:DelimitedFiles.JULIA_STDLIBSnow also listsDelimitedFiles,Mmap,Sockets,Downloads,FileWatching,LibdlandProfile(all checked againstSys.STDLIBon Julia 1.12).@eval using Xhid X from the scan. The scanner only matched lines that started withusing/import. Now it:;-separated statement, with an optionalbeginand/or@eval/@eval(prefix, so@eval using X,@eval import X,begin using X endandf(); using X; endare all scanned. Indentedusingin function bodies andbegin … endblocks was already matched; a test now pins that.Base.require(...), quoted:(using X),Expr(:using, …),@eval Mod using X. The reason readsdynamic package loading not supported — use a plain using/import: ….The multi-line continuation fail-closed behavior and its test are unchanged. The entitlement allowlist is out of scope and untouched.
Acceptance criteria
using DelimitedFilespasses the import scan.@eval using X/@eval import Xinside a function is refused with the same reason as a top-levelusing X(the test compares thecheckImportsresults for equality).using/importinside a function body orbegin … endblock is scanned.Tests
packages/amico-run/test/import_scan.test.ts: 4 new cases (DelimitedFiles + stdlibs,@evalforms, in-block forms, dynamic-form fail-closed). 9/9 pass.*.jlin the repo (34 files) still scans with no fail-closed result, so no shipped template or exemplar regresses.pnpm --filter amicode test: 5815 passed, 60 skipped.amico-runfull vitest: 2426 passed. 4 failures inupgrade-agents/upgrade-extensionhappen only under full-suite load; those files pass 16/16 in isolation and do not touch the import scan.amico-runtypecheck: clean.Follow-up (not in this PR)
Once this merges, the atom-transport-demo scripts that use the
@eval usingworkaround can move their imports back to top level.🤖 Generated with Claude Code