Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: compare drift baselines structurally so a collapsed hash list can't pass

[._.]/ Adam Eivyb41f12df2905
diff --git a/scripts/setup-data-drift.test.js b/scripts/setup-data-drift.test.js
index 04b0a98900..07b11454ff 100644
--- a/scripts/setup-data-drift.test.js
+++ b/scripts/setup-data-drift.test.js
@@ -100,11 +100,17 @@ const sortValues = (map) =>
// { …(28) }", which reads as an unrelated regression on whatever PR happens to
// inherit it — three PRs were triaged past this break before it was traced to
// `main`. Name the files and hashes that actually moved, and say what to do.
+// Interpolating an array renders it comma-joined and indistinguishable from the
+// single joined string it is NOT — the same collapse the filter avoids below.
+const render = (value) => (value === undefined ? '(absent)' : JSON.stringify(value));
+
const describeDrift = (actual, expected) =>
[...new Set([...Object.keys(actual), ...Object.keys(expected)])]
.map((file) => ({ file, was: expected[file], now: actual[file] }))
- .filter(({ was, now }) => String(was) !== String(now))
- .map(({ file, was, now }) => ` ${file}: baseline ${was ?? '(absent)'} -> migrations ship ${now ?? '(absent)'}`);
+ // Structural, not stringified: String(['a', 'b']) === String('a,b'), so a
+ // hash list that lost its element boundaries would compare equal.
+ .filter(({ was, now }) => JSON.stringify(was) !== JSON.stringify(now))
+ .map(({ file, was, now }) => ` ${file}: baseline ${render(was)} -> migrations ship ${render(now)}`);
const expectMatchesBaseline = (actual, expected, label) => {
const drifted = describeDrift(actual, expected);