Skip to content

Commit 738de0b

Browse files
Merge pull request #28 from curlewlabs-com/docs/release-tagging-contract
docs: document actual release-tagging contract
2 parents 13aef3b + b4431b8 commit 738de0b

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

AGENTS.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,16 @@ A GitHub composite action that provides local-disk caching for self-hosted runne
1010
- 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.
1111
- 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`).
1212
- 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`.
1425
- Never add a `cache-dir` default — callers must always be explicit about where their cache lives.

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ v3 features a collision-safe encoded on-disk cache layout. Existing exact-key en
159159

160160
Change `@v1` to `@v3` in your workflow files. No other changes needed.
161161

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.
163163

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:
165165

166166
```sh
167167
rm -rf /path/to/cache-dir/entries/* /path/to/cache-dir/entries/.tmp-*
@@ -183,20 +183,24 @@ Use `local-cache` when you cannot control where a tool installs itself. The Flut
183183
- **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`.
184184
- **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.
185185
- **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.
187187

188188
## Releasing
189189

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`:
191193

192194
```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.
194200
git tag -f v3 HEAD
195201
git push --force origin v3
196202
197-
# Create a versioned release for the marketplace.
198-
git tag v3.x.y HEAD
199-
git push origin v3.x.y
203+
# GitHub release for the marketplace.
200204
gh release create v3.x.y --title "v3.x.y" --notes "changelog here"
201205
```
202206

0 commit comments

Comments
 (0)