Skip to content

Commit adc9093

Browse files
committed
fix: make task recovery identity test portable
1 parent e3f0ff7 commit adc9093

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎changelogs/releases/v1.18.0.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ v1.18.0 将 DevCodex 明确定位为“跨宿主 AI Coding 工程 Harness”:
7070
- 隔离 exact-tree qualification 现在把 runner 已解析的 active-root 注入每个验证叶节点;V99 standalone 优先消费显式 `DEVCODEX_VALIDATION_ACTIVE_ROOT`,再回退 canonical resolver。这样 clean candidate、源工作树与 Profile 身份可以分栏取证,不再因资格仓物理位置误报 Profile consumers 缺失。
7171
- immutable runtime generation 在候选阶段从 `候选日期` 派生确定性 `createdAt` 并记录 `creationTimeAuthority=candidate-changelog`;最终发行源码改用 `发布日期` 后投影 `release-changelog`。两种状态都保持确定性,且候选资格验证不会伪造已发布事实。
7272
- TaskRecoveryStoreV5 与 RuntimeGenerationRetention 源码冻结后的 Codex CLI S15 已在 runtime `3c762817…daf842`、adapter `b4662345…d2f00` 上完成 Profile/Memory/SkillRoute、context rebind 与 entry/closeout 回放;run=`s15-codex-probe-f9b1014d-bde6-4381-8584-b23ce1e2af8d`,portable evidence=`55be4e4a…82524`,retirement anomalies 全 0。该 CLI 证据不替代 Codex Desktop fresh-task 原生事件验证。
73+
- TaskRecovery recovery key 的路径大小写回归按宿主文件系统语义分栏:Windows 断言大小写变体 identity 相等,POSIX 断言不相等;Node 18.17/20.20/22.23/24.17/26.0 均通过 10,000 semantic no-op 与 1,000 formal-task 压测,避免 Windows 专属合同阻断 Linux CI。
7374

7475
## 兼容性、升级与边界
7576

‎changelogs/unreleased.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
## 当前未发布实现候选
77

88
- **TaskRecoveryStoreV5 P0(PI-275 / PF-337)**:根因是旧 lifecycle writer 按 Hook/工具状态变化创建 UUID 全量 JSON,而 pointer 数量限制不回收物理孤儿。新 writer 按 formal task 使用稳定 hot A/B、cold resume stub、terminal 退出缓存与 ephemeral A/B;正式任务数无硬上限,默认 256/512 MiB soft/hard,8 MiB closeout reserve。辅助 observation/telemetry/trace/temp 同步有界;现有 legacy 零删除。
9+
- **TaskRecovery 跨平台身份回归**:recovery key 的路径大小写断言按文件系统语义分栏:Windows 盘符路径大小写不敏感,POSIX 路径大小写敏感;不再把 Windows 专属等价关系错误施加到 Linux CI。Node 18.17/20.20/22.23/24.17/26.0 均通过 10,000 semantic no-op 与 1,000 formal-task 压测。
910
- **ContextDeliveryLedgerV2**:只在同 task/conversation/context epoch/project/root/source/body identity 完全一致且正文已观察时复用;其余全文 fail-safe。402,848-byte 正文基准每次重复避免约 80,570~134,283 token-equivalent,serialized reduction 99.543%;actual host tokens 仍为 `UNVERIFIED`。
1011
- **运行态运维面**:新增 `devcodex runtime status|doctor|maintenance` 的 V5/legacy/physical/reserve/hot/cold/terminal/ephemeral 分栏;maintenance 默认预览,apply 也不删除 legacy。Profile 只允许 safe integer `hardLimitMiB >= 512`。
1112
- **RuntimeGenerationRetention P2(PI-276 / PF-338)**:用户级六宿主不可变 `runtime-*` 不再只有 retained 列表而无收敛路径。本机 `generationAdoptions` 防止旧 release 刚安装即越过宽限;Profile/Memory MCP 与 global-host activation 共用稳定 `RuntimeGenerationLeaseV1`,GC claim 与激活双向互斥。GC 只接受非 current、无 live lease、已过本机 24 小时宽限且 manifest/content-tree/receipt/path 全可证的候选;预览零写,普通 apply 零 generation 删除,只有匹配 `RuntimeGenerationGcPlanV1.planDigest` 的显式 apply 才执行。完整 claim replan 与全部候选预检失败时零删除,逐项删除失败如实 partial;崩溃遗留 claim 仅在超龄、PID 明确死亡且原子搬移读回一致时由固定 stale 槽接管。`status/doctor` 六宿主合计最多 12 条 generation 样本、每个 inventory 最多 12 类摘要、TaskRecovery task 最多 8 条;maintenance 的 task before/after 各最多 8 条,actions/failures 与 generation candidates/retained/removed/failed 各最多 24 条并保留真实总量,避免诊断本身产生巨量 Token。

‎scripts/test-task-recovery-store-v5.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ function taskReadLockTrackingFs(metaDir) {
213213

214214
try {
215215
const stableKey = createTaskRecoveryKey(identity('00000000-0000-4000-8000-000000000001'))
216-
assert.strictEqual(stableKey, createTaskRecoveryKey({
216+
const caseVariantKey = createTaskRecoveryKey({
217217
activeRoot: activeRoot.toUpperCase(),
218218
project: 'DEVCODEX',
219219
taskId: '00000000-0000-4000-8000-000000000001'
220-
}))
220+
})
221+
if (process.platform === 'win32') assert.strictEqual(stableKey, caseVariantKey)
222+
else assert.notStrictEqual(stableKey, caseVariantKey)
221223

222224
const oversized = state('00000000-0000-4000-8000-000000000001')
223225
const dataUrl = `data:image/jpeg;base64,${'A'.repeat(600000)}`

0 commit comments

Comments
 (0)