Summary
On 1.0.0-alpha05, KatalystMigration classes that are correctly discovered under scanPackages(...) are never executed at startup. MigrationFeature.onReady completes without running any migration, regardless of the runAtStartup setting.
Observed behavior
- A
KatalystMigration (via SqlMigration) placed under a scanned package is discovered and registered by the DI container — but only under its own concrete class.
KatalystMigration::class is included in AutoBindingRegistrar's reserved secondary-binding filter, and it is also absent from multiBindingSecondaryTypes.
- As a result,
context.getAll<KatalystMigration>() inside the migration feature always returns an empty list, so no migration is ever looked up or executed. There is no error, no warning — the boot log simply shows no migration activity.
Reproduction
- Consumer app on
1.0.0-alpha05 with features { enableMigrations() } (and the migrations starter on the classpath).
- Add any
KatalystMigration/SqlMigration under a scanPackages(...) root.
- Boot against an empty database.
- The migration never runs and the migration history table records nothing, even though DI discovery logs show the class was found. Verified by tracing
katalyst-di's AutoBindingRegistrar and the boot log of a real application.
Impact
- Any consumer relying on
runAtStartup migrations silently gets no schema management. Apps using schema { createMissing() } mask the problem (DDL still appears, created by the schema policy instead), which makes the failure easy to miss.
- Apps using
validateOnStartup()/none() with migration-managed schemas would fail boot or run against a missing schema.
- Direct
MigrationRunner usage is unaffected (executing the same migration through MigrationRunner in a test works and is how this was isolated).
Environment
io.github.darkryh.katalyst:*:1.0.0-alpha05 (Maven Central)
- JDK 21, Kotlin 2.4.x, Ktor 3.5.x, PostgreSQL (also reproducible in tests against H2)
Found while shipping the first KatalystMigration in a downstream application; as far as we can tell this affects every discovered migration on this version, not an edge case.
Summary
On
1.0.0-alpha05,KatalystMigrationclasses that are correctly discovered underscanPackages(...)are never executed at startup.MigrationFeature.onReadycompletes without running any migration, regardless of therunAtStartupsetting.Observed behavior
KatalystMigration(viaSqlMigration) placed under a scanned package is discovered and registered by the DI container — but only under its own concrete class.KatalystMigration::classis included inAutoBindingRegistrar's reserved secondary-binding filter, and it is also absent frommultiBindingSecondaryTypes.context.getAll<KatalystMigration>()inside the migration feature always returns an empty list, so no migration is ever looked up or executed. There is no error, no warning — the boot log simply shows no migration activity.Reproduction
1.0.0-alpha05withfeatures { enableMigrations() }(and the migrations starter on the classpath).KatalystMigration/SqlMigrationunder ascanPackages(...)root.katalyst-di'sAutoBindingRegistrarand the boot log of a real application.Impact
runAtStartupmigrations silently gets no schema management. Apps usingschema { createMissing() }mask the problem (DDL still appears, created by the schema policy instead), which makes the failure easy to miss.validateOnStartup()/none()with migration-managed schemas would fail boot or run against a missing schema.MigrationRunnerusage is unaffected (executing the same migration throughMigrationRunnerin a test works and is how this was isolated).Environment
io.github.darkryh.katalyst:*:1.0.0-alpha05(Maven Central)Found while shipping the first
KatalystMigrationin a downstream application; as far as we can tell this affects every discovered migration on this version, not an edge case.