From e7b0cee85908494fef2094b38b321f0e46124999 Mon Sep 17 00:00:00 2001 From: ework-agent Date: Sat, 7 Nov 2026 18:58:34 +0800 Subject: [PATCH 1/2] test(golden): realign storage-render snapshots with post-#5860 persisted-state shape #5860 added compress.requireUsageSampleForPressure; the resolved Config snapshot persisted in session.metadata["effectiveConfig"] (src/session.ts cloneSafe) grew by exactly that field, so the metadata section digest drifts deterministically on every lane (F1 of the #5860 born-red wave, signatures pinned in #4599). Regenerated all four snapshots at 5af5f9fed3 with scripts/update-storage-render-goldens.ts; state/blockContents/stats sections unchanged, no behavior change - snapshot realignment only. Verified green under the CI preload env (BILI_MESSAGE_TIMESTAMMS=0 via tests/preload-test-env.mjs). --- tests/golden/storage-render/anthropic.json | 6 +++--- tests/golden/storage-render/chat.json | 6 +++--- tests/golden/storage-render/google.json | 6 +++--- tests/golden/storage-render/responses.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/golden/storage-render/anthropic.json b/tests/golden/storage-render/anthropic.json index 087a1082bd..8fa4944d33 100644 --- a/tests/golden/storage-render/anthropic.json +++ b/tests/golden/storage-render/anthropic.json @@ -95,13 +95,13 @@ "foldAt": 9, "editedAt": 12, "summaryFrom": 9, - "stateDigest": "e1c4662975aaef423f2de518d3f4ffc0cc6baa27ec7fcf2c13289a12645d3e48", - "stateDigestAligned": "27b0656a52c71cf65497e7e11c90e59d49efeab2bbb2a2d52999eaaef04ff30c", + "stateDigest": "769f37660d00c1493c5fd6685d46f33d616fafb989e0ab8e20376a3f73aac798", + "stateDigestAligned": "3ff89ce95e826f411374971aef567f6e252ef7e3591f9a1703ff6f4598ad17fc", "sectionDigests": { "state": "56e66f6b72c7f0dd", "blockContents": "dc7d13d250c94bb4", "stats": "e83198a55e6b2c29", - "metadata": "12c05de38706b0a4" + "metadata": "3f0a403a86a95d21" }, "stateKeyDigests": { "blocks": "3a454b9a16e4f0b9", diff --git a/tests/golden/storage-render/chat.json b/tests/golden/storage-render/chat.json index 526a922dc3..795b602311 100644 --- a/tests/golden/storage-render/chat.json +++ b/tests/golden/storage-render/chat.json @@ -95,13 +95,13 @@ "foldAt": 9, "editedAt": 12, "summaryFrom": 9, - "stateDigest": "2dc15ac4e3235969e26282916259c6947121b507725151fbd9d5a37e7123af35", - "stateDigestAligned": "d8938cf78272caa52a0b75b348cfe6ec79f2869fa2eced9aab8e8b7b01456f27", + "stateDigest": "f53ae7a74cb65acee70a1a1745b9e0111ac004a535f6b864ed4d1717edfa097b", + "stateDigestAligned": "0d0a46517ddc009705218f03e8d733f2f217c0c29c8bffe96644a55b87bfa2fd", "sectionDigests": { "state": "90857fbf82001a2b", "blockContents": "94a58f96d7c5cfc3", "stats": "3e6858671f4b9a9d", - "metadata": "499784b12a0c8366" + "metadata": "0aa87883e1afd3d5" }, "stateKeyDigests": { "blocks": "d9770feee91dafc6", diff --git a/tests/golden/storage-render/google.json b/tests/golden/storage-render/google.json index 551106b78c..a06635eb01 100644 --- a/tests/golden/storage-render/google.json +++ b/tests/golden/storage-render/google.json @@ -95,13 +95,13 @@ "foldAt": 9, "editedAt": 12, "summaryFrom": 9, - "stateDigest": "f55747dc03782cedf1887b2b1b01c7f435a9fc3f9eee80f9ca058d9af4a39afd", - "stateDigestAligned": "7462b011498cdb9886bb1e64e747f552fc8a2411fde6fb8b2cb73867349c85ae", + "stateDigest": "2c935a3aa2ea69d6c940fefd7ff7e24150bf53d7fba971659045d856cbf65901", + "stateDigestAligned": "396425bd142ef952862ba9004efd8c818178a2e1456c28e5e517a15575cf3267", "sectionDigests": { "state": "c5243ba17364d3ac", "blockContents": "473264d9df8ba338", "stats": "a3c84817f1d0c3dd", - "metadata": "2cbb56bb9d0a35fc" + "metadata": "ccd5496952909304" }, "stateKeyDigests": { "blocks": "0cfd0b9c0fc53073", diff --git a/tests/golden/storage-render/responses.json b/tests/golden/storage-render/responses.json index b032ce360e..e4f476374c 100644 --- a/tests/golden/storage-render/responses.json +++ b/tests/golden/storage-render/responses.json @@ -95,13 +95,13 @@ "foldAt": 9, "editedAt": 12, "summaryFrom": 9, - "stateDigest": "9e182fe80de27b4add507dad50eb3d96e80fc0cfac96808ddd266f460a32e572", - "stateDigestAligned": "4398b34b74816f517fb66a3ead2533df1afa6172b1604ae126f6afb0cd61b89b", + "stateDigest": "01c80a6119edbe1914cd8ccaede4687d66bf711d8b32c9fbfd69e6eb681589b0", + "stateDigestAligned": "5e5c437a116d15369032faa1f30fa3a407d842181f8733549981ba73c2b07d64", "sectionDigests": { "state": "e686a14f31d69ce5", "blockContents": "b6701268a0bdcd8a", "stats": "099bde0a9cf64cad", - "metadata": "2d70b1b88b5bc399" + "metadata": "fa97fca618040493" }, "stateKeyDigests": { "blocks": "34b0dc17f8c24595", From 6436b23b3cc6becb5754af6c02a46813e6fbd451 Mon Sep 17 00:00:00 2001 From: ework-agent Date: Sat, 7 Nov 2026 18:58:34 +0800 Subject: [PATCH 2/2] test(golden): pin additive requireUsageSampleForPressure in wire-contract kernel.json buildKernelGolden() serializes behavior.defaultConfig100k = defaultConfig(100_000); #5860's additive NudgeConfig field broke the canonicalized snapshot (F2 of the #5860 born-red wave). Regenerated with scripts/update-wire-contract-goldens.ts: diff is the single additive field requireUsageSampleForPressure: true in the nudge section - the ledger grows, nothing shrinks (Kernel Boundary rule 4). --- tests/golden/wire-contract/kernel.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/golden/wire-contract/kernel.json b/tests/golden/wire-contract/kernel.json index 21aa9f36ed..15cbcf2ef3 100644 --- a/tests/golden/wire-contract/kernel.json +++ b/tests/golden/wire-contract/kernel.json @@ -1129,7 +1129,8 @@ "minGrowthFloor": 20000, "minGrowthRatio": 0.45, "emergencyThresholdPct": 0.95, - "tier2GrowthMultiplier": 1.5 + "tier2GrowthMultiplier": 1.5, + "requireUsageSampleForPressure": true }, "promotionThreshold": 5, "truncate": {