synology_apm_repo.sdk.presentation.verify_report module

Grouping and a stable render order for a batch of Findings from one Repository.verify()/Catalog.verify() run: turns a flat list into “same root cause” groups, shared by the CLI’s verify command and the TUI’s diagnostics screen.

synology_apm_repo.sdk.presentation.verify_report.finding_sort_key(finding)

A stable, deterministic order for a batch of Findings: chronological (by the version-display-name timestamp in path) for a per-version finding, alphabetical by whole path otherwise. This makes the order of a VerifyLevel.FULL multiprocess sweep deterministic.

class synology_apm_repo.sdk.presentation.verify_report.AugmentedFinding(finding, ref_value, template, variable_parts)

Bases: object

One Finding plus the ref/template/variable-parts signal that grouping and rendering share.

Variables:
  • finding (synology_apm_repo.sdk.findings.Finding) – The underlying Finding.

  • ref_value (str | None) – This finding’s own embedded [ref=...] value, or None when the detail carries none.

  • template (str) – finding.detail with its instance-specific values placeholdered away, keeping an embedded [ref=...] tag visible exactly when ref_value is not None.

  • variable_parts (str) – The instance-specific values template replaced, in order, joined for display, with ref_value itself omitted (the header already shows it once).

finding: Finding
ref_value: str | None
template: str
variable_parts: str
synology_apm_repo.sdk.presentation.verify_report.group_findings(findings)

Buckets findings by _group_key. Expects them already sorted by finding_sort_key (summarize_findings does that), which keeps each group’s members in that order. Groups themselves are sorted by key, not by first member.

Returns:

The groups, each finding wrapped in an AugmentedFinding.

Return type:

list[list[AugmentedFinding]]

synology_apm_repo.sdk.presentation.verify_report.group_count_label(group)

"<N> version(s)" for a Stage.VERSION group, else "<N> occurrence(s)": the member-count label under a group header.

class synology_apm_repo.sdk.presentation.verify_report.VerifySummary(findings, groups, problem_count, repaired_count)

Bases: object

One verify run’s findings, sorted, grouped and counted.

Variables:
findings: list[Finding]
groups: list[list[AugmentedFinding]]
problem_count: int
repaired_count: int
property group_count: int
headline(level)

The result line the CLI and the Browser both show above the groups, as Rich markup, for a run at verify level level; None when there are no findings at all, which each frontend words itself.

synology_apm_repo.sdk.presentation.verify_report.summarize_findings(findings)

Sorts findings by finding_sort_key and returns them with their groups and problem/repaired counts; the entry point every frontend renders a verify result from.