Skip to content

Remove redundant and outdated comments, and fix the workarounds they explained - #299

Merged
ghostdogpr merged 1 commit into
mainfrom
comments-cleanup
Nov 23, 2026
Merged

ghostdogpr merged 1 commit into
mainfrom
comments-cleanup

Conversation

@ghostdogpr

Copy link
Copy Markdown
Owner

Summary

A pass over every // comment, and over Scaladoc outside the public API, in main sources, tests, examples and benchmarks. Main code changes only in comments.

 comments
-  186 that repeat the code (section banners, restated names)
~  17 that no longer matched the code: 12 rewritten, 5 deleted
-  references to a design note that is not in the repository (one comment, two test names)
-  comments that explained away a shortcut, now fixed in the code:
integration-tests
├── ContainerClient          # uses CIO.acquireReleaseWith, now compiles on every cell; hand-written fold removed
├── ClientAssertions (new)   # helpers shared by ContainerClient and the conformance BothServersSuite (was a copy)
├── ClusterMultiMasterSuite  # scanAll and SCRIPT/FUNCTION LOAD broadcast moved here from ClusterSuite, asserted on every master
└── HashesSuite, StringsSuite  # hash field expiration and MSETEX run on Valkey 9.1.0 too
sage-client tests
├── DedicatedPoolSpec        # waits for the waiter to park instead of Thread.sleep
├── ClusterClientSpec        # waits for offloaded refreshes and asserts exact counts instead of Thread.sleep and >=
└── ConnectSpec              # ReplicaPreferred on Standalone no longer depends on a local server

Left as they were, with their comments:

  • RespParser.build: a closed aggregate kind would turn the Byte tableswitch into an equality chain on the parser's hot path.
  • CIO.foreachDiscard with explicit concurrency: still fails to compile on the Future cell, inside kyo-compat-future.
  • xCfgSet: requiring one option in the signature is a breaking API change, left for later.

Evidence

  • Before: the refresh tests in ClusterClientSpec slept 150 to 300 ms on the real scheduler and asserted >= 2 / >= 3 CLUSTER SLOTS; the scan and broadcast cluster tests ran on one master and asserted targets.nonEmpty.
    After: they assert exactly 2, then 3, and one scan target per master. clientZio/testOnly ClusterClientSpec ConnectSpec DedicatedPoolSpec passed 5 runs in a row; *ClusterMultiMaster* 22/22 on Redis and Valkey.
  • fmt, check, Test/compile on every backend including Future, testUnit, docAll, and itZio, itCe, itOx, itPekko, itKyo, itDirect pass.

Merge Danger

Door: two-way

Blast Radius: tests

No main code or public API changes. The test changes affect CI only, through the cluster integration fixtures and the conformance build (build.sbt adds ClientAssertions.scala to its sources).

…explained

Delete comments that only repeat the code, correct comments that no longer match it, and fix the code behind comments that explained away a shortcut: test sleeps, a test that depended on a local server, cluster tests that ran on one master, and helpers copied between the integration and conformance suites.
@ghostdogpr
ghostdogpr merged commit c921cb5 into main Nov 23, 2026
13 checks passed
@ghostdogpr
ghostdogpr deleted the comments-cleanup branch November 23, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant