thundergraph-model 1.3.1__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/PKG-INFO +1 -1
- thundergraph_model-1.3.2/docs/generation_docs/graph_compiler_nested_requirement_owner_fix_plan.md +283 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/pyproject.toml +1 -1
- thundergraph_model-1.3.2/tests/integration/evaluation/test_system_in_system_requirements.py +209 -0
- thundergraph_model-1.3.2/tests/unit/execution/test_graph_compiler.py +245 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/graph_compiler.py +17 -7
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/ISSUE_TEMPLATE/01-bug_report.yml +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/ISSUE_TEMPLATE/02-feature_request.yml +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/ISSUE_TEMPLATE/03-documentation.yml +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/pull_request_template.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.github/workflows/publish.yml +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/.gitignore +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/CHANGELOG.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/LICENSE +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/PYPI.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/README.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/behavior_methodology.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/behavioral_projection_plan.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/brainstorm.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/conceptual_requirements.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/evaluation_api_facade_implementation_plan.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/execution_methodology.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/implementation_plan.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/logical_architecture.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/model_prototype_sketch.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/requirement_composition_and_naming_implementation_plan.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/system_authoring_restrictions_implementation_plan.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/use_cases.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/generation_docs/v0_api.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/release/v1.2.0.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/release/v1.2.1.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/IMPLEMENTATION_PLAN.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/README.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.buildinfo +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.buildinfo.bak +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/api_analysis.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/api_execution.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/api_integrations.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/api_model.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/api_root.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/api/index.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/architecture.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/contributing.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/extension_playbook.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/releasing.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/repository_map.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/developer/testing.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/docstring_style.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/drafts/execution_pipeline.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/drafts/glossary.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/drafts/repository_map.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/drafts/what_is_thundergraph_model.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/environment.pickle +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/index.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/concepts_evaluation.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/concepts_external_compute.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/concepts_parts.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/concepts_requirements.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/concepts_system.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/end_to_end_guide.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/faq.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/install.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/mental_model.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/overview.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/.doctrees/user/quickstart.doctree +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/index.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/analysis/compare_variants.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/analysis/impact.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/analysis/sweep.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/behavior.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/configured_model.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/connection_bindings.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/dependency_graph.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/evaluator.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/graph_compiler.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/instances.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/requirements.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/run_context.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/validation.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/execution/value_slots.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/integrations/external_compute.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/model/definition_context.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/model/elements.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/model/expr.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_modules/tg_model/model/refs.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/api_analysis.rst.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/api_execution.rst.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/api_integrations.rst.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/api_model.rst.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/api_root.rst.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/api/index.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/architecture.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/contributing.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/extension_playbook.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/releasing.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/repository_map.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/developer/testing.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/docstring_style.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/drafts/execution_pipeline.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/drafts/glossary.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/drafts/repository_map.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/drafts/what_is_thundergraph_model.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/index.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/concepts_evaluation.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/concepts_external_compute.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/concepts_parts.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/concepts_requirements.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/concepts_system.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/end_to_end_guide.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/faq.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/install.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/mental_model.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/overview.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_sources/user/quickstart.md.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/base-stemmer.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/basic.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/debug.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/doctools.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/documentation_options.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/english-stemmer.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/file.png +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/language_data.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/minus.png +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/plus.png +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/pygments.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/scripts/furo-extensions.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/scripts/furo.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/scripts/furo.js.LICENSE.txt +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/scripts/furo.js.map +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/searchtools.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/skeleton.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/sphinx_highlight.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/styles/furo-extensions.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/styles/furo-extensions.css.map +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/styles/furo.css +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/_static/styles/furo.css.map +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/api_analysis.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/api_execution.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/api_integrations.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/api_model.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/api_root.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/api/index.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/architecture.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/contributing.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/extension_playbook.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/releasing.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/repository_map.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/developer/testing.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/docstring_style.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/drafts/execution_pipeline.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/drafts/glossary.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/drafts/repository_map.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/drafts/what_is_thundergraph_model.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/genindex.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/index.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/objects.inv +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/py-modindex.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/search.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/searchindex.js +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/concepts_evaluation.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/concepts_external_compute.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/concepts_parts.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/concepts_requirements.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/concepts_system.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/end_to_end_guide.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/faq.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/install.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/mental_model.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/overview.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/_build/html/user/quickstart.html +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/api_analysis.rst +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/api_execution.rst +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/api_integrations.rst +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/api_model.rst +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/api_root.rst +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/api/index.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/concepts_behavior.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/conf.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/architecture.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/contributing.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/extension_playbook.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/releasing.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/repository_map.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/developer/testing.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/docstring_style.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/drafts/README.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/drafts/execution_pipeline.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/drafts/glossary.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/drafts/repository_map.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/drafts/what_is_thundergraph_model.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/index.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_behavior.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_evaluation.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_external_compute.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_parts.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_requirements.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/concepts_system.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/end_to_end_guide.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/faq.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/install.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/mental_model.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/overview.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/docs/user_docs/user/quickstart.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/IMPLEMENTATION_PLAN.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/README.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/integrations/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/integrations/adapters.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/integrations/bindings.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/product/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/product/aircraft.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/product/major_assemblies/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/product/major_assemblies/parts.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/program/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/program/cargo_jet_program.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/program/l1_requirement_packages.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/program/mission_context.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/reporting/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/reporting/extract.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/commercial_aircraft/reporting/snapshot.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/hpc_datacenter/README.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/hpc_datacenter/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/hpc_datacenter/program.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/integrations/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/integrations/adapters.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/integrations/bindings.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/integrations/preset_inputs.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/reporting/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/reporting/extract.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/reporting/snapshot.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/examples/mars_ntp_tug/tug_model.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/implementation_plan_instructions.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/logo.png +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/notebooks/_gen_leo_notebook.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/notebooks/aev_architecture.mmd +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/notebooks/cargo_jet_program.ipynb +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/notebooks/hpc_datacenter_parameter_sweep.ipynb +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/notebooks/mars_ntp_nuclear_tug.ipynb +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/reviewer_architype.md +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/analysis/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/analysis/test_analysis_workflows.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/behavior/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/behavior/test_behavior_e2e.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/test_allocate_parameter_wiring.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/test_evaluation_e2e.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/test_external_compute.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/test_requirement_acceptance.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/evaluation/test_unitflow_evaluation.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/structural_models/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/structural_models/test_citations.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/structural_models/test_drive_system.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/structural_models/test_instantiation.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/test_commercial_aircraft_smoke.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/test_hpc_datacenter_smoke.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/integration/test_mars_ntp_tug_smoke.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/analysis/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/analysis/test_sweep_planning.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_behavior_runtime.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_behavior_scope.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_configured_model.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_configured_model_evaluate.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_dependency_graph.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_evaluator.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_instances.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_phase6_runtime.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_run_context.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/execution/test_validation.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/export/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/integrations/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_attribute_ref.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_behavior_declarations.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_compile_types.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_definition_context.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_elements.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_example_system_authoring_policy.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_expr.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_identity.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_new_api_validators.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_parameter_ref.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_phase6_ontology.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_refs.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_requirement_block.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tests/unit/model/test_system_authoring_restrictions.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/analysis/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/analysis/_coherence.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/analysis/compare_variants.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/analysis/impact.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/analysis/sweep.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/behavior.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/configured_model.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/connection_bindings.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/dependency_graph.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/evaluator.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/external_ops.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/instances.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/requirements.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/rollups.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/run_context.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/solve_groups.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/validation.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/execution/value_slots.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/export/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/integrations/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/integrations/external_compute.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/compile_types.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/declarations/__init__.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/declarations/behavior.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/declarations/values.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/definition_context.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/elements.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/expr.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/identity.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/tg_model/model/refs.py +0 -0
- {thundergraph_model-1.3.1 → thundergraph_model-1.3.2}/uv.lock +0 -0
thundergraph_model-1.3.2/docs/generation_docs/graph_compiler_nested_requirement_owner_fix_plan.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# Implementation Plan — Graph Compiler: Fix Requirement Package Owner Resolution in System-in-System Models
|
|
2
|
+
|
|
3
|
+
**Status:** Draft for review
|
|
4
|
+
**Audience:** Implementers and reviewers
|
|
5
|
+
**Related design context:** [`execution_methodology.md`](execution_methodology.md) (Phase 4 — Dependency Graph Compilation), [`logical_architecture.md`](logical_architecture.md) (Execution Subsystem)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
1. [Purpose and scope](#1-purpose-and-scope)
|
|
12
|
+
2. [Design philosophy](#2-design-philosophy)
|
|
13
|
+
3. [Methodology](#3-methodology)
|
|
14
|
+
4. [Root cause](#4-root-cause)
|
|
15
|
+
5. [Technical approach](#5-technical-approach)
|
|
16
|
+
6. [Architecture](#6-architecture)
|
|
17
|
+
7. [File tree](#7-file-tree)
|
|
18
|
+
8. [Phased delivery and GO / NO-GO gates](#8-phased-delivery-and-go--no-go-gates)
|
|
19
|
+
9. [Test plan](#9-test-plan)
|
|
20
|
+
10. [Risks and mitigations](#10-risks-and-mitigations)
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Purpose and scope
|
|
25
|
+
|
|
26
|
+
**Bug:** When a `Requirement` is composed inside a child `System` (System-in-System), any `attribute()` slot on that requirement with an `expr=` that references another slot within the same child System causes a `GraphCompilationError` at evaluation time.
|
|
27
|
+
|
|
28
|
+
**Example error:**
|
|
29
|
+
```
|
|
30
|
+
GraphCompilationError: Symbol 'l1_energy_capacity.usable_battery_capacity_kj'
|
|
31
|
+
has registered path ('l1_energy_capacity', 'usable_battery_capacity_kj')
|
|
32
|
+
but could not be resolved under 'AutonomousEvProgram'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**In scope:**
|
|
36
|
+
|
|
37
|
+
- Fix `_compile_requirement_package_tree` in `tg_model/execution/graph_compiler.py` to use the correct owning `PartInstance` when compiling requirement package slots.
|
|
38
|
+
- Fix the call site in `_compile_requirement_packages_from_parts` to pass the current `part` rather than delegating owner resolution down.
|
|
39
|
+
- Verify the existing `_resolve_symbol_to_slot` fallback (for cross-boundary root references) still works correctly after the fix.
|
|
40
|
+
- Add targeted unit and integration tests.
|
|
41
|
+
|
|
42
|
+
**Out of scope:**
|
|
43
|
+
|
|
44
|
+
- Any change to the `_resolve_symbol_to_slot` fallback logic (it is correct and unaffected).
|
|
45
|
+
- Any change to symbol registration or `_symbol_id_to_path`.
|
|
46
|
+
- Any change to the public DSL API.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2. Design philosophy
|
|
51
|
+
|
|
52
|
+
| Principle | How it applies here |
|
|
53
|
+
|-----------|---------------------|
|
|
54
|
+
| **Simpler is better** | The fix is a single new parameter — `owner_part` — threaded through two functions. No new abstractions, no new types. |
|
|
55
|
+
| **SOLID — Single Responsibility** | Each function already has one job. The fix keeps that clean: the caller knows which part owns the package; the callee uses the owner it is given. |
|
|
56
|
+
| **Small, single-purpose functions** | No function grows. The change is additive (a parameter + propagation). |
|
|
57
|
+
| **Fail loudly** | The error already fails loudly. The fix makes it not fail in the first place on valid models. |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 3. Methodology
|
|
62
|
+
|
|
63
|
+
**Understand before touching:** The root cause is a single hardcoded `model.root` at one call site. The fix is local and surgical. No architectural changes needed.
|
|
64
|
+
|
|
65
|
+
**Inside-out delivery:** Fix the compiler first, gate on tests passing, then document.
|
|
66
|
+
|
|
67
|
+
**No regression tolerance:** The existing test suite must pass unchanged. This fix expands what is supported, not what was previously working.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 4. Root cause
|
|
72
|
+
|
|
73
|
+
### Symbol path registration
|
|
74
|
+
|
|
75
|
+
When `EnergySystem.define()` calls `model.composed_of("l1_energy_capacity", EnergyCapacityRequirement)`, the DSL records each symbol created inside `EnergyCapacityRequirement.define()` with a `symbol_path_prefix` of `('l1_energy_capacity',)`. A parameter declared as `"usable_battery_capacity_kj"` inside the requirement therefore registers in `_symbol_id_to_path` as:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
_owner_type = EnergySystem
|
|
79
|
+
tg_path = ('l1_energy_capacity', 'usable_battery_capacity_kj')
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
That path is relative to **`EnergySystem`**, not to the root system.
|
|
83
|
+
|
|
84
|
+
### The broken call site
|
|
85
|
+
|
|
86
|
+
In `_compile_requirement_package_tree`, every non-overridden `parameter` and `attribute` slot is compiled via:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
_compile_slot(slot, model.root, graph, handlers, model)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`model.root` is always the top-level root `System` instance. For a directly nested requirement (at depth 1 under root) this works: the path walk finds the requirement package as a direct child of root. For a requirement nested inside a child `System`, the path walk cannot find `l1_energy_capacity` as a direct attribute of `AutonomousEvProgram`, so it fails.
|
|
93
|
+
|
|
94
|
+
### Why the fallback in `_resolve_symbol_to_slot` does not help
|
|
95
|
+
|
|
96
|
+
The fallback exists for the opposite case — where a symbol's registered owner type is the **root** but the caller passes a **child part** as owner. Here, the caller always passes `model.root`, so the fallback condition (`_owner_type is not owner.definition_type`) is never true.
|
|
97
|
+
|
|
98
|
+
### How the fix restores correctness
|
|
99
|
+
|
|
100
|
+
If the owning `PartInstance` is `EnergySystem`'s instance, the symbol walk becomes:
|
|
101
|
+
|
|
102
|
+
1. `getattr(energy_system_instance, 'l1_energy_capacity')` → `RequirementPackageInstance`
|
|
103
|
+
2. `getattr(req_pkg_instance, 'usable_battery_capacity_kj')` → `ValueSlot` ✓
|
|
104
|
+
|
|
105
|
+
The existing fallback in `_resolve_symbol_to_slot` still handles cross-boundary root references correctly because:
|
|
106
|
+
- After the fix, `owner` is the child System instance.
|
|
107
|
+
- If a symbol has `_owner_type == root System type` (e.g. via `parameter_ref`), the first walk fails, the fallback condition becomes `True`, and resolution retries from `model.root`.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 5. Technical approach
|
|
112
|
+
|
|
113
|
+
### Change 1: Add `owner_part` parameter to `_compile_requirement_package_tree`
|
|
114
|
+
|
|
115
|
+
The function gains one required parameter: `owner_part: PartInstance`. This is the `PartInstance` that owns the requirement package in the runtime instance tree.
|
|
116
|
+
|
|
117
|
+
Inside the function, the line:
|
|
118
|
+
```python
|
|
119
|
+
_compile_slot(slot, model.root, graph, handlers, model)
|
|
120
|
+
```
|
|
121
|
+
becomes:
|
|
122
|
+
```python
|
|
123
|
+
_compile_slot(slot, owner_part, graph, handlers, model)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
When the function recurses into nested `RequirementPackageInstance` children, `owner_part` is propagated unchanged — the owning `PartInstance` does not change as you descend into nested requirement packages.
|
|
127
|
+
|
|
128
|
+
### Change 2: Update `_compile_requirement_packages_from_parts` to pass `part`
|
|
129
|
+
|
|
130
|
+
The call site that invokes `_compile_requirement_package_tree` gains the `owner_part=part` argument. The `part` local variable is already the correct `PartInstance` at every recursive depth because `_compile_requirement_packages_from_parts` recurses into children via `part.children`.
|
|
131
|
+
|
|
132
|
+
No other call sites for `_compile_requirement_package_tree` exist.
|
|
133
|
+
|
|
134
|
+
### Non-change: `_resolve_symbol_to_slot`
|
|
135
|
+
|
|
136
|
+
This function requires no modification. Its fallback branch remains correct and continues to serve the cross-boundary root reference case.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 6. Architecture
|
|
141
|
+
|
|
142
|
+
### Where the fix lives in the compilation pipeline
|
|
143
|
+
|
|
144
|
+
```mermaid
|
|
145
|
+
%%{init: {'theme': 'dark'}}%%
|
|
146
|
+
flowchart TD
|
|
147
|
+
A["compile_graph(model)"] --> B["_compile_requirement_packages_from_parts(part, ...)"]
|
|
148
|
+
B -->|"part = child PartInstance\n[was: model.root passed below]"| C["_compile_requirement_package_tree(pkg, owner_part=part, ...)"]
|
|
149
|
+
C -->|"owner_part propagated\nthrough nested pkgs"| D["_compile_slot(slot, owner_part, ...)"]
|
|
150
|
+
D --> E["_resolve_symbol_to_slot(sym, owner_part, model)"]
|
|
151
|
+
E -->|"path walk from\ncorrect PartInstance"| F["ValueSlot ✓"]
|
|
152
|
+
E -->|"fallback: _owner_type\n== root type"| G["retry from model.root ✓"]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Owner resolution: before vs. after
|
|
156
|
+
|
|
157
|
+
```mermaid
|
|
158
|
+
%%{init: {'theme': 'dark'}}%%
|
|
159
|
+
flowchart LR
|
|
160
|
+
subgraph before["Before Fix"]
|
|
161
|
+
direction TB
|
|
162
|
+
R1["AutonomousEvProgram\n(model.root)"]
|
|
163
|
+
R1 -->|"getattr('l1_energy_capacity')"| FAIL["AttributeError\n→ GraphCompilationError"]
|
|
164
|
+
end
|
|
165
|
+
subgraph after["After Fix"]
|
|
166
|
+
direction TB
|
|
167
|
+
R2["EnergySystem instance\n(owner_part)"]
|
|
168
|
+
R2 -->|"getattr('l1_energy_capacity')"| PKG["RequirementPackageInstance"]
|
|
169
|
+
PKG -->|"getattr('usable_battery_capacity_kj')"| SLOT["ValueSlot ✓"]
|
|
170
|
+
end
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 7. File tree
|
|
176
|
+
|
|
177
|
+
Only one source file changes. One new test file is added.
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
thundergraph-model/
|
|
181
|
+
└── tg_model/
|
|
182
|
+
│ └── execution/
|
|
183
|
+
│ └── graph_compiler.py ← MODIFIED: _compile_requirement_packages_from_parts,
|
|
184
|
+
│ _compile_requirement_package_tree
|
|
185
|
+
└── tests/
|
|
186
|
+
├── unit/
|
|
187
|
+
│ └── execution/
|
|
188
|
+
│ └── test_graph_compiler.py ← MODIFIED: new test cases for nested system owner resolution
|
|
189
|
+
└── integration/
|
|
190
|
+
└── evaluation/
|
|
191
|
+
└── test_allocate_parameter_wiring.py ← MODIFIED: new System-in-System scenario
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 8. Phased delivery and GO / NO-GO gates
|
|
197
|
+
|
|
198
|
+
### Phase 1 — Source fix
|
|
199
|
+
|
|
200
|
+
**Deliverable:** Two targeted changes to `graph_compiler.py`:
|
|
201
|
+
1. `owner_part: PartInstance` parameter added to `_compile_requirement_package_tree`.
|
|
202
|
+
2. `_compile_requirement_packages_from_parts` passes `part` as `owner_part` at the call site.
|
|
203
|
+
|
|
204
|
+
**GO criteria:**
|
|
205
|
+
- `ruff` and `pyright` pass with no new errors on `graph_compiler.py`.
|
|
206
|
+
- Full existing test suite (`pytest thundergraph-model/tests/`) passes without any regressions.
|
|
207
|
+
|
|
208
|
+
**NO-GO triggers:**
|
|
209
|
+
- Any existing test that previously passed now fails.
|
|
210
|
+
- Type checker reports an error on the new parameter or its propagation.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Phase 2 — Tests
|
|
215
|
+
|
|
216
|
+
**Deliverable:** New unit tests and an integration test that would have caught this bug.
|
|
217
|
+
|
|
218
|
+
**Unit tests** in `tests/unit/execution/test_graph_compiler.py`:
|
|
219
|
+
- A System-in-System model where a child System composes a `Requirement` with an `attribute(expr=...)`. Assert that `compile_graph` succeeds and the graph contains the expected nodes.
|
|
220
|
+
- A System-in-System model where the requirement also references a root-level parameter via `parameter_ref` (the cross-boundary fallback path). Assert that `compile_graph` succeeds.
|
|
221
|
+
- Negative case: an expression symbol that is genuinely unregistered still raises `GraphCompilationError`.
|
|
222
|
+
|
|
223
|
+
**Integration test** in `tests/integration/evaluation/test_allocate_parameter_wiring.py`:
|
|
224
|
+
- A `System` → child `System` → `Part` + `Requirement` topology.
|
|
225
|
+
- The `Requirement` has a derived `attribute(expr=param_a - param_b)`.
|
|
226
|
+
- `allocate(inputs=...)` wires the requirement parameters from the child Part's slots.
|
|
227
|
+
- `evaluate()` produces the correct derived attribute value and passes the constraint.
|
|
228
|
+
|
|
229
|
+
**GO criteria:**
|
|
230
|
+
- All new tests pass.
|
|
231
|
+
- No new ruff or pyright errors in test files.
|
|
232
|
+
|
|
233
|
+
**NO-GO triggers:**
|
|
234
|
+
- A new test cannot reproduce the original bug before the fix is applied (the test is not meaningful).
|
|
235
|
+
- Any pre-existing test now fails.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
### Phase 3 — Documentation update
|
|
240
|
+
|
|
241
|
+
**Deliverable:** A brief note appended to [`execution_methodology.md`](execution_methodology.md) under Phase 4 (Dependency Graph Compilation) clarifying that requirement package slots are compiled relative to the `PartInstance` that owns the package, not relative to the global root.
|
|
242
|
+
|
|
243
|
+
**GO criteria:**
|
|
244
|
+
- Documentation sentence is accurate and references the correct function names.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 9. Test plan
|
|
249
|
+
|
|
250
|
+
### Unit tests
|
|
251
|
+
|
|
252
|
+
**Location:** `tests/unit/execution/test_graph_compiler.py`
|
|
253
|
+
|
|
254
|
+
| Test | What it verifies |
|
|
255
|
+
|------|-----------------|
|
|
256
|
+
| `test_compile_graph_system_in_system_requirement_attribute_expr` | `compile_graph` succeeds and produces a `LOCAL_EXPRESSION` node for a derived `attribute` on a requirement nested inside a child System. |
|
|
257
|
+
| `test_compile_graph_system_in_system_requirement_constraint_edges` | The constraint check node for the same requirement has correct dependency edges to the derived attribute's value node. |
|
|
258
|
+
| `test_compile_graph_cross_boundary_root_ref_still_resolves` | A requirement inside a child System whose expression references a root-level parameter (via `parameter_ref`) still compiles without error — the fallback path in `_resolve_symbol_to_slot` is not broken by the fix. |
|
|
259
|
+
| `test_compile_graph_unregistered_symbol_still_raises` | An expression containing a symbol that was never registered through the DSL still raises `GraphCompilationError` with the expected message. |
|
|
260
|
+
|
|
261
|
+
### Integration tests
|
|
262
|
+
|
|
263
|
+
**Location:** `tests/integration/evaluation/test_allocate_parameter_wiring.py`
|
|
264
|
+
|
|
265
|
+
| Test | What it verifies |
|
|
266
|
+
|------|-----------------|
|
|
267
|
+
| `test_system_in_system_requirement_attribute_evaluates_correctly` | End-to-end evaluation of a System-in-System model: the derived `attribute` on the nested requirement receives the correct value after `evaluate()`. |
|
|
268
|
+
| `test_system_in_system_requirement_constraint_passes_when_satisfied` | The requirement constraint evaluates to satisfied when the input values meet the condition. |
|
|
269
|
+
| `test_system_in_system_requirement_constraint_fails_when_violated` | The requirement constraint evaluates to violated when the input values do not meet the condition. |
|
|
270
|
+
|
|
271
|
+
### Regression
|
|
272
|
+
|
|
273
|
+
The full existing test suite (`pytest thundergraph-model/tests/`) must continue to pass unchanged after each phase.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 10. Risks and mitigations
|
|
278
|
+
|
|
279
|
+
| Risk | Likelihood | Mitigation |
|
|
280
|
+
|------|-----------|------------|
|
|
281
|
+
| Nested `RequirementPackageInstance` within a `RequirementPackageInstance` is not tested and gets the wrong `owner_part` | Low — propagation is straightforward; `owner_part` does not change for nested requirement packages | Unit test covering two-level requirement nesting confirms propagation |
|
|
282
|
+
| Cross-boundary root reference fallback in `_resolve_symbol_to_slot` stops working after the owner changes | Low — the fallback condition checks `_owner_type is model.root.definition_type`, which is unaffected by what `owner` we pass | Dedicated unit test `test_compile_graph_cross_boundary_root_ref_still_resolves` guards this path |
|
|
283
|
+
| Fix changes behaviour for existing models that already work | Very low — we only change what `owner` is passed when a requirement package lives under a non-root part; existing tests cover the root case | Full regression run in Phase 1 gate |
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"""Integration tests: Requirement with derived attributes inside a child System evaluates
|
|
2
|
+
correctly end-to-end.
|
|
3
|
+
|
|
4
|
+
Scenario
|
|
5
|
+
--------
|
|
6
|
+
An ``AutonomousPlatform`` (root) composes an ``EnergySubsystem`` (child System).
|
|
7
|
+
The child System composes a ``BatteryModule`` (Part) and an ``EnergyCapacityReq``
|
|
8
|
+
(Requirement) with a derived attribute and a constraint.
|
|
9
|
+
|
|
10
|
+
The requirement parameters are free inputs (not auto-wired here, as allocation
|
|
11
|
+
wiring from child Systems is a separate concern). This file tests only that the
|
|
12
|
+
graph compiler correctly resolves the `attribute(expr=...)` symbols relative to
|
|
13
|
+
the child System's PartInstance — the bug that triggered:
|
|
14
|
+
|
|
15
|
+
GraphCompilationError: Symbol '...' has registered path (...)
|
|
16
|
+
but could not be resolved under 'AutonomousPlatform'
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import pytest
|
|
22
|
+
from unitflow import Quantity
|
|
23
|
+
from unitflow.catalogs.si import kJ
|
|
24
|
+
|
|
25
|
+
from tg_model.execution.configured_model import instantiate
|
|
26
|
+
from tg_model.execution.evaluator import Evaluator
|
|
27
|
+
from tg_model.execution.graph_compiler import compile_graph
|
|
28
|
+
from tg_model.execution.requirements import (
|
|
29
|
+
all_requirements_satisfied,
|
|
30
|
+
iter_requirement_satisfaction,
|
|
31
|
+
)
|
|
32
|
+
from tg_model.execution.run_context import RunContext
|
|
33
|
+
from tg_model.execution.validation import validate_graph
|
|
34
|
+
from tg_model.model.elements import Part, Requirement, System
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class BatteryModule(Part):
|
|
38
|
+
@classmethod
|
|
39
|
+
def define(cls, model): # type: ignore[override]
|
|
40
|
+
model.name("battery_module")
|
|
41
|
+
model.parameter("usable_energy_kj", unit=kJ)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class EnergyCapacityReq(Requirement):
|
|
45
|
+
@classmethod
|
|
46
|
+
def define(cls, model): # type: ignore[override]
|
|
47
|
+
model.name("energy_capacity")
|
|
48
|
+
model.doc("Usable battery energy must cover mission demand.")
|
|
49
|
+
mission = model.parameter("mission_energy_kj", unit=kJ)
|
|
50
|
+
usable = model.parameter("usable_energy_kj", unit=kJ)
|
|
51
|
+
margin = model.attribute("energy_margin_kj", unit=kJ, expr=usable - mission)
|
|
52
|
+
model.constraint("margin_non_negative", expr=margin >= Quantity(0, kJ))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class EnergySubsystem(System):
|
|
56
|
+
@classmethod
|
|
57
|
+
def define(cls, model): # type: ignore[override]
|
|
58
|
+
model.name("energy_subsystem")
|
|
59
|
+
model.parameter("mission_energy_kj", unit=kJ)
|
|
60
|
+
model.composed_of("battery", BatteryModule)
|
|
61
|
+
model.composed_of("energy_req", EnergyCapacityReq)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class AutonomousPlatform(System):
|
|
65
|
+
@classmethod
|
|
66
|
+
def define(cls, model): # type: ignore[override]
|
|
67
|
+
model.name("autonomous_platform")
|
|
68
|
+
model.composed_of("energy", EnergySubsystem)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def setup_function() -> None:
|
|
72
|
+
BatteryModule._reset_compilation()
|
|
73
|
+
EnergyCapacityReq._reset_compilation()
|
|
74
|
+
EnergySubsystem._reset_compilation()
|
|
75
|
+
AutonomousPlatform._reset_compilation()
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _make_evaluator(cm):
|
|
79
|
+
graph, handlers = compile_graph(cm)
|
|
80
|
+
return graph, handlers, Evaluator(graph, compute_handlers=handlers)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _inputs(cm, *, mission_kj: float, usable_kj: float) -> dict:
|
|
84
|
+
"""Build a complete inputs dict for one evaluation run.
|
|
85
|
+
|
|
86
|
+
The requirement parameters are free INPUT_PARAMETER nodes (no auto-wiring
|
|
87
|
+
from child System allocations), so we supply them alongside the part-side
|
|
88
|
+
parameters with the same numerical values.
|
|
89
|
+
"""
|
|
90
|
+
return {
|
|
91
|
+
cm.energy.mission_energy_kj.stable_id: Quantity(mission_kj, kJ),
|
|
92
|
+
cm.energy.battery.usable_energy_kj.stable_id: Quantity(usable_kj, kJ),
|
|
93
|
+
cm.energy.energy_req.mission_energy_kj.stable_id: Quantity(mission_kj, kJ),
|
|
94
|
+
cm.energy.energy_req.usable_energy_kj.stable_id: Quantity(usable_kj, kJ),
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# ---------------------------------------------------------------------------
|
|
99
|
+
# Structural validation
|
|
100
|
+
# ---------------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
def test_graph_validates() -> None:
|
|
103
|
+
"""Static validation must pass before evaluation begins."""
|
|
104
|
+
cm = instantiate(AutonomousPlatform)
|
|
105
|
+
graph, _, _ = _make_evaluator(cm)
|
|
106
|
+
result = validate_graph(graph)
|
|
107
|
+
assert result.passed, result.failures
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# ---------------------------------------------------------------------------
|
|
111
|
+
# Derived attribute value correctness
|
|
112
|
+
# ---------------------------------------------------------------------------
|
|
113
|
+
|
|
114
|
+
def test_derived_margin_value_is_correct_when_satisfied() -> None:
|
|
115
|
+
"""energy_margin_kj must equal usable - mission after evaluation (positive case)."""
|
|
116
|
+
cm = instantiate(AutonomousPlatform)
|
|
117
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
118
|
+
ctx = RunContext()
|
|
119
|
+
evaluator.evaluate(ctx, inputs=_inputs(cm, mission_kj=300.0, usable_kj=500.0))
|
|
120
|
+
|
|
121
|
+
margin_id = cm.energy.energy_req.energy_margin_kj.stable_id
|
|
122
|
+
margin_value = ctx.get_value(margin_id)
|
|
123
|
+
assert margin_value is not None, "energy_margin_kj was not realized"
|
|
124
|
+
assert abs(margin_value.magnitude - 200.0) < 1e-9
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def test_derived_margin_value_is_correct_when_violated() -> None:
|
|
128
|
+
"""Margin is still computed (as negative) when the constraint fails."""
|
|
129
|
+
cm = instantiate(AutonomousPlatform)
|
|
130
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
131
|
+
ctx = RunContext()
|
|
132
|
+
evaluator.evaluate(ctx, inputs=_inputs(cm, mission_kj=600.0, usable_kj=400.0))
|
|
133
|
+
|
|
134
|
+
margin_id = cm.energy.energy_req.energy_margin_kj.stable_id
|
|
135
|
+
margin_value = ctx.get_value(margin_id)
|
|
136
|
+
assert margin_value is not None, "energy_margin_kj was not realized"
|
|
137
|
+
assert margin_value.magnitude == pytest.approx(-200.0)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# ---------------------------------------------------------------------------
|
|
141
|
+
# Constraint pass / fail / boundary
|
|
142
|
+
# ---------------------------------------------------------------------------
|
|
143
|
+
|
|
144
|
+
def test_constraint_passes_when_battery_exceeds_demand() -> None:
|
|
145
|
+
"""Requirement is satisfied when usable > mission demand."""
|
|
146
|
+
cm = instantiate(AutonomousPlatform)
|
|
147
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
148
|
+
result = evaluator.evaluate(RunContext(), inputs=_inputs(cm, mission_kj=300.0, usable_kj=500.0))
|
|
149
|
+
|
|
150
|
+
assert result.passed, result.failures
|
|
151
|
+
sat = iter_requirement_satisfaction(result)
|
|
152
|
+
assert len(sat) == 1
|
|
153
|
+
assert sat[0].passed
|
|
154
|
+
assert "energy_req" in sat[0].requirement_path
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def test_constraint_fails_when_battery_below_demand() -> None:
|
|
158
|
+
"""Requirement is violated when usable < mission demand."""
|
|
159
|
+
cm = instantiate(AutonomousPlatform)
|
|
160
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
161
|
+
result = evaluator.evaluate(RunContext(), inputs=_inputs(cm, mission_kj=600.0, usable_kj=400.0))
|
|
162
|
+
|
|
163
|
+
assert not result.passed
|
|
164
|
+
sat = iter_requirement_satisfaction(result)
|
|
165
|
+
assert len(sat) == 1
|
|
166
|
+
assert not sat[0].passed
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def test_constraint_passes_at_exact_boundary() -> None:
|
|
170
|
+
"""Zero margin (usable == demand) is the >= 0 boundary — must pass."""
|
|
171
|
+
cm = instantiate(AutonomousPlatform)
|
|
172
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
173
|
+
result = evaluator.evaluate(RunContext(), inputs=_inputs(cm, mission_kj=400.0, usable_kj=400.0))
|
|
174
|
+
|
|
175
|
+
assert result.passed, result.failures
|
|
176
|
+
assert all_requirements_satisfied(result)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def test_all_requirements_satisfied_reflects_result() -> None:
|
|
180
|
+
"""Helper agrees with individual constraint results for both pass and fail cases."""
|
|
181
|
+
cm = instantiate(AutonomousPlatform)
|
|
182
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
183
|
+
|
|
184
|
+
passing = evaluator.evaluate(RunContext(), inputs=_inputs(cm, mission_kj=200.0, usable_kj=350.0))
|
|
185
|
+
failing = evaluator.evaluate(RunContext(), inputs=_inputs(cm, mission_kj=500.0, usable_kj=300.0))
|
|
186
|
+
|
|
187
|
+
assert all_requirements_satisfied(passing)
|
|
188
|
+
assert not all_requirements_satisfied(failing)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
# ---------------------------------------------------------------------------
|
|
192
|
+
# Graph reuse: independent runs over the same compiled graph
|
|
193
|
+
# ---------------------------------------------------------------------------
|
|
194
|
+
|
|
195
|
+
def test_repeated_evaluations_are_independent() -> None:
|
|
196
|
+
"""Two evaluate() calls with different inputs produce independent, correct results.
|
|
197
|
+
Confirms the compiled graph is safely reusable (RunContexts are isolated)."""
|
|
198
|
+
cm = instantiate(AutonomousPlatform)
|
|
199
|
+
_, _, evaluator = _make_evaluator(cm)
|
|
200
|
+
margin_id = cm.energy.energy_req.energy_margin_kj.stable_id
|
|
201
|
+
|
|
202
|
+
ctx1 = RunContext()
|
|
203
|
+
evaluator.evaluate(ctx1, inputs=_inputs(cm, mission_kj=300.0, usable_kj=500.0))
|
|
204
|
+
|
|
205
|
+
ctx2 = RunContext()
|
|
206
|
+
evaluator.evaluate(ctx2, inputs=_inputs(cm, mission_kj=600.0, usable_kj=400.0))
|
|
207
|
+
|
|
208
|
+
assert ctx1.get_value(margin_id).magnitude == pytest.approx(200.0)
|
|
209
|
+
assert ctx2.get_value(margin_id).magnitude == pytest.approx(-200.0)
|