sync: upstream v1.14.48 (ce66b191d on dev)#58
Conversation
…reakdown (#26735)
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| - | - | Google API Key | 5bb7b23 | packages/http-recorder/test/record-replay.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
There was a problem hiding this comment.
5 issues found across 702 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/app/src/pages/layout/sidebar-project.tsx">
<violation number="1" location="packages/app/src/pages/layout/sidebar-project.tsx:307">
P2: Using `globalSync.child()` inside `isWorking` pins every scanned workspace store. In the sidebar this can accumulate long-lived pinned stores and cause avoidable memory/cache pressure.</violation>
</file>
<file name="packages/console/app/src/routes/zen/util/variant.ts">
<violation number="1" location="packages/console/app/src/routes/zen/util/variant.ts:1">
P2: Guard `body` in this parser; direct property access on an undefined payload will throw at runtime.</violation>
<violation number="2" location="packages/console/app/src/routes/zen/util/variant.ts:10">
P2: Add a default object for `body` to prevent runtime crashes when payload is missing.</violation>
<violation number="3" location="packages/console/app/src/routes/zen/util/variant.ts:19">
P2: This function should handle an undefined payload; otherwise variant parsing can throw before fallback logic runs.</violation>
</file>
<file name="packages/console/app/src/routes/workspace/[id]/usage/usage-section.tsx">
<violation number="1" location="packages/console/app/src/routes/workspace/[id]/usage/usage-section.tsx:56">
P2: Output token total now excludes reasoning tokens, making the displayed total inconsistent with the output breakdown and underreporting usage.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Fix all with cubic
| const projectStore = createMemo(() => globalSync.child(props.project.worktree, { bootstrap: false })[0]) | ||
| const isWorking = createMemo(() => | ||
| dirs().some((directory) => { | ||
| const [store] = globalSync.child(directory, { bootstrap: false }) |
There was a problem hiding this comment.
P2: Using globalSync.child() inside isWorking pins every scanned workspace store. In the sidebar this can accumulate long-lived pinned stores and cause avoidable memory/cache pressure.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/app/src/pages/layout/sidebar-project.tsx, line 307:
<comment>Using `globalSync.child()` inside `isWorking` pins every scanned workspace store. In the sidebar this can accumulate long-lived pinned stores and cause avoidable memory/cache pressure.</comment>
<file context>
@@ -301,6 +302,12 @@ export const SortableProject = (props: {
const projectStore = createMemo(() => globalSync.child(props.project.worktree, { bootstrap: false })[0])
+ const isWorking = createMemo(() =>
+ dirs().some((directory) => {
+ const [store] = globalSync.child(directory, { bootstrap: false })
+ return Object.values(store.session_status).some((status) => status?.type === "busy" || status?.type === "retry")
+ }),
</file context>
| const [store] = globalSync.child(directory, { bootstrap: false }) | |
| const [store] = globalSync.peek(directory, { bootstrap: false }) |
| return budget > 16_000 ? "max" : "high" | ||
| } | ||
|
|
||
| export function parseOpenAiVariant(body: any) { |
There was a problem hiding this comment.
P2: This function should handle an undefined payload; otherwise variant parsing can throw before fallback logic runs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/console/app/src/routes/zen/util/variant.ts, line 19:
<comment>This function should handle an undefined payload; otherwise variant parsing can throw before fallback logic runs.</comment>
<file context>
@@ -0,0 +1,21 @@
+ return budget > 16_000 ? "max" : "high"
+}
+
+export function parseOpenAiVariant(body: any) {
+ return body.reasoningEffort ?? body.reasoning_effort ?? body.reasoning?.effort
+}
</file context>
| export function parseOpenAiVariant(body: any) { | |
| export function parseOpenAiVariant(body: any = {}) { |
| return budget > 16_000 ? "max" : "high" | ||
| } | ||
|
|
||
| export function parseGoogleVariant(body: any) { |
There was a problem hiding this comment.
P2: Add a default object for body to prevent runtime crashes when payload is missing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/console/app/src/routes/zen/util/variant.ts, line 10:
<comment>Add a default object for `body` to prevent runtime crashes when payload is missing.</comment>
<file context>
@@ -0,0 +1,21 @@
+ return budget > 16_000 ? "max" : "high"
+}
+
+export function parseGoogleVariant(body: any) {
+ const thinkingConfig = body.generationConfig?.thinkingConfig ?? body.thinkingConfig
+ if (thinkingConfig?.thinkingLevel) return thinkingConfig.thinkingLevel
</file context>
| export function parseGoogleVariant(body: any) { | |
| export function parseGoogleVariant(body: any = {}) { |
| @@ -0,0 +1,21 @@ | |||
| export function parseAnthropicVariant(body: any) { | |||
There was a problem hiding this comment.
P2: Guard body in this parser; direct property access on an undefined payload will throw at runtime.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/console/app/src/routes/zen/util/variant.ts, line 1:
<comment>Guard `body` in this parser; direct property access on an undefined payload will throw at runtime.</comment>
<file context>
@@ -0,0 +1,21 @@
+export function parseAnthropicVariant(body: any) {
+ const effort = body.effort ?? body.output_config?.effort ?? body.outputConfig?.effort ?? body.thinking?.effort
+ if (effort) return effort
</file context>
| export function parseAnthropicVariant(body: any) { | |
| export function parseAnthropicVariant(body: any = {}) { |
|
|
||
| const calculateTotalOutputTokens = (u: Awaited<ReturnType<typeof getUsageInfo>>[0]) => { | ||
| return u.outputTokens + (u.reasoningTokens ?? 0) | ||
| return u.outputTokens |
There was a problem hiding this comment.
P2: Output token total now excludes reasoning tokens, making the displayed total inconsistent with the output breakdown and underreporting usage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/console/app/src/routes/workspace/[id]/usage/usage-section.tsx, line 56:
<comment>Output token total now excludes reasoning tokens, making the displayed total inconsistent with the output breakdown and underreporting usage.</comment>
<file context>
@@ -53,7 +53,7 @@ export function UsageSection() {
const calculateTotalOutputTokens = (u: Awaited<ReturnType<typeof getUsageInfo>>[0]) => {
- return u.outputTokens + (u.reasoningTokens ?? 0)
+ return u.outputTokens
}
</file context>
| return u.outputTokens | |
| return u.outputTokens + (u.reasoningTokens ?? 0) |
Summary
Brings
anomalyco/opencodeup to v1.14.48 (ce66b191dondev). 219 upstream commits across v1.14.42 – v1.14.48. Follow-up to PR #57 which stopped at v1.14.41.Per admin call, adopted the three large upstream features in this window rather than skipping them:
packages/core/src/...LLM primitives.scoutagent for repo research, wired intoagent.tsviaPROMPT_SCOUTfromprompt/scout.txt.packages/opencode/src/server/shared/workspace-routing.ts+httpapi/{middleware,groups,handlers}/workspace*surface. Flag-gated, safe when off.Major upstream removal pulled through
PR #25667 deleted the Hono backend (~7600 LOC, 57 files removed under
packages/opencode/src/server/routes/{control,global,instance/*}.ts+ adapters/error/fence/middleware/proxy). The httpapi-server (Effect HttpRouter) is the sole server now. Took deletions verbatim — our previous in-tree edits to those files were only OpenAPI title strings (bcode/browsercode api), no real divergence to preserve. Also dropped ouropenapiHono()helper fromserver/server.tswhich was explicitly marked "delete once the Hono backend is removed."Other notable upstream changes pulled in
packages/opencode/src/util/{effect-zod,schema}.ts→packages/core/src/{effect-zod,schema}.ts(PR #26565 — mechanical import-string rewrites).cli/cmd/tui/config/legacy-keymap-transform.ts,cli/cmd/tui/context/{keybind,plugin-keybinds}.tsx,config/keybinds.ts,tui/component/{dialog-command,textarea-keybindings}.ts).Conflicts resolved (7 + 8 modify/delete)
bun.lockbun install.github/workflows/test.yml+ 7 server-route filespackage.jsonupgrade-opentuiscriptpackages/opencode/package.json@browser-use/browsercode-core, bumped to 1.14.48packages/opencode/bin/bcodeBCODE_BIN_PATHenv var +.bcodecache dir, adopted upstream's consolidatedresolvedpattern (dropped the eagerrun()blocks — now centralized at line ~190)packages/opencode/src/agent/agent.tsSkillsimport, added upstream's newFlagimportpackages/opencode/src/cli/cmd/tui/app.tsxdocs.opencommand-palette entry to upstream's new{name, title, category, run}schema (was using the legacy{value, onSelect}shape); positioned next to upstream's newapp.consoletogglepackages/opencode/src/server/server.tsopenapiHono()helper — explicitly marked for removal once Hono went awaypackages/opencode/src/session/retry.tsGO_UPSELL_MESSAGE = "Free usage exceeded", added neutralizedGO_UPSELL_URL = "", adopted upstream's newRetryReason/Retryabletypes (now used bycli/cmd/tui/routes/session/index.tsx:104and elsewhere)Yellow-zone audit
8 files touched upstream:
core/src/global.ts,agent/agent.ts,cli/cmd/run.ts,cli/cmd/tui/{app.tsx,routes/session/index.tsx},config/config.ts,provider/provider.ts,session/session.ts.Customizations preserved:
app = "bcode",BC | …terminal title, BrowserCode GitHub link,bcode.shHTTP-Referer / X-Title / X-Source across 8 providers, CerebrasX-Cerebras-3rd-Party-Integration: bcode,.bcode/plans,.bcode/agent-workspace,Skillsimport, BrowserExecute tool registration + renderer, "run bcode with a message" describe.Verification
bun install: clean (lockfile regenerated)bun run typecheck: 6/6 passed in 10.2sSync state
After this lands,
UPSTREAM.mdshowsce66b191das the latest opencode anchor — fully caught up with the latest release point.