Expand description
Slice 6: one policy patch applied to the private index with git apply --cached --3way.
What:
One policy-proposed patch applied to the private commit index with git apply --cached --3way.
Why:
Corrections land in the private index, never the real one.
A patch that no longer applies is a patch-conflict for the transaction, not a silent skip.
The incumbent applies the same command in applyPrivatePatch
(src/policy-engine/commit-transaction-git.ts).
In TS you’d write (pseudocode):
await applyPrivatePatch({ workspace, gitPath, cwd, patch, candidateRevision, ordinal });Structs§
- Policy
Patch - What: A policy patch proposal for one ordinary text path. Why: The path and bytes are exactly what the policy proposed, and are validated before Git runs.
- Private
Patch Input - What: Inputs of one private patch application. Why: One object keeps the Git context, the private index and the patch separate at the call site.
Enums§
- Patch
Error - What:
Why a policy patch was not applied.
Why:
The convergence loop maps
Rejectedto a grammar failure andConflicttopatch-conflict.
Functions§
- apply_
private_ patch - What: Validate a policy patch, write it privately, and apply it to the private index. Why: The patch file is created exclusively with private permissions, so a re-run never overwrites an earlier one.