Parent Epic: #2813
Type: Chore
Related work: #211
What
Extension.Entry stores a source_type discriminator beside nullable path, git, hex, and module fields, allowing contradictory and incomplete source combinations.
Why
Tagged source data makes invalid combinations unrepresentable and gives install, compile, update, lazy-load, and display paths exhaustive matches.
Acceptance Criteria
- Extension.Entry carries one tagged source value with the required payload for path, git, Hex, or module sources.
- Constructors reject incomplete source data structurally rather than through downstream guards.
- Loaded runtime module identity remains separate when it is not part of source identity.
- Install, compile, update, lazy-load, display, persistence, and reload behavior remains compatible.
- Table-driven tests cover every source variant and reject invalid construction.
Developer Notes
Approach: Replace source_type plus nullable companion fields with tagged tuples or focused source structs. Put source-specific accessors and transitions on the owning value.
Files/areas: lib/minga/extension/entry.ex, lib/minga/extension/supervisor.ex, lib/minga/extension/lazy.ex, extension source tests
Testing: Run extension path, git, Hex, module, lazy-load, reload, update, and persistence suites.
Parent Epic: #2813
Type: Chore
Related work: #211
What
Extension.Entry stores a source_type discriminator beside nullable path, git, hex, and module fields, allowing contradictory and incomplete source combinations.
Why
Tagged source data makes invalid combinations unrepresentable and gives install, compile, update, lazy-load, and display paths exhaustive matches.
Acceptance Criteria
Developer Notes
Approach: Replace source_type plus nullable companion fields with tagged tuples or focused source structs. Put source-specific accessors and transitions on the owning value.
Files/areas:
lib/minga/extension/entry.ex,lib/minga/extension/supervisor.ex,lib/minga/extension/lazy.ex, extension source testsTesting: Run extension path, git, Hex, module, lazy-load, reload, update, and persistence suites.