exlab_wizard.sync.pre_sync_gate#
Pre-Sync Gate. Backend Spec §7.3.
The Pre-Sync Gate is the contract by which validator findings prevent the NAS sync queue from accepting a flagged run. A run is eligible iff:
the validator engine reports zero hard-tier findings, OR
every hard-tier finding has a matching active override entry in
creation.json’svalidation_overridesarray.
This module is the pure evaluator. The NASSyncClient calls it
before inserting a queue row and, when the gate blocks, mutates the
creation.json sync_status field to "blocked_by_validation".
Functions
|
Evaluate the §7.3 eligibility rule for a run. |
- exlab_wizard.sync.pre_sync_gate.is_eligible(*, validator, creation_json_path, creation)[source]#
Evaluate the §7.3 eligibility rule for a run.
Returns
(True, [])iff there is no hard-tier finding without an active override. Otherwise returns(False, blocking_findings)whereblocking_findingsis the list of unmasked hard-tier findings (so the caller can surface them in logs).The
creation_json_pathis the path to.exlab-wizard/creation.json; the run directory is its parent’s parent. The validator runs in creation-time mode (no walk; just rules over path segments + file names + the cached creation payload).