pub fn validate_predicate_edit(
proposed_source: &str,
author: &EditAuthor,
previous_policy: Option<&BootstrapPolicy>,
) -> BootstrapValidationExpand description
Validate a proposed edit to a per-directory invariants.harn file.
Bootstrap policy promotes the soft warnings on parse_invariants_source
into hard errors:
- Source must lex/parse cleanly.
- Every
@invariantpredicate must declare exactly one of@deterministicor@semantic. - Every predicate must carry a complete
@archivist(evidence, confidence, source_date, coverage_examples)provenance block. @semanticpredicates must declare a fallback whose target is a deterministic predicate visible in the proposed source.
previous_policy lets the caller pin the previously committed bootstrap
hash into the validation result for audit. It does not change the rules
applied — the bootstrap rules themselves live in this function so a
repository can roll its policy hash forward without rewriting Rust.