Repository navigation
test(mysql): WU-2 schema compliance for PHP-created MySQL test tables (F4-16) - #71
Conversation
… (F4-16) Document policies and add column/table COMMENTs for the lazy-savepoint and example-cleanup test tables (PACKAGE_BUILDING_STANDARD section 6), and pin the index set with an information_schema guard test. DDL structure is unchanged: no display_order index is added and UNIQUE u_updated is kept, so access paths and lock behaviour are preserved. Ref #64, #37. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
مراجعة القيادة الفنية المستقلة — WU-2 / PR #71 — CHANGES REQUIREDالحكم: MERGE NO-GO. هذه مراجعة واحدة للـdiff التراكمي كاملًا وجميع الملفات الثلاثة، وليست مراجعة ملاحظة واحدة ثم التوقف. لا تغيير Runtime أو Public API أو فهارس/قيود أصلية. أضفت Mermaid Follow Chart بالإنجليزية إلى وصف PR بنفسي. الهوية المتحقق منها من GitHub:
الملاحظات المجمعةF71-01 — BLOCKER: Lowest-dependencies PHPStan fails in the newly added test.
F71-02 — BLOCKER: regression guard does not cover the sixth repaired table.
F71-03 — REQUIRED DOC: policy header incomplete for the Example collision table.
F71-04 — REQUIRED ACCURACY: narrow two documentation guarantees to what is proven.
ما تأكدت من نجاحه
المطلوب: عالج F71-01..04 في commit جديد دون amend/force-push، وأعد إثبات RED/GREEN المحدد وبوابات MySQL (Integration مرتين، Consumer، residue)، ثم اكتمال CI 10/10 على HEAD الجديدة. لا تُدخل WU-3 أو تغييرات |
- F71-01: read information_schema index rows through fetchColumn so the guard passes PHPStan max on both the latest and the lowest dependency sets. - F71-02: assert TABLE/COLUMN COMMENT and PRIMARY KEY (id) on the Example collision table, inside the try so a failing assertion still drops it. - F71-03: document the collision table policy (no soft delete, display order, uniqueness beyond PK, or FK; PK is the only access path). - F71-04: narrow the guard description to index declarations and document that soft-delete filtering is active via the default deleted_at but never exercised. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
تسليم المنفذ بعد مراجعة القيادة — معالجة F71-01..04Commit جديدة بلا amend أو force-push. لا تغيير في
F71-01. أقر بأن هذا خلل حقيقي في عملي: لاحظت سابقًا ثلاثة أخطاء PHPStan بعد F71-02.
F71-03. سياسة جدول التصادم موثقة في docblock الاختبار: بلا soft delete أو display order أو uniqueness غير الـPK أو FK، والـPK هو مسار الوصول الوحيد لأن الجدول يُنشأ ويُحذف فقط. F71-04.
الإثبات المحلي على HEAD الجديدة (MySQL 8.4.10 حقيقي، PHP 8.4.4):
لا Merge. بانتظار الـFresh Full Re-Review. |
Fresh Full Re-Review — WU-2 / PR #71 — MERGE GO (Owner authorization required)أجريت مراجعة مستقلة للشجرة النهائية والـdiff التراكمي كاملًا بعد التصحيح، وليس إعادة فحص F71-01..04 منفردة. راجعت الملفات الثلاثة بالكامل، المصدر المعياري المثبت وAGENTS/Manifest، اختبارات التزامن الفعلية، DDL قبل/بعد، تقرير وتصحيحات المنفذ، ونتائج وظائف GitHub CI وسجلاتها. حدّثت وصف الـPR بنفسي ليعرض هوية الـHEAD النهائية والبوابات وFollow Chart الصحيحة. الهوية والنطاق
Full final acceptance matrix
CI verified directly on exact HEAD — Run 3981483228410/10 SUCCESS, including mandatory CI Gate.
Separately recorded: local Decision and boundariesWU-2 is accepted for Owner-authorized MERGE GO on this exact HEAD/Tree. No outstanding WU-2 findings. This is not a merge operation or release approval. PR remains Draft until the Owner decides; #37 remains RELEASE BLOCKED, WU-3 #65 and documented F4-04 #66 remain separate. After the Owner merges, reconcile actual merge commit/tree against the reviewed tree, post-merge CI, issue #64/umbrella #37, then proceed in approved work-unit order. No database migration, cache clearing or production deployment is implied by this test-only change. |
الملخص والنطاق
WU-2 / Issue #64 — معالجة F4-16 وفق Pinned PACKAGE_BUILDING_STANDARD §6 لجداول اختبار MySQL المُنشأة داخل PHP.
Closes #64 · Refs #37 (RELEASE BLOCKED؛ لا Tag/Release/version/deploy، والدمج إلى
mainبقرار المالك فقط).Git identity — final reviewed candidate
3b1af0d74eba809486f04aa34570d12dc2afede3· Tree:de85ce1edba60581c3b95793af0c57b3a5cf50b7eb67ac2a261ecf63930ae898e6b622ef0bd60a6718e492f87a3a009a8479d78ad2e5226a0159caa1src/, public API, Composer files, tracked schema fixtures, CI/workflows, or pinned standards; original DDL column types, PKs, secondary indexes, InnoDB engine and transaction scenarios stay unchanged.Schema coverage and policy
tests/Support/MySql/LazySavepointSchema.php: policy docblock for five test tables (plain, unique, audit, marker, fill); meaningful TABLE/COLUMN COMMENTS.display_orderdeliberately remains unindexed to retain the locking test's current access path;UNIQUE u_updated (updated_at)remains for original 1062 failure. Tests retain the default activedeleted_atsoft-delete filter; none soft-deletes a row.tests/Integration/Examples/ExampleSchemaCleanupTest.php: colliding sixth test table gains documented no-FK/no-soft-delete/no-display-order/PK-only policy and TABLE/COLUMN COMMENTS. Aninformation_schemaassertion checks the comments andPRIMARY KEY (id)insidetry/finally, preserving cleanup even on failing assertions. Original 1050 and metadata-lock scenario remain.tests/Integration/Support/LazySavepointSchemaComplianceTest.php: 5 data-provider cases check comments,PRIMARY KEY (id), and exact declared secondary indexes. Uses typedfetchColumn()outputs to work with both PHPStan 2.1.0 and 2.3.1. It guards index declarations, not optimizer plans; separate real-MySQL E2E tests guard locking semantics.Schema Compliance Matrix
maa_persistence_test_lsp_plainiddisplay_ordermaa_persistence_test_lsp_uniqueidu_updatedUNIQUE onupdated_atmaintains 1062 pathmaa_persistence_test_lsp_auditidmaa_persistence_test_lsp_markeridmaa_persistence_test_lsp_fillidmaa_example_items_cleanup_*idTest table identifiers were preserved to avoid changing existing test contracts and residue detection. Existing
tests/Fixtures/MySql/*.sql, examples, consumer fixtures and residue tests are unchanged.Evidence and validation
GitHub CI Run #39814832284 on the exact HEAD above: 10/10 completed successfully, including Workflow lint, Quality, Unit/Regression on PHP 8.2/8.3/8.4/8.5, Lowest Dependencies on PHP 8.2 and real MySQL 8.4.10, Integration on PHP 8.2 and 8.5, and CI Gate.
check:residuePASS).composer check:loweston PHP 8.4.4 / Composer 2.8.6 stops at audit of dev dependencies; the same full required lowest-dependency gate passes in GitHub CI on minimum supported PHP 8.2. Do not misattribute this to WU-2 or suppress advisories. WU-3 handles policy separately.Existing mutex/savepoint/deadlock integration tests preserve original 1062, 1205, 1213, scope locks and caller-owned transaction semantics. No SQLite/mocks replace real service verification.
Follow Chart
flowchart TD A[Integration suite on real MySQL] --> B{Scenario} B -->|Schema compliance| C[Initialize five lazy-savepoint fixture tables] C --> D[Inspect table and column comments, primary and secondary indexes] D --> E[Drop fixture tables] B -->|Transaction and lock regression| F[Initialize identical fixture structure] F --> G[Run scope locks, lazy savepoints and caller-owned transactions] G --> H{Failure scenario} H -->|Duplicate key| I[Assert original 1062 and rollback behavior] H -->|Lock wait| J[Assert original 1205 and transaction state] H -->|Deadlock| K[Assert original 1213 and victim behavior] H -->|Normal or false result| L[Assert changes, rollback and caller work] I --> M[Rollback open transactions and remove fixtures] J --> M K --> M L --> M B -->|Example cleanup| N[Create pre-existing collision table] N --> R[Assert table and column comments and primary key] R --> O[Run example setup and assert 1050 and cleanup] O --> P[Remove test-created objects] E --> Q[Repeat integration suite and check MySQL residue] M --> Q P --> Q🤖 Generated with Claude Code