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 inpath) for a per-version finding, alphabetical by wholepathotherwise. This makes the order of aVerifyLevel.FULLmultiprocess sweep deterministic.
- class synology_apm_repo.sdk.presentation.verify_report.AugmentedFinding(finding, ref_value, template, variable_parts)¶
Bases:
objectOne
Findingplus 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, orNonewhen the detail carries none.template (str) –
finding.detailwith its instance-specific values placeholdered away, keeping an embedded[ref=...]tag visible exactly whenref_valueis notNone.variable_parts (str) – The instance-specific values
templatereplaced, in order, joined for display, withref_valueitself omitted (the header already shows it once).
- synology_apm_repo.sdk.presentation.verify_report.group_findings(findings)¶
Buckets
findingsby_group_key. Expects them already sorted byfinding_sort_key(summarize_findingsdoes 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:
- synology_apm_repo.sdk.presentation.verify_report.group_count_label(group)¶
"<N> version(s)"for aStage.VERSIONgroup, 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:
objectOne verify run’s findings, sorted, grouped and counted.
- Variables:
findings (list[synology_apm_repo.sdk.findings.Finding]) – Every finding, sorted by
finding_sort_key.groups (list[list[synology_apm_repo.sdk.presentation.verify_report.AugmentedFinding]]) –
group_findings(findings).problem_count (int) – Findings still unresolved: every finding except a
Symptom.REPAIRED_VIA_PARITYone (a CRC mismatch the SDK’s redundancy-blob self-repair already reconstructed and confirmed).repaired_count (int) – Findings that were
Symptom.REPAIRED_VIA_PARITY.
- groups: list[list[AugmentedFinding]]¶
- 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;Nonewhen there are no findings at all, which each frontend words itself.
- synology_apm_repo.sdk.presentation.verify_report.summarize_findings(findings)¶
Sorts
findingsbyfinding_sort_keyand returns them with their groups and problem/repaired counts; the entry point every frontend renders a verify result from.