Repository navigation
v0.11.12
Immutable
release. Only release title and notes can be modified.
remote-dev 0.11.12:远程 NPU 作业存储上限与终态 GC、本地状态保留与测试临时目录修复
- 远程作业日志磁盘上限与诚实截断记账(
processes/worker.py、processes/worker_runtime.py):PTY 与普通 pipe 输出统一经CappedLog环形落盘,<stream>.log.prev+<stream>.log最多占用spec.max_log_bytes(默认每流256 MiB),替代原先无界追加;logs.json与result.json记录logical_bytes_written/truncated_head_bytes,tail/exchange继续使用逻辑偏移,并在头部被轮转时返回*_truncated、*_skipped_bytes、*_logical_bytes、*_truncated_head_bytes,不再把环形丢弃误报为干净 EOF。 - 远程终态作业 GC 与安全所有权(
processes/worker_runtime.py、core/job_ops.py):在.remote-dev/jobs上按7 天TTL、128个终态作业、2 GiB上限清理;仅处理当前远程os.getuid()拥有、worker.lock/lock未被持有、result.json状态明确终态且unknown为空、descendants_drained is True或实时quiet的目录,先原子重命名为.trash-<job_id>-<token>再删除;running、starting、stopping、unknown、retain_until_release永不删除。GC 带300s冷却与512条扫描上限,在作业创建与停止路径机会式触发。 - 本地端点状态保留与死会话目录清理(
core/retention.py、core/state_store.py、core/job_ops.py):state/endpoints/<id>/的reads/与logs/按7 天/256条 /128 MiB清理,本地jobs/<job_id>.*仅在记录状态确认终态时按14 天/128条 /256 MiB清理,running/unknown记录严格保留;写入路径带300s冷却与2s有界预算,清理失败不阻塞已提交的写入。新增prune_stale_session_runtime_dirs(),仅删除gate-v1*/runtime*/session*中 PID 已死、锁未被持有且超过24h的目录,并严格跳过任何包含 SQLite receipt 存储的目录(remote-dev本身不管理gate-v1布局,故以显式 helper 提供给上层)。 - 测试临时目录泄漏修复(
tests/test_native_contracts.py):test_tail_text_reads_bounded_suffix_without_whole_file改用tempfile.TemporaryDirectory,并新增回归用例断言执行后$TMPDIR中不新增tail-bounded-*目录,消除每轮64 MiB稀疏文件残留。 - 版本与发布:
0.11.11→0.11.12;worker_runtime.py纳入 wheelforce-include与远程 worker 组合源;新增tests/test_retention.py覆盖远程终态 GC、环形日志记账、本地reads/logs/jobs保留与 receipt 保护。
验证:pytest -q -m "not live_npu" 通过(1040 passed, 60 skipped, 6 deselected),隔离 $TMPDIR 无 tail-bounded-* 残留,全部变更文件为 Unix LF。