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/index.js
CHANGED
|
@@ -46975,6 +46975,7 @@ function summarizeRepoMeshStatusDebug(status) {
|
|
|
46975
46975
|
meshId: readStringValue(status?.meshId, status?.mesh_id) ?? null,
|
|
46976
46976
|
refreshedAt: readStringValue(status?.refreshedAt, status?.refreshed_at) ?? null,
|
|
46977
46977
|
sourceOfTruth: status?.sourceOfTruth ?? null,
|
|
46978
|
+
branchConvergenceSummary: status?.branchConvergenceSummary ?? status?.branch_convergence_summary ?? null,
|
|
46978
46979
|
nodeCount: nodes.length,
|
|
46979
46980
|
nodes: nodes.map((node) => ({
|
|
46980
46981
|
nodeId: readStringValue(node?.nodeId, node?.id) ?? null,
|
|
@@ -46990,7 +46991,8 @@ function summarizeRepoMeshStatusDebug(status) {
|
|
|
46990
46991
|
} : null,
|
|
46991
46992
|
gitProbePending: node?.gitProbePending === true,
|
|
46992
46993
|
launchReady: node?.launchReady === true,
|
|
46993
|
-
git: summarizeRepoMeshDebugGit(node?.git)
|
|
46994
|
+
git: summarizeRepoMeshDebugGit(node?.git),
|
|
46995
|
+
branchConvergence: node?.branchConvergence ?? node?.branch_convergence ?? null
|
|
46994
46996
|
}))
|
|
46995
46997
|
};
|
|
46996
46998
|
}
|
|
@@ -47492,7 +47494,7 @@ function finalizeMeshNodeStatus(args) {
|
|
|
47492
47494
|
async function probeRemoteMeshGitStatus(args) {
|
|
47493
47495
|
if (!args.dispatchMeshCommand) return null;
|
|
47494
47496
|
const remoteResult = await Promise.race([
|
|
47495
|
-
args.dispatchMeshCommand(args.daemonId, "git_status", { workspace: args.workspace }),
|
|
47497
|
+
args.dispatchMeshCommand(args.daemonId, "git_status", { workspace: args.workspace, refreshUpstream: true }),
|
|
47496
47498
|
new Promise((_2, reject) => setTimeout(() => reject(new Error("timeout")), args.timeoutMs))
|
|
47497
47499
|
]);
|
|
47498
47500
|
const remoteGit = remoteResult?.status ?? remoteResult?.git ?? remoteResult;
|
|
@@ -47761,6 +47763,81 @@ async function runMeshRefinePatchEquivalenceGate(repoRoot, baseHead, branchHead)
|
|
|
47761
47763
|
};
|
|
47762
47764
|
}
|
|
47763
47765
|
}
|
|
47766
|
+
async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree) {
|
|
47767
|
+
const startedAt = Date.now();
|
|
47768
|
+
const entries = [];
|
|
47769
|
+
try {
|
|
47770
|
+
const { execFile: execFile3 } = await import("child_process");
|
|
47771
|
+
const { promisify: promisify3 } = await import("util");
|
|
47772
|
+
const execFileAsync3 = promisify3(execFile3);
|
|
47773
|
+
const runGit2 = async (cwd, args) => {
|
|
47774
|
+
const { stdout } = await execFileAsync3("git", args, {
|
|
47775
|
+
cwd,
|
|
47776
|
+
encoding: "utf8",
|
|
47777
|
+
timeout: 3e4,
|
|
47778
|
+
maxBuffer: REFINE_PATCH_EQUIVALENCE_OUTPUT_LIMIT_BYTES,
|
|
47779
|
+
windowsHide: true
|
|
47780
|
+
});
|
|
47781
|
+
return String(stdout || "");
|
|
47782
|
+
};
|
|
47783
|
+
const treeOutput = await runGit2(repoRoot, ["ls-tree", "-r", "-z", mergedTree]);
|
|
47784
|
+
const gitlinks = treeOutput.split("\0").filter(Boolean).map((record2) => {
|
|
47785
|
+
const match = /^160000\s+commit\s+([0-9a-f]{40})\t(.+)$/.exec(record2);
|
|
47786
|
+
return match ? { commit: match[1], path: match[2] } : null;
|
|
47787
|
+
}).filter((entry) => !!entry);
|
|
47788
|
+
for (const gitlink of gitlinks) {
|
|
47789
|
+
const submodulePath = (0, import_path8.resolve)(repoRoot, gitlink.path);
|
|
47790
|
+
const entry = {
|
|
47791
|
+
path: gitlink.path,
|
|
47792
|
+
commit: gitlink.commit,
|
|
47793
|
+
reachable: false
|
|
47794
|
+
};
|
|
47795
|
+
try {
|
|
47796
|
+
if (!fs10.existsSync(submodulePath)) {
|
|
47797
|
+
entry.error = `Submodule checkout missing at ${gitlink.path}`;
|
|
47798
|
+
entries.push(entry);
|
|
47799
|
+
continue;
|
|
47800
|
+
}
|
|
47801
|
+
entry.checkedLocal = true;
|
|
47802
|
+
try {
|
|
47803
|
+
await runGit2(submodulePath, ["cat-file", "-e", `${gitlink.commit}^{commit}`]);
|
|
47804
|
+
entry.reachable = true;
|
|
47805
|
+
entries.push(entry);
|
|
47806
|
+
continue;
|
|
47807
|
+
} catch {
|
|
47808
|
+
}
|
|
47809
|
+
try {
|
|
47810
|
+
await runGit2(submodulePath, ["fetch", "origin", gitlink.commit]);
|
|
47811
|
+
entry.fetchedFromOrigin = true;
|
|
47812
|
+
await runGit2(submodulePath, ["cat-file", "-e", `${gitlink.commit}^{commit}`]);
|
|
47813
|
+
entry.reachable = true;
|
|
47814
|
+
} catch (e) {
|
|
47815
|
+
entry.error = truncateValidationOutput(e?.stderr || e?.message || String(e));
|
|
47816
|
+
}
|
|
47817
|
+
} catch (e) {
|
|
47818
|
+
entry.error = truncateValidationOutput(e?.message || String(e));
|
|
47819
|
+
}
|
|
47820
|
+
entries.push(entry);
|
|
47821
|
+
}
|
|
47822
|
+
const unreachable = entries.filter((entry) => !entry.reachable);
|
|
47823
|
+
return {
|
|
47824
|
+
status: unreachable.length ? "failed" : "passed",
|
|
47825
|
+
checked: entries.length,
|
|
47826
|
+
unreachable,
|
|
47827
|
+
entries,
|
|
47828
|
+
durationMs: Date.now() - startedAt
|
|
47829
|
+
};
|
|
47830
|
+
} catch (e) {
|
|
47831
|
+
return {
|
|
47832
|
+
status: "failed",
|
|
47833
|
+
checked: entries.length,
|
|
47834
|
+
unreachable: entries.filter((entry) => !entry.reachable),
|
|
47835
|
+
entries,
|
|
47836
|
+
durationMs: Date.now() - startedAt,
|
|
47837
|
+
error: truncateValidationOutput(e?.message || String(e))
|
|
47838
|
+
};
|
|
47839
|
+
}
|
|
47840
|
+
}
|
|
47764
47841
|
function buildMeshRefineValidationPlan(mesh, workspace) {
|
|
47765
47842
|
const plan = resolveMeshRefineValidationPlan(mesh, workspace);
|
|
47766
47843
|
return {
|
|
@@ -48913,6 +48990,37 @@ var init_router = __esm({
|
|
|
48913
48990
|
}
|
|
48914
48991
|
};
|
|
48915
48992
|
}
|
|
48993
|
+
const submoduleReachabilityStarted = Date.now();
|
|
48994
|
+
const submoduleReachability = await runMeshRefineSubmoduleReachabilityGate(repoRoot, patchEquivalence.mergedTree || branchHead);
|
|
48995
|
+
recordMeshRefineStage(refineStages, "submodule_reachability", submoduleReachability.status, submoduleReachabilityStarted, {
|
|
48996
|
+
checked: submoduleReachability.checked,
|
|
48997
|
+
unreachable: submoduleReachability.unreachable.map((entry) => ({ path: entry.path, commit: entry.commit, error: entry.error })),
|
|
48998
|
+
error: submoduleReachability.error
|
|
48999
|
+
});
|
|
49000
|
+
if (submoduleReachability.status === "failed") {
|
|
49001
|
+
return {
|
|
49002
|
+
success: false,
|
|
49003
|
+
code: "submodule_reachability_failed",
|
|
49004
|
+
convergenceStatus: "blocked_review",
|
|
49005
|
+
error: "Refinery submodule reachability preflight failed; merge/refine cleanup was not attempted.",
|
|
49006
|
+
branch,
|
|
49007
|
+
into: baseBranch,
|
|
49008
|
+
validationSummary,
|
|
49009
|
+
patchEquivalence,
|
|
49010
|
+
submoduleReachability,
|
|
49011
|
+
refineStages,
|
|
49012
|
+
finalBranchConvergenceState: {
|
|
49013
|
+
branch,
|
|
49014
|
+
baseBranch,
|
|
49015
|
+
merged: false,
|
|
49016
|
+
removed: false,
|
|
49017
|
+
validation: "passed",
|
|
49018
|
+
patchEquivalence: "passed",
|
|
49019
|
+
submoduleReachability: "failed",
|
|
49020
|
+
status: "blocked_review"
|
|
49021
|
+
}
|
|
49022
|
+
};
|
|
49023
|
+
}
|
|
48916
49024
|
let mergeResult;
|
|
48917
49025
|
const mergeStarted = Date.now();
|
|
48918
49026
|
try {
|
|
@@ -70070,7 +70178,7 @@ var init_adhdev_daemon = __esm({
|
|
|
70070
70178
|
init_version();
|
|
70071
70179
|
init_src();
|
|
70072
70180
|
init_runtime_defaults();
|
|
70073
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.
|
|
70181
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.66" });
|
|
70074
70182
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
70075
70183
|
localHttpServer = null;
|
|
70076
70184
|
localWss = null;
|