fix: verify staged mount file writes#1950
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wordpress.phpunitrun and assert test discoveryRoot cause
The direct Playground writer was treated as successful when it returned without throwing. That did not establish that the target VFS contained the same bytes, so a large staged tree could complete with a silently omitted or mismatched generated file. For Composer vendors,
composer/autoload_real.phpcould then reference aComposerStaticInit...class whose matchingcomposer/autoload_static.phpwas absent or stale, failing before PHPUnit discovery.Invariant
After each bounded direct-write batch, every target file must hash-match the exact captured host payload before staged-input materialization completes. Missing or mismatched files are rewritten through the persistent PHP runtime and hash-checked again. Any file that still cannot be preserved fails materialization instead of exposing a partial mount.
This stays generic to mount materialization: there are no Homeboy, Roadie, or Composer-specific runtime branches.
Tests and evidence
npm run buildnpx tsx tests/mount-materialization.test.tsnpx tsx tests/staged-input-materialization.test.tsnpm run test:playground-phpunit-readonly-cache-integrationautoload_real.phpandautoload_static.phpclass identities are checkedwordpress.phpunitdiagnostics reportDISCOVERY ... found=1and enterrun_testsnpm run smoke -- --group=policypassednpm run smoke -- --group=packagepassed; disposable MySQL E2E skipped because Docker is unavailablenpm run checkreached the existing main-branchcommand-registry-smokefailure tracked by command-registry-smoke fails on main: wordpress.collect-workload-result outputShape missing outputSchema id mention #1745; this branch has no diff in that contractThe reported downstream Homeboy reproduction was also attempted, but the deployed probe stopped earlier on a stale Playground archive cache lock before
wordpress.phpunitcould start. The in-repo real Playground probe above covers the corrected owner-layer path.Fixes #1949