Repository navigation
Resolve analytic functions by registry name or allowed module prefix (ISSUE-169) - #516
Merged
Merged
Conversation
…(ISSUE-169) _resolve_analytic_function imported any dotted path a report spec named. It now resolves a registered name to its entry's function, trusts a dotted path a registered entry declares, and accepts other dotted paths only under PYEGERIA_ANALYTIC_MODULE_PREFIXES (default: pyegeria, trellis_analytics), logging those at DEBUG. Anything else raises AnalyticFunctionRefused before any import. The same check covers action fetch/analytic steps and binder factories. No deprecation warning yet. Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
This was referenced Oct 31, 2026
dwolfson
added a commit
that referenced
this pull request
Oct 31, 2026
ISSUE-168 was released in 6.2.16 (#513) but still read "not merged"; ISSUE-169..172 are merged (#516..#519) and ship in 6.2.17. Their statuses now say so, the five entries move to Fixed / Resolved, and the open-items index and at-a-glance count (now 2: ISSUE-155, 150) match. No entry's content changed beyond its status line. Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
format_set_executor._resolve_analytic_functionimported whatever module a report spec'sanalytic_functionnamed. It now resolves names as follows:analytic_registry) resolves to that entry'sfunction.PYEGERIA_ANALYTIC_MODULE_PREFIXES(comma-separated) and defaults topyegeriaandtrellis_analytics. Each prefix is matched as a package boundary, sopyegeriadoes not admitpyegeria_extras. These resolutions log at DEBUG only.AnalyticFunctionRefused(aValueError) before any import happens.The same check covers action
fetch/analyticsteps andanalytic_bindersfactories. There is deliberately no deprecation warning yet. Neither egeria-workspaces nor trellis has a spec that names a module outside the default prefixes.Tests:
tests/micro-tests/test_issue_169_analytic_resolver.pycovers a registered name, a registered path outside the allowlist, an allowed dotted path (DEBUG only), the package-boundary match, refused paths (no import call, nothing insys.modules), an unregistered bare name, the env-var override, and binder factories.test_issue_138_140_149_analytic_envelope.pynow adds its fake module to the allowlist. All micro-tests pass.Note: this is one of four related PRs (ISSUE-169..172). Each adds an entry near the top of
PYEGERIA_ISSUES.md, so whichever merges later needs a trivial conflict resolution there.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc