Skip to content

Add operation-local database handler bridge - #42

Draft
alexstandiford wants to merge 1 commit into
release/2.2from
codex/operation-local-handler-bridge
Draft

alexstandiford wants to merge 1 commit into
release/2.2from
codex/operation-local-handler-bridge

Conversation

@alexstandiford

@alexstandiford alexstandiford commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the PHPNomad DB bridge for coordinated operations on database-backed datastore handlers.

  • Clones handlers and providers without mutating shared provider state.
  • Binds every local provider to the coordinator query strategy and validates exact shared cache, event, and logger policy.
  • Provides a named provider-factory seam for adapter-owned resource-bound query and clause builders.
  • Bypasses shared cache reads during the callback and buffers cache invalidation and events until confirmed commit.
  • Discards local state on rollback and returns publication and logging failures after commit.
  • Refuses attach and detach from inside the coordinated event strategy.

The design follows Siren CRM core (Source 9721), Coordinated database operations (Source 9774), Operation-local query boundary (Source 9775), and Retry-safe score projection (Source 9790).

Base and dependency

Base: release/2.2, after merged PR 37. This stays on the PHPNomad 2.2 line and does not depend on current-main identity work.

The adapter dependency is the named PHPNomad Database interface OperationDatabaseProviderFactory. The WordPress adapter must implement it with its pinned resource-bound query and clause builders before its handler callback begins. No adapter resource or global database state is used by this package.

Checks

  • vendor/bin/phpunit passes: 172 tests, 521 assertions.
  • PHPStan level 9 passes with the release/2.2 baseline and zero new findings.
  • composer validate --strict passes.
  • PHP lint and git diff --check pass.
  • PHP CS Fixer dry-run passes for the new bridge files and focused tests.
  • Hosted build-test, PHPStan, and spellcheck checks pass.

This is a draft because the adapter integrations still need to implement the named provider factory for their resource-bound builders.

@alexstandiford
alexstandiford force-pushed the codex/operation-local-handler-bridge branch 2 times, most recently from cb537b7 to 6d108b8 Compare September 20, 2026 23:28
@alexstandiford
alexstandiford force-pushed the codex/operation-local-handler-bridge branch from 6d108b8 to 4b0b770 Compare September 20, 2026 23:32
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