Repository navigation
Back the use cache directive with Harper and persist per-entry cache lives
#65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Ethan-Arrowood
merged 30 commits into
main
from
feat/use-cache-handler-and-per-entry-ttl
Oct 7, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
381cef3
feat: persist per-entry cache lives and serve stale on tag invalidation
jjohnson-hdb 2ebb947
feat: back the "use cache" directive with Harper
jjohnson-hdb 4eebc83
test: add a "use cache" fixture and document the two handler interfaces
jjohnson-hdb 1442b59
fix: store integer cache lives and disable the sweep by default
jjohnson-hdb 7bc7675
test: verify both handlers on a real two-node cluster
jjohnson-hdb ff7e895
fix: address Gemini review findings and de-time-bomb a unit test
jjohnson-hdb 9edbd6f
fix: keep oversized "use cache" keys under Harper's primary-key limit
jjohnson-hdb 0d42441
fix: restore the playwright-report ignore rule
jjohnson-hdb ab2d0e6
fix: follow Next's stale/expired tag semantics and make tombstones ouβ¦
jjohnson-hdb 826ef5f
docs: record the Harper and Next.js behaviour the cache handlers rely on
jjohnson-hdb 919d31c
fix: set each cache entry's Harper expiry from Next's expire, capped β¦
jjohnson-hdb c1d8250
feat: keep cache entries up to a year, and optionally clear earlier bβ¦
jjohnson-hdb ab8c7b0
Merge remote-tracking branch 'origin/main' into feat/use-cache-handleβ¦
jjohnson-hdb cd4e2d8
fix: fail closed until tombstones are hydrated, re-subscribe when theβ¦
jjohnson-hdb e03b4b0
test: pin the four invalidation defects with independent regression tβ¦
Ethan-Arrowood 1fba8ff
test: pin the same-millisecond ordering gap the write-version fix leaβ¦
Ethan-Arrowood f952676
test: pin the lone-surrogate cache-key collision, and rule out the chβ¦
Ethan-Arrowood ea56382
test: write the regression-test comments for the next reader, not theβ¦
Ethan-Arrowood c5c3365
ci: run the unit suite on every pull request
Ethan-Arrowood fd6f5a9
fix: separate oversized "use cache" keys that differ only by a lone sβ¦
Ethan-Arrowood 201b33c
fix: resolve a same-millisecond invalidation tie by strictness, not aβ¦
Ethan-Arrowood 0410543
fix: leave an unbounded cache life to the table's expiration instead β¦
Ethan-Arrowood e807099
test: run the cluster suite on any container runtime, and make it louβ¦
Ethan-Arrowood f09a64f
docs: point at the packaged loopback setup script instead of hand-rolβ¦
Ethan-Arrowood db1cc89
fix(test): make the cluster rig's staged tree writable by the image'sβ¦
Ethan-Arrowood 1391c8f
fix(test): reopen the staged rig from inside the image, which owns itβ¦
Ethan-Arrowood 64afdb1
fix(test): pin the cluster rig's build containers to the host uid
Ethan-Arrowood 31782ca
fix(test): fingerprint every staged input, so the cluster rig cannot β¦
Ethan-Arrowood c364be2
fix: keep a passed expiry irrevocable, so a later profiled invalidatiβ¦
Ethan-Arrowood 239684b
docs: state the constraint in the cluster rig's comments, not how it β¦
Ethan-Arrowood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Unit Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| unit-tests: | ||
| name: Unit Tests (Node ${{ matrix.node-version }}) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| node-version: [22, 24, 26] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| # No separate build step: `npm test` compiles first, because the suite runs the emitted | ||
| # `dist/**/*.test.js` rather than the TypeScript sources. Unlike the integration suite this | ||
| # needs no Harper instance, fixtures or browsers, so it stays a seconds-long check. | ||
| - name: Run unit tests | ||
| run: npm test |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,4 @@ node_modules/ | |
| test-results/ | ||
| .DS_Store | ||
| dist/ | ||
| playwright-report/ | ||
| playwright-report/ | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to detail this; lets also detail that the
@harperfast/integration-testingmodule has a loopback alias script included in it.