Repository navigation
Description
Problem
packages/runtime/src/history-compact-cleanup.ts defines cleanupLegacyHistoryCompactArtifacts and its result/diagnostic contracts, but the implementation is no longer connected to any supported product composition.
Verified on local main at ab3c1553a5ad1d0970491c99e6becc18a65ea6aa:
- there is no production import or call to
cleanupLegacyHistoryCompactArtifacts; - the module has no package subpath export;
- no test imports or exercises this implementation;
- Runtime Host does not inject it through
cleanupHistoryCompactArtifacts; - the checkpoint coordinator already treats an absent cleanup callback as a valid no-op composition.
The implementation was previously useful when legacy Desktop/CLI compositions wired artifact cleanup directly. Runtime Host now owns execution composition, leaving this module as a stranded implementation that can drift without ever reclaiming an artifact.
Proposed change
Remove the unused history-compact-cleanup.ts implementation and the types owned only by that module.
Preserve:
history-compact-artifacts.tsand its persisted artifact reader/writer;- history-compaction replay and checkpoint loading;
- the optional
cleanupHistoryCompactArtifactsinjection seam unless it receives its own deletion proof.
Acceptance criteria
-
cleanupLegacyHistoryCompactArtifactsand its implementation-only contracts are removed. - No persisted history-compact artifact format or reader changes.
- Checkpoint recording, loading, replay, and compaction behavior remain unchanged.
- The optional coordinator callback is not removed as part of this issue.
- Focused Runtime type checking, tests, and formatting pass.
Capability intentionally removed
A future composition can no longer reconnect this ready-made legacy artifact-reclaim helper. If artifact reclamation becomes a supported product requirement again, it must be designed and wired through the current Runtime Host authority.
Context
Historical cleanup work: #728.
Relevant files:
packages/runtime/src/history-compact-cleanup.tspackages/runtime/src/history-compact-checkpoint-coordinator.tspackages/runtime/src/history-compact-artifacts.tspackages/runtime/src/session-manager.tspackages/runtime/src/runtime-kernel.ts
This issue was identified and drafted with AI assistance (Codex). A human contributor reviewed the analysis and owns the submission.
Activity
1625567290 commentedon Aug 15, 2026
I'm working on this. I'll remove the unused
history-compact-cleanup.tsimplementation and the types owned only by that module. The artifact store, checkpoint coordinator, and optionalcleanupHistoryCompactArtifactsinjection stay.Grok is assisting with the implementation; I will review the change and remain the human contributor of record.
简体中文对照
我来处理。删除已无产品组合接入的
history-compact-cleanup.ts及其仅被该文件使用的类型。artifact store、checkpoint coordinator,以及可选的cleanupHistoryCompactArtifacts注入点保留。Grok 协助实现;我会审阅改动,并作为 human contributor of record。
refactor(runtime): remove the orphan legacy history-compact cleanup (#…