Observation: Some modules receive their QGIS dependencies as parameters (e.g. ui/service.py::run(selected_layer_id, feedback)), while others call QgsProject.instance() directly (utils/layers.py, intersection_context.py, intersection_processing.py, template_loader.py, and the PDF services). Both approaches coexist without an explicit guideline.
Impact: Limited in practice (this is documented as a deliberate architectural choice rather than an oversight-see core/AGENT.md), but a new contributor might reasonably expect systematic dependency injection and be surprised by the direct calls.
Future direction: If a more comprehensive testing/mocking layer is introduced, standardize on explicit injection of the QGIS project wherever it is practical.
Observation: Some modules receive their QGIS dependencies as parameters (e.g.
ui/service.py::run(selected_layer_id, feedback)), while others callQgsProject.instance()directly (utils/layers.py,intersection_context.py,intersection_processing.py,template_loader.py, and the PDF services). Both approaches coexist without an explicit guideline.Impact: Limited in practice (this is documented as a deliberate architectural choice rather than an oversight-see core/AGENT.md), but a new contributor might reasonably expect systematic dependency injection and be surprised by the direct calls.
Future direction: If a more comprehensive testing/mocking layer is introduced, standardize on explicit injection of the QGIS project wherever it is practical.