PyIngestKit V2 — LOT-18 V1 Semantic Migration
LOT-18 closes the repository-backed V1 migration evidence matrix for the areas that were deliberately split across earlier V2 lots:
- replay (LOT-11 / LOT-18);
- PostgreSQL materialization (LOT-14 / LOT-18);
- S3/object storage (LOT-15 / LOT-18);
- plugin migration (LOT-16 / LOT-18);
- stable V1 configuration (LOT-00 / LOT-18).
The goal is semantic migration, not source-code translation.
Migration dispositions
Every V1 configuration decision is classified explicitly:
AUTOMATIC
semantics map directly to an existing V2 contract
RETAINED_V1_ONLY
stable V1 operational behavior remains readable/maintained but V2 currently
has no equivalent portable contract
REWRITE_REQUIRED
behavior is executable/job-specific and must be authored explicitly in V2
BLOCKED
required migration identity/configuration is missing
No migration silently guesses a missing semantic.
Configuration
plan_v1_config_migration(PyIngestKitConfig) consumes the already validated
stable V1 config object. It does not reimplement configuration precedence.
Safe automatic mappings include:
- V1 local artifact backend -> explicit V2 filesystem adapter roots;
- V1 S3 bucket/prefix/region/endpoint environment variable name ->
S3ArtifactStoreV2/S3DatasetVersionStoreV2configuration; - V1 PostgreSQL target identity/schema/table/load mode ->
PostgresTargetV2/TargetLoadRequestV2semantics.
The planner never resolves DSN or endpoint secret values.
The current V2 runtime has no general MetadataStore replacement. V1
SQLite/PostgreSQL runtime metadata is therefore classified
RETAINED_V1_ONLY rather than falsely mapped.
Persisted references
Stable V1 metadata rows can be converted data-only:
ArtifactRecord
-> ArtifactReference
DatasetVersionRecord
-> DatasetVersionReference
PublishedDatasetRecord + migrated DatasetVersionReference
-> PublishedDataset
The adapters preserve identity, durable locator, checksum/fingerprint, creation timestamps and native UUID run identity where available.
V1 source_uri is deliberately not copied into the migrated
ArtifactReference: historical source URLs may contain information that does
not belong in a portable storage reference. The durable storage_uri is
preferred, with the historical local materialization path used only when no
storage URI exists.
Plugins
LOT-18 does not discover or load a V1 plugin merely to guess how to rewrite it.
The safe planner assess_v1_plugin_entry_point(name, value) inspects only the
declared entry-point strings and returns REWRITE_REQUIRED.
A separate qualified anti-corruption layer,
pyingestkit.migration.v2.V1JobMigrator, accepts an already loaded V1
Job only when a caller explicitly opts in and supplies
LegacyJobMigrationHints. It may inspect job.pipeline() and step
definitions to classify ownership, but it never discovers plugins and never
executes a step. Non-V2-owned semantics are reported as manual/unsupported
migration issues rather than silently translated.
This separation is intentional. Stable V1 plugins expose executable
Job / JobDefinition / Pipeline / Step behavior. Automatically discovering
or invoking that code during migration would violate the non-executable
serialization boundary and could not infer a correct IngestionDefinition.
Plugin authors must explicitly express:
- Source;
- decoder;
- validation;
- dataset identity;
- version/publication policy;
- target materialization;
through V2 contracts and registries.
LOT-18 therefore completes plugin migration acceptance without inventing a new externally frozen entry-point group.
Replay / PostgreSQL / S3 acceptance
The migration manifest targets these V1 behaviors at LOT-18. Their executable V2 acceptance surfaces are now:
V1 replay semantics
-> ReplayServiceV2 + strict RAW-only replay
V1 PostgreSQL materialization
-> PostgresTargetV2
V1 local/remote artifact and version identity
-> ArtifactReference / DatasetVersionReference
-> File/S3 V2 stores
V1 cross-host durable replay intent
-> S3ArtifactStoreV2 + S3DatasetVersionStoreV2
-> strict replay without live source/workspace
The earlier LOT-11/14/15 CI proofs remain authoritative; LOT-18 binds those capabilities to the V1 migration evidence matrix rather than reimplementing them.
Security
LOT-18 migration tooling:
- does not call
importlibfor migration discovery; - does not discover/load plugin entry points in the safe planner;
- does not execute V1 pipeline steps;
- confines the only V1 execution-model imports to the explicit
migration.v2.V1JobMigratoranti-corruption layer; - sanitizes semantic-export locators and does not promote historical source URLs into portable V2 artifact metadata;
- does not resolve secret environment variables;
- does not deserialize executable Python objects;
- does not mutate V1 persisted records;
- fails closed where V2 requires UUID execution identity.
Compatibility
The V1 config, plugin, replay, target, metadata and versioning APIs remain unchanged. LOT-18 is additive under:
from pyingestkit.migration import ...
from pyingestkit.migration.v2 import V1JobMigrator, V1SemanticImporter
The package-root 2.0 breaking cut remains a separate milestone.