@paraharness/git 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +68 -2
- package/dist/builders/create-git-candidate-comparison-tools.d.ts +14 -0
- package/dist/builders/create-git-candidate-comparison-tools.d.ts.map +1 -0
- package/dist/builders/create-git-candidate-comparison-tools.js +42 -0
- package/dist/builders/create-git-candidate-comparison-tools.js.map +1 -0
- package/dist/builders/create-git-commit-and-push-builder.d.ts +18 -0
- package/dist/builders/create-git-commit-and-push-builder.d.ts.map +1 -0
- package/dist/builders/create-git-commit-and-push-builder.js +60 -0
- package/dist/builders/create-git-commit-and-push-builder.js.map +1 -0
- package/dist/builders/create-git-cow-worktree-builder.d.ts +16 -0
- package/dist/builders/create-git-cow-worktree-builder.d.ts.map +1 -0
- package/dist/builders/create-git-cow-worktree-builder.js +72 -0
- package/dist/builders/create-git-cow-worktree-builder.js.map +1 -0
- package/dist/builders/create-git-discard-branch-builder.d.ts +13 -0
- package/dist/builders/create-git-discard-branch-builder.d.ts.map +1 -0
- package/dist/builders/create-git-discard-branch-builder.js +22 -0
- package/dist/builders/create-git-discard-branch-builder.js.map +1 -0
- package/dist/builders/create-git-keep-worktree-builder.d.ts +13 -0
- package/dist/builders/create-git-keep-worktree-builder.d.ts.map +1 -0
- package/dist/builders/create-git-keep-worktree-builder.js +22 -0
- package/dist/builders/create-git-keep-worktree-builder.js.map +1 -0
- package/dist/builders/create-git-merge-queue-builder.d.ts +19 -0
- package/dist/builders/create-git-merge-queue-builder.d.ts.map +1 -0
- package/dist/builders/create-git-merge-queue-builder.js +59 -0
- package/dist/builders/create-git-merge-queue-builder.js.map +1 -0
- package/dist/builders/create-git-patch-equivalence-builder.d.ts +13 -0
- package/dist/builders/create-git-patch-equivalence-builder.d.ts.map +1 -0
- package/dist/builders/create-git-patch-equivalence-builder.js +32 -0
- package/dist/builders/create-git-patch-equivalence-builder.js.map +1 -0
- package/dist/builders/create-git-public-surface-cross-tester-builder.d.ts +14 -0
- package/dist/builders/create-git-public-surface-cross-tester-builder.d.ts.map +1 -0
- package/dist/builders/create-git-public-surface-cross-tester-builder.js +38 -0
- package/dist/builders/create-git-public-surface-cross-tester-builder.js.map +1 -0
- package/dist/builders/create-git-ref-reader-tools.d.ts +14 -0
- package/dist/builders/create-git-ref-reader-tools.d.ts.map +1 -0
- package/dist/builders/create-git-ref-reader-tools.js +42 -0
- package/dist/builders/create-git-ref-reader-tools.js.map +1 -0
- package/dist/builders/create-git-reset-worktree-builder.d.ts +13 -0
- package/dist/builders/create-git-reset-worktree-builder.d.ts.map +1 -0
- package/dist/builders/create-git-reset-worktree-builder.js +22 -0
- package/dist/builders/create-git-reset-worktree-builder.js.map +1 -0
- package/dist/builders/create-git-snapshot-and-reset-builder.d.ts +13 -0
- package/dist/builders/create-git-snapshot-and-reset-builder.d.ts.map +1 -0
- package/dist/builders/create-git-snapshot-and-reset-builder.js +23 -0
- package/dist/builders/create-git-snapshot-and-reset-builder.js.map +1 -0
- package/dist/builders/git-commit-and-push-builder.d.ts +44 -0
- package/dist/builders/git-commit-and-push-builder.d.ts.map +1 -0
- package/dist/builders/git-commit-and-push-builder.js +2 -0
- package/dist/builders/git-commit-and-push-builder.js.map +1 -0
- package/dist/builders/git-commit-and-push-options.d.ts +22 -0
- package/dist/builders/git-commit-and-push-options.d.ts.map +1 -0
- package/dist/builders/git-commit-and-push-options.js +2 -0
- package/dist/builders/git-commit-and-push-options.js.map +1 -0
- package/dist/builders/git-cow-worktree-builder.d.ts +64 -0
- package/dist/builders/git-cow-worktree-builder.d.ts.map +1 -0
- package/dist/builders/git-cow-worktree-builder.js +2 -0
- package/dist/builders/git-cow-worktree-builder.js.map +1 -0
- package/dist/builders/git-cow-worktree-options.d.ts +42 -0
- package/dist/builders/git-cow-worktree-options.d.ts.map +1 -0
- package/dist/builders/git-cow-worktree-options.js +2 -0
- package/dist/builders/git-cow-worktree-options.js.map +1 -0
- package/dist/builders/git-merge-queue-builder.d.ts +37 -0
- package/dist/builders/git-merge-queue-builder.d.ts.map +1 -0
- package/dist/builders/git-merge-queue-builder.js +2 -0
- package/dist/builders/git-merge-queue-builder.js.map +1 -0
- package/dist/builders/git-merge-queue-options.d.ts +23 -0
- package/dist/builders/git-merge-queue-options.d.ts.map +1 -0
- package/dist/builders/git-merge-queue-options.js +2 -0
- package/dist/builders/git-merge-queue-options.js.map +1 -0
- package/dist/builders/git-namespace-contract.d.ts +142 -0
- package/dist/builders/git-namespace-contract.d.ts.map +1 -0
- package/dist/builders/git-namespace-contract.js +2 -0
- package/dist/builders/git-namespace-contract.js.map +1 -0
- package/dist/builders/git-namespace.d.ts +6 -0
- package/dist/builders/git-namespace.d.ts.map +1 -0
- package/dist/builders/git-namespace.js +32 -0
- package/dist/builders/git-namespace.js.map +1 -0
- package/dist/builders/git-public-surface-cross-tester-options.d.ts +16 -0
- package/dist/builders/git-public-surface-cross-tester-options.d.ts.map +1 -0
- package/dist/builders/git-public-surface-cross-tester-options.js +2 -0
- package/dist/builders/git-public-surface-cross-tester-options.js.map +1 -0
- package/dist/builders/git-reconcile-strategy-options.d.ts +16 -0
- package/dist/builders/git-reconcile-strategy-options.d.ts.map +1 -0
- package/dist/builders/git-reconcile-strategy-options.js +2 -0
- package/dist/builders/git-reconcile-strategy-options.js.map +1 -0
- package/dist/builders/internal/build-git-cow-worktree-node.d.ts +35 -0
- package/dist/builders/internal/build-git-cow-worktree-node.d.ts.map +1 -0
- package/dist/builders/internal/build-git-cow-worktree-node.js +77 -0
- package/dist/builders/internal/build-git-cow-worktree-node.js.map +1 -0
- package/dist/executors/create-git-executors.d.ts +12 -0
- package/dist/executors/create-git-executors.d.ts.map +1 -0
- package/dist/executors/create-git-executors.js +43 -0
- package/dist/executors/create-git-executors.js.map +1 -0
- package/dist/executors/git-checkpoint-payload.d.ts +44 -0
- package/dist/executors/git-checkpoint-payload.d.ts.map +1 -0
- package/dist/executors/git-checkpoint-payload.js +2 -0
- package/dist/executors/git-checkpoint-payload.js.map +1 -0
- package/dist/executors/git-commit-and-merge-steps.d.ts +33 -0
- package/dist/executors/git-commit-and-merge-steps.d.ts.map +1 -0
- package/dist/executors/git-commit-and-merge-steps.js +52 -0
- package/dist/executors/git-commit-and-merge-steps.js.map +1 -0
- package/dist/executors/git-cow-worktree-scope.d.ts +201 -0
- package/dist/executors/git-cow-worktree-scope.d.ts.map +1 -0
- package/dist/executors/git-cow-worktree-scope.js +260 -0
- package/dist/executors/git-cow-worktree-scope.js.map +1 -0
- package/dist/executors/git-cross-verifiers-and-tools.d.ts +42 -0
- package/dist/executors/git-cross-verifiers-and-tools.d.ts.map +1 -0
- package/dist/executors/git-cross-verifiers-and-tools.js +112 -0
- package/dist/executors/git-cross-verifiers-and-tools.js.map +1 -0
- package/dist/executors/git-executors.constants.d.ts +4 -0
- package/dist/executors/git-executors.constants.d.ts.map +1 -0
- package/dist/executors/git-executors.constants.js +4 -0
- package/dist/executors/git-executors.constants.js.map +1 -0
- package/dist/executors/git-hooks-and-checks.d.ts +51 -0
- package/dist/executors/git-hooks-and-checks.d.ts.map +1 -0
- package/dist/executors/git-hooks-and-checks.js +139 -0
- package/dist/executors/git-hooks-and-checks.js.map +1 -0
- package/dist/executors/internal/checkpoint-restore-steps.d.ts +50 -0
- package/dist/executors/internal/checkpoint-restore-steps.d.ts.map +1 -0
- package/dist/executors/internal/checkpoint-restore-steps.js +184 -0
- package/dist/executors/internal/checkpoint-restore-steps.js.map +1 -0
- package/dist/executors/internal/checkpoint-staging-and-integrity.d.ts +51 -0
- package/dist/executors/internal/checkpoint-staging-and-integrity.d.ts.map +1 -0
- package/dist/executors/internal/checkpoint-staging-and-integrity.js +192 -0
- package/dist/executors/internal/checkpoint-staging-and-integrity.js.map +1 -0
- package/dist/executors/internal/compute-worktree-status-options.d.ts +15 -0
- package/dist/executors/internal/compute-worktree-status-options.d.ts.map +1 -0
- package/dist/executors/internal/compute-worktree-status-options.js +2 -0
- package/dist/executors/internal/compute-worktree-status-options.js.map +1 -0
- package/dist/executors/internal/cow-worktree-hydrator.d.ts +51 -0
- package/dist/executors/internal/cow-worktree-hydrator.d.ts.map +1 -0
- package/dist/executors/internal/cow-worktree-hydrator.js +174 -0
- package/dist/executors/internal/cow-worktree-hydrator.js.map +1 -0
- package/dist/executors/internal/file-digest-and-globs.d.ts +58 -0
- package/dist/executors/internal/file-digest-and-globs.d.ts.map +1 -0
- package/dist/executors/internal/file-digest-and-globs.js +188 -0
- package/dist/executors/internal/file-digest-and-globs.js.map +1 -0
- package/dist/executors/internal/git-checkpoint-diff-effects.d.ts +16 -0
- package/dist/executors/internal/git-checkpoint-diff-effects.d.ts.map +1 -0
- package/dist/executors/internal/git-checkpoint-diff-effects.js +38 -0
- package/dist/executors/internal/git-checkpoint-diff-effects.js.map +1 -0
- package/dist/executors/internal/git-checkpoint-restore.d.ts +14 -0
- package/dist/executors/internal/git-checkpoint-restore.d.ts.map +1 -0
- package/dist/executors/internal/git-checkpoint-restore.js +37 -0
- package/dist/executors/internal/git-checkpoint-restore.js.map +1 -0
- package/dist/executors/internal/git-checkpoint-serialize.d.ts +13 -0
- package/dist/executors/internal/git-checkpoint-serialize.d.ts.map +1 -0
- package/dist/executors/internal/git-checkpoint-serialize.js +48 -0
- package/dist/executors/internal/git-checkpoint-serialize.js.map +1 -0
- package/dist/executors/internal/git-checkpoint-status-map.d.ts +14 -0
- package/dist/executors/internal/git-checkpoint-status-map.d.ts.map +1 -0
- package/dist/executors/internal/git-checkpoint-status-map.js +27 -0
- package/dist/executors/internal/git-checkpoint-status-map.js.map +1 -0
- package/dist/executors/internal/git-cli-command-options.d.ts +21 -0
- package/dist/executors/internal/git-cli-command-options.d.ts.map +1 -0
- package/dist/executors/internal/git-cli-command-options.js +2 -0
- package/dist/executors/internal/git-cli-command-options.js.map +1 -0
- package/dist/executors/internal/git-cli-command-result.d.ts +16 -0
- package/dist/executors/internal/git-cli-command-result.d.ts.map +1 -0
- package/dist/executors/internal/git-cli-command-result.js +2 -0
- package/dist/executors/internal/git-cli-command-result.js.map +1 -0
- package/dist/executors/internal/git-cli-runner.d.ts +73 -0
- package/dist/executors/internal/git-cli-runner.d.ts.map +1 -0
- package/dist/executors/internal/git-cli-runner.js +157 -0
- package/dist/executors/internal/git-cli-runner.js.map +1 -0
- package/dist/executors/internal/git-cross-test-import-scanner.d.ts +68 -0
- package/dist/executors/internal/git-cross-test-import-scanner.d.ts.map +1 -0
- package/dist/executors/internal/git-cross-test-import-scanner.js +226 -0
- package/dist/executors/internal/git-cross-test-import-scanner.js.map +1 -0
- package/dist/executors/internal/git-executor.constants.d.ts +29 -0
- package/dist/executors/internal/git-executor.constants.d.ts.map +1 -0
- package/dist/executors/internal/git-executor.constants.js +40 -0
- package/dist/executors/internal/git-executor.constants.js.map +1 -0
- package/dist/executors/internal/git-merge-train-bisect.d.ts +51 -0
- package/dist/executors/internal/git-merge-train-bisect.d.ts.map +1 -0
- package/dist/executors/internal/git-merge-train-bisect.js +152 -0
- package/dist/executors/internal/git-merge-train-bisect.js.map +1 -0
- package/dist/executors/internal/git-tool-dispatchers.d.ts +26 -0
- package/dist/executors/internal/git-tool-dispatchers.d.ts.map +1 -0
- package/dist/executors/internal/git-tool-dispatchers.js +174 -0
- package/dist/executors/internal/git-tool-dispatchers.js.map +1 -0
- package/dist/executors/internal/git-worktree-acquire-root.d.ts +22 -0
- package/dist/executors/internal/git-worktree-acquire-root.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-acquire-root.js +67 -0
- package/dist/executors/internal/git-worktree-acquire-root.js.map +1 -0
- package/dist/executors/internal/git-worktree-commit-child.d.ts +26 -0
- package/dist/executors/internal/git-worktree-commit-child.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-commit-child.js +88 -0
- package/dist/executors/internal/git-worktree-commit-child.js.map +1 -0
- package/dist/executors/internal/git-worktree-flush-and-prune.d.ts +43 -0
- package/dist/executors/internal/git-worktree-flush-and-prune.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-flush-and-prune.js +169 -0
- package/dist/executors/internal/git-worktree-flush-and-prune.js.map +1 -0
- package/dist/executors/internal/git-worktree-fork-and-release.d.ts +37 -0
- package/dist/executors/internal/git-worktree-fork-and-release.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-fork-and-release.js +159 -0
- package/dist/executors/internal/git-worktree-fork-and-release.js.map +1 -0
- package/dist/executors/internal/git-worktree-materialize-merge.d.ts +51 -0
- package/dist/executors/internal/git-worktree-materialize-merge.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-materialize-merge.js +161 -0
- package/dist/executors/internal/git-worktree-materialize-merge.js.map +1 -0
- package/dist/executors/internal/git-worktree-reattach.d.ts +57 -0
- package/dist/executors/internal/git-worktree-reattach.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-reattach.js +324 -0
- package/dist/executors/internal/git-worktree-reattach.js.map +1 -0
- package/dist/executors/internal/git-worktree-sync-child-and-root.d.ts +26 -0
- package/dist/executors/internal/git-worktree-sync-child-and-root.d.ts.map +1 -0
- package/dist/executors/internal/git-worktree-sync-child-and-root.js +82 -0
- package/dist/executors/internal/git-worktree-sync-child-and-root.js.map +1 -0
- package/dist/executors/internal/host-repository-head-state.d.ts +10 -0
- package/dist/executors/internal/host-repository-head-state.d.ts.map +1 -0
- package/dist/executors/internal/host-repository-head-state.js +2 -0
- package/dist/executors/internal/host-repository-head-state.js.map +1 -0
- package/dist/executors/internal/merge-train-candidate.d.ts +14 -0
- package/dist/executors/internal/merge-train-candidate.d.ts.map +1 -0
- package/dist/executors/internal/merge-train-candidate.js +2 -0
- package/dist/executors/internal/merge-train-candidate.js.map +1 -0
- package/dist/executors/internal/merge-train-chain-entry.d.ts +13 -0
- package/dist/executors/internal/merge-train-chain-entry.d.ts.map +1 -0
- package/dist/executors/internal/merge-train-chain-entry.js +2 -0
- package/dist/executors/internal/merge-train-chain-entry.js.map +1 -0
- package/dist/executors/internal/merge-train-result.d.ts +19 -0
- package/dist/executors/internal/merge-train-result.d.ts.map +1 -0
- package/dist/executors/internal/merge-train-result.js +2 -0
- package/dist/executors/internal/merge-train-result.js.map +1 -0
- package/dist/executors/internal/merge-train-runner.d.ts +16 -0
- package/dist/executors/internal/merge-train-runner.d.ts.map +1 -0
- package/dist/executors/internal/merge-train-runner.js +141 -0
- package/dist/executors/internal/merge-train-runner.js.map +1 -0
- package/dist/executors/internal/merge-tree-materializer-params.d.ts +19 -0
- package/dist/executors/internal/merge-tree-materializer-params.d.ts.map +1 -0
- package/dist/executors/internal/merge-tree-materializer-params.js +2 -0
- package/dist/executors/internal/merge-tree-materializer-params.js.map +1 -0
- package/dist/executors/internal/parent-fast-forward.d.ts +47 -0
- package/dist/executors/internal/parent-fast-forward.d.ts.map +1 -0
- package/dist/executors/internal/parent-fast-forward.js +138 -0
- package/dist/executors/internal/parent-fast-forward.js.map +1 -0
- package/dist/executors/internal/porcelain-v2-parser.d.ts +49 -0
- package/dist/executors/internal/porcelain-v2-parser.d.ts.map +1 -0
- package/dist/executors/internal/porcelain-v2-parser.js +165 -0
- package/dist/executors/internal/porcelain-v2-parser.js.map +1 -0
- package/dist/executors/internal/resolve-effective-base-branch.d.ts +13 -0
- package/dist/executors/internal/resolve-effective-base-branch.d.ts.map +1 -0
- package/dist/executors/internal/resolve-effective-base-branch.js +38 -0
- package/dist/executors/internal/resolve-effective-base-branch.js.map +1 -0
- package/dist/executors/internal/squash-rebase-and-push.d.ts +14 -0
- package/dist/executors/internal/squash-rebase-and-push.d.ts.map +1 -0
- package/dist/executors/internal/squash-rebase-and-push.js +192 -0
- package/dist/executors/internal/squash-rebase-and-push.js.map +1 -0
- package/dist/executors/internal/staged-checkpoint-tree-result.d.ts +13 -0
- package/dist/executors/internal/staged-checkpoint-tree-result.d.ts.map +1 -0
- package/dist/executors/internal/staged-checkpoint-tree-result.js +2 -0
- package/dist/executors/internal/staged-checkpoint-tree-result.js.map +1 -0
- package/dist/executors/internal/stateless-merge-tree-result.d.ts +12 -0
- package/dist/executors/internal/stateless-merge-tree-result.d.ts.map +1 -0
- package/dist/executors/internal/stateless-merge-tree-result.js +2 -0
- package/dist/executors/internal/stateless-merge-tree-result.js.map +1 -0
- package/dist/executors/internal/synthesized-working-tree-commit.d.ts +10 -0
- package/dist/executors/internal/synthesized-working-tree-commit.d.ts.map +1 -0
- package/dist/executors/internal/synthesized-working-tree-commit.js +2 -0
- package/dist/executors/internal/synthesized-working-tree-commit.js.map +1 -0
- package/dist/executors/internal/worktree-integrity-verdict.d.ts +10 -0
- package/dist/executors/internal/worktree-integrity-verdict.d.ts.map +1 -0
- package/dist/executors/internal/worktree-integrity-verdict.js +2 -0
- package/dist/executors/internal/worktree-integrity-verdict.js.map +1 -0
- package/dist/executors/internal/worktree-status-snapshot.d.ts +17 -0
- package/dist/executors/internal/worktree-status-snapshot.d.ts.map +1 -0
- package/dist/executors/internal/worktree-status-snapshot.js +2 -0
- package/dist/executors/internal/worktree-status-snapshot.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/git-receipts.schema.d.ts +174 -0
- package/dist/schemas/git-receipts.schema.d.ts.map +1 -0
- package/dist/schemas/git-receipts.schema.js +123 -0
- package/dist/schemas/git-receipts.schema.js.map +1 -0
- package/package.json +71 -3
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { withFileLock } from '@paraharness/lockfile';
|
|
5
|
+
import writeFileAtomic from 'write-file-atomic';
|
|
6
|
+
import { HarnessMetaSchema, } from '../../schemas/git-receipts.schema.js';
|
|
7
|
+
import { HARNESS_GIT_IDENTITY_ENV } from './git-executor.constants.js';
|
|
8
|
+
/**
|
|
9
|
+
* Constructs the isolated environment map for git and subprocess invocations inside a worktree.
|
|
10
|
+
*
|
|
11
|
+
* Sets `GIT_CEILING_DIRECTORIES=<dirname(worktreePath)>`, `GIT_CONFIG_NOSYSTEM=1`, `GIT_OPTIONAL_LOCKS=0`,
|
|
12
|
+
* disables GPG signing, and forces `core.hooksPath=/dev/null` per `SPEC.md` §4.4.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} worktreePath - Worktree directory path.
|
|
15
|
+
* @param {Readonly<Record<string, string | undefined>>} [extraEnv] - Optional overrides merged on top.
|
|
16
|
+
*
|
|
17
|
+
* @returns {Readonly<Record<string, string>>} Frozen environment map for subprocess execution.
|
|
18
|
+
*/
|
|
19
|
+
export function buildIsolatedWorktreeGitEnv(worktreePath, extraEnv) {
|
|
20
|
+
const env = {};
|
|
21
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
22
|
+
if (value !== undefined)
|
|
23
|
+
env[key] = value;
|
|
24
|
+
}
|
|
25
|
+
Object.assign(env, HARNESS_GIT_IDENTITY_ENV, {
|
|
26
|
+
GIT_CEILING_DIRECTORIES: path.dirname(path.resolve(worktreePath)),
|
|
27
|
+
GIT_CONFIG_NOSYSTEM: '1',
|
|
28
|
+
GIT_OPTIONAL_LOCKS: '0',
|
|
29
|
+
GIT_TERMINAL_PROMPT: '0',
|
|
30
|
+
GIT_CONFIG_COUNT: '2',
|
|
31
|
+
GIT_CONFIG_KEY_0: 'commit.gpgsign',
|
|
32
|
+
GIT_CONFIG_VALUE_0: 'false',
|
|
33
|
+
GIT_CONFIG_KEY_1: 'core.hooksPath',
|
|
34
|
+
GIT_CONFIG_VALUE_1: '/dev/null',
|
|
35
|
+
});
|
|
36
|
+
if (extraEnv !== undefined) {
|
|
37
|
+
for (const [key, value] of Object.entries(extraEnv)) {
|
|
38
|
+
if (value !== undefined)
|
|
39
|
+
env[key] = value;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return Object.freeze(env);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Spawns a `git` CLI command inside `options.cwd` with isolated worktree environment settings.
|
|
46
|
+
*
|
|
47
|
+
* Pipes optional `stdin`, captures `stdoutBuffer` and `stderr`, cleans up `AbortSignal` listeners,
|
|
48
|
+
* and throws an actionable diagnostic `Error` when `exitCode !== 0` unless `allowNonZeroExit` is set.
|
|
49
|
+
*
|
|
50
|
+
* @param {GitCliCommandOptions} options - Command execution options.
|
|
51
|
+
*
|
|
52
|
+
* @returns {Promise<GitCliCommandResult>} Resolved exit code, decoded output strings, and raw stdout buffer.
|
|
53
|
+
*
|
|
54
|
+
* @throws {Error} If the `git` process exits non-zero and `allowNonZeroExit` is not `true`.
|
|
55
|
+
*/
|
|
56
|
+
export async function runGitCommand(options) {
|
|
57
|
+
options.signal?.throwIfAborted();
|
|
58
|
+
const env = buildIsolatedWorktreeGitEnv(options.cwd, options.env);
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
const child = spawn('git', [...options.args], { cwd: options.cwd, env, stdio: 'pipe' });
|
|
61
|
+
const stdoutChunks = [];
|
|
62
|
+
const stderrChunks = [];
|
|
63
|
+
const onAbort = () => {
|
|
64
|
+
child.kill('SIGTERM');
|
|
65
|
+
};
|
|
66
|
+
options.signal?.addEventListener('abort', onAbort, { once: true });
|
|
67
|
+
child.stdout.on('data', (chunk) => stdoutChunks.push(chunk));
|
|
68
|
+
child.stderr.on('data', (chunk) => stderrChunks.push(chunk));
|
|
69
|
+
child.on('error', (err) => {
|
|
70
|
+
options.signal?.removeEventListener('abort', onAbort);
|
|
71
|
+
reject(err);
|
|
72
|
+
});
|
|
73
|
+
child.on('close', (code) => {
|
|
74
|
+
options.signal?.removeEventListener('abort', onAbort);
|
|
75
|
+
const exitCode = code ?? 1;
|
|
76
|
+
const stdoutBuffer = Buffer.concat(stdoutChunks);
|
|
77
|
+
const stdout = stdoutBuffer.toString('utf8');
|
|
78
|
+
const stderr = Buffer.concat(stderrChunks).toString('utf8');
|
|
79
|
+
if (exitCode !== 0 && !options.allowNonZeroExit) {
|
|
80
|
+
reject(new Error(`git ${options.args.join(' ')} failed in '${options.cwd}' (exit ${exitCode}): ${stderr.trim() || stdout.trim()}`));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
resolve({ exitCode, stdout, stderr, stdoutBuffer });
|
|
84
|
+
});
|
|
85
|
+
if (options.stdin !== undefined)
|
|
86
|
+
child.stdin.end(options.stdin);
|
|
87
|
+
else
|
|
88
|
+
child.stdin.end();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Reads and validates `<gitDirPath>/harness-meta.json` using `HarnessMetaSchema`.
|
|
93
|
+
*
|
|
94
|
+
* Parses the persisted worktree lineage, unresolved conflict digests, and in-flight crash-recovery markers.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} gitDirPath - Path to the worktree's isolated `<gitdir>` metadata directory.
|
|
97
|
+
*
|
|
98
|
+
* @returns {Promise<HarnessMetaRecord>} Validated `HarnessMetaRecord` object.
|
|
99
|
+
*/
|
|
100
|
+
export async function readHarnessMeta(gitDirPath) {
|
|
101
|
+
const metaPath = path.join(gitDirPath, 'harness-meta.json');
|
|
102
|
+
const rawJson = await readFile(metaPath, 'utf8');
|
|
103
|
+
return HarnessMetaSchema.parse(JSON.parse(rawJson));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Atomically writes and validates `<gitDirPath>/harness-meta.json` under a cross-process file lock.
|
|
107
|
+
*
|
|
108
|
+
* Acquires `<gitDirPath>/harness-meta.json.lock` via `withFileLock` and persists the validated JSON via `writeFileAtomic`.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} gitDirPath - Path to the worktree's isolated `<gitdir>` metadata directory.
|
|
111
|
+
* @param {HarnessMetaRecord} meta - Metadata record to persist.
|
|
112
|
+
*
|
|
113
|
+
* @returns {Promise<void>} Resolves once `harness-meta.json` is durably updated.
|
|
114
|
+
*/
|
|
115
|
+
export async function writeHarnessMeta(gitDirPath, meta) {
|
|
116
|
+
const validated = HarnessMetaSchema.parse(meta);
|
|
117
|
+
const metaPath = path.join(gitDirPath, 'harness-meta.json');
|
|
118
|
+
const lockPath = path.join(gitDirPath, 'harness-meta.json.lock');
|
|
119
|
+
await withFileLock(lockPath, async () => {
|
|
120
|
+
await writeFileAtomic(metaPath, JSON.stringify(validated, null, 2), { encoding: 'utf8' });
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Updates mutable `GitWorktreeHandle` properties in place when the caller passed a non-frozen handle.
|
|
125
|
+
*
|
|
126
|
+
* Avoids throwing `TypeError` when a caller passes a frozen `GitWorktreeHandle` fixture without
|
|
127
|
+
* using empty `try / catch` blocks.
|
|
128
|
+
*
|
|
129
|
+
* @param {GitWorktreeHandle} handle - Target worktree handle to update.
|
|
130
|
+
* @param {Partial<GitWorktreeHandle>} patch - Partial property updates to assign onto `handle`.
|
|
131
|
+
*/
|
|
132
|
+
export function updateWorktreeHandleInPlace(handle, patch) {
|
|
133
|
+
if (!Object.isFrozen(handle)) {
|
|
134
|
+
Object.assign(handle, patch);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Executes a host-repository worktree administrative operation (`worktree prune`, `worktree add`, `worktree remove`)
|
|
139
|
+
* under `<commonGitDir>/harness-worktree.lock` to prevent concurrent `git worktree` administrative races.
|
|
140
|
+
*
|
|
141
|
+
* @template T Result type returned by `fn`.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} cwd - Working directory inside the host repository or an attached worktree.
|
|
144
|
+
* @param {() => Promise<T>} fn - Async callback performing `git worktree` administrative commands.
|
|
145
|
+
*
|
|
146
|
+
* @returns {Promise<T>} Result produced by `fn`.
|
|
147
|
+
*/
|
|
148
|
+
export async function withHostWorktreeLock(cwd, fn) {
|
|
149
|
+
const commonDirResult = await runGitCommand({
|
|
150
|
+
cwd,
|
|
151
|
+
args: ['rev-parse', '--git-common-dir'],
|
|
152
|
+
});
|
|
153
|
+
const commonGitDir = path.resolve(cwd, commonDirResult.stdout.trim());
|
|
154
|
+
const lockPath = path.join(commonGitDir, 'harness-worktree.lock');
|
|
155
|
+
return withFileLock(lockPath, fn);
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=git-cli-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-cli-runner.js","sourceRoot":"","sources":["../../../src/executors/internal/git-cli-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,iBAAiB,GAElB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,YAAoB,EACpB,QAAuD;IAEvD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC5C,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,wBAAwB,EAAE;QAC3C,uBAAuB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACjE,mBAAmB,EAAE,GAAG;QACxB,kBAAkB,EAAE,GAAG;QACvB,mBAAmB,EAAE,GAAG;QACxB,gBAAgB,EAAE,GAAG;QACrB,gBAAgB,EAAE,gBAAgB;QAClC,kBAAkB,EAAE,OAAO;QAC3B,gBAAgB,EAAE,gBAAgB;QACl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C/B,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAW,EACX,EAAoB;IAEpB,MAAM,eAAe,GAAG,MAAM,aAAa,CAAC;QAC1C,GAAG;QACH,IAAI,EAAE,CAAC,WAAW,EAAE,kBAAkB,CAAC;KACxC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC;IAClE,OAAO,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { CrossVerifierBranchCandidate, GitPublicSurfaceCrossTesterNode, GitWorktreeHandle, StepExecutionContext } from '@paraharness/core';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts and normalizes relative module import paths from a test file's source text using `es-module-lexer`.
|
|
4
|
+
*
|
|
5
|
+
* Resolves `./` and `../` specifiers relative to `testFileRelPath` while ignoring fake imports in comments or string literals.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} sourceCode - Raw UTF-8 test file contents.
|
|
8
|
+
* @param {string} testFileRelPath - Posix-normalized repository-relative path of the test file.
|
|
9
|
+
*
|
|
10
|
+
* @returns {Promise<readonly string[]>} Normalized repository-relative imported file paths.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractRelativeImports(sourceCode: string, testFileRelPath: string): Promise<readonly string[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Pre-compiles all boundary glob patterns from `node.partitionMap` into a single predicate function.
|
|
15
|
+
*
|
|
16
|
+
* @param {GitPublicSurfaceCrossTesterNode<unknown>} node - Public-surface cross-tester AST node.
|
|
17
|
+
*
|
|
18
|
+
* @returns {(candidatePath: string) => boolean} Predicate returning `true` when `candidatePath` matches a public boundary glob.
|
|
19
|
+
*/
|
|
20
|
+
export declare function compileBoundaryGlobMatcher(node: GitPublicSurfaceCrossTesterNode<unknown>): (candidatePath: string) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Collects newly added or modified test files in `candidate` that import exclusively from `isBoundaryPath`.
|
|
23
|
+
*
|
|
24
|
+
* Inspects `git diff --name-only <baseRef> <headRef>` for test files and verifies their relative imports.
|
|
25
|
+
*
|
|
26
|
+
* @param {CrossVerifierBranchCandidate<GitWorktreeHandle>} candidate - Speculative candidate descriptor.
|
|
27
|
+
* @param {(candidatePath: string) => boolean} isBoundaryPath - Compiled boundary glob matcher.
|
|
28
|
+
*
|
|
29
|
+
* @returns {Promise<ReadonlyMap<string, string>>} Map of boundary-only test relative paths to their file contents.
|
|
30
|
+
*/
|
|
31
|
+
export declare function collectCandidateBoundaryTests(candidate: CrossVerifierBranchCandidate<GitWorktreeHandle>, isBoundaryPath: (candidatePath: string) => boolean): Promise<ReadonlyMap<string, string>>;
|
|
32
|
+
/**
|
|
33
|
+
* Transplants `testsToRun` into `target` inside a checkpoint sandbox and executes each test file.
|
|
34
|
+
*
|
|
35
|
+
* Restores `target.scopeHandle` to its pre-test checkpoint in a `finally` block.
|
|
36
|
+
*
|
|
37
|
+
* @param {CrossVerifierBranchCandidate<GitWorktreeHandle>} target - Target candidate branch receiving tests.
|
|
38
|
+
* @param {ReadonlyMap<string, string>} testsToRun - Boundary test files mapped to source content.
|
|
39
|
+
* @param {AbortSignal} [signal] - Optional cancellation signal forwarded to child processes.
|
|
40
|
+
*
|
|
41
|
+
* @returns {Promise<Record<string, unknown>>} Cross-test report for `target`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function runTransplantedTestsOnTarget(target: CrossVerifierBranchCandidate<GitWorktreeHandle>, testsToRun: ReadonlyMap<string, string>, signal?: AbortSignal): Promise<Record<string, unknown>>;
|
|
44
|
+
/**
|
|
45
|
+
* Executes cross-verification of public-surface tests across all speculative `candidates`.
|
|
46
|
+
*
|
|
47
|
+
* Collects boundary-only tests from each candidate and transplants them into every sibling candidate.
|
|
48
|
+
*
|
|
49
|
+
* @param {GitPublicSurfaceCrossTesterNode<unknown>} node - Public-surface cross-tester AST node.
|
|
50
|
+
* @param {ReadonlyArray<CrossVerifierBranchCandidate<GitWorktreeHandle>>} candidates - Surviving speculative candidate branches.
|
|
51
|
+
* @param {AbortSignal} [signal] - Optional cancellation signal forwarded to child processes.
|
|
52
|
+
*
|
|
53
|
+
* @returns {Promise<Readonly<Record<number, unknown>>>} Validated per-branch cross-testing report indexed by `branchIndex`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function runPublicSurfaceCrossVerification(node: GitPublicSurfaceCrossTesterNode<unknown>, candidates: ReadonlyArray<CrossVerifierBranchCandidate<GitWorktreeHandle>>, signal?: AbortSignal): Promise<Readonly<Record<number, unknown>>>;
|
|
56
|
+
/**
|
|
57
|
+
* Runs an arbitrary benchmark or evaluation command inside `candidateHandle` wrapped in a checkpoint rollback.
|
|
58
|
+
*
|
|
59
|
+
* Guarantees `candidateHandle` remains bit-for-bit identical after `command` finishes.
|
|
60
|
+
*
|
|
61
|
+
* @param {GitWorktreeHandle} candidateHandle - Target candidate worktree handle.
|
|
62
|
+
* @param {string | readonly string[]} command - Shell command string or argv tuple to execute.
|
|
63
|
+
* @param {StepExecutionContext<GitWorktreeHandle>} ctx - Active step execution context.
|
|
64
|
+
*
|
|
65
|
+
* @returns {Promise<Record<string, unknown>>} Command execution result `{ exitCode, stdout, stderr }`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function runEvalCommandInSandboxedCandidate(candidateHandle: GitWorktreeHandle, command: string | readonly string[], ctx: StepExecutionContext<GitWorktreeHandle>): Promise<Record<string, unknown>>;
|
|
68
|
+
//# sourceMappingURL=git-cross-test-import-scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-cross-test-import-scanner.d.ts","sourceRoot":"","sources":["../../../src/executors/internal/git-c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,GAAG,SAAS,MAAM,EAAE,EACnC,GAAG,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBlC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { stripTypeScriptTypes } from 'node:module';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { init, parse } from 'es-module-lexer';
|
|
6
|
+
import picomatch from 'picomatch';
|
|
7
|
+
import { gitCheckpointRestore } from './git-checkpoint-restore.js';
|
|
8
|
+
import { gitCheckpointSerialize } from './git-checkpoint-serialize.js';
|
|
9
|
+
import { buildIsolatedWorktreeGitEnv, runGitCommand, } from './git-cli-runner.js';
|
|
10
|
+
/**
|
|
11
|
+
* Extracts and normalizes relative module import paths from a test file's source text using `es-module-lexer`.
|
|
12
|
+
*
|
|
13
|
+
* Resolves `./` and `../` specifiers relative to `testFileRelPath` while ignoring fake imports in comments or string literals.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} sourceCode - Raw UTF-8 test file contents.
|
|
16
|
+
* @param {string} testFileRelPath - Posix-normalized repository-relative path of the test file.
|
|
17
|
+
*
|
|
18
|
+
* @returns {Promise<readonly string[]>} Normalized repository-relative imported file paths.
|
|
19
|
+
*/
|
|
20
|
+
export async function extractRelativeImports(sourceCode, testFileRelPath) {
|
|
21
|
+
await init();
|
|
22
|
+
let imports;
|
|
23
|
+
try {
|
|
24
|
+
[imports] = parse(sourceCode, testFileRelPath);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
const stripped = stripTypeScriptTypes(sourceCode, { mode: 'strip' });
|
|
28
|
+
[imports] = parse(stripped, testFileRelPath);
|
|
29
|
+
}
|
|
30
|
+
const dir = path.posix.dirname(testFileRelPath);
|
|
31
|
+
const resolvedPaths = [];
|
|
32
|
+
for (const imp of imports) {
|
|
33
|
+
const specifier = imp.specifier;
|
|
34
|
+
if (typeof specifier === 'string' && specifier.startsWith('.')) {
|
|
35
|
+
resolvedPaths.push(path.posix.normalize(path.posix.join(dir, specifier)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Object.freeze(resolvedPaths);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Pre-compiles all boundary glob patterns from `node.partitionMap` into a single predicate function.
|
|
42
|
+
*
|
|
43
|
+
* @param {GitPublicSurfaceCrossTesterNode<unknown>} node - Public-surface cross-tester AST node.
|
|
44
|
+
*
|
|
45
|
+
* @returns {(candidatePath: string) => boolean} Predicate returning `true` when `candidatePath` matches a public boundary glob.
|
|
46
|
+
*/
|
|
47
|
+
export function compileBoundaryGlobMatcher(node) {
|
|
48
|
+
const matchers = [];
|
|
49
|
+
for (const part of Object.values(node.partitionMap.mapping)) {
|
|
50
|
+
for (const glob of part.boundaryGlobs)
|
|
51
|
+
matchers.push(picomatch(glob, { dot: true }));
|
|
52
|
+
}
|
|
53
|
+
return (candidatePath) => {
|
|
54
|
+
for (const isMatch of matchers) {
|
|
55
|
+
if (isMatch(candidatePath))
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Collects newly added or modified test files in `candidate` that import exclusively from `isBoundaryPath`.
|
|
63
|
+
*
|
|
64
|
+
* Inspects `git diff --name-only <baseRef> <headRef>` for test files and verifies their relative imports.
|
|
65
|
+
*
|
|
66
|
+
* @param {CrossVerifierBranchCandidate<GitWorktreeHandle>} candidate - Speculative candidate descriptor.
|
|
67
|
+
* @param {(candidatePath: string) => boolean} isBoundaryPath - Compiled boundary glob matcher.
|
|
68
|
+
*
|
|
69
|
+
* @returns {Promise<ReadonlyMap<string, string>>} Map of boundary-only test relative paths to their file contents.
|
|
70
|
+
*/
|
|
71
|
+
export async function collectCandidateBoundaryTests(candidate, isBoundaryPath) {
|
|
72
|
+
const cwd = candidate.scopeHandle.worktreePath;
|
|
73
|
+
const headSha = typeof candidate.scopeReceipt['headRef'] === 'string'
|
|
74
|
+
? candidate.scopeReceipt['headRef']
|
|
75
|
+
: (candidate.scopeHandle.headRef ?? candidate.scopeHandle.baseRef);
|
|
76
|
+
const diffOutput = await runGitCommand({
|
|
77
|
+
cwd,
|
|
78
|
+
args: ['diff', '--name-only', '--diff-filter=AM', candidate.scopeHandle.baseRef, headSha],
|
|
79
|
+
allowNonZeroExit: true,
|
|
80
|
+
});
|
|
81
|
+
const boundaryTests = new Map();
|
|
82
|
+
for (const rawLine of diffOutput.stdout.split('\n')) {
|
|
83
|
+
const relPath = rawLine.trim();
|
|
84
|
+
if (relPath.length === 0 || !/(?:\.test\.|\.spec\.|^test\/|\/test\/)/.test(relPath))
|
|
85
|
+
continue;
|
|
86
|
+
const content = await readFile(path.join(cwd, relPath), 'utf8').catch(() => undefined);
|
|
87
|
+
if (content === undefined)
|
|
88
|
+
continue;
|
|
89
|
+
const imports = await extractRelativeImports(content, relPath);
|
|
90
|
+
const allBoundary = imports.length > 0 && imports.every((imp) => isBoundaryPath(imp) || isBoundaryPath(imp.replace(/\.js$/, '.ts')) || isBoundaryPath(`${imp}/index.ts`));
|
|
91
|
+
if (allBoundary)
|
|
92
|
+
boundaryTests.set(relPath, content);
|
|
93
|
+
}
|
|
94
|
+
return boundaryTests;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Transplants `testsToRun` into `target` inside a checkpoint sandbox and executes each test file.
|
|
98
|
+
*
|
|
99
|
+
* Restores `target.scopeHandle` to its pre-test checkpoint in a `finally` block.
|
|
100
|
+
*
|
|
101
|
+
* @param {CrossVerifierBranchCandidate<GitWorktreeHandle>} target - Target candidate branch receiving tests.
|
|
102
|
+
* @param {ReadonlyMap<string, string>} testsToRun - Boundary test files mapped to source content.
|
|
103
|
+
* @param {AbortSignal} [signal] - Optional cancellation signal forwarded to child processes.
|
|
104
|
+
*
|
|
105
|
+
* @returns {Promise<Record<string, unknown>>} Cross-test report for `target`.
|
|
106
|
+
*/
|
|
107
|
+
export async function runTransplantedTestsOnTarget(target, testsToRun, signal) {
|
|
108
|
+
if (testsToRun.size === 0) {
|
|
109
|
+
return { passedCrossTests: 0, failedCrossTests: 0, crossTestDeficits: [], transplantedTestFiles: [] };
|
|
110
|
+
}
|
|
111
|
+
const handle = target.scopeHandle;
|
|
112
|
+
const ckpt = await gitCheckpointSerialize(handle);
|
|
113
|
+
let passedCrossTests = 0;
|
|
114
|
+
let failedCrossTests = 0;
|
|
115
|
+
const crossTestDeficits = [];
|
|
116
|
+
const transplantedTestFiles = [];
|
|
117
|
+
try {
|
|
118
|
+
for (const [relPath, content] of testsToRun) {
|
|
119
|
+
signal?.throwIfAborted();
|
|
120
|
+
transplantedTestFiles.push(relPath);
|
|
121
|
+
const absPath = path.join(handle.worktreePath, relPath);
|
|
122
|
+
await mkdir(path.dirname(absPath), { recursive: true });
|
|
123
|
+
await writeFile(absPath, content, 'utf8');
|
|
124
|
+
const nodeArgs = relPath.endsWith('.ts') ? ['--experimental-strip-types', absPath] : [absPath];
|
|
125
|
+
const env = buildIsolatedWorktreeGitEnv(handle.worktreePath);
|
|
126
|
+
const errMsg = await new Promise((resolve) => {
|
|
127
|
+
execFile(process.execPath, nodeArgs, { cwd: handle.worktreePath, env, signal }, (err, stdout, stderr) => {
|
|
128
|
+
resolve(err === null ? undefined : (stderr || stdout || err.message).trim());
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
if (errMsg === undefined)
|
|
132
|
+
passedCrossTests += 1;
|
|
133
|
+
else {
|
|
134
|
+
failedCrossTests += 1;
|
|
135
|
+
crossTestDeficits.push(`${relPath}: ${errMsg}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
finally {
|
|
140
|
+
await gitCheckpointRestore(handle, ckpt);
|
|
141
|
+
}
|
|
142
|
+
return { passedCrossTests, failedCrossTests, crossTestDeficits, transplantedTestFiles };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Executes cross-verification of public-surface tests across all speculative `candidates`.
|
|
146
|
+
*
|
|
147
|
+
* Collects boundary-only tests from each candidate and transplants them into every sibling candidate.
|
|
148
|
+
*
|
|
149
|
+
* @param {GitPublicSurfaceCrossTesterNode<unknown>} node - Public-surface cross-tester AST node.
|
|
150
|
+
* @param {ReadonlyArray<CrossVerifierBranchCandidate<GitWorktreeHandle>>} candidates - Surviving speculative candidate branches.
|
|
151
|
+
* @param {AbortSignal} [signal] - Optional cancellation signal forwarded to child processes.
|
|
152
|
+
*
|
|
153
|
+
* @returns {Promise<Readonly<Record<number, unknown>>>} Validated per-branch cross-testing report indexed by `branchIndex`.
|
|
154
|
+
*/
|
|
155
|
+
export async function runPublicSurfaceCrossVerification(node, candidates, signal) {
|
|
156
|
+
const isBoundaryPath = compileBoundaryGlobMatcher(node);
|
|
157
|
+
const testsByBranch = new Map();
|
|
158
|
+
for (const cand of candidates) {
|
|
159
|
+
testsByBranch.set(cand.branchIndex, await collectCandidateBoundaryTests(cand, isBoundaryPath));
|
|
160
|
+
}
|
|
161
|
+
const reports = {};
|
|
162
|
+
for (const target of candidates) {
|
|
163
|
+
const mergedTests = new Map();
|
|
164
|
+
for (const [sourceIdx, testMap] of testsByBranch) {
|
|
165
|
+
if (sourceIdx === target.branchIndex)
|
|
166
|
+
continue;
|
|
167
|
+
for (const [relPath, content] of testMap)
|
|
168
|
+
mergedTests.set(relPath, content);
|
|
169
|
+
}
|
|
170
|
+
const rawReport = await runTransplantedTestsOnTarget(target, mergedTests, signal);
|
|
171
|
+
reports[target.branchIndex] = node.reportSchema.parse(rawReport);
|
|
172
|
+
}
|
|
173
|
+
return Object.freeze(reports);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Resolves a numeric process exit code from an `execFile` error callback argument.
|
|
177
|
+
*
|
|
178
|
+
* @param {ExecFileException | null} execError - Error object from `execFile`, or `null` on exit `0`.
|
|
179
|
+
*
|
|
180
|
+
* @returns {number} Numeric exit code (`0` on success, `execError.code` when numeric, or `1`).
|
|
181
|
+
*/
|
|
182
|
+
function resolveExecFileExitCode(execError) {
|
|
183
|
+
if (execError === null)
|
|
184
|
+
return 0;
|
|
185
|
+
if (typeof execError.code === 'number')
|
|
186
|
+
return execError.code;
|
|
187
|
+
return 1;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Runs an arbitrary benchmark or evaluation command inside `candidateHandle` wrapped in a checkpoint rollback.
|
|
191
|
+
*
|
|
192
|
+
* Guarantees `candidateHandle` remains bit-for-bit identical after `command` finishes.
|
|
193
|
+
*
|
|
194
|
+
* @param {GitWorktreeHandle} candidateHandle - Target candidate worktree handle.
|
|
195
|
+
* @param {string | readonly string[]} command - Shell command string or argv tuple to execute.
|
|
196
|
+
* @param {StepExecutionContext<GitWorktreeHandle>} ctx - Active step execution context.
|
|
197
|
+
*
|
|
198
|
+
* @returns {Promise<Record<string, unknown>>} Command execution result `{ exitCode, stdout, stderr }`.
|
|
199
|
+
*/
|
|
200
|
+
export async function runEvalCommandInSandboxedCandidate(candidateHandle, command, ctx) {
|
|
201
|
+
const scope = ctx.scope !== undefined && 'serializeCheckpoint' in ctx.scope && 'restoreCheckpoint' in ctx.scope
|
|
202
|
+
? ctx.scope
|
|
203
|
+
: undefined;
|
|
204
|
+
const ckpt = scope !== undefined
|
|
205
|
+
? await scope.serializeCheckpoint(candidateHandle)
|
|
206
|
+
: await gitCheckpointSerialize(candidateHandle);
|
|
207
|
+
try {
|
|
208
|
+
const cwd = candidateHandle.worktreePath;
|
|
209
|
+
const env = buildIsolatedWorktreeGitEnv(cwd);
|
|
210
|
+
const bin = typeof command === 'string' ? 'sh' : (command[0] ?? 'true');
|
|
211
|
+
const args = typeof command === 'string' ? ['-c', command] : command.slice(1);
|
|
212
|
+
return await new Promise((resolve) => {
|
|
213
|
+
execFile(bin, args, { cwd, env, signal: ctx.signal }, (err, stdout, stderr) => {
|
|
214
|
+
const exitCode = resolveExecFileExitCode(err);
|
|
215
|
+
resolve({ exitCode, stdout, stderr });
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
finally {
|
|
220
|
+
if (scope !== undefined)
|
|
221
|
+
await scope.restoreCheckpoint(candidateHandle, ckpt);
|
|
222
|
+
else
|
|
223
|
+
await gitCheckpointRestore(candidateHandle, ckpt);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=git-cross-test-import-scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-cross-test-import-scanner.js","sourceRoot":"","sources":["../../../src/executors/internal/git-cross-test-import-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAO7B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,UAAkB,EAClB,eAAuB;IAEvB,MAAM,IAAI,EAAE,CAAC;IACb,IAAI,OAAoC,CAAC;IACzC,IAAI,CAAC;QACH,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,MA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OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,IAAI,KAAK,KAAK,SAAS;YAAE,MAAM,KAAK,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;;YACzE,MAAM,oBAAoB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default maximum file size in bytes (1 MiB) for untracked files staged directly into temporary git index checkpoints.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEFAULT_MAX_UNTRACKED_FILE_SIZE_BYTES = 1048576;
|
|
5
|
+
/**
|
|
6
|
+
* Implicit glob patterns always excluded from clones and checkpoints when `repo` is `'.'`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const IMPLICIT_REPO_EXCLUDE_GLOBS: readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* Regular expression matching the opening `<<<<<<< ` conflict marker line.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CONFLICT_START_REGEX: RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* Regular expression matching the middle `=======` conflict separator line (`^={7}( |$)`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONFLICT_SEP_REGEX: RegExp;
|
|
17
|
+
/**
|
|
18
|
+
* Regular expression matching the closing `>>>>>>> ` conflict marker line.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CONFLICT_END_REGEX: RegExp;
|
|
21
|
+
/**
|
|
22
|
+
* Deterministic git author and committer identity and epoch timestamps used when synthesizing internal worktree commits.
|
|
23
|
+
*/
|
|
24
|
+
export declare const HARNESS_GIT_IDENTITY_ENV: Readonly<Record<string, string>>;
|
|
25
|
+
/**
|
|
26
|
+
* Memoized cache of compiled `picomatch` exclusion predicates keyed by null-delimited glob patterns.
|
|
27
|
+
*/
|
|
28
|
+
export declare const COMPILED_EXCLUDE_MATCHER_CACHE: Map<string, (relPath: string) => boolean>;
|
|
29
|
+
//# sourceMappingURL=git-executor.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-executor.constants.d.ts","sourceRoot":"","sources":["../../../src/executors/internal/git-executor.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qCAAqC,UAAY,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAIvD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAW,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAiB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAW,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOpE,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAGlF,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default maximum file size in bytes (1 MiB) for untracked files staged directly into temporary git index checkpoints.
|
|
3
|
+
*/
|
|
4
|
+
export const DEFAULT_MAX_UNTRACKED_FILE_SIZE_BYTES = 1_048_576;
|
|
5
|
+
/**
|
|
6
|
+
* Implicit glob patterns always excluded from clones and checkpoints when `repo` is `'.'`.
|
|
7
|
+
*/
|
|
8
|
+
export const IMPLICIT_REPO_EXCLUDE_GLOBS = Object.freeze([
|
|
9
|
+
'.harness/state.sqlite*',
|
|
10
|
+
'.harness/lesson*',
|
|
11
|
+
'.git/**',
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* Regular expression matching the opening `<<<<<<< ` conflict marker line.
|
|
15
|
+
*/
|
|
16
|
+
export const CONFLICT_START_REGEX = /^<{7} /;
|
|
17
|
+
/**
|
|
18
|
+
* Regular expression matching the middle `=======` conflict separator line (`^={7}( |$)`).
|
|
19
|
+
*/
|
|
20
|
+
export const CONFLICT_SEP_REGEX = /^={7}(?: |$)/;
|
|
21
|
+
/**
|
|
22
|
+
* Regular expression matching the closing `>>>>>>> ` conflict marker line.
|
|
23
|
+
*/
|
|
24
|
+
export const CONFLICT_END_REGEX = /^>{7} /;
|
|
25
|
+
/**
|
|
26
|
+
* Deterministic git author and committer identity and epoch timestamps used when synthesizing internal worktree commits.
|
|
27
|
+
*/
|
|
28
|
+
export const HARNESS_GIT_IDENTITY_ENV = Object.freeze({
|
|
29
|
+
GIT_AUTHOR_NAME: 'Paraharness Runtime',
|
|
30
|
+
GIT_AUTHOR_EMAIL: 'runtime@paraharness.local',
|
|
31
|
+
GIT_COMMITTER_NAME: 'Paraharness Runtime',
|
|
32
|
+
GIT_COMMITTER_EMAIL: 'runtime@paraharness.local',
|
|
33
|
+
GIT_AUTHOR_DATE: '1700000000 +0000',
|
|
34
|
+
GIT_COMMITTER_DATE: '1700000000 +0000',
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Memoized cache of compiled `picomatch` exclusion predicates keyed by null-delimited glob patterns.
|
|
38
|
+
*/
|
|
39
|
+
export const COMPILED_EXCLUDE_MATCHER_CACHE = new Map();
|
|
40
|
+
//# sourceMappingURL=git-executor.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-executor.constants.js","sourceRoot":"","sources":["../../../src/executors/internal/git-executor.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,SAAS,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC1E,wBAAwB;IACxB,kBAAkB;IAClB,SAAS;CACV,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAqC,MAAM,CAAC,MAAM,CAAC;IACtF,eAAe,EAAE,qBAAqB;IACtC,gBAAgB,EAAE,2BAA2B;IAC7C,kBAAkB,EAAE,qBAAqB;IACzC,mBAAmB,EAAE,2BAA2B;IAChD,eAAe,EAAE,kBAAkB;IACnC,kBAAkB,EAAE,kBAAkB;CACvC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAA8C,IAAI,GAAG,EAG7F,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BaseCheckASTNode, CheckEvaluationResult, GitWorktreeHandle, StepExecutionContext } from '@paraharness/core';
|
|
2
|
+
import type { MergeTrainCandidate } from './merge-train-candidate.js';
|
|
3
|
+
import type { MergeTrainChainEntry } from './merge-train-chain-entry.js';
|
|
4
|
+
/**
|
|
5
|
+
* Evaluates a deterministic `CheckASTNode` against the active `GitWorktreeHandle`.
|
|
6
|
+
*
|
|
7
|
+
* Dispatches through `ctx.registry.checks` when registered, or executes `command` in the worktree environment.
|
|
8
|
+
*
|
|
9
|
+
* @param {BaseCheckASTNode<string, GitWorktreeHandle>} checkNode - Check AST node to evaluate.
|
|
10
|
+
* @param {StepExecutionContext<GitWorktreeHandle>} ctx - Active step execution context.
|
|
11
|
+
*
|
|
12
|
+
* @returns {Promise<CheckEvaluationResult>} Check pass/fail evaluation outcome.
|
|
13
|
+
*/
|
|
14
|
+
export declare function evaluateWorktreeCheck(checkNode: BaseCheckASTNode<string, GitWorktreeHandle>, ctx: StepExecutionContext<GitWorktreeHandle>): Promise<CheckEvaluationResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Normalizes candidate branch inputs for a batch merge-train step up to `maxBatchSize`.
|
|
17
|
+
*
|
|
18
|
+
* Resolves branch names, refs, or receipt objects into `{ label, headSha, baseSha }` descriptors.
|
|
19
|
+
*
|
|
20
|
+
* @param {unknown} input - Step input containing candidate branches/refs or `undefined`.
|
|
21
|
+
* @param {GitWorktreeHandle} handle - Active worktree handle used for ref resolution.
|
|
22
|
+
* @param {number} maxBatchSize - Maximum number of candidates per batch.
|
|
23
|
+
*
|
|
24
|
+
* @returns {Promise<readonly MergeTrainCandidate[]>} Normalized merge-train candidates.
|
|
25
|
+
*/
|
|
26
|
+
export declare function extractMergeTrainCandidates(input: unknown, handle: GitWorktreeHandle, maxBatchSize: number): Promise<readonly MergeTrainCandidate[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a cumulative speculative rebase chain $R_1 \dots R_m$ onto `currentTargetSha`.
|
|
29
|
+
*
|
|
30
|
+
* Halts and returns `[chain, conflictedIndex]` if a candidate fails to rebase cleanly onto the prior tip.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} cwd - Worktree directory path.
|
|
33
|
+
* @param {string} currentTargetSha - Base commit SHA for $R_1$.
|
|
34
|
+
* @param {readonly MergeTrainCandidate[]} queue - Remaining candidate branches to chain.
|
|
35
|
+
*
|
|
36
|
+
* @returns {Promise<readonly [readonly MergeTrainChainEntry[], number]>} Tuple of `[chain, conflictedIndex]`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildCumulativeRebaseChain(cwd: string, currentTargetSha: string, queue: readonly MergeTrainCandidate[]): Promise<readonly [readonly MergeTrainChainEntry[], number]>;
|
|
39
|
+
/**
|
|
40
|
+
* Binary-bisects a cumulative rebase chain $R_1 \dots R_m$ whose tip $R_m$ failed `verifyWith`.
|
|
41
|
+
*
|
|
42
|
+
* Isolates the first offending candidate index in $O(\log m)$ verification checks.
|
|
43
|
+
*
|
|
44
|
+
* @param {readonly MergeTrainChainEntry[]} chain - Cumulative speculative rebase chain entries.
|
|
45
|
+
* @param {BaseCheckASTNode<string, GitWorktreeHandle>} verifyWith - Verification check AST node.
|
|
46
|
+
* @param {StepExecutionContext<GitWorktreeHandle>} ctx - Active step execution context.
|
|
47
|
+
*
|
|
48
|
+
* @returns {Promise<readonly [number, number]>} Tuple of `[firstFailingIndex, verificationRunsUsed]`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function gitMergeTrainBisect(chain: readonly MergeTrainChainEntry[], verifyWith: BaseCheckASTNode<string, GitWorktreeHandle>, ctx: StepExecutionContext<GitWorktreeHandle>): Promise<readonly [number, number]>;
|
|
51
|
+
//# sourceMappingURL=git-merge-train-bisect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-merge-train-bisect.d.ts","sourceRoot":"","sources":["../../../src/executors/internal/git-merge-train-bisect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAEhB,qBAAqB,EACrB,iBAAiB,EAEjB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACtD,GAAG,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,GAC3C,OAAO,CAAC,qBAAqB,CAAC,CAsChC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,iBAAiB,EACzB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAiDzC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,MAAM,EACX,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,SAAS,mBAAmB,EAAE,GACpC,OAAO,CAAC,SAAS,CAAC,SAAS,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC,CAiB7D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,SAAS,oBAAoB,EAAE,EACtC,UAAU,EAAE,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACvD,GAAG,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,GAC3C,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAepC"}
|