fix(server): reject foreign directory hints before instance lookup - #40857
Open
romanilyin wants to merge 5 commits into
Open
fix(server): reject foreign directory hints before instance lookup#40857romanilyin wants to merge 5 commits into
romanilyin wants to merge 5 commits into
Conversation
Author
|
Updated replacement branch is now based on current Changes since the closed PR head:
Verification:
Full-suite caveat: |
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.
Supersedes #34256, which was closed by automated PR cleanup.
Issue for this PR
Closes #34255
Part of #33107
Related: #30895, #19473, #36902
Type of change
What does this PR do?
Validates request directory hints before instance and location lookup.
LocationMiddlewareuse the sameServerDirectoryparser.../repo.The existing
@romanilyin/canonicalpathdependency remains intentionally unchanged in this revision. This PR does not translate Windows paths to WSL paths, migrate persisted SQLite/App state, change session matching, or resolve symlink identity.How did you verify your code works?
bun install --frozen-lockfilepassed with Bun 1.3.14.server-directory, v1 instance/workspace routing, v2 location routing, and SDK coverage.bun typecheckpassed in bothpackages/serverandpackages/opencode.bun typecheckpassed: 30/30 Turbo tasks.bun run generateinpackages/clientproduced no diff.git diff --check origin/dev..HEADpassed.The full
packages/opencodesuite completed with 3259 passed, 22 skipped, 1 todo, and 10 failures. The failures are confined to unrelated subprocess timeout cases intest/cli/acp/lifecycle.test.tsandtest/cli/run/run-process.test.ts; both groups reproduce when run in isolation in this WSL workspace. The changed server tests remain green.Screenshots / recordings
N/A - server/API change.
Checklist