Skip to content

fix(sandbox): upload with --no-git-ignore and push query results into the sandbox - #3351

Closed
kunal0137 wants to merge 1 commit into
SEMOSS:devfrom
kunal0137:fix/sandbox-upload-no-git-ignore
Closed

kunal0137 wants to merge 1 commit into
SEMOSS:devfrom
kunal0137:fix/sandbox-upload-no-git-ignore

Conversation

@kunal0137

Copy link
Copy Markdown
Collaborator

Summary

  • Local openshell sandbox upload applied .gitignore when the source sat inside a git work tree, failing with "Git filtering selected no files" and leaving rooms empty in the sandbox. Every upload now passes --no-git-ignore (room/project refresh, full and view-only uploads, brokered-secret placeholders).
  • A sandboxed Python process cannot read the host insight folder, so database query results (a_*.json) were unreachable (FileNotFoundError). NativePyEngineWorker now writes the result to a temp file, pushes it into /tmp/semoss-engine-results in the sandbox, and returns that path. Non-sandbox behavior is unchanged.
  • ClientProcessWrapper gets isOpenShell() and deliverResultFile(); OpenShellTransport.pushScratchFile() validates the file name (a_<6 chars>.json, regular file, no symlink) before uploading. The scratch folder is never watched, so it does not trigger write-back.

Test plan

  • Room upload into a sandbox succeeds locally with the git-ignored room folder
  • NIH app: database query result reaches the sandbox and the app works
  • Parallel tool calls in one insight
  • Normal non-room insight and plain chroot mode (no sandbox) still return the host path
  • /tmp/semoss-engine-results empty after runs and no new a_*.json left in the room folder

… the sandbox

- Pass --no-git-ignore on every openshell sandbox upload (room/project
  refresh, full and view-only uploads, brokered-secret placeholders). The CLI
  otherwise applies .gitignore when the source sits in a git work tree, which
  left rooms and other ignored paths empty in the sandbox.
- A sandboxed Python process cannot read the host insight folder, so the
  engine-query worker now writes the a_*.json result to a temp file, pushes it
  to /tmp/semoss-engine-results in the sandbox, and returns that path.
  Non-sandbox runs are unchanged.
@kunal0137
kunal0137 requested a review from a team as a code owner November 19, 2026 19:35
@snyk-io

snyk-io Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kunal0137

Copy link
Copy Markdown
Collaborator Author

Superseded by #3352 (same commit, pushed as a branch on SEMOSS/Semoss instead of the fork).

@kunal0137 kunal0137 closed this Nov 19, 2026
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.

1 participant