fix(javascript): keep digestless bundle matches unknown
This commit is contained in:
@@ -279,12 +279,12 @@ const classifyMapping = (
|
|||||||
if (topPathCandidates.length === 1) {
|
if (topPathCandidates.length === 1) {
|
||||||
const candidate = topPathCandidates[0];
|
const candidate = topPathCandidates[0];
|
||||||
return {
|
return {
|
||||||
status: "modified",
|
status: "unknown",
|
||||||
confidence: candidate?.confidence === "high" ? "high" : "medium",
|
confidence: "unknown",
|
||||||
currentNodeIds:
|
currentNodeIds:
|
||||||
candidate === undefined ? [] : [candidate.current_node_id],
|
candidate === undefined ? [] : [candidate.current_node_id],
|
||||||
limitations: [
|
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.",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ describe("historical source to bundle comparison", () => {
|
|||||||
).not.toThrow();
|
).not.toThrow();
|
||||||
expect(first.summary).toEqual({
|
expect(first.summary).toEqual({
|
||||||
unchanged: 1,
|
unchanged: 1,
|
||||||
modified: 1,
|
modified: 0,
|
||||||
removed: 1,
|
removed: 1,
|
||||||
split: 1,
|
split: 1,
|
||||||
merged: 2,
|
merged: 2,
|
||||||
duplicated: 1,
|
duplicated: 1,
|
||||||
unknown: 0,
|
unknown: 1,
|
||||||
});
|
});
|
||||||
expect(item(first, "src/unchanged.ts")).toMatchObject({
|
expect(item(first, "src/unchanged.ts")).toMatchObject({
|
||||||
status: "unchanged",
|
status: "unchanged",
|
||||||
@@ -65,8 +65,8 @@ describe("historical source to bundle comparison", () => {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
expect(item(first, "src/modified.ts")).toMatchObject({
|
expect(item(first, "src/modified.ts")).toMatchObject({
|
||||||
status: "modified",
|
status: "unknown",
|
||||||
confidence: "high",
|
confidence: "unknown",
|
||||||
candidates: [
|
candidates: [
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
signals: expect.arrayContaining([
|
signals: expect.arrayContaining([
|
||||||
|
|||||||
Reference in New Issue
Block a user