You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,5 +10,16 @@ A GitHub composite action that provides local-disk caching for self-hosted runne
10
10
- No external dependencies beyond `rsync`, `sh`, and standard POSIX utilities. The one published-action dependency is [`curlewlabs-com/local-mutex`](https://github.com/curlewlabs-com/local-mutex), which both `action.yml` and `save/action.yml` use to serialize per-key concurrent access via the kernel's `lockf`/`flock` primitive. **Pin this dependency to an immutable patch tag (e.g. `@v2.0.1`)**, not the floating major tag. Rationale: `local-cache` is a *published* action whose `action.yml` ships to public consumers. A floating `@v2` in our `action.yml` would mean every local-mutex retag silently changes behavior for pinned `local-cache@v3` consumers, defeating the point of pinning. Bump the pin in a dedicated PR when you want to adopt a new local-mutex release.
11
11
- The action interface (`action.yml`, `save/action.yml`) must remain compatible with `actions/cache` inputs/outputs (`path`, `key`, `restore-keys`, `cache-hit`, `cache-matched-key`).
12
12
- Every change ships with a test in `.github/workflows/ci.yml`.
13
-
- Tag releases as `v2`, `v3`, etc. (major only). Use floating major tags.
13
+
- Release tagging: every release gets an **immutable patch tag** of the
14
+
form `vMAJOR.MINOR.PATCH` (e.g. `v3.0.0`, `v3.0.1`) that, once pushed,
15
+
is never force-moved — this is what downstream callers pin to if they
16
+
need exact reproducibility. In addition, the **floating major tag**
17
+
`vMAJOR` (e.g. `v3`) is force-updated on every release in that major
18
+
series so it always points at the latest `v3.x.y` commit. Callers that
19
+
track `@v3` get automatic minor/patch updates inside the same major
20
+
series; callers pinned to `@v3.0.1` stay pinned forever. Both kinds of
21
+
tags exist in this repo and both are part of the release contract. Use
22
+
`git tag v3.0.1 HEAD` (immutable) and `git tag -f v3 HEAD` followed by
23
+
`git push --force origin v3` (floating) when cutting a release, and
24
+
create a matching GitHub release with `gh release create v3.0.1`.
14
25
- Never add a `cache-dir` default — callers must always be explicit about where their cache lives.
Copy file name to clipboardExpand all lines: README.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,9 +159,9 @@ v3 features a collision-safe encoded on-disk cache layout. Existing exact-key en
159
159
160
160
Change `@v1` to `@v3` in your workflow files. No other changes needed.
161
161
162
-
On the first v2 restore, the target directory is cleaned and re-synced (since v1 left hard-linked files with no marker). After that, restores with the same key are skipped entirely.
162
+
On the first restore after upgrading, the target directory is cleaned and re-synced (since v1 left hard-linked files with no marker). After that, restores with the same key are skipped entirely.
163
163
164
-
**Purge bloated v1 entries after upgrading.** v1 did not clean the target before restoring, so tools that install new versions alongside old ones (e.g. Flutter) caused the save step to capture every version ever installed. After upgrading to v2, delete the old entries so the next save creates a clean one:
164
+
**Purge bloated v1 entries after upgrading.** v1 did not clean the target before restoring, so tools that install new versions alongside old ones (e.g. Flutter) caused the save step to capture every version ever installed. After upgrading, delete the old entries so the next save creates a clean one:
@@ -183,20 +183,24 @@ Use `local-cache` when you cannot control where a tool installs itself. The Flut
183
183
- **macOS Spotlight indexing.** On macOS runners, restoring large cache entries (e.g. the Flutter SDK) can trigger `mds` / `mds_stores` to re-index the restored files, causing CPU spikes. Exclude the runner's root directory (or at minimum the `cache-dir`) from Spotlight indexing via System Settings > Spotlight > Privacy, or programmatically with `mdutil -i off /path/to/runner`.
184
184
- **Windows Defender on WSL2.** If your runners run inside WSL2 and you notice CPU spikes from `MsMpEng.exe` after cache restores, Windows Defender may be scanning files written to the WSL2 filesystem. Add the WSL2 distribution's directory to the Defender exclusion list in Windows Security settings.
185
185
- **No GitHub cloud fallback.** Unlike `actions/cache`, there is no network fallback on a local miss. The first run on a new machine always downloads.
186
-
- **Explicit save required.** Composite actions have no automatic post-step hook, so you must call `curlewlabs-com/local-cache/save@v2` explicitly after your install step. A JavaScript action with a `post:` hook would enable a single-step interface, but adds a build step and Node.js dependency that this action avoids by being pure shell.
186
+
- **Explicit save required.** Composite actions have no automatic post-step hook, so you must call `curlewlabs-com/local-cache/save@v3` explicitly after your install step. A JavaScript action with a `post:` hook would enable a single-step interface, but adds a build step and Node.js dependency that this action avoids by being pure shell.
187
187
188
188
## Releasing
189
189
190
-
Users pin to `@v3` (floating major tag). After merging to `main`:
190
+
Every release ships **both** an immutable patch tag (`vMAJOR.MINOR.PATCH`, e.g. `v3.0.1`) and a floating major tag (`vMAJOR`, e.g. `v3`). Users who want exact reproducibility pin to `@v3.0.1`; users who want automatic minor/patch updates inside the v3 series pin to `@v3`. Both tag kinds exist for every release. See [AGENTS.md](AGENTS.md) for the full contract.
191
+
192
+
After merging to `main`:
191
193
192
194
```sh
193
-
# Move the floating tag so @v3 users get the update.
195
+
# Immutable patch tag — never force-moved once pushed.
196
+
git tag v3.x.y HEAD
197
+
git push origin v3.x.y
198
+
199
+
# Floating major tag — force-updated to the latest v3.x.y commit on every release.
0 commit comments