Skip to main content

Module bisect

Module bisect 

Source
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 = 0

Structs§

BisectPredicates
The set of predicates the user wrote in .cgx/bisect.toml.
BisectReport
PredicateOutcome
Result of a single predicate evaluation. Implements Display for nice CLI output.

Constants§

EXAMPLE_TOML
Sample TOML emitted by cgx bisect-script --example. Keep in sync with the BisectPredicates struct.