Skip to content

Clean up analyze subgraph pattern logic (match-first / derived from rules parquet / overrides node results) #981

Description

@fangyangci

Background

Clean up the subgraph pattern decision logic in analyze, and clarify the relationship between pattern results and op (node) results.

Expected logic

  1. Match the pattern first; once matched, the ops it contains are no longer checked individually.

    • As soon as a pattern matches, its constituent nodes are removed from node-level checking to avoid duplicate evaluation.
  2. Pattern results are fully derived from the rules parquet table, using the same decision source as ops.

    • A pattern's supported / unsupported conclusion comes from the rules parquet (the same data source ops use), not from ad-hoc computation.
  3. Pattern results override node results (keeping the current behavior).

    • When some nodes belong to a matched pattern, the final result is taken from the pattern, overriding the original results of those nodes.

Related

Relevant code

  • analyze/core/pattern_extractor.py
  • analyze/core/model_validators/pattern_matching_validator.py
  • analyze/core/output_aggregator.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions