Repository navigation
fix(lint): don't look for audio on another computer's share - #7572
Merged
Merged
Conversation
The audio-missing check resolved every <audio src> on disk, including a src naming a share on another host (\\host\share, //host/share). On Windows that lookup opens a connection to that host, and Studio runs lint as soon as a project opens. The check now skips a src whose root is a network share other than the project's own, as the other lint rules already do. Media on the project's own share, local absolute paths and project files are checked as before; the render still reports a file it cannot find. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Edit accuracy: accurate 267 (base branch 267), smooth 105 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (1)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 109bf1cd
Scope
- Read all 4 files. The skip cleans the src exactly as
resolveProjectRelativeSrcdoes, and it runs on the samerootRelative. The resolver's only lookup of an absolute path isexistsSync(cleanSrc), and the skip covers it. The other candidates arejoined under the project, so they stay local. - Checked with a
path.win32probe that records every disk lookup. I tried percent-encoded%5C%5Chost…,\\?\UNC\…,\\.\pipe,..\climbs, a project on\\nas\films, and a different share on the same host. None of them looked up another computer's share.\\?\paths get cut at the?before any lookup, both before and after this PR. - Locally: parsers win32 44/44 and lint 2/2 pass. Reverting the
continuefails 1 of 2, and making the helper returnfalsefails 4 of 44, which matches the body. - CI: every required check at this head passed (
Skills: manifest in syncskipped by path filter).
— Genesis
Merged
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.
Lint no longer looks on disk for an
<audio src>that names a share on another computer (\\host\share\...,//host/share/...). On Windows that lookup connects to the host, and Studio runs lint as soon as a project opens.Claude Opus 5.5
What
The
audio_src_not_foundcheck skips a src whose root is a network share other than the project's own. It neither looks for that file nor reports it.Why
The check passed every
<audio src>toresolveProjectRelativeSrc, which callsexistsSyncon any absolute path. On Windows, checking whether\\host\share\x.wavexists opens an SMB connection tohostas the signed-in user. Studio runs lint automatically when a project opens, so just opening a project made that connection. #7534 already stopped the other lint rules, the compile probes and the Studio media scan from looking at another computer's share. This is the one lint path that still did.Related work
Refs #7534 (same network-root rule,
namesAnotherNetworkRoot). #7386 also editspackages/lint/src/project.ts, in a different function (audio overlap hint). #3759 (draft) editspackages/parsers/src/assetResolution.ts, in a different function.How
packages/parsers/src/assetResolution.ts: a newsrcOnAnotherNetworkRoot(projectDir, src)cleans the src as the resolver does (query and fragment,file:URL) and returnsnamesAnotherNetworkRootfor an absolute path. It touches no file.packages/lint/src/project.ts:lintAudioSrcNotFoundskips such a src before it resolves the path or checks the#/?file-name hint.What users see:
C:\media\voice.wav), and audio on the share the project itself lives on are checked exactly as before.//host/shareis a local path, andnamesAnotherNetworkRootis false for it.The render and
checkstill resolve absolute and UNC media sources, because rendering them is supported (#4172, #7534). This PR does not change that.Test plan
assetResolution.win32.test.tsuses Windows path rules and a recordingexistsSync.\\host\share,//host/share,/\host\shareand a src with?v=2count as another share, and none of them touches the disk. Drive-letter, relative and root-absolute srcs, and a src on the project's own share, do not count.lint/src/project.networkRoot.test.ts: the lint never resolves an<audio>src on another share and doesn't report it. A missing project audio file is still resolved and reported.continuefails the lint test (1 of 2), and making the helper returnfalsefails the Windows test (4 of 44).path.win32.— Rames Jusso
🤖 Generated with Claude Code