Skip to content

fix(shadow): compare missing-table outcomes - #394

Merged
chubes4 merged 9 commits into
mainfrom
fix/mdi-missing-table-shadow-outcome
Sep 9, 2026
Merged

chubes4 merged 9 commits into
mainfrom
fix/mdi-missing-table-shadow-outcome

Conversation

@chubes4

@chubes4 chubes4 commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Compare missing-table outcomes independently in SQL snapshot mode. Preserve explicit source absence observed through MySQL error1146, execute the native query, and normalize its unsupported-table result only when that source absence is proven. Unknown registry entries and duplicate JOIN aliases remain unsupported.

Compare caller-visible error state (false return, errno, rows, columns, affected rows, sticky insert ID and exception state), excluding server-specific error text. Report compatible reads separately from compatible missing-table errors. Other capture failures remain limitations; observers cannot change authoritative query outcomes.

Verification

Exact candidate 4d8afbd9e589433fe86f2a0605537b0e5bcbebd7 includes main fe664766.

Parent independently ran the real DME multisite lifecycle on Linux: WordPress7.1, PHP8.3, PHPUnit9.6.35,4 tests17 assertions passed. Report:1141 observations;398 compatible reads plus1 compatible missing-table error;21 unsupported native observations;0 snapshot limitations;0 mismatches;721 ignored;0 verifier failures/dropped.

Formal artifact SHA-256:dad7592cd48afedf306ed719440c3f797e95eb0173d2cb72a0c0b19affb91098. Fresh fixture values can change the hash.

Parent also passed both snapshot and verifier regressions at exact head, including source recovery after table creation, duplicate-alias rejection, unknown-source rejection and different-native-error mismatch.

Reproduction

Use the pinned DME/Data Machine and managed wp-phpunit fixture configuration documented in #386, then run php tests/run-mysql-shadow-corpus.php. The runner emits exact source revision, PHPUnit result, normalized report and formal artifact reference.

php tests/smoke-native-shadow-sql-snapshot.php
php tests/smoke-native-shadow-verifier.php

Supports #377; full consumer/SQL parity remains open. No release or deployment.

AI Assistance

OpenAI GPT-5.6 Terra (openai/gpt-5.6-terra) via OpenCode implemented and tested the error-path contract. GPT-6 Astra (openai/gpt-6-astra) via OpenCode reviewed error classification and state semantics, independently reran the exact Linux corpus and regressions, and finalized evidence under Chris Huber's direction.

@chubes4
chubes4 marked this pull request as ready for review September 9, 2026 14:05
@chubes4
chubes4 merged commit 0adc126 into main Sep 9, 2026
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