Skip to content

fix(core): match dev patch behavior#37709

Merged
rekram1-node merged 8 commits into
v2from
fix-patch
Jul 20, 2026
Merged

fix(core): match dev patch behavior#37709
rekram1-node merged 8 commits into
v2from
fix-patch

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make the V2 patch tool match origin/dev apply_patch behavior, except for the tool name
  • port every applicable V1 parser and tool behavior test to V2
  • preserve V1 parsing, lexical path handling, permission ordering and scopes, overwrite, move, symlink, BOM, diff, count, error, and sequential mutation semantics

Testing

  • bun test test/patch.test.ts test/tool-patch.test.ts from packages/core (48 passed)
  • bun typecheck from packages/core
  • git diff --check
  • independent source and test-port parity review

Scope

This PR is intentionally limited to behavioral parity with dev apply_patch. Optimizations, stricter parsing, additional safety behavior, and Codex-specific changes are deferred.

@rekram1-node
rekram1-node force-pushed the fix-patch branch 3 times, most recently from be0ba65 to 87f4648 Compare July 19, 2026 04:51
@rekram1-node
rekram1-node changed the base branch from dev to v2 July 19, 2026 04:51
@rekram1-node rekram1-node changed the title fix(core): restore patch tool parity fix(core): match dev patch behavior Jul 20, 2026
@rekram1-node
rekram1-node merged commit 455b5d3 into v2 Jul 20, 2026
10 of 12 checks passed
@rekram1-node
rekram1-node deleted the fix-patch branch July 20, 2026 21:46
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 20, 2026
* upstream/v2: (63 commits)
  feat(codemode): add Set method parity (anomalyco#38000)
  fix(core): match dev patch behavior (anomalyco#37709)
  refactor(tui): migrate diff viewer to V2 theme (anomalyco#37999)
  feat(ai): support image-guided generation (anomalyco#37998)
  feat(ai): add Z.ai image generation (anomalyco#37780)
  chore: merge dev into v2 (anomalyco#37996)
  refactor(tui): expose theme colors as properties (anomalyco#37995)
  feat(ai): add Google image generation (anomalyco#37781)
  fix(cli): isolate bun updater cache
  feat(ai): add xAI image generation (anomalyco#37778)
  feat(codemode): add groupBy parity (anomalyco#37992)
  refactor(ai): infer image provider options (anomalyco#37948)
  fix(core): ignore empty provider api keys
  feat(tui): add categorical theme hues (anomalyco#37985)
  refactor(core): inject models options
  refactor(server): inject database options
  fix(tui): make migrated selected background transparent (anomalyco#37967)
  feat(codemode): complete date parity (anomalyco#37960)
  feat(codemode): complete regexp and math parity (anomalyco#37955)
  fix(tui): adapt file badge accent to theme mode (anomalyco#37953)
  ...
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (65 commits)
  refactor(server): inject runtime options
  refactor(server): centralize server options
  feat(codemode): add Set method parity (anomalyco#38000)
  fix(core): match dev patch behavior (anomalyco#37709)
  refactor(tui): migrate diff viewer to V2 theme (anomalyco#37999)
  feat(ai): support image-guided generation (anomalyco#37998)
  feat(ai): add Z.ai image generation (anomalyco#37780)
  chore: merge dev into v2 (anomalyco#37996)
  refactor(tui): expose theme colors as properties (anomalyco#37995)
  feat(ai): add Google image generation (anomalyco#37781)
  fix(cli): isolate bun updater cache
  feat(ai): add xAI image generation (anomalyco#37778)
  feat(codemode): add groupBy parity (anomalyco#37992)
  refactor(ai): infer image provider options (anomalyco#37948)
  fix(core): ignore empty provider api keys
  feat(tui): add categorical theme hues (anomalyco#37985)
  refactor(core): inject models options
  refactor(server): inject database options
  fix(tui): make migrated selected background transparent (anomalyco#37967)
  feat(codemode): complete date parity (anomalyco#37960)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant