Skip to content

feat(edit): add native and standalone pure mutations - #3

Merged
PHPCraftdream merged 2 commits into
mainfrom
source-mutate09
Oct 27, 2026
Merged

PHPCraftdream merged 2 commits into
mainfrom
source-mutate09

Conversation

@PHPCraftdream

@PHPCraftdream PHPCraftdream commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add native and standalone pure insertion, removal, and literal-key renaming with textual and decoded-segment paths.
  • Insert only new final Object keys under existing parents; reject collisions. Remove values/subtrees/Array elements without pruning empty ancestors. Preserve rename value, order, and same-name no-op bytes.
  • Use positional splices and intended-tree verification; preserve untouched source, comments, key spelling, BOM, EOL/EOF, and inline branches.
  • Bind exact additive ABI 2 signatures with two-input removal and literal UTF-8 rename keys. Missing symbols fail explicitly; no silent pure fallback. Copy FFI output inside try/finally and free through the producing library.
  • Keep new mutations source-first without changing legacy replacement transport preflight. Match Rust malformed-UTF-8 messages while preserving raw source spans. Normalize decoded segment arrays consistently.
  • Retain regular Dumps value mapping: unsupported ArrayObject/nonempty stdClass replacements report structured Message errors rather than inventing new type support.
  • Add exact-source, independent semantic, and native/pure envelope regressions. Pin Rust core 8b6b45ffbd9e50e1588e8ab6b1ae5d422bbe8910; update source/generated EN/RU/ZH documentation.

Validation

Exact head: 8ee9af10448e1fb56036233f29cec58e6f3f8678.

GitHub CI 40485596787 passed 24/24 jobs: native and no-Rust pure matrices on Linux/macOS/Windows with PHP 7.4/8.2/8.3, packaged pure without FFI/mbstring, cycle diagnostics, debug ABI, Rust lint, and generated documentation.

The actual implementation and independent regression oracles were reviewed. Locked polydoc 0.1.0 generation/check passed. Documentation repair preserved backups. Product builds, runtime tests, and PHP lint were not run locally by the parent. Actual failures were fixed without weakening existing tests or corpus guards.

Scope

Preparation for 0.9, not a published 0.8.1 feature. ABI remains 2; no package versions, tags, or releases changed. The pre-existing local spec checkout change is excluded. Unsupported source shapes fail closed. This PR remains draft; no merge or release is requested.

🤖 Generated with Claude Code

PHPCraftdream and others added 2 commits October 27, 2026 09:08
Implement insertion, removal and literal key renaming with textual and segment paths, preserving source ranges and verifying intended semantic trees. Preserve empty ancestors, root trivia, comments, Unicode and source EOL/EOF.

Add ABI 2 mutation bindings, source-first transport diagnostics, exception-safe buffer ownership, native/pure regressions and generated EN/RU/ZH documentation. Pin the verified Rust core without changing package versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore legacy replacement transport validation without requiring a native artifact, while keeping source-first validation for new mutation APIs. Normalize unsupported edit types to structured Message errors and match Rust UTF-8 wording without changing raw spans.

Keep the documented PHP value mapping, correct invalid ArrayObject success fixtures and strengthen native/pure transport regressions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PHPCraftdream
PHPCraftdream marked this pull request as ready for review October 27, 2026 13:44
@PHPCraftdream
PHPCraftdream merged commit ef9d110 into main Oct 27, 2026
24 checks passed
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