Repository navigation
test(063): increment 4b, store host-seam tests and a Valkey-shaped store double - #525
Conversation
AI review (findings)Reviewing the three changed files: two new test-infrastructure files and a spec documentation update.
|
6862814 to
8a05904
Compare
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
bd9e911 to
10c6331
Compare
|
Review note: the finding is fixed in the latest commit. |
AI review (no-findings)Reviewing the three changed paths: a new test file, a new Valkey test double, and a spec documentation update.
The change adds nine lines of prose to the acceptance section, describing what the two new files cover. No frontmatter ( No concrete defects found in any of the three files. {"head": "10c6331dc03c85883f6a746da7a50b9fdefd5c38", "verdict": "no-findings", "findings": []}Subject: 8a05904...10c6331, diff digest 932cb9b26ee9c711cdfae4713fa0a2fb78e98d8d3f1bab6eb4f1de3404dc572e, 1 call(s). An AI comment is not an approval. |
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
10c6331 to
5ccb63a
Compare
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
5ccb63a to
30e15da
Compare
AI review (findings)Reviewing the three changed files: two new test files and a spec prose addition.
set(k, v) {
const old = this.keys.get(k); // bypasses #live
this.#write(k, { ..., expiresAt: old?.expiresAt ?? null, ... });
}If
Logic, fixture paths, clock manipulation, and assertions look self-consistent. The
Prose-only addition to the testing notes section. No frontmatter or lifecycle fields are modified. {"head": "30e15da3e1700b76c8dc024fab1b43f9a474e795", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/test/valkey-double.mjs", "line": 72, "severity": "low", "category": "correctness", "summary": "ValkeyNode.set uses this.keys.get(k) instead of this.#live(k) to retrieve the old entry, so an expired string key's past expiresAt is inherited by its replacement, making the replacement immediately expired on the next live access."}]}Subject: 5638821...30e15da, diff digest 932cb9b26ee9c711cdfae4713fa0a2fb78e98d8d3f1bab6eb4f1de3404dc572e, 1 call(s). An AI comment is not an approval. |
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
30e15da to
3e91c05
Compare
AI review (no-findings)Reviewing the three changed files:
The
The
Generation-key eviction invariant ( Split-read and check-then-write tests correctly distinguish between failures Rustev can detect ( The
The added paragraph accurately describes the new test files — it matches the test file's own header comment and the ValkeyStore's option set. The change is purely additive acceptance documentation; it touches no frontmatter ( No concrete defects found across all three files. {"head": "3e91c0540554efffb5dd7f3692c10138901b2ac6", "verdict": "no-findings", "findings": []}Subject: e85ffcf...3e91c05, diff digest 131bc9fd1ebb0d6edcd84297b24369ec0b307806e29492ae4340620700ffe600, 1 call(s). An AI comment is not an approval. |
e85ffcf to
e3de14f
Compare
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
3e91c05 to
fdacda6
Compare
AI review (findings)Reviewing the three changed files: two new test files and a spec documentation update.
The double is carefully written. One concrete modeling gap: in
If step 3 evicts the entry it returns File/line:
Logic, gauge assertions, and
The added paragraph accurately describes the coverage and the double's design. No lifecycle or authority issue. {"head": "fdacda680799f471d268395b6ee2f8ae0a3c5416", "verdict": "findings", "findings": [{"path": "integrations/rustev-node/test/valkey-double.mjs", "line": 190, "severity": "low", "category": "correctness", "summary": "In ValkeyStore.put's write closure, pexpire is called before the byte-counter incrby calls, so the just-written entry already carries a TTL and is a volatile-lru eviction candidate; under OOM during incrby, #write may evict that entry while the function still returns 'stored', producing inconsistent state without any test currently exercising this code path."}]}Subject: e3de14f...fdacda6, diff digest 131bc9fd1ebb0d6edcd84297b24369ec0b307806e29492ae4340620700ffe600, 1 call(s). An AI comment is not an approval. |
…its entry last (AI review on #525)
AI review (no-findings)Reviewing the three changed files: two new test files (
Adds nine lines of test-coverage prose to the existing acceptance section. No frontmatter or lifecycle fields changed; no authority or ratification change. No concrete defects found on any path the evidence supports. {"head": "8d5f1077fed5234041c4490cdc57c1fef1c93b4e", "verdict": "no-findings", "findings": []}Subject: e3de14f...8d5f107, diff digest b95bab0a21c4c7e23d6dd86e761b8f916fc54e20feb332ee997ae512e2a8c123, 1 call(s). An AI comment is not an approval. |
e3de14f to
26e71c9
Compare
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
AI review (findings)ReviewScope: New test file
|
…ite that landed (AI review on #525)
|
Review note: finding 7144f102e9c7 on 5ca0bac is right and fixed in 348c18e: with |
AI review (no-findings)Reviewing the three changed files for correctness, security, and consistency with governance.
Byte-counter keys (
The
The added paragraph correctly describes the two new test files, their scope (store rows of section 5 and 3.13.3 host-seam cases), and the double's key properties (volatile-lru, primary-only reads, one script per operation, no network/clock). No frontmatter ( No concrete defects, security issues, or governance contradictions are supported by the supplied evidence. {"head": "348c18e3459de6f2d13a7eecb529032d0e5e21c2", "verdict": "no-findings", "findings": []}Subject: 10815b9...348c18e, diff digest 76df3be00dfde8c74c9db48e712492d432ccb8c236fd39fdbeba4ee8dc609caa, 1 call(s). An AI comment is not an approval. |
…ore double test/store.test.mjs covers the store rows of 063 section 5 and the host-seam cases of 3.13.3 over test/valkey-double.mjs, a reference Redis-shaped double behaving like Valkey 8.1 with volatile-lru and primary-only reads, and its non-atomic variants (3.7).
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
…its entry last (AI review on #525)
…ite that landed (AI review on #525)
…s keyspace A write that cannot make room was stored before the OOM check (AI review on #525); it is now restored and the error raised, as Valkey refuses it.
348c18e to
0303912
Compare
…its entry last (AI review on #525)
…ite that landed (AI review on #525)
|
M5: rebased onto main at a9eeb9f (#524 merged); clean, with |
0303912 to
bbe7b09
Compare
|
M5: correction to my comment above. Both branches had already been rebased onto main by another push (impl/063-store-tests at 0303912, impl/063-capture-acquire at 30e33e9) after my last fetch, so my first push was refused. I then pushed over them: bbe7b09 and 09d0275 have byte-identical trees to 0303912 and 30e33e9 (same commits, rebased the same way), so nothing was lost. If you are rebasing these yourself, tell me and I will leave the branches alone. |
AI review (no-findings)Reviewing the three changed files: two new test files (
No concrete defects found. {"head": "bbe7b09abadfc0fdc62a1859575e48701163357a", "verdict": "no-findings", "findings": []}Subject: a9eeb9f...bbe7b09, diff digest 76df3be00dfde8c74c9db48e712492d432ccb8c236fd39fdbeba4ee8dc609caa, 1 call(s). An AI comment is not an approval. |
Spec 063 increment 4, part b (3.7, 3.13.3): host-seam tests for the store and a reference Valkey-shaped store double. Stacked on part a (the store seam); review only the commit after it. Test files only, plus the spec record sentence.
test/valkey-double.mjs: a Redis-shaped double that behaves like Valkey 8.1 withmaxmemory-policy volatile-lruand primary-only reads, as the partner requires. No network access and no wall-clock time.PEXPIREwith lazy expiry on an injected clock, and Lua-script atomicity (a script runs with nothing in between).maxmemory, only keys with a TTL are evicted; a write that cannot make room is refused with OOM, as Valkey refuses it.ValkeyStore: the 3.7 Redis table as code. Keys sit under one hash tag per namespace ({rx:<ns>}:g,:g:<scope>,:e:<keyId>holdingbytesandscope,:b,:b:<scope>).get,putanddeleteare each one script on the primary.invalidateis anINCRof a generation key with no TTL. Entry removal runs afterwards and is optional.volatile-lrucannot evict them.readFrom: 'replica'breaks G2.atomicGet: falsebreaks G3: entry and generations are read in two round trips, with a hook in the gap.atomicPut: falsebreaks G4: check, hook, then write.policy: 'allkeys-lru'breaks G1.removeOnInvalidate: false.test/store.test.mjscovers the store rows of section 5 and 3.13.3's host-seam cases:erasure, an empty term, an unknown term, none), the queue bound,store_missing,store_contract_mismatch.age_ms, and writes nothing more. Another engine'splan.invalidatemakes the next one miss withgeneration_advanced.getfailure underfail_closedis refused with nothing dispatched; undercontinue_without_cacheit is a miss and nothing is written.putanswer, and non-Uint8Arraybytes are each astore_failedmiss, never a hit.host_seam_queue_fullat once. Agetstill unsettled at the decision deadline counts inabandonedPending, and its late settlement is discarded and counted.invalidateends attimeoutMson the manual clock aspending,complete: false, with the signal aborted andabandonedPending1. The next decision is a miss with no store read ("unavailable until invalidation completes").timeoutMsbounds are checked, andnullcomes back without an optimization namespace. A throwing invalidation stays pending; a later call completes it and the tier hits again.gets reportsabandonedPending3, no slot held.volatile-lruevicts only entries under memory pressure, never generation or counter keys, and an invalidated entry is never served.allkeys-lruevicting a generation key, and a lagging reader endpoint, each serve a stale hit. Rustev cannot detect either; G1 and G2 forbid them.putracing an invalidation leaves an entry with old generations that is read and refused (generation_advanced), never served.M5 note for the spec owner (no spec change here): G2 makes entry removal on
invalidateoptional, but under first-writer-wins put-if-absent (G4), an entry that is never removed answers every laterputof its key withconflict. That key then stays a miss until the entry's TTL reclaims it. This is safe, never a stale hit, but the cache stays cold after an invalidation.ValkeyStoreremoves covered entries after theINCRby default, and the restart test opts out to showgeneration_advanced. A non-normative sentence in 3.7 may be worth adding.Checks run locally: as part a, with
node --test integrations/rustev-node/test/*.test.mjspassing, andstore.test.mjswithsource.test.mjspassing three runs in a row.