ByteNex
ByteNex Docs
BX-System Documentation

ByteNex › Docs › Automatic repair

Automatic repair

Automatic repair is the principle by which BX-System corrects faulty code without manual review. The AST engine detects rule violations and corrects them; the kernel returns to a stable state.

Automatic repair

Automatic repair is the principle by which BX-System corrects faulty code without manual review. The AST engine detects rule violations and corrects them; the kernel returns to a stable state.

What triggers a repair?

Code that violates a defined rule: direct open() calls, os.path usage, missing return contracts, missing decorators, hardcoded paths.

Who performs the repair?

The AST engine. It parses the code, applies the policies, writes the corrected code, and updates the signature.

Is manual review required?

No. The repair is automatic. The AST engine applies the policy and writes the corrected code.

What happens after the repair?

The kernel returns to a stable state and updates the signature of the tool. The corrected code is verified.

How are rules defined?

A rule is policy. Adding a rule does not require a rewrite of the engine. The policy is applied automatically.

wak · 2018-04-01