fix(javascript): distinguish relocation from application changes

Keep location-only matched pairs unchanged under complete coverage while retaining both coordinates and location dimensions. Preserve incomplete coverage as unknown and retain definite content, property, and relationship changes.

Validated with focused domain, compiled CLI and MCP workflows, static checks and docs checks. A tiny public CLI bundle fixture reproduces the issue; the reported Bitwarden releases were not rerun.

Refs #4520
This commit is contained in:
morluto committed 2026-10-17 12:36:21 +08:00
1 parent 1e36e707b1
commit 556504edcb
4 files changed
+332 -4

No files matched your search

@@ -144,11 +144,14 @@ const matchedItem = (
): ApplicationVersionComparisonItem => {
const dimensions = changedDimensions(pair, context);
const complete = graphsComplete(context);
const observedChange = dimensions.some((dimension) =>
["content", "location", "properties"].includes(dimension),
);
const observedChange =
dimensions.includes("content") || dimensions.includes("properties");
// Coordinates remain comparison evidence; relocation alone is not a
// content, property, or relationship change.
const completeChange =
complete && dimensions.some((dimension) => dimension !== "location");
const status: ApplicationVersionComparisonItem["status"] =
observedChange || (complete && dimensions.length > 0)
observedChange || completeChange
? "changed"
: complete
? "unchanged"