chore: upstream sync v1.4.x (252 commits)#196
Merged
Conversation
…of type 'reasoning' was provided without its required following item (anomalyco#25007)
…in task child sessions (anomalyco#23290)
Generate linked sourcemaps when building beta releases to help users debug issues with readable stack traces.
…o#25600) Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Conflict resolutions (handled by Codex CLI route C): - packages/opencode/src/cli/cmd/run.ts: kept upstream effectCmd conversion + fork cwd canonicalization - packages/opencode/src/plugin/codex.ts: kept upstream provider-model hook - packages/opencode/src/session/prompt.ts: merged upstream tracing with fork tool.execute.error hook - packages/opencode/test/session/prompt.test.ts: kept both upstream v2 event test and fork permission merge test Preservation: - packages/guardrails/profile/plugins/*.ts: 7 files, 4262 LOC intact - packages/plugin/src/index.ts: 337L intact No fork-only hits for Adaptor/registerAdaptor/AppRuntime/runPromise/tool/bash imports. Co-Authored-By: Codex CLI (route C) <noreply@openai.com>
- team.test.ts: ask callback now returns Effect.void instead of Promise<void>
Instance.disposeAll -> disposeAllInstances (fixture helper)
- agent.test.ts: Instance.provide -> provideTestInstance (3 occurrences)
- config.test.ts: Instance.provide -> provideTestInstance (1 occurrence)
Migration follows upstream commit 4c4860f 'Replace Instance.disposeAll/load with fixture helper'
and the Effectified AskInput callback signature.
Refs #195
The packages/sdk/js/build.ts script writes openapi.json to packages/sdk/js/ during code generation and removes it on success, but interrupted builds can leave the file behind (~500KB). The canonical spec lives at packages/sdk/openapi.json. Ignore the transient copy so it cannot be accidentally committed. Refs #195
|
This pull request has been automatically closed. |
Upstream's new provider.models hook (anomalyco#25646) filters models by ALLOWED_MODELS before the guardrail allow-list applies. Without these entries, fork guardrails that whitelist gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.1-codex-max, and gpt-5.2-codex would be silently bypassed when the user is on ChatGPT OAuth. Refs PR #196 review feedback (MEDIUM).
Author
|
Addressed MEDIUM review finding: restored 4 fork-specific gpt-5.1-codex models in |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
terisuke
added a commit
that referenced
this pull request
May 4, 2026
…p + clean-room provenance)
- CRITICAL: reject rename when target file already exists (data loss prevention).
executeHashlineEdits now stats the rename target before any write and
refuses if a different file already exists at that path.
- HIGH: resolveAll now detects overlapping line ranges across edits and
rejects the entire batch atomically. Replace+delete that share even a
single line, two appends at the same line, etc. were silently corrupting
the file because the reverse-line apply ran later edits against a
shifted buffer.
- HIGH: clean-room provenance hardened.
* HASH_ALPHABET replaced with an independently chosen 16-letter consonant
set "BCDFGHJKMNPQRSTV" (vowel-free, drops L/W/X/Z for visual clarity).
Empty-line anchor is now '1#BH' (was '1#ZR').
* annotateLines separator changed from '|' to U+001E (ASCII Record
Separator), exported as ANCHOR_CONTENT_SEPARATOR. Path/code-safe
control char that cannot appear in legitimate file paths or source
tokens, eliminating downstream parsing ambiguity.
* Clean-room header copied to every source file (anchor/edit/hash/
index/types) documenting that constants are independently chosen and
not derived from any third-party source.
- MEDIUM: empty-file edit consistency. A pre-existing zero-byte file with a
line-1 edit no longer wrongly rejects (synthesizes the empty-line
buffer the same way createIfMissing does).
- MEDIUM: errors-as-values for assertValidArgs. Renamed to checkArgs and
surfaces structural failures as { ok: false, error } instead of
throwing — callers no longer need try/catch.
- MEDIUM: tempfile entropy. atomicWrite now appends 4 random bytes (8
hex chars) to the temp suffix on top of pid + timestamp.
- MEDIUM: rename parameter shadow fixed. evaluateRename's parameter
renamed to renamePath to avoid shadowing the node:fs/promises#rename
import.
Regression tests added:
* refuses to overwrite an existing file at the rename target (CRITICAL)
* rename to the same path as filePath is allowed (no-op move)
* rejects overlapping replace+delete on the same line (HIGH)
* rejects two replaces that share even a single line
* rejects two appends at the same line (ambiguous order)
* allows non-overlapping edits at adjacent lines
* accepts a line-1 replace against a pre-existing zero-byte file
* returns ok:false (no throw) for missing filePath / non-array edits / null args
* ANCHOR_CONTENT_SEPARATOR is U+001E
Independently chosen alphabet 'BCDFGHJKMNPQRSTV' and Record Separator
(U+001E) — not derived from upstream.
Tests: 54 pass / 0 fail (was 45 pass; 9 new regressions).
Typecheck: 13/13 successful.
Refs PR #196 reviews (code-reviewer + Codex CLI route A)
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.
Issue for this PR
Closes #195
Type of change
What does this PR do?
Pulls in 252 commits from upstream
anomalyco/opencodedev branch into the fork'sdev. Includes the upstream Effect.ts refactor (EffectifiedModelsDev,InstanceBootstrapService,AppRuntime.runPromiseremoval, workspace adapter rename).Fork-only adaptations:
provideTestInstance,disposeAllInstances)ask: async () => {}callbacks in team.test.ts →ask: () => Effect.voidfor the new Effect-typed AskInput signatureALLOWED_MODELS(upstream's new provider.models hook would otherwise filter them out before our guardrail allow-list applies)Guardrails plugins (4262 LOC) preserved untouched — upstream never had this directory.
How did you verify your code works?
bun typecheck: 13/13 packages passbun --cwd packages/opencode run build: smoke test pass (0.0.0-feat-upstream-sync-v1-4-4-202605040951)bun --cwd packages/opencode test test/plugin/team.test.ts: 42/42 pass (the fork's largest custom test)Screenshots / recordings
N/A (no UI changes).
Checklist