ReviewOS

home-lang/home

Port Valkey GC and RESP line-bound reliability corpus

#320
Closed chris opened this 10 days ago ·
10 days ago

Bun compatibility slice

Port js/valkey/valkey-gc.test.ts at exhaustive corpus position 4080.

Required behavior

  • preserve RedisClient GC safety after argument validation failures, foreign-receiver setters, and many short-lived clients;
  • reject an unterminated RESP scalar line beyond the 512 KiB bound with ERR_REDIS_INVALID_RESPONSE;
  • accept a properly terminated 100,000-byte simple string;
  • preserve adopted Buffer backing-store integrity across GC-heavy bulk, empty, null, and verbatim replies;
  • surface parse operation, endpoint, line length/bound, and retained causes without credential/path leakage;
  • cover all five active tests in focused and permanent gates.

Tracked from #66 and adjacent to #318.

10 days ago

Implemented and pushed in 25d0a6af0.

All five active Valkey GC/reliability cases now pass. RedisClient GC subprocesses return cleanly after validation errors, foreign receiver setter checks, and short-lived instance churn. The RESP line test rejects a 600,001-byte unterminated scalar with ERR_REDIS_INVALID_RESPONSE, then accepts the 100,000-byte terminated value intact. The GC-heavy adopted-buffer workload also completes cleanly.

The scalar-line error retains valkey.parse, endpoint, lineLength, maxLineLength (512 KiB), and its original RangeError cause while redacting credentials, database paths, and query secrets.

Verification:

  • focused position 4080: 5 passed, 0 failed, 0 todo, 0 unsupported;
  • adjacent positions 4079–4080: 5 passed, 1 conditional todo, 0 failed, 0 unsupported;
  • permanent mini-suite: passed, including 48 structured-error diagnostics;
  • formatting and diff checks: passed.

Sign in to comment on this issue.