Skip to content

chore(sync): merge upstream dev into fork (2026-06-29) - #48

Merged
trevor050 merged 48 commits into
devfrom
codex/upstream-sync-20260629
Jun 29, 2026
Merged

trevor050 merged 48 commits into
devfrom
codex/upstream-sync-20260629

Conversation

@trevor050

Copy link
Copy Markdown
Owner

Summary

  • Merges upstream/dev into the fork dev branch.
  • Start delta: upstream/dev...dev = 47 behind / 390 ahead.
  • Upstream areas include app/session UI updates, core effect/runtime movement, generated client/sdk updates, console budget routing, LLM tests, and docs/model updates.

ULM-preserved areas

  • Preserved fork branch behavior and ULM-critical packages/opencode/** wiring while absorbing upstream structure.
  • Kept packages/opencode/engagements/** clean: only packages/opencode/engagements/.gitkeep is tracked.
  • Resolved the console provider budget tracker conflict by keeping upstream's new budgetPriority-aware routing contract used by the updated handler.

Validation

  • bun run typecheck passed locally: 29 successful / 29 total, 22m57.344s.
  • git diff --check passed.
  • Engagement artifact guard passed.

jlongster and others added 30 commits June 27, 2026 11:09
)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 13:54
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dacb9af4-0dec-42cb-9f05-1eb5226ca1e6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/upstream-sync-20260629

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

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.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

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().

Suggested change
const state = yield* stream(request).pipe(Stream.runFold(LLMResponse.empty, LLMResponse.reduce))
const state = yield* stream(request).pipe(Stream.runFold(LLMResponse.empty(), LLMResponse.reduce))

Comment on lines +204 to +207
if (v === "$workspace") {
if (authInfo?.workspaceID) headers.set(k, authInfo.workspaceID)
return
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This file appears to be a temporary scratchpad or debug file accidentally committed to the repository. It should be deleted.

@trevor050
trevor050 merged commit 97582cd into dev Jun 29, 2026
16 of 20 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)]))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.