Skip to content

fix(download): resolve output folders before returning links - #390

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-372-absolute-output
Oct 14, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-372-absolute-output

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

Relative MCP output folders produced file links rooted at the filesystem root instead of the folder where the download was saved. Resolve the folder in the shared usableOutDir helper and pass the resulting absolute path through MCP to the downloader. The saved file and returned link now identify the same location.

Fixes #372

what changed: Resolved output-folder checks and added shared-download/MCP regressions for relative nested paths and an existing saved file behind the link.

why: Restore the resource link's existing promise to identify the download. No alternative design was set aside.

what it touched: dispatch.mjs, mcp.mjs, their tests and architecture rows, changelog and README inventory. No new public option.

what you verified: verified - red-first reproduction and 81 passing dispatch/MCP tests; handoff OK and root preflight PASS. The required full-suite commit gate accepted this commit.

what you got wrong and fixed: nothing to report.

Full offline gate on Windows / Node 24.20.0: 1779 passed, 0 failures, 12 unsupported capabilities waived by the gate's documented local policy; 1543.7 seconds. No hook override or fail-open acceptance.

what changed: usableOutDir resolves its argument and returns the absolute path it checked. MCP fetch_corpus passes that path to the shared downloader. Added download and MCP regressions for relative nested folders and links to the actual saved file.

why: A relative download folder previously produced a root-anchored file URI that named a different location. Use the same resolved folder for access checks, writing and linking. No alternative design was set aside.

what it touched: dispatch.mjs, mcp.mjs, dispatch/MCP tests, architecture rows, changelog and test inventory. No new option or path semantics for absolute folders.

what you verified: verified - red-first reproduction (79 passed, two expected failures), then dispatch/MCP regressions (81 passed, zero failed); handoff OK and preflight PASS in this checkout. The required complete suite runs in the commit gate before acceptance.

what you got wrong and fixed: nothing to report.
@StepenkoAnatoli
StepenkoAnatoli merged commit 0dc3ff0 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-372-absolute-output branch October 14, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A relative out_dir to fetch_corpus yields a file:// link naming a path that does not exist

1 participant