Expand description
Replay: the replayed index, the shadow HEAD move, and the pre-commit re-run decision of revalidation (replay_revalidation).
What:
The parts of revalidation after a replay that need no policy and no hook:
the replayed index, the shadow HEAD move the policies see, and the decision whether pre-commit must re-run.
Why:
Policies and the pre-commit re-run belong to the integrator, which owns the policy engine and the hook dispatcher;
these three steps are pure Git work the integrator calls before it.
In TS you’d write (pseudocode):
await runTransactionGit({ gitPath, cwd, indexPath, args: ['read-tree', mergedTree], objectDirectory });
await moveShadowHead({ context, onto });
const rerun = !context.noVerify && policyTree !== approvedTree;Functions§
- move_
shadow_ head - What:
Moves the shadow’s target ref to the replay parent, so policies and hooks see the parent the commit will have.
Why:
A detached
HEADmoves itself without dereferencing; a symbolic one moves the branch it names. - pre_
commit_ rerun_ required - What:
Whether
pre-commitmust see the replayed tree: the invocation did not bypass hooks, and the policies changed the treepre-commitlast approved. Why: An unchanged tree was already approved, so re-running the hook would only repeat its answer. - read_
replayed_ index - What:
Reads the merged tree into the replay’s private index, with the shadow object store reachable.
Why:
The index is the input to policies and
pre-commit; objects the merge wrote live in the shadow store. - replayed_
index_ path - What:
The private index of one replayed tree:
replay-<r>/commit.indexunder the transaction directory. Why: Policies andpre-commitsee the replayed tree through this index, not the real one.