Expand description
Slice 6: the commit path’s bounded policy convergence over the private index.
What:
The commit path’s bounded policy convergence over the private commit index:
each changed pass writes its corrections into the index,
then the whole ordered pass restarts until it proposes nothing.
Why:
The commit path must end with the corrections the policies settled on,
and must stop when they repeat a state or do not settle.
The loop is the shared converge;
this module supplies the commit path’s three operations,
as the direct fix does for the worktree.
Exact prior states are compared in memory; the incumbent also streams them to snapshot files,
which only serve the same comparison.
In TS you’d write (pseudocode):
const convergence = await convergeCommitPolicies({ args, gitPath, cwd, workspace, policyOptions, baseRevision, ... });Structs§
- Commit
Convergence - What: The settled or stopped result of one commit-path convergence. Why: The caller needs the outcome, the events that explain it, and the paths the loop corrected.
- Commit
Convergence Input - What: Everything one commit-path convergence reads and writes. Why: The request, the shipped checks and the private index travel together, so no caller can pair them wrongly.
Constants§
- COMMIT_
CYCLE_ MESSAGE - What: The message of a commit-path loop that repeated an exact prior state. Why: The wording is the incumbent’s, so the two paths report the same failure.
Functions§
- converge_
commit_ policies - What: Run the bounded commit-path convergence and return the pass that describes its outcome. Why: Settled passes keep their own events; each stop reports its cause as the incumbent does.