Repository navigation
Conversation
… without file links fails A device-code login asked for the identity scopes and the scopes the spec's operations declare. No operation declares asset:file:download, which only changes what a response holds, so a login could not get it. The API then leaves the links to a task's files out of every task it returns to that login, and -o, download and make saved the previews alone and exited 0. The login scope: - The spec's security scheme now lists every permission a credential can be limited to (x-meshy-scopes). It comes from the same contract as the operations' scopes; no other part of the spec changes. - overlay/cli.yaml gains response_scopes: scopes a login asks for although no operation declares them, each with the reason. catalog-gen fails unless each one is on the spec's list and not already an operation's, and unless every operation scope is on the list. The catalog carries them as response_scopes. - meshy auth login asks for openid profile email, the operations' scopes and the response scopes. It does not ask for every scope the spec lists. The download: - A SUCCEEDED task whose output has file fields (model_urls, a *_url) but links only previews is refused before anything is fetched, whatever is asked for (-o, download with or without --all or --asset, make): exit 1, code server, "nothing was downloaded", and a hint naming the causes the CLI cannot tell apart. - When the run's credential is a stored OAuth login whose access token is held to permissions without asset:file:download (its msy_restricted and scope claims, read without a refresh), the error is code auth (exit 3) with a login recovery and the command that signs that profile in again. - Without --all or --asset, a download also fails when a format in the task's input.target_formats has no link in model_urls (the spec says every format a task produced has one) and the download would save it: any such format into a directory, the path's own for a file path (-o car.glb). --all and --asset still save what the task has. - download, make and -o help say so.
… never point back at a paid create - The credential that explains a task without file links is the one the API answered: the executor records the credential of the latest 2xx response (Executor.AnsweredBy), and the error goes by it, not by what the credentials file holds by then. A login replaced on disk during the run, or one whose token was refreshed, no longer changes the verdict. - The hint never says to run the command again: after make or create --wait -o the task is paid for. It says to sign in again (or which causes apply) and then save the same task's files with the command that reads it again (meshy tasks get <id> -o …, or the same download). - input.target_formats is not checked any more: a task keeps the formats of its request even when it does not produce them (a relief asked for its depth map alone), so it is no list of what a task holds. A download fails only when every file came without a link; -o <file> and --asset still refuse a file the task does not have, as before. - When no preview came either, the message no longer says "only previews".
… command they give - The sign-in after a download refused for a login without the download permission is for the profile that answered, on the site that answered: its region comes from that site, not from the credentials file, which another login may hold by then. The hint always names the profile (meshy auth login --profile <name>, quoted for the shell when needed); recovery.command carries it when it runs as it is, with --region on the production file. - The hint without that knowledge no longer offers another credential (a bare meshy auth login, an API key in the environment) beside a save command that keeps this run's --profile or --api-key-file. It names the causes, then: once the credential this command used can download them, save the task's files with that command.
…on the site that answered When a login without the permission to download files read the task and its sign-in cannot be given as a command to run as it is (a profile name the shell needs quoted, a credentials file of one's own, MESHY_BASE_URL_V2 set), the command to copy now still names the region of the site that answered on a production site, and says to leave MESHY_BASE_URL_V2 as it is when the variable chose the site. A login without --region goes to the active profile's site, so the hint could sign a China login in again on the global site, and the save it gave next failed again.
…t can be pasted as it is With MESHY_BASE_URL_V2 set, the note to keep it was written inside the command to copy, which a shell then refused. The command is the command alone again, and the hint asks to keep MESHY_BASE_URL_V2 as it is next to the permission to download files. A test now states the causes the hint gives in full.
…he other links were left out The check for links left out ran before the files were picked, so it refused even a preview that --asset or a file path named, and turned an unknown --asset or a path in a format the task lacks from a usage error into a server error. The files are now picked first. Of a task whose other links were left out, a file an explicit selection found is saved; a directory, which would hold the previews alone, and a selection that found nothing, which most likely asked for a file left out, still fail with the error that explains it.
…k's links were left out Every error from picking the files and their paths was turned into the error for links left out, so an output path outside the workspace or a symbolic link in the way was reported as a missing link (exit 1), or as a login without the permission (exit 3), instead of the path error it was (exit 11). Only a selection that found nothing, a usage error, is turned into it now. The -o and make help say that a path naming the preview still saves it.
| e.Recovery = &output.Recovery{Action: "login"} | ||
| signIn, keep := "Sign in again", "the permission to download files" | ||
| if c.Source == string(auth.SourceFile) { |
There was a problem hiding this comment.
🟡 Download recovery keeps the restricted host token
For a restricted host login, withheldFrom tells users to sign in again and repeat the download. Credential resolution still picks the host token over the new profile, so signing in does not restore downloads.
Learn more
The host app passes an OAuth token to the CLI in DSH_MESHY_CREDENTIAL. Credential resolution uses that token before considering a stored profile. Device login writes a profile; it does not update the host's environment. A restricted host token that can read tasks but cannot download files therefore survives the recovery instructions unchanged.
Example: A host shell downloads a completed task with a token that lacks asset:file:download. The user runs meshy auth login and grants downloads, but the retry in the same shell still uses the old host token and returns exit 3.
Recommended fix: Distinguish auth.SourceHost from auth.SourceFile. Tell host users to reauthorize through the host and retry once it supplies an updated token. Do not present a local profile login as recovery unless the instructions also explain how to select that profile without the host override.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if linksWithheld(r.Task, assets) { | ||
| var e *output.Error | ||
| missed := errors.As(err, &e) && e.Code == output.CodeUsage | ||
| if missed || err == nil && (len(r.Keys) == 0 && !p.single || len(p.jobs) == 0) { | ||
| return nil, nil, withheldError(taskID, len(assets) > 0, r.Rerun) |
There was a problem hiding this comment.
🟡 Missing links hide occupied download paths
For a preview-only task, plan reports missing links before checking whether another task owns the destination sidecar. The suggested retry still fails after the user restores download permission, because the destination remains occupied.
Learn more
Directory downloads write meta.json to record the files saved for a task. The sidecar ownership check refuses an existing sidecar for a different task and tells the user to choose another path. The new missing-link check returns before that check, even though the directory and sidecar path are already known. Its recovery instead points users back to the occupied destination.
Example: A user downloads task A into out/, then runs meshy download B -o out/ with a login that can read B but not download its model. The command tells the user to sign in again. When the user gains permission and retries, the command refuses to overwrite A's meta.json.
Recommended fix: When layout succeeds, run the existing destination and sidecar collision checks before returning the missing-link error. Keep both checks before file transfers and add a regression case with an existing sidecar for a different task.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
A device-code login asked for the identity scopes and the scopes the spec's operations declare. No operation declares
asset:file:download: it only changes what a response holds. So a login never got it, the API left the links to a task's files out of every task it returned to that login, and-o,downloadandmakesaved the preview alone and exited 0.Where the login scope comes from. It now has a source that can be checked:
The spec's list comes from the same contract as the operations'
x-meshy-scopes. The committed spec changes only by that list; its version and sources are the same. A login asks for no scope just because the spec lists it.A download whose file links were left out fails. The check runs before anything is fetched, on every path that saves a task's files:
download,-oontasks get/wait/streamand oncreate --wait, andmake.input.target_formatsis not checked: a task keeps the formats of its request even when it does not produce them (a relief asked for its depth map alone).--assetor a file path that names a file which came (--asset thumbnail_url,-o preview.png) still saves it. A directory (with or without--all), or a selection that finds nothing (--asset model_urls.glb,-o car.glb), gets the error above. A path the download refuses (outside the workspace, a symbolic link in the way) stays a path error (exit 11). On other tasks,-o <file>and--assetrefuse a file the task does not have as before (exit 2).output, so they are not checked.Other callers of the code this changes:
internal/execrecords the credential of each 2xx response, inDoandOpen; nothing else changes there.internal/authgainsLacksScope, which reads two more claims of the access token. Its other readers (refresh timing, issuer) are unchanged.download,makeand the-oflag help describe the new failure.Evidence
Before (
e22e67d) / After (cd49724). Both binaries were built and run with--format jsonagainst a local mock. Its task is shaped like the staging response to a login withoutasset:file:download:model_urls: {}, a preview link and null texture links. The run used a fake API key and a temporary config directory.New tests:
asset:file:download.linksWithheldover a model, rig, animation, image and motion task without links, previews alone, a verdict, whole tasks, and a depth-map relief that echoestarget_formats.download(directory,--all,--asset, file path) andtasks get -owith an API key, a login held without the scope (exit 3, login recovery), a login held with it, and a login with full access.make -owith a login without the scope sends one create and points atmeshy tasks get <id> -o …, never atmake.MESHY_BASE_URL_V2set).Executor.AnsweredByholds the token of a first attempt, the token a 401 swapped in, and a stream's token, and nothing after a 401 or a 404.Mutation probes, 35 guards: each broken on purpose turned at least one test red.
Locally, darwin/arm64,
go test -race ./...atef2a9c9: 1018 passed, 0 failed, 18 skipped (the 0.8.8 interoperability and OS key store tests, which needMESHY_TEST_TS_CLIandMESHY_TEST_OS_KEYRING).go vet ./...(also withGOOS=windows) passes. CI passes oncd49724.Staging, build
cd49724, two device-code logins approved in the browser, each with its own config directory and a test key store, logged out afterwards:The creates pass
--should-texture=false(an untextured model, the quickest GLB).Merge Danger
Door: two-way
Revert restores the old scope and the old saving. A login made with this build keeps
asset:file:downloadafter a revert, which only adds the file links the API gives an API key.Blast Radius: every download of a task's files, and every new OAuth login
A task the check misreads would fail where it saved before. The check fires only when no file other than a preview has a link, and a verdict or Creative Lab task is not checked.