Summary
Implement Stage 6 (Cache Infrastructure) for the Ansible-first reboot.
Scope
- Create the caching role
- Establish persistent cache directories (/opt/runner-cache/{nuget,ccache,pico-sdk})
- Set correct permissions (sticky bit for UID safety)
- Extend container hook wrapper to bind-mount caches into containers
- Add environment variables visible inside containers
- Create weekly cleanup cron jobs
Key Capabilities
- NuGet packages persist across jobs (~7-14 min savings per warm run)
- ccache compiler cache persists with LRU limit enforcement
- Pico SDK toolchain persists (11-19 min savings per warm run)
- Hook wrapper extended to inject mounts and env vars
Acceptance
- Cache directories exist at /opt/runner-cache/{nuget,ccache,pico-sdk}
- Sticky bits set for UID-safe access
- Hook wrapper extension created at /opt/runner-hooks/hooks/mounts.js
- Systemd unit includes cache environment variables
- Test job can read/write cache directories
- Environment variables visible inside container
- Cleanup cron jobs configured and executable
- Second role run is idempotent
- Caches persist across multiple job runs
Summary
Implement Stage 6 (Cache Infrastructure) for the Ansible-first reboot.
Scope
Key Capabilities
Acceptance