Interface: GitNamespace
Defined in: git/src/builders/git-namespace-contract.ts:35
Public git builder and schema namespace contract (import { git } from '@paraharness/git').
Mounts ScopeReceiptSchema, SyncReceiptSchema, AbortMetaSchema, and all declarative Copy-on-Write worktree, hook, cross-verifier, tool, and delivery step builders.
Methods
candidateComparisonTools()
candidateComparisonTools(runner?): readonly GitCandidateComparisonToolNode<GitWorktreeHandle>[];Defined in: git/src/builders/git-namespace-contract.ts:192
Creates the speculative candidate comparison tool bundle (diffCandidates, readCandidateFile, evalInCandidates).
Enables candidateArbiter and .refineWinnerWhen() to compare candidate refs and run sandboxed benchmarks.
Parameters
| Parameter | Type | Description |
|---|---|---|
runner? | MaybeBuilder<NodeRunnerNode> | Optional subprocess runner pool governing git and benchmark command slots (defaults to DEFAULT_NODE_RUNNER_AST_NODE). |
Returns
readonly GitCandidateComparisonToolNode<GitWorktreeHandle>[]
Frozen tuple of candidate comparison tool AST nodes.
commitAndPush()
commitAndPush<TIn>(id, options): GitCommitAndPushBuilder<TIn>;Defined in: git/src/builders/git-namespace-contract.ts:67
Creates a fluent builder for a retry-safe squash, rebase, verify, and push step.
Compiles into a passive GitCommitAndPushNode<TIn> dispatched via RuntimeExecutorRegistry.steps.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Step input payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique step node identifier. |
options | GitCommitAndPushOptions<TIn> | Remote branch and commit message projections. |
Returns
Immutable fluent commit-and-push step builder.
cowWorktree()
cowWorktree(options?): GitCowWorktreeBuilder;Defined in: git/src/builders/git-namespace-contract.ts:53
Creates a fluent builder for a Tier-3 branchable Copy-on-Write Git worktree scope.
Provisions disjoint sibling <dir>/roots/<runId> and <dir>/forks/<runId>/<forkId> worktrees at runtime, defaulting repo to '.' and dir to '.paraharness/worktree'.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | GitCowWorktreeOptions | Optional host repository path and worktree base directory. |
Returns
Immutable fluent worktree scope builder.
discardBranch()
discardBranch(id?): AstBuilder<GitDiscardBranchNode>;Defined in: git/src/builders/git-namespace-contract.ts:132
Alias for git.resetWorktree() compiling to GitDiscardBranchNode (resetsRunOverlay: true).
Restores the worktree to targetStepBaseScopeCheckpoint and discards uncommitted overlay mutations.
Parameters
| Parameter | Type | Description |
|---|---|---|
id? | string | Optional custom rewind hook identifier. |
Returns
AstBuilder<GitDiscardBranchNode>
Immutable rewind hook builder.
keepWorktree()
keepWorktree(id?): AstBuilder<GitKeepWorktreeNode>;Defined in: git/src/builders/git-namespace-contract.ts:110
Creates a rewind hook builder preserving the active worktree and topology overlay in-place (resetsRunOverlay: false).
Used with .rewindTo(stepId, { onRewind: git.keepWorktree() }) for live steering without discarding work.
Parameters
| Parameter | Type | Description |
|---|---|---|
id? | string | Optional custom rewind hook identifier. |
Returns
AstBuilder<GitKeepWorktreeNode>
Immutable rewind hook builder.
mergeQueue()
mergeQueue<TIn, TOut>(id, options): GitMergeQueueBuilder<TIn, TOut>;Defined in: git/src/builders/git-namespace-contract.ts:85
Creates a fluent builder for a cumulative batch merge-train verification step.
Constructs a speculative rebase chain $R_1 \dots R_k$ up to maxBatchSize and binary-bisects on failure.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Validated step input type. |
TOut | unknown | Validated step output type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique merge queue step identifier. |
options | GitMergeQueueOptions<TIn, TOut> | Target branch, batch size, and verification check. |
Returns
GitMergeQueueBuilder<TIn, TOut>
Immutable fluent merge queue step builder.
patchEquivalence()
patchEquivalence(id?): CrossVerifierBuilder<GitWorktreeHandle, GitScopeReceipt, Record<string, unknown>, GitPatchEquivalenceNode<Record<string, unknown>>>;Defined in: git/src/builders/git-namespace-contract.ts:161
Creates a CrossVerifierBuilder grouping speculative candidates by normalized patch equivalence.
Computes canonicalized patch digests and equivalence classes across surviving tournament branches.
Parameters
| Parameter | Type | Description |
|---|---|---|
id? | string | Optional custom cross-verifier identifier. |
Returns
CrossVerifierBuilder<GitWorktreeHandle, GitScopeReceipt, Record<string, unknown>, GitPatchEquivalenceNode<Record<string, unknown>>>
Immutable cross-verifier builder.
publicSurfaceCrossTester()
publicSurfaceCrossTester(options): CrossVerifierBuilder<GitWorktreeHandle, GitScopeReceipt, Record<string, unknown>, GitPublicSurfaceCrossTesterNode<Record<string, unknown>>>;Defined in: git/src/builders/git-namespace-contract.ts:143
Creates a CrossVerifierBuilder transplanting boundary-only tests across speculative worktree candidates.
Parses test imports against partitionMap.partitions[*].boundaryGlobs and cross-executes eligible tests.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | GitPublicSurfaceCrossTesterOptions | Subprocess runner and partition map configuration. |
Returns
CrossVerifierBuilder<GitWorktreeHandle, GitScopeReceipt, Record<string, unknown>, GitPublicSurfaceCrossTesterNode<Record<string, unknown>>>
Immutable cross-verifier builder.
refReaderTools()
refReaderTools(runner?): readonly GitRefReaderToolNode<GitWorktreeHandle>[];Defined in: git/src/builders/git-namespace-contract.ts:179
Creates the read-only git ref inspection tool bundle (readRefFile, diffRefs, listRefFiles).
Enables actors to inspect refs/harness/aborted/<run-id>/<stepExecId> snapshots against the object store.
Parameters
| Parameter | Type | Description |
|---|---|---|
runner? | MaybeBuilder<NodeRunnerNode> | Optional subprocess runner pool governing git command slots (defaults to DEFAULT_NODE_RUNNER_AST_NODE). |
Returns
readonly GitRefReaderToolNode<GitWorktreeHandle>[]
Frozen tuple of ref reader tool AST nodes.
resetWorktree()
resetWorktree(id?): AstBuilder<GitDiscardBranchNode>;Defined in: git/src/builders/git-namespace-contract.ts:121
Creates a rewind hook builder resetting the worktree to targetStepBaseScopeCheckpoint (resetsRunOverlay: true).
Restores both the physical working tree and the run's Copy-on-Write topology overlay to the target step entry.
Parameters
| Parameter | Type | Description |
|---|---|---|
id? | string | Optional custom rewind hook identifier. |
Returns
AstBuilder<GitDiscardBranchNode>
Immutable rewind hook builder.
snapshotAndReset()
snapshotAndReset(id?): AstBuilder<GitSnapshotAndResetNode>;Defined in: git/src/builders/git-namespace-contract.ts:99
Creates an idempotent abort hook builder snapshotting the dirty worktree to refs/harness/aborted/<run-id>/<stepExecId>.
Resets the working tree to handle.baseRef and clears unresolvedConflictPaths after snapshotting.
Parameters
| Parameter | Type | Description |
|---|---|---|
id? | string | Optional custom abort hook identifier. |
Returns
AstBuilder<GitSnapshotAndResetNode>
Immutable abort hook builder.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
AbortMetaSchema | readonly | ZodObject<{ abortedSnapshotRef: ZodString; resetToRef: ZodString; }, $strip> | Zod schema validating GitAbortMeta objects returned by git.snapshotAndReset(). | git/src/builders/git-namespace-contract.ts:41 |
ScopeReceiptSchema | readonly | ZodObject<{ baseBranch: ZodDefault<ZodString>; baseRef: ZodString; branchName: ZodOptional<ZodString>; diffStat: ZodString; headRef: ZodString; mutatedFiles: ZodReadonly<ZodArray<ZodString>>; }, $strip> | Zod schema validating GitScopeReceipt objects returned by inspect() and commitChild(). | git/src/builders/git-namespace-contract.ts:37 |
SyncReceiptSchema | readonly | ZodObject<{ baseBranch: ZodDefault<ZodString>; rebasedOntoRef: ZodString; updatedFiles: ZodReadonly<ZodArray<ZodString>>; }, $strip> | Zod schema validating GitSyncReceipt objects returned by syncChild() and syncRoot(). | git/src/builders/git-namespace-contract.ts:39 |