Repository navigation
fix(shadow): wire SQL snapshot input mode - #386
Conversation
|
Codebox handoff: wp-codebox PR2490 now exposes bounded typed The capture reads declared JSON directly from the completed PHPUnit command VFS, after shutdown callbacks and before any follow-up runtime request. It validates path/JSON/size, redacts and materializes the result, and attaches a digest-bearing command artifact ref. A real PHPUnit fixture shutdown callback proved the boundary; Lab managed MariaDB/mysqli verification also passed. The MDI runner should declare its native shadow JSON as the AI disclosure: OpenCode using OpenAI GPT-5.6 Terra ( |
Summary
Adds opt-in
sql_snapshotinput mode for authoritative MySQL shadow verification, bounded classified reports, quote-aware template redaction, and correct sticky WPDBinsert_idprojection. Canonical-state comparison remains the default.Before each observed SELECT, the adapter captures authoritative schemas, raw source rows and pre-query facade state. Native SQL executes independently against typed in-memory providers. Reports retain structural diagnostics and hashes, not source values or connection details. Bounds are 16 tables, 10,000 rows per table and 8 MiB per table.
Comparison is exact by default. Unbounded SELECTs with no outer ORDER BY may compare complete duplicate-preserving row bags. Ordered and limited results remain exact; unspecified limited ordering is not evidence of full SQL parity.
Verified Evidence
Candidate
1772cd1eca7536cedca6c3222f445ef5172a3475includes main78caa45cfbb845130aafcd22e80b23a7cdf0a3ab.The real DME multisite lifecycle corpus passed on WordPress 7.1, PHP 8.3 and PHPUnit 9.6.35: 4 tests, 17 assertions. DME source was pinned to
88d55a907b12638e88baee5b492501dbed5c2665, with Data Machine31befb659aaa5268e79a0c28a16321c3ee5e1108.mdi-shadow-reportartifact reference returned with SHA-2565d7a6bf7a7009519aef3fc61e33d3b40211f4a491d1e7efc76d057f65fcdf9ad. Structural hashes may differ on fresh fixtures.Reproduction
Use a built wp-codebox checkout with the same-command
resultPathscontract, normal npm installation/postinstall, Docker-backed managed MySQL, built consumer dependencies, and a wp-phpunit vendor directory. From this repository:The runner prints its source revision, PHPUnit outcome, report and formal artifact reference, plus the retained artifact directory. Repository-local checks are
php tests/smoke-native-shadow-sql-snapshot.php,php tests/smoke-native-shadow-verifier.php,php tests/smoke-native-wpdb-lifecycle.php, andphp tests/probe-native-transaction-semantics.php.Supports #377, which remains open. This verifies bounded SQL execution over explicit snapshots, not canonical persistence parity, concurrent transaction isolation, or full consumer readiness. No release or deployment is included.
AI Assistance
OpenAI GPT-5.6 Terra (
openai/gpt-5.6-terra) via OpenCode implemented and tested the changes. GPT-6 Astra (openai/gpt-6-astra) via OpenCode coordinated review corrections, independently ran the exact candidate's Linux lifecycle corpus and focused gates, and finalized the evidence under Chris Huber's direction.