harbor run -t openthoughts/tasktrove-mix-h6-test-quality-top25-mix-h6-test-quality-2087harbor download openthoughts/tasktrove-mix-h6-test-quality-top25-mix-h6-test-quality-2087Implement a small dependency-injection core so the provided pytest tests can construct a composed application and build a runtime instance that can "provide" element instances and follow a bootstrap sequence.
Place your implementation under /app/ with the following public classes and functions (module paths and signatures must match the tests):
di.core.element.Element
name (str) and dependencies (list of Element).dependencies defaults to an empty list when not provided.di.core.injection.InjectionSolver
di.core.module.ModuleImportSolver
di.core.module.ModuleElementConsistencyCheck
di.core.compose.ApplicationComposer
ComposedApplication.bootstrap_steps should exist and be an iterable of module-step objects. Each module-step must have a steps attribute that is itself iterable of sequences (each sequence being an iterable of Element). The compose method should simply expose bootstrap/step data from the input application so the builder can iterate them in order. In other words, copy or translate the application's bootstrap structure into the ComposedApplication in a way that preserves ordering and groupings.di.core.compose.ComposedApplication
bootstrap_steps as described above.di.core.instance.ApplicationInstanceElementNotFound
di.core.instance.RecursiveApplicationInstance
di.core.instance.RecursiveProvideContext
di.core.instance.RecursiveApplicationInstanceBuilder
Other functional details you must honor (to match tests' expectations):
Dependencies wiring and attribute naming:
Error cases:
Creation semantics:
Notes and hints:
This is enough information to implement the required minimal DI core so the tests can compose applications, build recursive instances, observe bootstrap ordering, obtain element instances, and receive an error when a non-existent element is requested.