Skip to content

Commit 9f5e958

Browse files
committed
docs(jepsen-zset): strip LLM reviewer artifact markers from comments
Scrub "(gemini MEDIUM)", "(codex P1)", "gemini HIGH", "CodeRabbit finding", etc. from source and test comments. The substantive explanations remain; only the review-trail jargon is removed so the code reads as intentional design rather than a paper trail of iterative bot feedback. Files: - jepsen/src/elastickv/redis_zset_safety_workload.clj (2 sites) - jepsen/test/elastickv/redis_zset_safety_workload_test.clj (many)
1 parent 22e41e1 commit 9f5e958

2 files changed

Lines changed: 42 additions & 42 deletions

File tree

jepsen/src/elastickv/redis_zset_safety_workload.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
;; run survives under zset-key and can produce false-positive
178178
;; safety verdicts in the checker. Log loudly AND re-throw so
179179
;; Jepsen aborts the run instead of silently running against
180-
;; dirty state. (gemini MEDIUM)
180+
;; dirty state.
181181
(try
182182
(car/wcar cs (car/del zset-key))
183183
(catch Throwable t
@@ -769,7 +769,7 @@
769769
[]
770770
read-pairs)
771771
by-kind (group-by :kind all-errors)
772-
;; Vacuous-pass guard (codex P1): if the run produced zero
772+
;; Vacuous-pass guard: if the run produced zero
773773
;; successful reads, we have no evidence that the system
774774
;; under test actually satisfies ZSet safety -- every op
775775
;; may have been downgraded to :info because Redis was

jepsen/test/elastickv/redis_zset_safety_workload_test.clj

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@
7777
(is (not (:valid? result)) (str "expected mismatch, got: " result))))
7878

7979
(deftest single-ok-concurrent-zincrby-still-validates-scores
80-
;; Codex P1: :unknown-score? must NOT be set when exactly one
81-
;; concurrent ZINCRBY is :ok (and therefore has a known resulting
82-
;; score). The read may observe either the pre-op score or the
83-
;; post-op score, both of which are in :scores. An arbitrary
84-
;; impossible score (e.g. 999.0) must still be flagged as a
85-
;; :score-mismatch, not waved through by `:unknown-score?`.
80+
;; :unknown-score? must NOT be set when exactly one concurrent
81+
;; ZINCRBY is :ok (and therefore has a known resulting score). The
82+
;; read may observe either the pre-op score or the post-op score,
83+
;; both of which are in :scores. An arbitrary impossible score
84+
;; (e.g. 999.0) must still be flagged as a :score-mismatch, not
85+
;; waved through by `:unknown-score?`.
8686
(let [history [{:type :invoke :process 0 :f :zadd :value ["m1" 1] :index 0}
8787
{:type :ok :process 0 :f :zadd :value ["m1" 1] :index 1}
8888
{:type :invoke :process 1 :f :zincrby :value ["m1" 5] :index 2}
@@ -130,7 +130,7 @@
130130
(is (:valid? result) (str "expected valid, got: " result))))
131131

132132
(deftest duplicate-members-are-flagged
133-
;; CodeRabbit finding: ZRANGE must not return the same member twice.
133+
;; ZRANGE must not return the same member twice.
134134
;; With a hypothetical committed + concurrent score for the same
135135
;; member, a duplicate could sneak past sort + score-membership
136136
;; checks. Enforce distinctness explicitly.
@@ -143,7 +143,7 @@
143143
(is (not (:valid? result)) (str "expected duplicate-members error, got: " result))))
144144

145145
(deftest overlapping-committed-zadds-allow-either-score
146-
;; CodeRabbit finding: two :ok ZADDs for the same member whose
146+
;; Two :ok ZADDs for the same member whose
147147
;; invoke/complete windows overlap have ambiguous serialization
148148
;; order. Either's resulting score is a valid post-state; the checker
149149
;; must not pin to the higher :complete-idx value only.
@@ -163,7 +163,7 @@
163163
(str "expected valid under overlapping-writes relaxation, got: " result))))
164164

165165
(deftest info-before-read-is-considered-uncertain
166-
;; CodeRabbit finding: an :info mutation that completed before a
166+
;; An :info mutation that completed before a
167167
;; later read may have taken effect. It must be considered a possible
168168
;; source of state for that read, rather than being ignored by both
169169
;; model-before and the concurrent window.
@@ -183,11 +183,11 @@
183183
(str "expected :info-before-read to skip strict score check, got: " result))))
184184

185185
;; ---------------------------------------------------------------------------
186-
;; Stale-read / phantom / superseded-committed checks (gemini HIGH)
186+
;; Stale-read / phantom / superseded-committed checks
187187
;; ---------------------------------------------------------------------------
188188

189189
(deftest phantom-member-is-flagged
190-
;; gemini HIGH: a read that observes a member which was never added
190+
;; A read that observes a member which was never added
191191
;; (no ZADD/ZINCRBY/true-ZREM anywhere) must be rejected.
192192
(let [history [{:type :invoke :process 0 :f :zrange-all :index 0}
193193
{:type :ok :process 0 :f :zrange-all
@@ -199,7 +199,7 @@
199199
(str "expected :unexpected-presence, got kinds=" kinds))))
200200

201201
(deftest phantom-from-info-zrem-still-flagged
202-
;; gemini HIGH (round 2): an :info ZREM is the ONLY history contact
202+
;; An :info ZREM is the ONLY history contact
203203
;; with a member (no ZADD/ZINCRBY ever). Because completed-mutation-
204204
;; window defaults :removed? to true on :info ZREMs (for uncertainty
205205
;; accounting), the checker must NOT treat ZREM as proof the member
@@ -224,7 +224,7 @@
224224
(str "expected :unexpected-presence, got kinds=" kinds))))
225225

226226
(deftest stale-read-after-committed-zrem-is-flagged
227-
;; gemini HIGH: once a ZADD and a subsequent real (:removed? true) ZREM
227+
;; Once a ZADD and a subsequent real (:removed? true) ZREM
228228
;; have BOTH committed (with no concurrent re-add), a later read that
229229
;; still sees the member must be rejected as a stale read.
230230
(let [history [;; Add then remove m1 — both committed before any read.
@@ -243,7 +243,7 @@
243243
(str "expected :unexpected-presence, got kinds=" kinds))))
244244

245245
(deftest superseded-committed-score-is-not-allowed
246-
;; gemini HIGH: a ZADD committed BEFORE another ZADD for the same
246+
;; A ZADD committed BEFORE another ZADD for the same
247247
;; member whose invoke strictly followed it should not be treated as
248248
;; a valid post-state score. Only the latest committed score (plus
249249
;; concurrent in-flight) may be observed.
@@ -267,11 +267,11 @@
267267
;; ---------------------------------------------------------------------------
268268

269269
;; ---------------------------------------------------------------------------
270-
;; Linearization of concurrent ops / uncertain mutations (gemini HIGH batch 2)
270+
;; Linearization of concurrent ops / uncertain mutations
271271
;; ---------------------------------------------------------------------------
272272

273273
(deftest concurrent-zadd-zrem-both-completed-accepts-either-outcome
274-
;; gemini HIGH: ZADD and ZREM for the same member whose invoke/complete
274+
;; ZADD and ZREM for the same member whose invoke/complete
275275
;; windows overlap (both commit before the read) have ambiguous
276276
;; linearization. A linearizable store may serialize either one last,
277277
;; so the read legitimately observes EITHER [["m1" 1.0]] OR [].
@@ -294,7 +294,7 @@
294294
"expected read observing ZREM's outcome (absent) to be accepted")))
295295

296296
(deftest info-zrem-concurrent-with-read-allows-missing-member
297-
;; gemini HIGH: an :info ZREM that might have applied before a read
297+
;; An :info ZREM that might have applied before a read
298298
;; leaves the member's presence uncertain. A ZRANGE that omits the
299299
;; member must NOT be flagged as a completeness failure.
300300
(let [history [;; ZADD m1 committed before the read.
@@ -312,7 +312,7 @@
312312
(str "expected :info ZREM to make absence acceptable, got: " result))))
313313

314314
(deftest info-zincrby-does-not-flag-zrangebyscore-completeness
315-
;; gemini HIGH: a pre-read :info / concurrent ZINCRBY leaves the
315+
;; A pre-read :info / concurrent ZINCRBY leaves the
316316
;; resulting score unknown. ZRANGEBYSCORE filtering on a specific
317317
;; range must not flag the member as missing, because its score may
318318
;; have moved outside [lo, hi].
@@ -359,11 +359,11 @@
359359
(str "expected :missing-member, got kinds=" kinds))))
360360

361361
;; ---------------------------------------------------------------------------
362-
;; Failed-concurrent mutations must not contribute to uncertainty (codex P1)
362+
;; Failed-concurrent mutations must not contribute to uncertainty
363363
;; ---------------------------------------------------------------------------
364364

365365
(deftest failed-concurrent-zrem-does-not-relax-must-be-present
366-
;; codex P1: a concurrent ZREM that completes with :fail did NOT take
366+
;; A concurrent ZREM that completes with :fail did NOT take
367367
;; effect. Its window must NOT make the member's presence uncertain,
368368
;; so a read that omits the member (which was ZADDed and committed
369369
;; beforehand) must be flagged as :missing-member.
@@ -386,7 +386,7 @@
386386
(str "expected :missing-member, got kinds=" kinds))))
387387

388388
(deftest failed-concurrent-zadd-does-not-contribute-allowed-score
389-
;; codex P1: a concurrent ZADD that completes with :fail did NOT take
389+
;; A concurrent ZADD that completes with :fail did NOT take
390390
;; effect. Its score must NOT be added to the allowed set. A read
391391
;; observing that score must be flagged as :score-mismatch rather than
392392
;; being waved through by the failed ZADD's ghost contribution.
@@ -410,11 +410,11 @@
410410

411411
;; ---------------------------------------------------------------------------
412412
;; Chained committed ZINCRBYs: only the linearization-chain tail is a
413-
;; valid final score. Earlier intermediate return values are stale. (codex P1)
413+
;; valid final score. Earlier intermediate return values are stale.
414414
;; ---------------------------------------------------------------------------
415415

416416
(deftest chained-committed-zincrby-rejects-stale-intermediate
417-
;; codex P1: sequential committed ZINCRBYs form a forced linearization
417+
;; Sequential committed ZINCRBYs form a forced linearization
418418
;; chain. The first ZINCRBY's return value is an intermediate that no
419419
;; post-chain read may observe. Expect :score-mismatch on the stale
420420
;; intermediate.
@@ -442,7 +442,7 @@
442442
(str "expected :score-mismatch, got kinds=" kinds))))
443443

444444
(deftest chained-committed-zincrby-accepts-latest
445-
;; codex P1: same history but the read observes the LATEST chain tail
445+
;; Same history but the read observes the LATEST chain tail
446446
;; (6.0) -- accept as valid.
447447
(let [history [{:type :invoke :process 0 :f :zadd :value ["m1" 1] :index 0}
448448
{:type :ok :process 0 :f :zadd :value ["m1" 1] :index 1}
@@ -458,7 +458,7 @@
458458
(str "expected chain-tail score to be accepted, got: " result))))
459459

460460
(deftest concurrent-zincrby-both-admissible
461-
;; codex P1: two overlapping-in-real-time ZINCRBYs whose returned
461+
;; Two overlapping-in-real-time ZINCRBYs whose returned
462462
;; scores are BOTH candidate final states under some linearization.
463463
;; Read observing either value must be accepted.
464464
;; Overlap: A=[inv=2, cmp=5], B=[inv=3, cmp=4].
@@ -484,7 +484,7 @@
484484
"expected A's return value (6.0) admissible under overlap")))
485485

486486
(deftest zadd-resets-zincrby-chain
487-
;; codex P1: a committed ZADD between ZINCRBYs resets the chain --
487+
;; A committed ZADD between ZINCRBYs resets the chain --
488488
;; subsequent ZINCRBYs operate on the new ZADD'd value. The pre-reset
489489
;; ZINCRBY score is NOT a valid read after the chain completes.
490490
(let [base [;; ZADD m1 1
@@ -517,11 +517,11 @@
517517
;; :ok ZINCRBYs with known return values do NOT make the score check
518518
;; unknown -- their return values pin the linearization and the
519519
;; admissible score set is constrained by :scores (candidates + uncertain
520-
;; ok return values). (codex P1)
520+
;; ok return values).
521521
;; ---------------------------------------------------------------------------
522522

523523
(deftest two-ok-concurrent-zincrbys-reject-impossible-score
524-
;; codex P1: two overlapping :ok ZINCRBYs with known return values
524+
;; Two overlapping :ok ZINCRBYs with known return values
525525
;; (3 and 6) constrain the admissible post-chain read set to {1,3,6}.
526526
;; A read of 999 is impossible under any linearization; the checker
527527
;; must flag it as :score-mismatch (no longer swallowed by the old
@@ -545,7 +545,7 @@
545545
(str "expected :score-mismatch, got kinds=" kinds))))
546546

547547
(deftest two-ok-concurrent-zincrbys-accept-known-chain-tail
548-
;; codex P1: same concurrent :ok ZINCRBY history, but the read
548+
;; Same concurrent :ok ZINCRBY history, but the read
549549
;; observes one of the recorded return values. Both 3.0 (linearization
550550
;; where +3 ran first, then +2) and 6.0 (the other order) must be
551551
;; accepted as valid.
@@ -569,7 +569,7 @@
569569
"expected 3.0 (other linearization) to be accepted")))
570570

571571
(deftest info-plus-ok-concurrent-zincrby-stays-unknown
572-
;; codex P1: when at least one concurrent ZINCRBY is :info (unknown
572+
;; When at least one concurrent ZINCRBY is :info (unknown
573573
;; post-op score), the strict score check must be relaxed regardless
574574
;; of how many other :ok ZINCRBYs are concurrent. Any numeric score
575575
;; must be accepted for this read.
@@ -596,11 +596,11 @@
596596
;; ---------------------------------------------------------------------------
597597

598598
;; ---------------------------------------------------------------------------
599-
;; Client setup! / invoke! robustness (gemini MEDIUM)
599+
;; Client setup! / invoke! robustness
600600
;; ---------------------------------------------------------------------------
601601

602602
(deftest setup-bang-hard-fails-when-conn-spec-missing
603-
;; gemini HIGH: if open! failed to populate :conn-spec (unresolvable
603+
;; If open! failed to populate :conn-spec (unresolvable
604604
;; host, etc.), setup! MUST throw rather than silently proceed.
605605
;; Continuing with a no-op setup would leave stale data from a prior
606606
;; run under zset-key and risk false-positive checker verdicts from
@@ -612,7 +612,7 @@
612612
"setup! must throw ex-info when :conn-spec is nil")))
613613

614614
(deftest setup-bang-hard-fails-when-cleanup-del-errors
615-
;; gemini MEDIUM: even when :conn-spec is populated, if the actual
615+
;; Even when :conn-spec is populated, if the actual
616616
;; cleanup (DEL zset-key) fails or errors, setup! must NOT silently
617617
;; proceed. Stale data surviving from a prior run under zset-key
618618
;; would cause false-positive safety verdicts. Propagate the
@@ -626,7 +626,7 @@
626626
"setup! must propagate cleanup failures, not swallow them")))
627627

628628
(deftest zincrby-invoke-handles-nil-response
629-
;; gemini MEDIUM: if car/wcar for ZINCRBY returns nil (error reply
629+
;; If car/wcar for ZINCRBY returns nil (error reply
630630
;; coerced, unexpected protocol edge), the op must complete as :info
631631
;; with a structured :error, not throw NumberFormatException from
632632
;; parse-double-safe swallowing (str nil) -> "nil".
@@ -642,7 +642,7 @@
642642
(str "expected :error to be populated, got: " result))))))
643643

644644
(deftest zincrby-invoke-handles-unexpected-response
645-
;; gemini MEDIUM: same guard, but for a non-string / non-number reply.
645+
;; Same guard, but for a non-string / non-number reply.
646646
;; Must complete :info rather than propagate a parse failure.
647647
(let [client (workload/->ElastickvRedisZSetSafetyClient
648648
{} {:pool {} :spec {:host "localhost" :port 6379
@@ -667,11 +667,11 @@
667667
(is (= ["m1" 7.0] (:value result)))))))
668668

669669
;; ---------------------------------------------------------------------------
670-
;; Vacuous-pass guard (codex P1)
670+
;; Vacuous-pass guard
671671
;; ---------------------------------------------------------------------------
672672

673673
(deftest empty-history-is-unknown-not-valid
674-
;; codex P1: an empty history (e.g. Redis unreachable, all ops
674+
;; An empty history (e.g. Redis unreachable, all ops
675675
;; downgraded to :info) produces zero successful reads. The checker
676676
;; MUST NOT return :valid? true in that case -- that would be a
677677
;; false-green. Expect :valid? :unknown plus a diagnostic :reason.
@@ -683,7 +683,7 @@
683683
(is (zero? (:reads result)))))
684684

685685
(deftest all-info-history-is-unknown-not-valid
686-
;; codex P1: a run where every operation was downgraded to :info
686+
;; A run where every operation was downgraded to :info
687687
;; (Redis unreachable / every read timed out) still has read-pairs
688688
;; filtered down to zero :ok reads. Must surface as :valid? :unknown.
689689
(let [history [{:type :invoke :process 0 :f :zadd :value ["m1" 1] :index 0}
@@ -708,7 +708,7 @@
708708
(str "expected :valid? true with one :ok read, got: " result))))
709709

710710
(deftest zrem-invoke-handles-nil-response
711-
;; gemini MEDIUM: if car/wcar for ZREM returns nil (protocol edge,
711+
;; If car/wcar for ZREM returns nil (protocol edge,
712712
;; closed connection, etc.), `(long nil)` would throw NPE and the
713713
;; op would be logged as a generic failure via the general Exception
714714
;; handler. Guard with `(or removed 0)` so the op resolves cleanly
@@ -736,7 +736,7 @@
736736
(is (= ["m1" true] (:value result)))))))
737737

738738
(deftest parse-withscores-handles-inf-strings
739-
;; gemini HIGH: Redis returns "inf" / "+inf" / "-inf" for infinite
739+
;; Redis returns "inf" / "+inf" / "-inf" for infinite
740740
;; ZSET scores. Double/parseDouble expects "Infinity"; the workload's
741741
;; parser must normalize both encodings instead of throwing.
742742
(let [flat ["m-pos" "inf"

0 commit comments

Comments
 (0)