Skip to main content

Module policy_patch_validate

Module policy_patch_validate 

Source
Expand description

Slice 6: the exact grammar of one policy-proposed Git patch (commit-transaction-patch.ts). What: The exact supported grammar of one policy-proposed Git patch. Why: A policy patch is untrusted output, so only one ordinary text path, its declared headers and the candidate base index line may reach git apply. The rules are the incumbent’s validatePolicyPatch (src/policy-engine/commit-transaction-patch.ts).

In TS you’d write (pseudocode):

validatePolicyPatch({ patch, expectedRevision });

Structs§

PatchCheck
What: The validation input: the proposed patch and the exact candidate blob it must base on. Why: One object keeps the check’s two inputs named at every call site.

Functions§

validate_policy_patch
What: Check a policy patch against the exact supported grammar. Why: Each rule removes one way a proposal could address another path or change another mode.