Skip to content

Accept proven transactional table backends for identity reservation - #3485

Merged
chubes4 merged 6 commits into
mainfrom
fix/dm-377-capability-adapter
Sep 11, 2026
Merged

Accept proven transactional table backends for identity reservation#3485
chubes4 merged 6 commits into
mainfrom
fix/dm-377-capability-adapter

Conversation

@chubes4

@chubes4 chubes4 commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

The maintainer approved this generic capability API; the previous hold is lifted. This is backend-neutral application integration, not proof that MDI implements the original MySQL-specific consumer contract unchanged.

  • Ask optional wpdb::supports_transactional_tables(array $tables) about the exact reservation and posts table set.
  • Accept only strict true. Missing methods, incomplete coverage, false-like answers and exceptions fail closed.
  • Preserve schema column/index validation, the default MySQL/InnoDB verification and SQLite safeguards.
  • Introduce no MDI class dependency or fake InnoDB label.

Engine prerequisite: Automattic/markdown-database-integration#403. Track remaining MySQL parity separately in Automattic/markdown-database-integration#377.

Verification

Data Machine 4432c2433dbce2985654cc88f57dc3d5abc411f0 passed the following runs. Current b6fe3762ea92a31b30d63cb72607dfaaa8582b4f adds only a PHPCS assignment-alignment fix; its lint, audit, refactor and all four test shards passed. MDI prerequisite #403 is merged as d4907227f4c252d1f781134bd79f00f4e1a112b1.

  • Dedicated reservation tests on MySQL: 26 passed, 0 failed, 1 skipped / 27.
  • Full DME with the native provider and this consumer adapter: 1040 passed, 4 failed, 9 skipped / 1053.
  • Full DME with physical MySQL and this consumer adapter: 1046 passed, 0 failed, 7 skipped / 1053.

All 15 prior identity/upsert failure identities disappear with the adapter. The four remaining native failures require physical mysqli connections or handles. The native provider is tested at dcfe6b4; restored PR403 head 34057b0 has the identical tree. Its transaction behavior is bounded coarse serialization, not MVCC.

With the repository's configured WordPress PHPUnit database and fixtures:

vendor/bin/phpunit --configuration phpunit.xml tests/Unit/Core/Database/PostIdentityReservations/PostIdentityReservationsTest.php

The managed test runner used tests/fixtures/phpunit-isolation.php and the shared WP-CLI bootstrap. The capability fake tests routing and failure handling, not transactional behavior of MyISAM. Independent-process conformance belongs to the native prerequisite.

Operator-retained evidence: transaction-capability-full-native-dcfe6b4-4432c243, transaction-capability-full-mysql-dcfe6b4-4432c243, and dm-post-identity-mysql-4432c243-dedicated, with full JUnit and effective recipes. No consumer assertions were weakened. No release or deployment is included.

AI Assistance

OpenAI GPT-6 Astra (openai/gpt-6-astra) via OpenCode investigated transactional requirements, implemented and reviewed the generic adapter through isolated agents, corrected test-double/bootstrap and lint issues, and ran dedicated MySQL and paired native/MySQL consumer verification under maintainer direction.

@chubes4
chubes4 marked this pull request as draft September 11, 2026 01:07
@chubes4 chubes4 changed the title Accept proven transactional table backends for identity reservation [On hold] Consider transactional backend admission for identity reservation Sep 11, 2026
@chubes4 chubes4 changed the title [On hold] Consider transactional backend admission for identity reservation Accept proven transactional table backends for identity reservation Sep 11, 2026
@chubes4
chubes4 marked this pull request as ready for review September 11, 2026 01:36
@chubes4
chubes4 merged commit 44c235a into main Sep 11, 2026
30 checks passed
@chubes4
chubes4 deleted the fix/dm-377-capability-adapter branch September 11, 2026 01:54
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