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.
| ID | Criterion | Priority | Status | Evidence |
|---|---|---|---|---|
| AC-001 | Mojo compiler target is documented | Must | Complete | README.md, docs/technical-investigation.md (Mojo 1.2.0, 2016d0cd) |
| AC-002 | Injectable is implemented and tested | Must | Complete | mjdi/injectable.mojo; tests/test_injectable.mojo |
| AC-003 | Dependency marker is implemented and tested | Must | Complete | mjdi/inject.mojo; tests/test_inject.mojo |
| AC-004 | Automatic dependency discovery works for supported structs | Must | Complete | mjdi/dependency_scanner.mojo; tests/test_dependency_scanner.mojo, tests/test_inject.mojo (nested graphs) |
| AC-005 | Compile-time registry composition works | Must | Complete | mjdi/registry.mojo (immutable type-level chain); tests/test_registry.mojo (chaining + immutability) |
| AC-006 | Container can be specialized using the registry | Must | Complete | Container[type_of(registry)]; every container test |
| AC-007 | Type-based resolution works | Must | Complete | app.resolve[T](); tests/test_container.mojo |
| AC-008 | Nested dependency graphs resolve correctly | Must | Complete | 2- and 3-level graphs in tests/test_inject.mojo, tests/test_container.mojo |
| AC-009 | Singleton behavior is correct | Must | Complete | one canonical construction per container, copies handed out; tests/test_scopes.mojo (construction-observable via value providers) |
| AC-010 | Transient behavior is correct | Must | Complete | fresh construction per resolve; tests/test_scopes.mojo, tests/test_factories.mojo |
| AC-011 | Missing dependencies produce useful diagnostics | Must | Complete | consumer-aware compile-time message; tests/compile_fail/cf_missing_provider.mojo |
| AC-012 | Circular dependencies are detected, at compile time where feasible | Must | Complete | struct-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-013 | Custom construction is supported | Should | Complete | create override; tests/test_injectable.mojo (CustomService) |
| AC-014 | Value providers work | Should | Complete | tests/test_container.mojo (set_value, missing-value runtime error) |
| AC-015 | Factory providers work | Should | Complete | tests/test_factories.mojo (invocation + failure propagation) |
| AC-016 | Alias providers work | Should | Complete | lifetime-binding semantics (see docs/usage.md §2); tests/test_aliases.mojo; deviations documented |
| AC-017 | Scoped lifetime works | Later release acceptable | Complete | tests/test_scopes.mojo (per-scope caching, independence, close_scope; per-container scoping rejected by design) |
| AC-018 | Resource disposal is documented and tested if supported | Should | Complete | disposal 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-019 | README and working examples are complete | Must | Complete | README.md, examples/e2e_example.mojo, docs/usage.md |
| AC-020 | No unrelated application framework functionality is included | Must | Complete | the 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 (
createoverride). - 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:
| P1 | Status | Where it lives |
|---|---|---|
| P1-01 registry graph export | Complete | mjdi/graph.mojo (graph_json, graph_dot), tools/graph_export.mojo, docs/graph-export.md, tests/test_graph.mojo |
| P1-02 graph visualization | Complete | Website graph viewer (/docs/<latest>/graph-visualization), real fixtures from scripts/export_graph_fixtures.sh, docs/graph-visualization.md |
| P1-03 graph diff | Complete | scripts/graph_diff.py + real before/after fixtures, docs/graph-diff.md, tests/python/test_graph_diff.py |
| P1-04 explain resolution | Complete | mjdi/graph.mojo (explain_resolution), docs/explain-resolution.md, pinned in tests/test_graph.mojo |
| P1-05 composition-root templates | Complete | templates/ (4 self-testing templates + READMEs), runner-gated, docs/composition-roots.md |
| P1-06 missing-value ergonomics | Complete | value_inventory / missing_values / missing_value_count, docs/runtime-validation.md, tests/test_runtime_validation.mojo |
| P1-07 strict startup validation | Complete | validate_runtime() returning RuntimeValidation, same tests/docs |
| P1-08 test container helpers | Complete | mjdi/testing.mojo + examples/testing_patterns + docs/testing.md, tested by tests/test_example_testing_patterns.mojo |
| P1-09 typed override composition | Complete | override / override_value / override_factory, docs/registry-overrides.md, tests/test_override.mojo + 2 compile-fail fixtures |
| P1-10 diagnostic quick-fix catalog | Complete | scripts/gen_diagnostics.py → diagnostics/catalog.json, docs/diagnostics.md, tests/python/test_diagnostics.py |
| P1-11 IDE integration starter | Complete | diagnostics/schema.json, ide/problem-matchers.json, ide/vscode-example/tasks.json, docs/ide-integration.md |
| P1-12 API discoverability | Complete | scripts/gen_api_reference.py → generated docs/api-reference.md, tests/python/test_api_reference.py |
| P1-13 scope guard | Complete | with_scope + ScopeGuard (mjdi/guards.mojo), docs/scope-guard.md, tests/test_guards.mojo |
| P1-14 container guard | Complete | with_container + ContainerGuard, docs/container-guard.md, tests/test_guards.mojo |
| P1-15 lifecycle tracing | Complete | traced=True specialization, TraceLog/TraceEvent, docs/lifecycle-tracing.md, tests/test_observability.mojo |
| P1-16 cache statistics | Complete | collect_stats=True specialization, CacheStats, docs/cache-statistics.md, tests/test_observability.mojo |
| P1-17 benchmark suite | Complete | benchmarks/ + scripts/run_benchmarks.sh + recorded benchmarks/RESULTS.md, docs/performance.md |
| P1-18 construction ordering contract | Complete | docs/construction-ordering.md, pinned by tests/test_construction_order.mojo |
| P1-19 concurrency contract | Complete (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 guard | Complete | Guard in Container/Scope (reentrancy_guard=True default), docs/reentrancy.md, tests/test_reentrancy.mojo |
| P1-21 linear service ergonomics | Complete | examples/linear_resources, docs/linear-patterns.md, tests/test_example_linear_resources.mojo |
| P1-22 linear destruction diagnostics | Complete | Compile-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:
| P0 | Status | Where it lives |
|---|---|---|
| P0-01 release metadata source of truth | Complete | release/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 matrix | Complete (evidence tiers) | docs/compiler-compatibility.md, release/manifest.json compiler_matrix, the CI platform matrix |
| P0-03 lifecycle safety diagnostics | Complete | debug_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 semantics | Complete (behavior preserved + pinned) | docs/close-semantics.md, tests/test_close_semantics.mojo, was_closed() |
| P0-05 lifecycle failure policy | Complete | Non-raising pre_destruct contract, docs/lifecycle-failure-policy.md, tests/test_lifecycle_policy.mojo |
| P0-06 validation output contract | Complete | Pinned IDs in scripts/gen_diagnostics.py, 30-entry catalog, docs/validation-output-contract.md, tests/python/test_diagnostics.py |
| P0-07 test inventory reconciliation | Complete | scripts/test_inventory.py, tests/inventory.json, tests/INVENTORY.md, docs/test-inventory.md, tests/python/test_inventory.py |
| P0-08 runtime error consistency | Complete | The four categories with stable IDs, docs/runtime-error-reference.md, tests/test_runtime_errors.mojo, the MJDI-R004 factory wrapper |
| P0-09 alias semantics hardening | Complete | docs/alias-semantics.md, tests/test_alias_semantics.mojo, tests/compile_fail/cf_alias_target_alias.mojo |
| P0-10 scope semantics clarity | Complete | docs/scope-behavior-matrix.md, tests/test_scope_matrix.mojo |
| Release gate | Complete | scripts/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.
| P2 | Status | Where it lives |
|---|---|---|
| P2-01 keyed registrations | Complete | mjdi/keyed.mojo, tests/test_keyed.mojo, docs/keyed-registrations.md, cf_duplicate_keyed / cf_reserved_key / cf_unkeyed_with_keyed_only |
| P2-02 qualified dependencies | Complete | Inject[T, K] + DefaultKey, cf_missing_qualified, the E021/E007 variants |
| P2-03 multi-bindings | Complete | mjdi/multi.mojo (All[T], count_all), tests/test_multi_bind.mojo, docs/multi-bindings.md |
| P2-04 optional dependencies | Complete | mjdi/optional.mojo (OptionalInject[T]), tests/test_optional.mojo, docs/optional-dependencies.md |
| P2-05 provider decorators | Complete | mjdi/decorator.mojo (ProviderDecorator, DecoratedProvider), tests/test_provider_decorators.mojo, docs/provider-decorators.md |
| P2-06 async factories | Deferred with compiler evidence | experiments/exp11_async_feasibility.mojo, docs/async-factories.md |
| P2-07 assisted injection | Complete | mjdi/assisted.mojo, tests/test_assisted.mojo, docs/assisted-injection.md, cf_assisted_resolve / cf_assisted_non_assisted, crash_assisted_unpopulated |
| P2-08 registry bundles | Complete | add_provider[H, R], tests/test_bundles.mojo, docs/registry-bundles.md, cf_bundle_collision |
| P2-09 conditional providers | Complete | comptime if patterns, tests/test_conditional.mojo, docs/conditional-providers.md |
| P2-10 named/child scopes | Complete | create_scope(name) / child_scope(), tests/test_child_scopes.mojo + test_scope_matrix.mojo, docs/child-scopes.md, examples/scope_hierarchy |
| P2-11 borrowed providers | Deferred with compiler evidence | experiments/exp12_borrowed_feasibility.mojo, docs/borrowed-providers.md |
| P2-12 factory dependency metadata | Complete | register_factory_with_deps, tests/test_factory_deps.mojo, docs/factory-dependencies.md, cf_factory_dep_unregistered |
| P2-13 playground | Complete | /playground route, tools/playground_export.mojo, scripts/export_playground_artifacts.py, docs/playground.md |
| P2-14 MCP improvements | Complete | 5 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 gates | Complete | scripts/verify_docs.py, the CI documentation step, docs/testing.md gate section |
| P2-16 migration guides | Complete | docs/migration-0.7-to-0.8.md, docs/migration-guide-template.md |
| P2-17 package distribution | Complete | scripts/install.sh, scripts/make_release.py (archive + SHA256SUMS + SBOM), docs/distribution.md |
| P2-18 security posture | Complete | SECURITY.md, docs/security-posture.md, workflow least-privilege, release checksums + SBOM |