mjdi

Search documentation

Search the mjdi v0.10.0 documentation

mjdi docsv0.10.0latest

Migration notes (0.9.0)

Every change in mjdi 0.9.0 classified per the release policy. The default

Source: mjdi/docs/migration-notes.md

Every change in mjdi 0.9.0 classified per the release policy. The default is documenting and testing existing behavior — no silent breaking changes.

Additive (new API, no existing code affected)

AdditionWhereNotes
debug_tracking container/scope parameter (5th, default False)Container, Scope, create_scope, the guards and testing helpersExisting spellings (Container[reg], Container[reg, True], Container[reg, True, True], Container[reg, True, True, False]) keep their exact meaning; the new parameter defaults to off.
DebugLog typemjdi.observabilityPull-model log; exported with the observability family.
debug_report() / debug_count() / was_closed()Container, Scopedebug_* accessors return empty/zero in the default specialization; was_closed() is informational in all specializations.
Destructor diagnostics MJDI-D001/D002debug_tracking=True specializations onlyPrint-only, at drop time; the default specialization never prints.
Factory-failure wrapper MJDI-R004FactoryProvider.supply_asSee "behavior clarification" below.
Stable diagnostic IDs in message textevery diagnosticSee "behavior clarification" below.
scripts/validate_metadata.py, scripts/release_update_docs.py, scripts/test_inventory.py, scripts/release_gate.shrelease toolingNot part of the runtime library.
New test files, fixtures, and golden checkstests/, scripts/run_tests.shPurely additive; no existing test weakened or deleted.

Behavior clarifications (messages only; failure modes unchanged)

  1. Diagnostic messages now end with [diagnostic MJDI-XXX]. Tests that match message fragments (substring matches) are unaffected — the stable leading mjdi: fragments are unchanged. Tests that matched a whole message verbatim need the suffix added (mjdi's own suite pins fragments, not whole messages).
  2. Factory failures are wrapped (MJDI-R004). Previously the factory's error propagated verbatim; it now propagates wrapped with the service type, the operation, and the original text preserved as Underlying cause: <original>. Any test matching the original fragment keeps passing; tests asserting the exact full message need updating. The error type and raisability are unchanged.
  3. MJDI-R001/MJDI-R002 messages gained remediation text (the with_scope guard; the validate_runtime() startup suggestion). Same failure modes, same leading fragments, same IDs (R001/R002 were already the catalog's pinned IDs).

Bug fixes (correctness, no API change)

  • override_missing_target_message embedded the wrong diagnostic ID (MJDI-E011, which belongs to the unregistered-resolve diagnostic). It now embeds its correct pinned ID MJDI-E008.
  • The diagnostics catalog documented a factory-failure message pattern ("mjdi: the factory function raised") that no code emitted. The P0-08 wrapper makes the catalog entry real.
  • missing_provider_message in errors.mojo was dead code (imported by registry.mojo but never called); removed together with the unused import. The live missing-provider diagnostic is dependency_graph.mojo's MJDI-E007 builder.
  • The diagnostics catalog had cataloged five library diagnostics with no IDs (circular dependency, lifetime conflict, and the three alias validation reports). All now carry pinned IDs (MJDI-E015–MJDI-E019, MJDI-E020).

Deprecated

Nothing. mjdi has no deprecated surface in 0.9.0.

Breaking

Nothing. The close semantics, alias semantics, and scope semantics documented by the P0 work are the inherited behaviors, now pinned by tests (see docs/close-semantics.md, docs/alias-semantics.md, and docs/scope-behavior-matrix.md). Any future proposal to change one of those rows must be announced in this file first.