Repository navigation
fix(overview-metrics): scans read every page or report nothing; a failed viewer count is None - #565
Merged
Conversation
…er 0 count_elements / count_elements_by_property (and counts_by_type, people_counts, usage_context_counts) returned 0 in the viewer population when the find fallback itself failed, unless strict=True. A 0 there reads as "none of them". It is now None with an unmeasured note, strict or not, as a failed repository count already was. strict is still accepted and changes nothing; the registry's strict param says so. Docs: the odpi#562 sentence in output-formats-and-report-specs.md and the 6.2.27 release note no longer say the viewer 0 survives; new 6.2.28 release note. pyegeria's own callers are None-safe: sum_counts gives total None when a row is None, contextualised_coverage's pct guards on a truthy total, and the composites only place the value in a dict. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A figure computed from a scan is only a figure when the scan read everything (Architect read-back, READBACK-6.2.27-live-2026-11-08). - orphan_glossary_terms read one 500-relationship SemanticAssignment page, which held 8 distinct terms, and reported 1,053 orphans; all 747 relationships hold 77 terms, so 984. New _all_relationships() pages until Egeria returns an EMPTY page (a short page is not the last page), dedupes by relationship GUID, and always puts startFrom/pageSize (and asOfTime) in the body: get_relationships ignores start_from/page_size whenever a body is given, so the as_of scans were not paging at all. - stale_assets reported staleCount 0 from a full 500-Asset page beside a not-measured assetTotal. A full Asset page is a sample: staleCount is now None plus an unmeasured note. ai_ready_assets and drl_readiness_gates do the same (capped: true) instead of reporting the sample's figures. - Every other page scan is paged to exhaustion: certifications_summary, contextualised_coverage, solution_component_realisation, active_contributors, engagement_series, the DataFlow lineage scans, count_relationships in the viewer population, and the governed / ownership / karma finds (new _all_elements()). - A scan that cannot finish -- more than MAX_SCAN_PAGES (40) pages, or a server that repeats its page -- is None plus a note, never a figure from the part it read. - engagement_series: a failed type was a row of zeros; it is now None in every week, as is each week's total. Registry cost lines, completeness labels and demo-spec descriptions say what is read now. Tests: test_capped_scans_not_counts.py (each fails on the old module), and the existing fakes now page like Egeria. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Nov 9, 2026
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Nov 9, 2026
…ilter-kwargs Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md # pyegeria/omvs/asset_catalog.py # pyegeria/view/format_set_executor.py # pyegeria/view/microflow.py # tests/micro-tests/test_rs_egeria_tier.py
This was referenced Nov 9, 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.
Scans read every page, or report nothing; a failed viewer count is
None, not0. For pyegeria 6.2.28. This follows the Architect's HIGH finding in the 6.2.27 live read-back (READBACK-6.2.27-live-2026-11-08.md, lines 34–43), in the same area as #555.Branch
fix/capped-scans-and-viewer-noneoff upstream/main 0fdf951 (#563). Two commits:Nonewith a note, never0.No Egeria writes. No version bump.
A. Capped scans reported as numbers
A figure computed from a scan is only a figure when the scan read everything.
orphan_glossary_termsread one 500-relationshipSemanticAssignmentpage. That page held 8 distinct terms, soorphanCountread 1,053. All 747 relationships hold 77 terms, so the count is 984 (confirmed live, below)._all_relationships()pages until Egeria returns an empty page. Egeria's paging contract: a short page is not the last page.startFrom/pageSize(andasOfTime) in the body.ClassificationExplorer.get_relationshipsignores itsstart_from/page_sizearguments whenever a body is given, so the oldas_ofscans were not paging at all.stale_assetsreportedstaleCount0 from a full 500-Asset page, beside a not-measuredassetTotal. A full page of Assets is a sample, not the catalog.staleCountis nowNonewith anunmeasurednote. The Asset population (about 27,000) is too large to page through on every dashboard load.MAX_SCAN_PAGESpages (40 × 500), or a server that repeats its page (startFromignored). The result isNonewith a note, never a figure from the part the scan read.Audit: every analytic routine that scans a page and reports a count
orphan_glossary_termsstale_assetsai_ready_assetscapped: true) when the Asset page is full; DataFlow pageddrl_readiness_gatescapped: true); DataFlow pagedgoverned_coveragegovernedCapped: true)_all_elements);governedCappedfalse when measuredownership_coveragekarma_leaderboard[]+ notecertifications_summarycontextualised_coveragesolution_component_realisationactive_contributorsengagement_seriescount_relationships(viewer population)count_elements/_by_propertyviewer fallbackterm_definition_completeness,semantic_grounding,context_readiness_funnel,business_value_signals,feedback_summary(repository)Registry cost lines, completeness labels (
governedCapped,ownershipCapped,capped), thestale_assetsmeasure and itsnot_measuredsentence, and the demo-spec descriptions now say what is read.B. A failed viewer count is
None, not0_element_countin the viewer population (orscope=None) returned0when the find fallback itself failed, unlessstrict=True. It is nowNonewith anunmeasurednote, strict or not, as a failed repository count already was.strictis still accepted and changes nothing. The registry'sstrictparam says so.docs/output-formats-and-report-specs.mdnow says there is no exception to "never 0".docs/release-notes/6.2.27.mdline now says the 0 survived in 6.2.27 and isNonefrom 6.2.28.docs/release-notes/6.2.28.md.sum_countsgivestotalNone when any row is None.contextualised_coverageguards its pct on a truthy total.people_counts,usage_context_countsandcounts_by_typeonly place the value in a dict._count_cell(asset_composition) already handles None.Live before/after (read-only)
Method:
qs-view-server, userresourceexplorernpa, default 30 s client timeout.orphan_glossary_termsstale_assetsai_ready_assetsdrl_readiness_gatesgoverned_coverageownership_coveragecertifications_summarycontextualised_coveragesolution_component_realisationactive_contributorsengagement_series(12 weeks)karma_leaderboardcount_elements(population="viewer")whose query fails (unknown type)Five routines reported a different number: orphan terms, governed elements, contextualised Assets, realised components, and (as not measured) stale/AI-ready. The others were already under one page live, so they are unchanged.
Cost:
solution_component_realisationruns the same paged ImplementedBy scan, and it is 7 s slower (42.2 → 49.5 s). So that is roughly what reading every page costs on this catalog.contextualised_coveragewent from 45.4 to 94.5 s. Most of that gap is its viewer Asset total (a 30 s native timeout, then the find fallback), which varies between runs and is not changed here. That total is the existing mixed-population item listed under Follow-ups.Tests
uv run -p 3.13 pytest tests/micro-tests/(Python 3.13.2), JUnit counts: at 0013963, 2,398 collected, 2,395 passed, 3 skipped, 0 failed. At 507e873 (B alone): 2,379 collected, 2,376 passed, 3 skipped, 0 failed.test_capped_scans_not_counts.py(16 tests). Every one excepttest_a_short_asset_page_is_counted(a control) fails on the old module (checked). It covers:startFrom/pageSize/asOfTime;test_capped_count_not_measured.py:MAX_SCAN_PAGESstops a scan, with its note.test_issue_123_strict_counts.py: the viewer zero contract is now None.startFrom, then an empty page):_pages/_by_typeintest_overview_metrics.py, and the_clients()fixture intest_rs_w2_1a. Sequence-based fakes are now keyed by relationship type.Callableimport) pre-exists.Consumers (not changed here)
ai_ready_assets/drl_readiness_gates→None+capped: trueon a full Asset page (live, every time today).stale_assets.staleCount→Noneon a full Asset page.engagement_seriesfields →Nonefor a failed type.karma_leaderboard→[]+ a note when its scan cannot finish.None(the #807 rule).Follow-ups (not changed here)
stale_assets,ai_ready_assets,drl_readiness_gates) cannot be measured on a catalog over 500 Assets. Making them measurable needs native counts Egeria does not offer yet: an update-time filter, and "has DataFlow". Alternatively a bounded background scan could cache the answer.contextualised_coverage(andstale_assets) divide by a viewer-population Asset total. Live, that count times out at 30 s and then fills a find page, socontextualisedPctis never measured on this catalog. That is unchanged since feat(overview-metrics): totals count the whole repository (push-down) by default #556; it needs the zone-aware push-down._find()in overview_metrics has no callers left.🤖 Generated with Claude Code