mjdi

Search documentation

Search the mjdi v0.10.0 documentation

mjdi docsv0.10.0latest

mjdi Acceptance Criteria Status

Status of every acceptance criterion from the product requirements, as of

Source: mjdi/docs/acceptance-criteria.md

Status of every acceptance criterion from the product requirements, as of this release (Mojo 1.2.0). "Working test" refers to the suite in tests/ run by scripts/run_tests.sh; every criterion marked complete has one.

IDCriterionPriorityStatusEvidence
AC-001Mojo compiler target is documentedMustCompleteREADME.md, docs/technical-investigation.md (Mojo 1.2.0, 2016d0cd)
AC-002Injectable is implemented and testedMustCompletemjdi/injectable.mojo; tests/test_injectable.mojo
AC-003Dependency marker is implemented and testedMustCompletemjdi/inject.mojo; tests/test_inject.mojo
AC-004Automatic dependency discovery works for supported structsMustCompletemjdi/dependency_scanner.mojo; tests/test_dependency_scanner.mojo, tests/test_inject.mojo (nested graphs)
AC-005Compile-time registry composition worksMustCompletemjdi/registry.mojo (immutable type-level chain); tests/test_registry.mojo (chaining + immutability)
AC-006Container can be specialized using the registryMustCompleteContainer[type_of(registry)]; every container test
AC-007Type-based resolution worksMustCompleteapp.resolve[T](); tests/test_container.mojo
AC-008Nested dependency graphs resolve correctlyMustComplete2- and 3-level graphs in tests/test_inject.mojo, tests/test_container.mojo
AC-009Singleton behavior is correctMustCompleteone canonical construction per container, copies handed out; tests/test_scopes.mojo (construction-observable via value providers)
AC-010Transient behavior is correctMustCompletefresh construction per resolve; tests/test_scopes.mojo, tests/test_factories.mojo
AC-011Missing dependencies produce useful diagnosticsMustCompleteconsumer-aware compile-time message; tests/compile_fail/cf_missing_provider.mojo
AC-012Circular dependencies are detected, at compile time where feasibleMustCompletestruct-level cycles are rejected by the Mojo compiler at type-definition time (compile fail fixtures cf_circular_dependency, cf_self_cycle); alias cycles are impossible by construction (aliases bind to class providers only) — both documented in docs/known-limitations.md §4
AC-013Custom construction is supportedShouldCompletecreate override; tests/test_injectable.mojo (CustomService)
AC-014Value providers workShouldCompletetests/test_container.mojo (set_value, missing-value runtime error)
AC-015Factory providers workShouldCompletetests/test_factories.mojo (invocation + failure propagation)
AC-016Alias providers workShouldCompletelifetime-binding semantics (see docs/usage.md §2); tests/test_aliases.mojo; deviations documented
AC-017Scoped lifetime worksLater release acceptableCompletetests/test_scopes.mojo (per-scope caching, independence, close_scope; per-container scoping rejected by design)
AC-018Resource disposal is documented and tested if supportedShouldCompletedisposal follows Mojo's synthesized destructors; Scope.close_scope and Container.close release caches (tested); lifecycle hooks are opt-in via InjectableLifecycle (post_construct/pre_destruct, tested)
AC-019README and working examples are completeMustCompleteREADME.md, examples/e2e_example.mojo, docs/usage.md
AC-020No unrelated application framework functionality is includedMustCompletethe package contains only DI concerns (see docs/architecture.md scope section)

Functional requirements cross-check (FR-001 … FR-020)

  • FR-001..FR-014: implemented (see the mapping above; FR-014 scoped lifetime implemented within the documented scope semantics).
  • FR-015 missing-dependency detection: complete (compile-time, consumer-aware).
  • FR-016 circular-dependency detection: complete at the boundary the compiler allows — struct cycles are compile-time rejected by Mojo itself; alias cycles are prevented by construction; factory-mediated cycles are documented as a runtime hazard (docs/known-limitations.md §4).
  • FR-017 provider validation: complete (duplicates, alias targets, scopes, Copyable requirements, Injectable requirements).
  • FR-018 custom construction: complete (create override).
  • FR-019 runtime ownership: complete — documented and tested (copies for cached lifetimes, owned returns otherwise).
  • FR-020 documentation: complete (README, architecture, usage, technical investigation, known limitations, this file).

Test coverage

Mojo 1.2.0 has no coverage instrumentation. scripts/coverage_report.py measures API-surface coverage statically: at v0.7.0 this was 265/265 declarations (100%) with 44 suite checks plus ten golden example runs (54 checks in total — the historical figure; see the test inventory for the 54/55 reconciliation). The current figures are derived, not quoted: the authoritative test inventory reports 114/114 suite checks and 814/814 (100%) library / 166/166 (100%) example API-surface coverage against mojo 1.2.0 (2016d0cd).

P1 enhancement status (v0.8.0)

All 22 P1 enhancements from the v0.8.0 mission are implemented, tested, and documented:

P1StatusWhere it lives
P1-01 registry graph exportCompletemjdi/graph.mojo (graph_json, graph_dot), tools/graph_export.mojo, docs/graph-export.md, tests/test_graph.mojo
P1-02 graph visualizationCompleteWebsite graph viewer (/docs/<latest>/graph-visualization), real fixtures from scripts/export_graph_fixtures.sh, docs/graph-visualization.md
P1-03 graph diffCompletescripts/graph_diff.py + real before/after fixtures, docs/graph-diff.md, tests/python/test_graph_diff.py
P1-04 explain resolutionCompletemjdi/graph.mojo (explain_resolution), docs/explain-resolution.md, pinned in tests/test_graph.mojo
P1-05 composition-root templatesCompletetemplates/ (4 self-testing templates + READMEs), runner-gated, docs/composition-roots.md
P1-06 missing-value ergonomicsCompletevalue_inventory / missing_values / missing_value_count, docs/runtime-validation.md, tests/test_runtime_validation.mojo
P1-07 strict startup validationCompletevalidate_runtime() returning RuntimeValidation, same tests/docs
P1-08 test container helpersCompletemjdi/testing.mojo + examples/testing_patterns + docs/testing.md, tested by tests/test_example_testing_patterns.mojo
P1-09 typed override compositionCompleteoverride / override_value / override_factory, docs/registry-overrides.md, tests/test_override.mojo + 2 compile-fail fixtures
P1-10 diagnostic quick-fix catalogCompletescripts/gen_diagnostics.py → diagnostics/catalog.json, docs/diagnostics.md, tests/python/test_diagnostics.py
P1-11 IDE integration starterCompletediagnostics/schema.json, ide/problem-matchers.json, ide/vscode-example/tasks.json, docs/ide-integration.md
P1-12 API discoverabilityCompletescripts/gen_api_reference.py → generated docs/api-reference.md, tests/python/test_api_reference.py
P1-13 scope guardCompletewith_scope + ScopeGuard (mjdi/guards.mojo), docs/scope-guard.md, tests/test_guards.mojo
P1-14 container guardCompletewith_container + ContainerGuard, docs/container-guard.md, tests/test_guards.mojo
P1-15 lifecycle tracingCompletetraced=True specialization, TraceLog/TraceEvent, docs/lifecycle-tracing.md, tests/test_observability.mojo
P1-16 cache statisticsCompletecollect_stats=True specialization, CacheStats, docs/cache-statistics.md, tests/test_observability.mojo
P1-17 benchmark suiteCompletebenchmarks/ + scripts/run_benchmarks.sh + recorded benchmarks/RESULTS.md, docs/performance.md
P1-18 construction ordering contractCompletedocs/construction-ordering.md, pinned by tests/test_construction_order.mojo
P1-19 concurrency contractComplete (documented single-thread contract)docs/concurrency.md — the compiler ships no threading primitives; the contract states what is prohibited and what changes later
P1-20 re-entrancy guardCompleteGuard in Container/Scope (reentrancy_guard=True default), docs/reentrancy.md, tests/test_reentrancy.mojo
P1-21 linear service ergonomicsCompleteexamples/linear_resources, docs/linear-patterns.md, tests/test_example_linear_resources.mojo
P1-22 linear destruction diagnosticsCompleteCompile-enforced exactly-once destruction (cf_linear_double_destroy), error-path cleanup tests, the failure-mode matrix in docs/linear-patterns.md

P0 hardening status (v0.9.0)

All ten P0 enhancements from the trust/correctness/release-readiness mission are implemented, tested, and documented:

P0StatusWhere it lives
P0-01 release metadata source of truthCompleterelease/manifest.json, scripts/validate_metadata.py, scripts/release_update_docs.py, docs/release-metadata.md, tests/python/test_metadata.py, the metadata CI job
P0-02 compiler compatibility matrixComplete (evidence tiers)docs/compiler-compatibility.md, release/manifest.json compiler_matrix, the CI platform matrix
P0-03 lifecycle safety diagnosticsCompletedebug_tracking specialization, DebugLog, MJDI-D001/D002, tests/test_debug_tracking.mojo, tests/golden_debug_diagnostics.mojo, docs/lifecycle-safety-diagnostics.md, experiments/exp10_deinit_diagnostics.mojo
P0-04 deterministic close semanticsComplete (behavior preserved + pinned)docs/close-semantics.md, tests/test_close_semantics.mojo, was_closed()
P0-05 lifecycle failure policyCompleteNon-raising pre_destruct contract, docs/lifecycle-failure-policy.md, tests/test_lifecycle_policy.mojo
P0-06 validation output contractCompletePinned IDs in scripts/gen_diagnostics.py, 30-entry catalog, docs/validation-output-contract.md, tests/python/test_diagnostics.py
P0-07 test inventory reconciliationCompletescripts/test_inventory.py, tests/inventory.json, tests/INVENTORY.md, docs/test-inventory.md, tests/python/test_inventory.py
P0-08 runtime error consistencyCompleteThe four categories with stable IDs, docs/runtime-error-reference.md, tests/test_runtime_errors.mojo, the MJDI-R004 factory wrapper
P0-09 alias semantics hardeningCompletedocs/alias-semantics.md, tests/test_alias_semantics.mojo, tests/compile_fail/cf_alias_target_alias.mojo
P0-10 scope semantics clarityCompletedocs/scope-behavior-matrix.md, tests/test_scope_matrix.mojo
Release gateCompletescripts/release_gate.sh, ci.yml (metadata job), release.yml (tag validation)

P2 enhancement status (v0.10.0)

All 18 P2 items from the advanced-capabilities mission are addressed: 16 implemented and verified, 2 deferred with executable compiler experiments (the mission's own deferral rule). The full per-item evidence table lives in the 0.10.0 release report.

P2StatusWhere it lives
P2-01 keyed registrationsCompletemjdi/keyed.mojo, tests/test_keyed.mojo, docs/keyed-registrations.md, cf_duplicate_keyed / cf_reserved_key / cf_unkeyed_with_keyed_only
P2-02 qualified dependenciesCompleteInject[T, K] + DefaultKey, cf_missing_qualified, the E021/E007 variants
P2-03 multi-bindingsCompletemjdi/multi.mojo (All[T], count_all), tests/test_multi_bind.mojo, docs/multi-bindings.md
P2-04 optional dependenciesCompletemjdi/optional.mojo (OptionalInject[T]), tests/test_optional.mojo, docs/optional-dependencies.md
P2-05 provider decoratorsCompletemjdi/decorator.mojo (ProviderDecorator, DecoratedProvider), tests/test_provider_decorators.mojo, docs/provider-decorators.md
P2-06 async factoriesDeferred with compiler evidenceexperiments/exp11_async_feasibility.mojo, docs/async-factories.md
P2-07 assisted injectionCompletemjdi/assisted.mojo, tests/test_assisted.mojo, docs/assisted-injection.md, cf_assisted_resolve / cf_assisted_non_assisted, crash_assisted_unpopulated
P2-08 registry bundlesCompleteadd_provider[H, R], tests/test_bundles.mojo, docs/registry-bundles.md, cf_bundle_collision
P2-09 conditional providersCompletecomptime if patterns, tests/test_conditional.mojo, docs/conditional-providers.md
P2-10 named/child scopesCompletecreate_scope(name) / child_scope(), tests/test_child_scopes.mojo + test_scope_matrix.mojo, docs/child-scopes.md, examples/scope_hierarchy
P2-11 borrowed providersDeferred with compiler evidenceexperiments/exp12_borrowed_feasibility.mojo, docs/borrowed-providers.md
P2-12 factory dependency metadataCompleteregister_factory_with_deps, tests/test_factory_deps.mojo, docs/factory-dependencies.md, cf_factory_dep_unregistered
P2-13 playgroundComplete/playground route, tools/playground_export.mojo, scripts/export_playground_artifacts.py, docs/playground.md
P2-14 MCP improvementsComplete5 new read-only tools in /api/mcp, website/src/lib/mcp-tools.ts, website/tests/mcp-tools.test.ts, tests/python/test_mcp_tools.py, size caps
P2-15 documentation quality gatesCompletescripts/verify_docs.py, the CI documentation step, docs/testing.md gate section
P2-16 migration guidesCompletedocs/migration-0.7-to-0.8.md, docs/migration-guide-template.md
P2-17 package distributionCompletescripts/install.sh, scripts/make_release.py (archive + SHA256SUMS + SBOM), docs/distribution.md
P2-18 security postureCompleteSECURITY.md, docs/security-posture.md, workflow least-privilege, release checksums + SBOM