fix(javascript): keep digestless bundle matches unknown

This commit is contained in:
morluto
2026-07-24 14:14:40 +00:00
parent 6039b92be7
commit 5a76aaffde
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -279,12 +279,12 @@ const classifyMapping = (
if (topPathCandidates.length === 1) {
const candidate = topPathCandidates[0];
return {
status: "modified",
confidence: candidate?.confidence === "high" ? "high" : "medium",
status: "unknown",
confidence: "unknown",
currentNodeIds:
candidate === undefined ? [] : [candidate.current_node_id],
limitations: [
"Location evidence links the source to the current node, but exact source bytes do not match or are unavailable.",
"Location evidence links the source to the current node, but comparable source digests are unavailable.",
],
};
}
+4 -4
View File
@@ -43,12 +43,12 @@ describe("historical source to bundle comparison", () => {
).not.toThrow();
expect(first.summary).toEqual({
unchanged: 1,
modified: 1,
modified: 0,
removed: 1,
split: 1,
merged: 2,
duplicated: 1,
unknown: 0,
unknown: 1,
});
expect(item(first, "src/unchanged.ts")).toMatchObject({
status: "unchanged",
@@ -65,8 +65,8 @@ describe("historical source to bundle comparison", () => {
],
});
expect(item(first, "src/modified.ts")).toMatchObject({
status: "modified",
confidence: "high",
status: "unknown",
confidence: "unknown",
candidates: [
expect.objectContaining({
signals: expect.arrayContaining([