Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/output-formats-and-report-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,9 @@ A count a routine could not establish is `None`, never `0` and never the cap (#5
- a `SERIES`/`BAR`/`PIE` over a result that holds one becomes `kind: "absent"` too: a missing bar, or a pie re-proportioned without its missing slice, would read as an answer;
- a dict or list result keeps its measured values; the unmeasured ones are `None` and the notes name each one.

Measured results are unchanged. One exception to "never `0`": a `viewer` count with `strict=False` still returns `0` when the query itself fails; pass `strict=True` for `None`.
Measured results are unchanged. Since 6.2.28 there is no exception to "never `0`": a `viewer` count whose query fails is `None` with a note too, whatever `strict` says (6.2.27 still returned `0` there unless `strict=True`). `strict` is still accepted, and changes nothing.

**Scans (6.2.28).** A figure computed from a scan, rather than from a native count, is only a figure when the scan read everything. The relationship scans (`orphan_glossary_terms`, `certifications_summary`, `contextualised_coverage`, `solution_component_realisation`, `active_contributors`, `engagement_series`, the DataFlow lineage in `ai_ready_assets`/`drl_readiness_gates`, and `count_relationships` in the viewer population) and the element finds of `governed_coverage`, `ownership_coverage` and `karma_leaderboard` page until Egeria returns an **empty** page. That is Egeria's paging contract: a short page is not the last page. A scan that cannot finish (more than `MAX_SCAN_PAGES` pages, 40 by default, or a server that repeats its page) is `None` with a note, never a figure from the part it read. `stale_assets`, `ai_ready_assets` and `drl_readiness_gates` read one page of Assets, which is too many to page through; when that page is full, their figures are `None` with a note (`capped` is `true` for the readiness routines), because a page of Assets is a sample, not the catalog. In 6.2.27 `orphan_glossary_terms` read one 500-relationship page that held 8 distinct terms, so it reported 1,053 orphans where all 747 relationships give 984.

**Population (#556, 6.2.27).** The count routines take `population=` (`"viewer"` or `"repository"`; `scope=` is a deprecated alias and passing both with different values is a `ValueError`). They now default to `"repository"`: totals count the whole repository, **including elements the viewer may not be able to see**, via the native push-down count. This is a deliberate interim choice until zone-aware push-down exists, and the registry descriptions say so. `"viewer"` is an explicit opt-in; `scope=None` omits the argument and takes the server default. A failed repository count has no find fallback, so it is `None` with a note, strict or not. Routines that scan elements (for example `certifications_summary`, `orphan_glossary_terms`, `stale_assets`) stay viewer-scoped, and no payload mixes the two populations in one ratio.

Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/6.2.27.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
`exec_report_spec` puts the notes on the output as `unmeasured`
(`[{"count", "reason", "at_least"}, ...]`); a scalar count that was not measured, and a
`SERIES`/`BAR`/`PIE` over one, come back as `kind: "absent"` with the reason and the lower bound
in `content`. Measured results are unchanged. A `viewer` count with `strict=False` still returns `0` when the query itself fails; pass `strict=True` for `None`. See
in `content`. Measured results are unchanged. In 6.2.27 a `viewer` count with `strict=False` still returned `0` when the query itself failed; from 6.2.28 that is `None` with a note too (see [6.2.28](6.2.28.md)). See
[Counts: not measured, and whose population](../output-formats-and-report-specs.md#counts-not-measured-and-whose-population).
- **Totals count the whole repository by default (#556).** The count routines (`count_elements`,
`count_elements_by_property`, `count_relationships`, `counts_by_type`, `people_counts`,
Expand Down
25 changes: 25 additions & 0 deletions docs/release-notes/6.2.28.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,28 @@
a table.
- **`exec_report_spec` no longer returns `None` when a find method raises `ValueError`.** It logs
the error and raises it, so the caller sees the words.

## Changed

- **A failed viewer count is `None`, not `0`.** `count_elements`, `count_elements_by_property` and
the composites built on them (`counts_by_type`, `people_counts`, `usage_context_counts`) returned
`0` in the viewer population when the query itself failed, unless `strict=True`. That read as
"none of them". It is now `None` with an `unmeasured` note, strict or not, as a repository count
already was. `strict` is still accepted and changes nothing.
- **Scans read every page, or report nothing.** A figure computed from a scan is only a figure
when the scan read everything. The relationship scans and the governance, ownership and karma
finds now page until Egeria returns an empty page (a short page is not the last page). A scan
that cannot finish (more than `MAX_SCAN_PAGES` pages, or a server that repeats its page) is
`None` with an `unmeasured` note, never a figure from the part it read. In 6.2.27,
`orphan_glossary_terms` read one 500-relationship page that held 8 distinct terms, and reported
1,053 orphan terms where all 747 relationships give 984.
- **A full page of Assets is a sample, not a count.** `stale_assets` reported `staleCount` `0`
from a full 500-Asset page beside a not-measured `assetTotal`. It is now `None` with a note when
the page is full. `ai_ready_assets` and `drl_readiness_gates` do the same, with `capped: true`;
they used to report the sample's figures.
- `engagement_series`: a feedback type whose query failed is `None` in every week, and so is
every week's `total`, where it used to read as a week of no activity.
- `governedCapped`, `ownershipCapped` and the readiness routines' `capped` are `false` whenever
the figures were measured.

See [Counts: not measured, and whose population](../output-formats-and-report-specs.md#counts-not-measured-and-whose-population).
17 changes: 9 additions & 8 deletions pyegeria/view/analytic_demo_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def _demo(
heading="Ownership Coverage",
what="Count of elements carrying an Ownership classification -- NOT a percentage, same "
"caveat as Governance Coverage (no cheap total-elements denominator yet). "
"ownershipCapped=true means the query hit its result-page cap (DEFAULT_CAP), so "
"ownershipCount is a floor, not exact, when true. byOwnerType is a nested breakdown "
"The find is paged until Egeria returns an empty page, so ownershipCount is every owned "
"element (ownershipCapped is false when measured; an incomplete scan is not measured). byOwnerType is a nested breakdown "
"of the same ownershipCount elements by the owner's type (Person, Team, "
"SolutionActorRole, ...) -- pick BAR below for a chart of byOwnerType.",
analytic_function_name="ownership_coverage",
Expand All @@ -132,8 +132,8 @@ def _demo(
what="Count of elements carrying at least one governance classification "
"(ZoneMembership/Confidentiality/Criticality/Impact/Retention) -- NOT a percentage "
"despite 'coverage' in the name (there's no cheap total-elements denominator to "
"divide by yet). governedCapped=true means the query hit its result-page cap "
"(DEFAULT_CAP), so governedCount is a floor, not exact, when true. byClassification "
"divide by yet). The find is paged until Egeria returns an empty page, so governedCount "
"is every governed element (governedCapped is false when measured). byClassification "
"and topZones are nested breakdowns of the same governedCount elements -- pick BAR "
"below for a chart of byClassification.",
analytic_function_name="governed_coverage",
Expand Down Expand Up @@ -212,13 +212,14 @@ def _demo(
heading="AI-Ready Assets (Composite)",
what="The actual per-asset intersection context_readiness_funnel's 'aiReady' field can't "
"give you: Asset elements that are governed AND documented AND lineage-traced, all "
"three, checked per element from a single capped Asset fetch plus one DataFlow "
"relationship query (not three separate counts intersected client-side after the "
"three, checked per element from one Asset find page plus every DataFlow "
"relationship (not three separate counts intersected client-side after the "
"fact -- see the function's own docstring for the exact field-name gotchas this hit "
"while being built, e.g. find_metadata_elements results key their GUID as "
"'elementGUID' but a relationship end's GUID is plain 'guid'). 'total' is the "
"(possibly capped) Asset population actually checked -- divide aiReadyCount by total "
"for a percentage, don't assume it's the full catalog. First worked example of the "
"Asset population checked. A full Asset page is a sample, not the catalog, so then "
"nothing is measured (capped=true, with a note); otherwise divide aiReadyCount by "
"total for a percentage. First worked example of the "
"composite/derived analytic metric pattern NEXT-18 (egeria-workspaces BACKLOG.md) "
"flagged as missing.",
analytic_function_name="ai_ready_assets",
Expand Down
Loading
Loading