Skip to content

Add an undeclared-depends_on addon dependency detector#948

Open
eduralph wants to merge 1 commit into
gramps-project:maintenance/gramps60from
eduralph:split/addon-dependency-detector
Open

Add an undeclared-depends_on addon dependency detector#948
eduralph wants to merge 1 commit into
gramps-project:maintenance/gramps60from
eduralph:split/addon-dependency-detector

Conversation

@eduralph

@eduralph eduralph commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Split out of #820 per the one-change-per-PR review. Standalone feature, not CI
infrastructure, so it ships on its own.

Depends on #820 (merge after it): the test is auto-run by the
python3 -m unittest discover -s tests -p "test_*.py" step #820 introduces. It does
not import #820's code, though — the engine is stdlib-only and the test runs green
standalone under plain unittest (its loader is injectable, so the classifier/pool
logic is exercised without spawning real subprocesses). So this branch stays on clean
maintenance/gramps60 (detector-only diff); #820 only governs when it's auto-invoked.

What

Detects addons that import another addon's module without declaring it in depends_on
(the Mantis-13707 class), by loading each registered module in an isolated subprocess
and classifying the failure.

R-F (bounded runtime)

Isolated loads run in a bounded thread pool (configurable; default scales with CPUs)
rather than one 30s-timeout subprocess per registered module, serially — so the
detector's wall-clock stays bounded across the full ~144-addon set.

Draft until its own review/sign-off. Companion split-out from #820: the TMG test split (#949).

🤖 Generated with Claude Code

@eduralph
eduralph force-pushed the split/addon-dependency-detector branch from fdb8ba5 to 0bfb6a6 Compare June 13, 2026 14:18
@eduralph eduralph changed the title Add an undeclared-depends_on addon dependency detector Add an undeclared-depends_on addon dependency detector (stacked on #820) Jun 13, 2026
@eduralph
eduralph marked this pull request as ready for review June 13, 2026 14:19
Split out of the CI-pipeline PR (gramps-project#820) per the one-change-per-PR review:
this is a standalone feature, not CI infrastructure.

Detects addons that import another addon's module without declaring it in
depends_on (the Mantis-13707 class), by loading each registered module in
an isolated subprocess and classifying the failure. The isolated loads run
in a bounded thread pool (configurable; default scales with CPUs) instead
of one 30s-timeout subprocess per module serially — so the detector's
wall-clock stays bounded on the full ~144-addon set (review finding R-F).

Logic split into tests/addon_dependencies.py (the engine) + its test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eduralph
eduralph force-pushed the split/addon-dependency-detector branch from 0bfb6a6 to edb290d Compare June 13, 2026 14:26
@eduralph eduralph changed the title Add an undeclared-depends_on addon dependency detector (stacked on #820) Add an undeclared-depends_on addon dependency detector Jun 13, 2026
@eduralph
eduralph marked this pull request as draft June 13, 2026 14:29
@eduralph
eduralph marked this pull request as ready for review June 13, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant