dsh-lite-memory 0.18.42 → 0.18.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ # 0.18.43:回执上限从 256 降到 64
2
+
3
+ ## 问题
4
+
5
+ 回执只用于同一 `operationId` 的重放保护,重试都发生在当下;按 7 天 TTL 叠加 256 条
6
+ 上限,热点层实测单层回执 35 KB。面板并不读这份列表,`state.receipts` 纯粹是防重
7
+ 数据,留 256 条等于白占状态体积。
8
+
9
+ ## 改法
10
+
11
+ - `LIMITS.receipts` 256 → 64。仍按 7 天 TTL 过期,仍在每次状态写入时清理。
12
+ - 单个热点层实测回执体积从 35.7 KB 降到约 9 KB;重放窗口覆盖当下重试与并发收尾,
13
+ 不涉及历史查询。
14
+
15
+ ## 验证
16
+
17
+ - 全量 `npm test` 通过(含回执过期清理、按 `operationId` 重放两条回归)。
18
+ - 线上层 `DSH-0ea3b310` 下一次写入即截到 64 条。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-lite-memory",
3
- "version": "0.18.42",
3
+ "version": "0.18.43",
4
4
  "description": "On-demand memory for the DeepSeek Harness: nothing resident, at most three small cards on a real hit, bodies read on demand.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/state.js CHANGED
@@ -232,7 +232,8 @@ export const LIMITS = {
232
232
  suggestionTtlMs: 48 * 60 * 60 * 1000,
233
233
  pending: 20,
234
234
  pendingBytes: 64 * 1024,
235
- receipts: 256,
235
+ /** 回执只用于同一操作的重放保护,重试都发生在当下;256 条会白占几十 KB。 */
236
+ receipts: 64,
236
237
  receiptTtlMs: 7 * 24 * 60 * 60 * 1000,
237
238
  suppressions: 64,
238
239
  suppressionTtlMs: 7 * 24 * 60 * 60 * 1000,