Commit 1:
Distinguish CacheError variants in package staging
When restorePackageArchiveRequest failed, the same generic
"failed to resolve package cache" message was returned for
every CacheError variant (OutOfMemory, FileSystem,
PermissionDenied, InvalidInput). Users hitting the failure
had no way to tell whether they were looking at a permissions
problem, a missing path, an OOM, or invalid input.
Replace the catch-all else branch with explicit handling
of each variant, surfacing a distinct hint in the diagnostic
message. The PackageError mapping is unchanged.
Ref #75
Commit 2:
Test the rootless guard in finalizeAdmittedStoreObject
The rootless support PR (#78) added a guard that skips
rollback-state updates when running unprivileged. The
existing "fails hard on rollback-state update after
admission" test relied on running unprivileged and chmod'ing
the cache directory to trigger PermissionDenied — the new
guard makes that path unreachable, so the test fails on
unprivileged hosts (and skips silently on the privileged CI
container).
Replace it with a test that verifies the intended behavior:
when unprivileged, finalizeAdmittedStoreObject succeeds and
does not write a rollback-state file. Error propagation in
the privileged path is the standard switch-and-return pattern
used throughout the codebase.