Skip to content

fix(tests): restore framework tables after schema scope changes - #1040

Merged
1 commit merged into
mainfrom
workflow/1036-test-schema-boundary
Nov 5, 2026
Merged

1 commit merged into
mainfrom
workflow/1036-test-schema-boundary

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Mixed Testbench applications can share RefreshDatabase's migrated flag while recreating the physical database with different migration paths. The next truncating test then queries removed framework tables, as seen in #1036's original MySQL shard failure. Track the test harness's table inventory by connection, database and prefix; restore its migrations and invalidate Laravel's table cache when that inventory changes.

The regression primes the truncation cache, removes framework tables and leaves a committed workflow row. The next test must restore framework tables and clear data. On unchanged main 98bd986 it produces a missing-table error (3 tests, 7 assertions, 1 error); this candidate passes all 3 tests and 16 assertions with the same PHP 8.4.27 / Laravel 13.40 public dependency graph. Focused ECS and configured PHPStan pass, and exact ownership cleanup is empty.

A separate controlled MySQL source comparison now also reproduces the missing testbench.cache boundary on unchanged main (22 tests, 71 assertions, 11 errors); this exact candidate passes the same primer and unchanged ActivityEntryArguments→ActivityOptions classes (22 tests, 134 assertions). The original hosted dependency graph and full preceding shard prefix were not rerun.

Draft: the full Quality Cycle and Laravel 10–12 execution still need qualification. Full hosted run 41966046437 remains failed, with complete attribution on #1036; no rerun was requested. PostgreSQL shard 3's separate timeout is addressed in draft #1041. This changes test infrastructure only.

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Workflow owns one bounded local source control for this draft's remaining MySQL schema boundary. It compares maintained main 98bd986 with this exact candidate 3fbc69e, using the same cached public PHP 8.4.27 / Laravel 13.40 dependency graph and MySQL 8.4 image. This is a narrower source graph than the original hosted PHP 8.3 / PHPUnit 12 run and will be attributed separately.

The control primes the common framework/table cache, explicitly invalidates the shared migration flag, then runs the unchanged V2ActivityEntryArguments and V2ActivityOptions classes in that order. The explicit primer models a valid schema-refresh boundary; it does not claim to replay all preceding files from the original failed shard. Expected predecessor result is SQLSTATE 42S02 on a missing framework table; candidate must restore the schema and pass the same tests.

One isolated internal Docker network, no published ports, no external service or credential access. Disposable MySQL: 1 CPU / 2 GiB / 256 PIDs with a 1 GiB temporary data mount; one sequential source-test container: 1 CPU / 1 GiB / 256 PIDs. At most one PHP test job, 100 seconds per predecessor/candidate command, 60 seconds for DB readiness and 360 seconds absolute cleanup. An independently armed guardian owns exact nonce/name cleanup; no pull, image build, dependency solve, Redis, whole-feature/cold test or hosted rerun is involved. Cloud confirmed this does not duplicate its separate #1034 ownership.

Workflow will preserve original results and observed cleanup. Full Quality Cycle, Laravel 10–12 execution and full backend qualification remain open.

@rmcdaniel

Copy link
Copy Markdown
Member Author

The bounded MySQL source comparison is terminal expected predecessor failure / candidate pass. Exact candidate remains 3fbc69ee1d569e352496825f44f85512364975ce; no implementation change followed the earlier focused ECS/Stan and normal hosted PR checks (17 successes, 7 declared profile skips).

Source Result on the same PHP 8.4.27 / Laravel 13.40 / cached MySQL 8.4 graph
Main 98bd986 + common primer + unchanged target classes Exit 2; 22 tests, 71 assertions, 11 errors. First error is SQLSTATE 42S02: missing testbench.cache at V2ActivityOptions after V2ActivityEntryArguments.
Candidate 3fbc69e + identical primer/classes Exit 0; 22 tests, 134 assertions, 16.336 seconds of PHPUnit time.

The primer first establishes and caches the common schema, then explicitly invalidates the shared migration flag. The standalone class refreshes the same physical DB using its narrower migration paths; the common class must restore its complete table inventory. This is a controlled reproduction of the boundary, not a replay of the original shard's entire preceding prefix or its PHP 8.3 / PHPUnit 12 graph.

Bound source archives: predecessor SHA-256 3914468019c19a04f7829f03663d5f69effc821445c9da5efe1a4f8ec013e4b0; candidate 490ad5bdbd2cc0e4095e5f0352f48dcf041aacef2a02e25da3069e0392aaab4e. Result logs: predecessor f2949dd57f2dba90764b33818cbd06ffd67b96bb77704d48ee45ef765d3f0e56; candidate 8623f9a3e0e9a1669b27ed55921f8fb0b725bfbbe967a0dae5e143c98e0f6ee4.

The whole cell took 36.196 seconds. Controller PID 893786 and independent guardian 893834 are absent. The database was removed at 2026-11-05 10:32:43.159780 UTC, and the guardian independently observed zero owned containers/networks at 10:32:43.807318. A subsequent exact prefix/name/process check is empty. No images were built or acquired; the DB used a temporary 1 GiB data mount and no ports were published. Closed controller inventory SHA-256 287ccde8c75d2abb546bd381fa8225474e2ec5d77ccc680826f4fc4c2fdd3f29.

Workflow owns remaining full-cycle and compatibility qualification; General owns integration/any full-QA successor selection. The original #1036 run stays failed, #1041's timing correction remains separate, and Cloud's #1034 feature/cold ownership is unchanged. Laravel 10–12 execution, full unit/coverage/features and combined-source qualification are still open.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact head 3fbc69ee1d569e352496825f44f85512364975ce is now included without file changes in P1 #1043's frozen combined reference 31aa05e42501a206bb2ce5d55b2fb7aeaa708201. Its one selected full run, attempt 1, succeeded: 21 jobs passed and four policy jobs skipped. Full attribution includes full ECS/Stan, 5,868 unit tests, all MySQL/PostgreSQL feature shards, configured MariaDB profiles, coverage ratchets and four Laravel upgrades. All three schema-boundary unit controls passed. This is combined-source evidence with the contributor fix and #1041, not a new standalone full run on this PR.

The original #1036 full failure remains recorded. This test-harness correction is a QA prerequisite for the P1 qualification rather than a runtime dependency. Workflow owns source follow-through; General owns integration of the preserved contributor fix, this PR and #1041. The separate new-path MariaDB control is still under review. No merge or repeated full run was performed.

@rmcdaniel rmcdaniel closed this pull request by merging all changes into main in e366443 Nov 5, 2026
@rmcdaniel
rmcdaniel deleted the workflow/1036-test-schema-boundary branch November 5, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant