LeaseManager documents a periodic sweep that emits lease.revoked for expired leases at Sources/ARCP/Runtime/LeaseManager.swift:7, and ArtifactStore documents ownership of a periodic retention sweep at Sources/ARCP/Runtime/ArtifactStore.swift:8. Both types expose startSweep, but neither ARCPRuntime nor JobManager calls those methods during session setup. The conformance docs repeat the same guarantee for lease expiry sweeps and artifact retention at CONFORMANCE.md:37 and CONFORMANCE.md:72. In the current behavior, expired artifacts are lazily deleted on fetch and permission leases are not automatically revoked unless a caller manually reaches into the subsystem and starts the sweep.
Fix prompt: Decide whether sweeps are runtime-managed or caller-managed. If they are runtime-managed, start the lease sweep when each JobManager is created, start the artifact sweep when ARCPRuntime is initialized or when artifact support is negotiated, and stop both tasks during shutdown. If they are caller-managed, rename or document the APIs so users know they must opt in and update conformance text accordingly. Add tests that use short TTLs and lease durations to prove the expected revocation or deletion happens without undocumented setup.
LeaseManagerdocuments a periodic sweep that emitslease.revokedfor expired leases atSources/ARCP/Runtime/LeaseManager.swift:7, andArtifactStoredocuments ownership of a periodic retention sweep atSources/ARCP/Runtime/ArtifactStore.swift:8. Both types exposestartSweep, but neitherARCPRuntimenorJobManagercalls those methods during session setup. The conformance docs repeat the same guarantee for lease expiry sweeps and artifact retention atCONFORMANCE.md:37andCONFORMANCE.md:72. In the current behavior, expired artifacts are lazily deleted on fetch and permission leases are not automatically revoked unless a caller manually reaches into the subsystem and starts the sweep.Fix prompt: Decide whether sweeps are runtime-managed or caller-managed. If they are runtime-managed, start the lease sweep when each
JobManageris created, start the artifact sweep whenARCPRuntimeis initialized or when artifact support is negotiated, and stop both tasks during shutdown. If they are caller-managed, rename or document the APIs so users know they must opt in and update conformance text accordingly. Add tests that use short TTLs and lease durations to prove the expected revocation or deletion happens without undocumented setup.