Repository navigation
chore(sync): merge upstream dev into fork (2026-06-29) - #48
Conversation
Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: Brendan Allan <git@brendonovich.dev> Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Code Review
This pull request refactors the core effect layer node architecture, updates the HTTP API client generation to expose all standard groups, and introduces priority-based provider budget tracking. It also updates several SolidJS UI components and refactors the LLM response reducer to handle interleaved reasoning and text. Feedback on these changes highlights a critical runtime TypeError in the LLM client due to an uninvoked state function, a potential header leak when the workspace ID is missing, and a regression in external server detection within the TUI. Additionally, an accidental debug file was committed and should be removed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| }, | ||
| ), | ||
| ), | ||
| const state = yield* stream(request).pipe(Stream.runFold(LLMResponse.empty, LLMResponse.reduce)) |
There was a problem hiding this comment.
The initial state passed to Stream.runFold is LLMResponse.empty, which is a function (() => ResponseState) rather than the evaluated state object. This will cause a runtime TypeError when the reducer tries to access state.events. It should be invoked as LLMResponse.empty().
| const state = yield* stream(request).pipe(Stream.runFold(LLMResponse.empty, LLMResponse.reduce)) | |
| const state = yield* stream(request).pipe(Stream.runFold(LLMResponse.empty(), LLMResponse.reduce)) |
| if (v === "$workspace") { | ||
| if (authInfo?.workspaceID) headers.set(k, authInfo.workspaceID) | ||
| return | ||
| } |
There was a problem hiding this comment.
If authInfo?.workspaceID is falsy, the code currently returns early without modifying the header. This leaves the header with its placeholder value "$workspace", which will be leaked to the upstream provider. The header should be deleted if the workspace ID is not available.
if (v === "$workspace") {
if (authInfo?.workspaceID) {
headers.set(k, authInfo.workspaceID)
} else {
headers.delete(k)
}
return
}| network.mdns || | ||
| network.port !== 0 || | ||
| network.hostname !== "127.0.0.1" | ||
| const external = hasArg("--port") || hasArg("--hostname") || network.mdns === true |
There was a problem hiding this comment.
By removing the checks for network.port !== 0 and network.hostname !== "127.0.0.1", the TUI will fail to detect an external server if the port or hostname are configured via the config file rather than passed as CLI arguments. This will cause the TUI to incorrectly use the internal transport (http://opencode.internal) instead of connecting to the configured external server.
| const external = hasArg("--port") || hasArg("--hostname") || network.mdns === true | |
| const external = hasArg("--port") || hasArg("--hostname") || network.mdns === true || network.port !== 0 || network.hostname !== "127.0.0.1" |
| @@ -0,0 +1 @@ | |||
| File to save in: ~/.local/share/opencode/worktree/012780/location-layer-tiers/packages/core/src/effect/ No newline at end of file | |||
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0612cee36c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| function replacementMapFrom(replacements?: Replacements) { | ||
| return new Map(replacements?.map(([source, replacement]) => [source.name, replacementNode(source, replacement)])) |
There was a problem hiding this comment.
Key replacements by node identity
When a graph contains two distinct nodes for the same service name, replacing one node now replaces every node with that name because the replacement map is keyed by source.name and resolve looks up by node.name. This breaks the branch-specific implementation case supported by this layer graph: overriding one branch's service in a test/simulation will silently override sibling branches that intentionally use a different implementation of the same service. Key the map by the source node identity instead of the shared service name.
Useful? React with 👍 / 👎.
| if (config.budgetContribution === undefined) return | ||
| const cost = centsToMicroCents(costInCent * config.budgetContribution) | ||
| if (cost <= 0) return | ||
| const redisKey = key(provider, priority, currInterval) |
There was a problem hiding this comment.
Track budget spend in the current interval
For streaming requests that run past the minute in which createProviderBudgetTracker was constructed, track() writes the completed cost to the stale request-start currInterval. Since check() only reads the current and previous minute, responses that finish more than a minute later are charged to an interval that future checks no longer read, so provider budget gates can ignore long-running stream spend and overroute fill providers. Compute the interval at track time instead of reusing the captured one.
Useful? React with 👍 / 👎.
Summary
upstream/devinto the forkdevbranch.upstream/dev...dev = 47 behind / 390 ahead.ULM-preserved areas
packages/opencode/**wiring while absorbing upstream structure.packages/opencode/engagements/**clean: onlypackages/opencode/engagements/.gitkeepis tracked.budgetPriority-aware routing contract used by the updated handler.Validation
bun run typecheckpassed locally: 29 successful / 29 total, 22m57.344s.git diff --checkpassed.