Skip to main content

MEP-75 Phase 14: Full 24-Package Fixture Corpus Gate + mochi.lock Round-Trip

Status: LANDED 2026-05-30 00:43 (GMT+7)

Goal

Define and exercise the full 24-package fixture corpus against every prior MEP-75 phase component. Validate that the extern emitter, glue emitter, typemap, async detector, and mochi.lock round-trip all work correctly across the complete set of representative PHP package surfaces.

Corpus Packages (24)

#PackageKey patterns exercised
1guzzlehttp/guzzleHTTP client, async promise returns, interface
2symfony/consoleAbstract command class, interface params
3symfony/http-foundationRequest/Response classes, primitive returns
4laravel/frameworkmixed return (skip), container pattern
5phpunit/phpunitAbstract test case, void returns, mixed params
6monolog/monologPSR-3 interface implementation
7doctrine/ormObject param (skip), entity manager interface
8psr/logPure interface with 8 void methods
9nesbot/carbonStatic factory methods, class return type
10vlucas/phpdotenvStatic constructor, void methods
11league/flysystemFilesystem interface + implementation
12paragonie/random_compatTop-level functions (not class methods)
13ramsey/uuidStatic UUID factory, interface return
14bacon/bacon-qr-codeSimple class with string/void methods
15spatie/laravel-permissionStatic finder, fluent return type
16barryvdh/laravel-debugbarmixed param (skip), bool returns
17composer/composerCross-package class dependencies
18phpmailer/phpmailerbool returns, void SMTP config
19symfony/mailerMailer interface + implementation
20league/oauth2-serverOAuth2 server, interface response return
21firebase/php-jwtStatic encode/decode, array param (skip)
22socialiteproviders/googleOAuth provider, class return types
23stripe/stripe-phpPayment intent static factory
24pestphp/pestTest suite static factory, int return

Gate Criteria

  • corpus.All() returns exactly 24 fixtures
  • All fixture names are unique
  • externemit.Emit succeeds (no error, non-nil result) for all 24 fixtures
  • Packages with mappable methods produce non-empty MochiSource
  • Packages with mixed returns produce at least one SkipReport
  • glue.Emit succeeds for all 24 fixtures
  • All glue namespaces begin with MochiGlue\
  • mochi.lock Format + Check round-trip is clean (no false-positive drift)
  • Drift is detected when dist SHA-256 changes
  • Async detection finds promise methods in guzzlehttp/guzzle
  • typemap.Map correctly maps primitive types and skips mixed/object
  • All fixtures have non-nil surfaces with non-empty PackageName

Files Landed

  • package3/php/corpus/corpus.go -- 24 Fixture definitions + All()
  • package3/php/corpus/corpus_test.go -- 13 integration test functions
  • website/docs/implementation/0075/index.md -- all phases marked LANDED

Test Coverage (13 tests)

  • TestCorpusSize: exactly 24 fixtures
  • TestCorpusNoDuplicateNames: all names unique
  • TestCorpusExternEmitDoesNotPanic: all 24 surfaces emit without error
  • TestCorpusExternEmitProducesOutput: method-bearing surfaces have output
  • TestCorpusExternEmitExternFnPresent: mappable packages have extern fn
  • TestCorpusMixedTypeSkipped: mixed-returning packages have SkipReports
  • TestCorpusGlueEmitDoesNotPanic: all 24 surfaces produce glue files
  • TestCorpusGlueNamespaceCorrect: all namespaces start with MochiGlue\
  • TestCorpusLockRoundTrip: Format + Check round-trip is clean
  • TestCorpusLockDriftDetected: changed hash triggers drift entry
  • TestCorpusAsyncDetection: guzzlehttp/guzzle has async extern fn
  • TestCorpusTypemapPrimitiveTypes: string/int/bool/float/void map; mixed/object skip
  • TestCorpusAllFixturesHaveSurface: no nil surfaces or empty PackageName