Expand description
Declarative graph predicates evaluated against a freshly-indexed repo.
The intended usage is git bisect run cgx bisect-script — at each commit
bisect visits, cgx analyze re-indexes the repo and this module evaluates
the predicates defined in .cgx/bisect.toml. The runner exits with 0 if
the commit is “good” (all predicates pass), 1 if “bad”, and 125 if cgx
couldn’t determine an answer (which git bisect interprets as “skip”).
Example .cgx/bisect.toml:
# All predicates must hold for the commit to be "good".
node_count_min = 700
node_count_max = 2000
nodes_exist = ["fn:crates/cgx-engine/src/parser.rs:parse"]
nodes_missing = []
nodes_alive = ["fn:crates/cgx-engine/src/graph.rs:get_file_summary"]
rule_violations_max = 0Structs§
- Bisect
Predicates - The set of predicates the user wrote in
.cgx/bisect.toml. - Bisect
Report - Predicate
Outcome - Result of a single predicate evaluation. Implements
Displayfor nice CLI output.
Constants§
- EXAMPLE_
TOML - Sample TOML emitted by
cgx bisect-script --example. Keep in sync with theBisectPredicatesstruct.