fix(javascript): classify application input selection failures by cause
analyze_javascript_application reported every input-selection problem as an artifact fault: - a missing input path: "Artifact could not be read or written", with no path or reason; - an unreadable selected directory: the same generic io failure; - a regular file that is neither a directory nor an .asar, and a --artifact-format that contradicts the selection: "Artifact is invalid or has changed. Get a fresh copy and try again." Report a missing path as an invalid input_path, an unreadable selection as access_denied, a non-directory non-.asar file as unsupported_target with the accepted inputs as remediation, and a contradicting format as an invalid format with the observed kind as expected value. Failures inside a selected artifact keep their existing classification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f4c99ab8a5
commit
0a14bbbf05
@@ -268,8 +268,13 @@ it("preserves cancellation and explicit format diagnostics", async () => {
|
||||
await expect(
|
||||
reconstructJavaScriptArtifact({ input_path: root, format: "asar" }),
|
||||
).rejects.toMatchObject({
|
||||
reason: "format",
|
||||
message: expect.stringContaining(root),
|
||||
issues: [
|
||||
{
|
||||
path: ["format"],
|
||||
reason: "invalid_value",
|
||||
message: expect.stringContaining(root),
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user