Repository navigation
feat(overview-metrics): totals count the whole repository (push-down) by default - #556
Merged
Merged
Conversation
… by default Owner decision O-cap-1 (2026-11-08): report-spec and analytic totals count with population="repository" (push_down=True) -- the whole repository, including elements the viewer may not be able to see -- as a deliberate interim choice until zone-aware push-down exists. Live: Asset 0.9 s instead of a 30 s timeout. - count_elements, count_elements_by_property, count_relationships, counts_by_type, people_counts, usage_context_counts, feedback_summary, business_value_signals and growth_series default to "repository"; "viewer" stays an explicit opt-in, and scope=None still reaches the server default. - A failed repository count is None with an unmeasured note, strict or not: it has no find fallback, and 0 would read as an empty catalog. - count_relationships uses ce itself as the native counter when it has the method (EgeriaTech does); semantic_grounding passes expert=mgr (R4). - One population per payload, and no ratio mixes populations: term_definition_completeness, context_readiness_funnel and business_value_signals now count every figure natively (count_elements_by_property gains operator="NEQ": description != ""), replacing capped scans whose totals were the page size (live: 500 terms instead of 1061). certifications_summary, orphan_glossary_terms, stale_assets, contextualised_coverage and solution_component_realisation keep their scan-backed payloads wholly viewer-scoped, explicitly. - Declarations: each measure's population says "repository", the population param defaults to it, and descriptions say the totals include elements the viewer may not be able to see. - The native-method cache no longer hands a cached method name to a client of the same class name that lacks it. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…at can answer them
Read-back P1-1 on O-cap-1: feedback_summary and count_relationships declared
egeria_client:ClassificationExplorer, which is what the Portal's supply
builds, and a ClassificationExplorer has no native
count_relationships_between_elements. With the repository default, every
feedback count on the Portal was None ("needs a MetadataExpert client") where
it used to be 61.
- feedback_summary and count_relationships declare egeria_client:EgeriaTech
(both get_relationships and the native count), as asset_composition does.
- Sweep: metric_trend binds a target's ce slot to its EgeriaTech when the
target declares EgeriaTech there (an input may be declared only once, so
metric_trend keeps [EgeriaTech, ClassificationExplorer]). semantic_grounding
and context_readiness_funnel count through mgr; certifications_summary is
viewer-scoped.
- Composites forward the server default (scope=None) explicitly. The keyword
wrapper reads population=None as "not given", so it had become a
repository count inside counts_by_type, people_counts, usage_context_counts,
feedback_summary, business_value_signals and growth_series.
- P3: count_elements / count_elements_by_property docstrings and
descriptions say the capped-find fallback is viewer-only; assetCapped's
label says it is empty when not measured.
Tests run feedback_summary and count_relationships through a Portal-shaped
supply that builds exactly the declared class, and sweep every demo spec
through it for a missing native relationship count.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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.
Totals count the whole repository by default (push-down). Owner decision O-cap-1, 2026-11-08: "we should pushdown and get all totals not just visible ones (at least for now - we have some ideas on pushdown that may allow us to more efficiently do pushdown with zone sensitivity)". Every total that a report spec or analytic function shows now counts with
population="repository"(push_down=True). On the live platform that takes anAssetcount from a 30 s timeout to 0.9 s.Branch
feat/totals-repository-populationoff upstream/main 5ac4bb5 (#555). Two commits: 03b854d (repository default) and 4c64296 (read-back P1-1: relationship counts get a client that can answer them). No Egeria writes. No version bump.Rules followed
population="viewer".scope=Nonestill reaches the server default. Only the default changed.overview_handler.py"Count scope"). A numerator from a find only sees what the viewer may see, so it is never divided by a repository total. Each routine took one of two paths:Made wholly native, in the repository population:
term_definition_completeness(Glossary Definition Completeness)context_readiness_funnelbusiness_value_signalssemantic_grounding"Has a description" is now
count_elements_by_property(..., "description", "", operator="NEQ").Kept wholly viewer-scoped, explicitly: these payloads come from scans that a native count cannot express (relationship-end distinct GUIDs, update times, certification end dates). Their native total now passes
population="viewer".certifications_summaryorphan_glossary_termsstale_assetscontextualised_coveragesolution_component_realisationNoneplus anunmeasurednote, strict or not. The find fallback only sees what the viewer may see, so it is not used, and a 0 would read as an empty catalog. The non-strict0now survives only for a failed viewer count, which no dashboard or analytic default reaches.count_relationships_between_elements. AClassificationExplorerlacks it (checked live), and the Portal's supply builds exactly the declared class.feedback_summaryandcount_relationshipstherefore declareegeria_client:EgeriaTech, asasset_compositionalready does. EgeriaTech has bothget_relationshipsand the native count.metric_trendcan't declare EgeriaTech twice, because an input may be declared only once. So it binds a target'sceslot to its own EgeriaTech when the target declares EgeriaTech there.semantic_groundingand the funnel count throughmgr(a MetadataExpert), andcertifications_summaryis viewer-scoped.semantic_groundingpassesexpert=mgr.count_relationshipsin the repository population also usesceitself when it has the native method; theEgeriaTechthatPlainSupplyhands out does. A bareClassificationExplorergetsNonewith the words "no native relationship count is available (it needs a MetadataExpert client)".Changes
overview_metrics:"repository":count_elements,count_elements_by_property(which gainsoperator="EQ"|"NEQ"),count_relationships,counts_by_type,people_counts,usage_context_counts,feedback_summary,business_value_signals, andgrowth_series(newpopulationparam).GlossaryTerm with description != ''.population=Noneas "not given". So a composite that forwardedscope=Noneused to get the repository default instead. It now forwardsscope=None, through_pop(scope), incounts_by_type,people_counts,usage_context_counts,feedback_summary,business_value_signalsandgrowth_series.analytic_registry):populationparam defaults torepository.population="repository".REPOSITORY_WORDSsentence is appended to each one's description: the totals include elements you may not be able to see.not_measuredsentences are updated.MeasureDeclaration.populationdocstring now says it is the default population when the routine takes apopulationparam.population="viewer".analytic_spec_paramsis unchanged; the defaults carry the population.Live before/after (read-only)
Method:
resourceexplorernpa, default 30 s client timeout (what the tiles use).asOfTime(probe: GlossaryTerm 30 days ago = 200 in both populations)Before this PR, the completeness tile's "total" was the 500-term page, so its 65 % described only that page. The ratio is now two native counts in one population.
One definitional shift: "defined" now means the description is set and not the empty string. A whitespace-only description counts as defined; live that is 9 of 1,061 terms. A full viewer scan gives 527 non-blank against 536
NEQ "". "Not blank" cannot be counted natively: Egeria'sLIKE(regex) condition returned 0 for every pattern tried (.+,.*\S.*,(?s).*[a-zA-Z0-9].*), in both populations. That looks like an Egeria bug, worth its own issue.Feedback Summary through a Portal-shaped supply (live, 20:13Z, read-only)
The supply builds exactly the declared client class, as the Portal's does.
get_relationshipspath)population=viewerTests
pytest tests/micro-testson Python 3.13.2: 2,295 collected, 2,292 passed, 3 skipped, 0 failed (junit count, after 4c64296; 03b854d alone was 2,284 / 3 / 0).test_portal_supply_relationship_counts.py:feedback_summaryandcount_relationshipsrun through a RoleSupply that hands out a client shaped like the class asked for. The test checks that the declared class (EgeriaTech) is the one used, with push-down.metric_trendoffeedback_summarygives its EgeriaTech to theceslot.test_scope_none_reaches_the_server_default_through_every_composite.Trueby default,scope=Noneomits it, andpopulation="viewer"sets itFalse, forbusiness_value_signalsandgrowth_series. An unknown population raises.Nonewith a "has no fallback" note, strict or not, and the find is never asked (test_a_timed_out_repository_count_is_not_measured_and_never_asks_the_find,test_a_failed_repository_count_is_none_never_zero).documentedisNEQ ""onAsset.mgr, with push-down.Nonewith its words. Feedback counts the repository through anEgeriaTech-like client. Thecount_elements_by_propertyNEQbody is checked, and a bad operator raises.population="viewer". That fallback only exists there now.test_rs_w2_3's fakeEgeriaTechgainscount_relationships_between_elements, as the real one has.Consumers (not changed here)
overview_handler.pyalready bindsscope="repository"explicitly through_scoped, andscope="viewer"for its background viewer Asset count, so its own counts don't change. These calls do change:business_value_signals(mgr, as_of)now returns repository counts instead of a 500-capped find, so_reconcile_business_valuesees a consistentassetTotal.context_readiness_funnel:_strict_funnel_countscallscount_elementswithout a scope, and those calls now default to repository too. This matches the payload'scountScope.orphan_glossary_termsandstale_assetsstay viewer-scoped inside a payload labelledcountScope: "repository". Their native totals are viewer Asset/GlossaryTerm counts, and the Asset one times out at 30 s. That mix predates this PR, but it is worth labelling in egeria-workspaces.local-dashboards.html: the fix(overview-metrics): a capped or timed-out count is not measured, never the cap #555 finding stands. It needs anabsentbranch andunmeasuredlabels.Follow-ups (not changed here)
populationparam for the routines that hard-code repository (semantic_grounding,context_readiness_funnel,term_definition_completeness).LIKEcondition counts 0 for every regex tried. This blocks a native "not blank" count.certifications_summary.active,stale_assets.staleCount,contextualised_coverage.contextualisedCount,orphan_glossary_terms.referencedCount, andsolution_component_realisation. Moving them to repository needs native counts Egeria does not offer yet (distinct relationship ends, update-time filters).🤖 Generated with Claude Code