Repository navigation
fix(mothership): stop Chat reading files search as a download of a file named search - #8930
Closed
waleedlatif1 wants to merge 1 commit into
Closed
waleedlatif1 wants to merge 1 commit into
waleedlatif1 wants to merge 1 commit into
Conversation
…le named search The Chat file transport matched GET /api/v2/files/search as a direct download of file id 'search', so files search failed with an unrelated validation error. It now recognizes the search route and refuses it with a message pointing at grep --scope files, because search results quote file text without reporting file provenance and so cannot be admitted to Chat yet.
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
Contributor
|
Collaborator
Author
|
Closing: this fix is being consolidated with the other file-provenance fixes into a single PR with one shared abstraction. The branch is kept for reference. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously deployed
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.
Summary
GET /api/v2/files/searchwith its^([^/]+)$file-id pattern. It treatedfiles searchas a direct download of a file with idsearch, so the command failed with an unrelated validation error (Unrecognized key: "query").grep <pattern> --scope files. Search results quote indexed file text but don't report the provenance of the files they quote, so passing them through would let content of unknown provenance reach the model unchecked. A separate change makes the search use case report per-file provenance. Once that lands, this branch can forward search through the provenance-admitting path like bulk download.Type of Change
Testing
file-provenance.test.tsrunsfiles search --query …through the real CLI handler. It expects the clear refusal and that no file lookup or storage read happens. It fails on the old code with the download-contract validation error.bunx vitest run lib/mothership/agent-clipasses (300 tests).bun run test:scriptspasses.bun run lint,bun run type-checkandbun run check:auditspass.Checklist
test-auditauthoring gate)