Repository navigation
fix(action): key the action's cache by the binary's cache schema - #325
Merged
Merged
Conversation
Every Count version shared one actions/cache lineage, so an older binary could restore a newer binary's database and refuse it as a future schema. The action now installs the binary first, asks it for its schema with the new `patchula cache schema`, and keys the cache by that schema; releases without the command key by their version.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | fe741f6 | Commit Preview URL Branch Preview URL |
Nov 14 2026, 07:21 PM |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The composite action cached
$RUNNER_TEMP/patchulaunderpatchula-v2-<os>-<arch>-<run>-<attempt>and restored anypatchula-v2-<os>-<arch>-entry, so every Count version shared one cache lineage. The binary rejects a cache database from a newer schema (Error::FutureSchema, on purpose, and that stays). So an older binary that restored a newer binary's cache failed hard:This showed up in #318's "Action" dry run (release 0.8.1) after main's source-built self-run saved a schema-15 cache. Anyone rolling back to an older version would hit the same error.
Fix
patchula cache schemaprints the newest cache schema the binary supports (patchula_cache::SCHEMA, which isMIGRATIONS.len(), currently 15).action.ymlnow resolves the binary in its ownInstall Count Patchulastep, before the cache step. That step uses the samebinary:/version/ action-ref logic as before and outputs the binary path plus a cache lineage:s<schema>when the binary hascache schemav<version>(from--version) for older releases that don't have itpatchula-v3-<os>-<arch>-<lineage>-<run>-<attempt>, and it only restores within its own lineage. The run step uses the resolved binary. The pre-0.4.0--cachefile/dir handling is unchanged.The "Action" workflow dry run uses the latest release (0.8.1), so it covers the version fallback path.