Skip to content

Extract atomic JSON Patch package with stable arrays and conformance tests - #1

Merged
dermatthes merged 1 commit into
mainfrom
feat/json-patch-package
Sep 10, 2026
Merged

dermatthes merged 1 commit into
mainfrom
feat/json-patch-package

Conversation

@dermatthes

@dermatthes dermatthes commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The deterministic patch engine currently lives in AI Harness, which prevents using it independently of AI and schema dependencies. This PR extracts it into phore/json-patch, under Phore\JsonPatch\.

  • Moves 12 core classes and the two existing core test files from Implementierung: atomare Struct-Patches mit stabiler Array-Adressierung phore-ai-harness#6; only their namespaces change.
  • Adds PHP 8.5 / Composer package configuration, documentation and three executable examples covering ordinary patches, atomic failure/conflicts and combined stable-array edits.
  • Compares json-patch-tests, python-json-patch and fast-json-patch tests. Includes the pinned, unchanged Apache-2.0 shared corpus with attribution/license and 75 independently written regression data sets. docs/test-coverage.md maps gaps to tests and documents deliberate differences.
  • Adds CI for Composer validation, PHPUnit and executable examples.

Validation: PHP 8.5.10 / PHPUnit 13.3.3: 200 tests, 628 assertions, 4 cases disabled upstream. Two disabled semantic cases are covered by enabled independent regressions; duplicate-member JSON syntax remains outside the native decoder. All three examples pass; composer.json validates strictly. No runtime fixes were required by the additional cases.

Runtime has no AI/schema dependencies. Existing strict defaults and typed-operation field rules are preserved and documented. Source is prepared for later publication; this PR does not tag or publish the package. Dependent Harness draft: phore/phore-ai-harness#8.

GitHub Actions verified on this commit: https://github.com/phore/phore-json-patch/actions/runs/34536649427 — Composer validation/install, 200 tests / 628 assertions / 4 upstream skips, and all three executable examples pass.

@dermatthes
dermatthes merged commit 900a12c into main Sep 10, 2026
2 checks passed
@dermatthes
dermatthes deleted the feat/json-patch-package branch September 10, 2026 22:19
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