adhdev 0.9.82-rc.64 → 0.9.82-rc.66
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/dist/cli/index.js +111 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +111 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
|
@@ -47963,6 +47963,7 @@ function summarizeRepoMeshStatusDebug(status) {
|
|
|
47963
47963
|
meshId: readStringValue(status?.meshId, status?.mesh_id) ?? null,
|
|
47964
47964
|
refreshedAt: readStringValue(status?.refreshedAt, status?.refreshed_at) ?? null,
|
|
47965
47965
|
sourceOfTruth: status?.sourceOfTruth ?? null,
|
|
47966
|
+
branchConvergenceSummary: status?.branchConvergenceSummary ?? status?.branch_convergence_summary ?? null,
|
|
47966
47967
|
nodeCount: nodes.length,
|
|
47967
47968
|
nodes: nodes.map((node) => ({
|
|
47968
47969
|
nodeId: readStringValue(node?.nodeId, node?.id) ?? null,
|
|
@@ -47978,7 +47979,8 @@ function summarizeRepoMeshStatusDebug(status) {
|
|
|
47978
47979
|
} : null,
|
|
47979
47980
|
gitProbePending: node?.gitProbePending === true,
|
|
47980
47981
|
launchReady: node?.launchReady === true,
|
|
47981
|
-
git: summarizeRepoMeshDebugGit(node?.git)
|
|
47982
|
+
git: summarizeRepoMeshDebugGit(node?.git),
|
|
47983
|
+
branchConvergence: node?.branchConvergence ?? node?.branch_convergence ?? null
|
|
47982
47984
|
}))
|
|
47983
47985
|
};
|
|
47984
47986
|
}
|
|
@@ -48480,7 +48482,7 @@ function finalizeMeshNodeStatus(args) {
|
|
|
48480
48482
|
async function probeRemoteMeshGitStatus(args) {
|
|
48481
48483
|
if (!args.dispatchMeshCommand) return null;
|
|
48482
48484
|
const remoteResult = await Promise.race([
|
|
48483
|
-
args.dispatchMeshCommand(args.daemonId, "git_status", { workspace: args.workspace }),
|
|
48485
|
+
args.dispatchMeshCommand(args.daemonId, "git_status", { workspace: args.workspace, refreshUpstream: true }),
|
|
48484
48486
|
new Promise((_2, reject) => setTimeout(() => reject(new Error("timeout")), args.timeoutMs))
|
|
48485
48487
|
]);
|
|
48486
48488
|
const remoteGit = remoteResult?.status ?? remoteResult?.git ?? remoteResult;
|
|
@@ -48749,6 +48751,81 @@ async function runMeshRefinePatchEquivalenceGate(repoRoot, baseHead, branchHead)
|
|
|
48749
48751
|
};
|
|
48750
48752
|
}
|
|
48751
48753
|
}
|
|
48754
|
+
async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree) {
|
|
48755
|
+
const startedAt = Date.now();
|
|
48756
|
+
const entries = [];
|
|
48757
|
+
try {
|
|
48758
|
+
const { execFile: execFile3 } = await import("child_process");
|
|
48759
|
+
const { promisify: promisify3 } = await import("util");
|
|
48760
|
+
const execFileAsync3 = promisify3(execFile3);
|
|
48761
|
+
const runGit2 = async (cwd, args) => {
|
|
48762
|
+
const { stdout } = await execFileAsync3("git", args, {
|
|
48763
|
+
cwd,
|
|
48764
|
+
encoding: "utf8",
|
|
48765
|
+
timeout: 3e4,
|
|
48766
|
+
maxBuffer: REFINE_PATCH_EQUIVALENCE_OUTPUT_LIMIT_BYTES,
|
|
48767
|
+
windowsHide: true
|
|
48768
|
+
});
|
|
48769
|
+
return String(stdout || "");
|
|
48770
|
+
};
|
|
48771
|
+
const treeOutput = await runGit2(repoRoot, ["ls-tree", "-r", "-z", mergedTree]);
|
|
48772
|
+
const gitlinks = treeOutput.split("\0").filter(Boolean).map((record2) => {
|
|
48773
|
+
const match = /^160000\s+commit\s+([0-9a-f]{40})\t(.+)$/.exec(record2);
|
|
48774
|
+
return match ? { commit: match[1], path: match[2] } : null;
|
|
48775
|
+
}).filter((entry) => !!entry);
|
|
48776
|
+
for (const gitlink of gitlinks) {
|
|
48777
|
+
const submodulePath = (0, import_path8.resolve)(repoRoot, gitlink.path);
|
|
48778
|
+
const entry = {
|
|
48779
|
+
path: gitlink.path,
|
|
48780
|
+
commit: gitlink.commit,
|
|
48781
|
+
reachable: false
|
|
48782
|
+
};
|
|
48783
|
+
try {
|
|
48784
|
+
if (!fs10.existsSync(submodulePath)) {
|
|
48785
|
+
entry.error = `Submodule checkout missing at ${gitlink.path}`;
|
|
48786
|
+
entries.push(entry);
|
|
48787
|
+
continue;
|
|
48788
|
+
}
|
|
48789
|
+
entry.checkedLocal = true;
|
|
48790
|
+
try {
|
|
48791
|
+
await runGit2(submodulePath, ["cat-file", "-e", `${gitlink.commit}^{commit}`]);
|
|
48792
|
+
entry.reachable = true;
|
|
48793
|
+
entries.push(entry);
|
|
48794
|
+
continue;
|
|
48795
|
+
} catch {
|
|
48796
|
+
}
|
|
48797
|
+
try {
|
|
48798
|
+
await runGit2(submodulePath, ["fetch", "origin", gitlink.commit]);
|
|
48799
|
+
entry.fetchedFromOrigin = true;
|
|
48800
|
+
await runGit2(submodulePath, ["cat-file", "-e", `${gitlink.commit}^{commit}`]);
|
|
48801
|
+
entry.reachable = true;
|
|
48802
|
+
} catch (e) {
|
|
48803
|
+
entry.error = truncateValidationOutput(e?.stderr || e?.message || String(e));
|
|
48804
|
+
}
|
|
48805
|
+
} catch (e) {
|
|
48806
|
+
entry.error = truncateValidationOutput(e?.message || String(e));
|
|
48807
|
+
}
|
|
48808
|
+
entries.push(entry);
|
|
48809
|
+
}
|
|
48810
|
+
const unreachable = entries.filter((entry) => !entry.reachable);
|
|
48811
|
+
return {
|
|
48812
|
+
status: unreachable.length ? "failed" : "passed",
|
|
48813
|
+
checked: entries.length,
|
|
48814
|
+
unreachable,
|
|
48815
|
+
entries,
|
|
48816
|
+
durationMs: Date.now() - startedAt
|
|
48817
|
+
};
|
|
48818
|
+
} catch (e) {
|
|
48819
|
+
return {
|
|
48820
|
+
status: "failed",
|
|
48821
|
+
checked: entries.length,
|
|
48822
|
+
unreachable: entries.filter((entry) => !entry.reachable),
|
|
48823
|
+
entries,
|
|
48824
|
+
durationMs: Date.now() - startedAt,
|
|
48825
|
+
error: truncateValidationOutput(e?.message || String(e))
|
|
48826
|
+
};
|
|
48827
|
+
}
|
|
48828
|
+
}
|
|
48752
48829
|
function buildMeshRefineValidationPlan(mesh, workspace) {
|
|
48753
48830
|
const plan = resolveMeshRefineValidationPlan(mesh, workspace);
|
|
48754
48831
|
return {
|
|
@@ -49901,6 +49978,37 @@ var init_router = __esm({
|
|
|
49901
49978
|
}
|
|
49902
49979
|
};
|
|
49903
49980
|
}
|
|
49981
|
+
const submoduleReachabilityStarted = Date.now();
|
|
49982
|
+
const submoduleReachability = await runMeshRefineSubmoduleReachabilityGate(repoRoot, patchEquivalence.mergedTree || branchHead);
|
|
49983
|
+
recordMeshRefineStage(refineStages, "submodule_reachability", submoduleReachability.status, submoduleReachabilityStarted, {
|
|
49984
|
+
checked: submoduleReachability.checked,
|
|
49985
|
+
unreachable: submoduleReachability.unreachable.map((entry) => ({ path: entry.path, commit: entry.commit, error: entry.error })),
|
|
49986
|
+
error: submoduleReachability.error
|
|
49987
|
+
});
|
|
49988
|
+
if (submoduleReachability.status === "failed") {
|
|
49989
|
+
return {
|
|
49990
|
+
success: false,
|
|
49991
|
+
code: "submodule_reachability_failed",
|
|
49992
|
+
convergenceStatus: "blocked_review",
|
|
49993
|
+
error: "Refinery submodule reachability preflight failed; merge/refine cleanup was not attempted.",
|
|
49994
|
+
branch,
|
|
49995
|
+
into: baseBranch,
|
|
49996
|
+
validationSummary,
|
|
49997
|
+
patchEquivalence,
|
|
49998
|
+
submoduleReachability,
|
|
49999
|
+
refineStages,
|
|
50000
|
+
finalBranchConvergenceState: {
|
|
50001
|
+
branch,
|
|
50002
|
+
baseBranch,
|
|
50003
|
+
merged: false,
|
|
50004
|
+
removed: false,
|
|
50005
|
+
validation: "passed",
|
|
50006
|
+
patchEquivalence: "passed",
|
|
50007
|
+
submoduleReachability: "failed",
|
|
50008
|
+
status: "blocked_review"
|
|
50009
|
+
}
|
|
50010
|
+
};
|
|
50011
|
+
}
|
|
49904
50012
|
let mergeResult;
|
|
49905
50013
|
const mergeStarted = Date.now();
|
|
49906
50014
|
try {
|
|
@@ -101243,7 +101351,7 @@ var init_adhdev_daemon = __esm({
|
|
|
101243
101351
|
init_version();
|
|
101244
101352
|
init_src();
|
|
101245
101353
|
init_runtime_defaults();
|
|
101246
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.
|
|
101354
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.66" });
|
|
101247
101355
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
101248
101356
|
localHttpServer = null;
|
|
101249
101357
|
localWss = null;
|