You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Sad Catapella B9][Mask reporting] Cyclic mask hierarchies are rendered as empty or truncated trees without warning #105
Final Batch 9, pinned d7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed report failure for a cyclic hierarchy input, with genuine cycle occurrence in scanner outputs an unverified edge case. No runtime tests executed.
_relations() lines 502–519 marks an edge direct if it is not a two-step implied edge. It does not check full-graph cycles; aggregate pair relations are built from pairwise evidence across images. Pairwise cooccurrence can differ from image to image.
_hierarchy_lines() lines 442–457 only starts traversal at nodes with no parents and recursively follows children without a visited set. A cycle A→B→C→A has no root, so the report silently prints no mask types under 'Hierarchy (direct parents only)'. If a malicious/custom MaskReport contains a cycle reachable from a root, recursion can fail; whether the scanner can produce that exact topology is unproven.
Silently incomplete mask relationship reporting and false reassurance that no hierarchy exists. The JSON hierarchy retains the edges but is not flagged as cyclic. This is distinct from #67 (incorrect one-to-one matching) and #69 (performance).
Fix and acceptance
Validate that the proposed hierarchy is a DAG (or represent cycles as explicit ambiguous relationships); never silently omit nodes. On detected cycle, present every involved type and edge with a warning that a biological parent-child hierarchy cannot be inferred, and still list all mask types. Consider a condensation graph (strongly connected components) for presentation, not automatic biological direction guessing. Add direct MaskReport A↔B and A→B→C→A fixtures, a valid DAG, multiple-parent DAG, and an end-to-end scan fixture with pairwise sparse co-occurrence if it genuinely yields a cycle. Do not presume a hierarchy that the evidence does not support. No Numba role.
Activity
Name cyclic mask hierarchies instead of printing an empty tree (#105)