Skip to content

client-compat harness: warn on stale MOON_BIN — a days-old binary reports a confident, false result #461

Description

@TinDang97

Problem

scripts/test-client-compat.sh defaults MOON_BIN to "this checkout's release build" = target/release/moon. In an everyday working tree that binary is stale — normal development builds release-fast, and target/release/moon can be days old (it is explicitly quarantined in this repo). The harness reports the resulting divergences as ordinary FAILs with no indication that the binary under test is not the code under test.

Observed cost

2026-08-10, on a tree where the fix was already applied and green:

PASS=94  FAIL=32  WAIVED=26

The failure list looked like a broad regression across unrelated categories. The tell was subtle: one entry reported

FAIL [type] type_sismember_is_integer: integer != boolean
  REDIS: b':1\r\n'
  MOON:  b'#t\r\n'

…from int_to_bool, a function deleted hours earlier. Same tree, MOON_BIN pinned:

PASS=128 FAIL=0 WAIVED=24

A two-day-old binary produced a confident and entirely false compatibility picture. For a harness whose whole purpose is to be the trustworthy oracle-backed verifier, that is the one failure mode it must not have.

Proposed fix

  1. Print provenance in the header, always — resolved MOON_BIN path, mtime, and --version. Cheap, and makes the mistake self-diagnosing.
  2. Warn loudly (or refuse under --strict) when the binary is older than the newest file under src/. A stale binary under --strict should be ERR_STALE_BINARY, consistent with the existing ERR_NO_ORACLE philosophy: "a differential harness with no oracle proves nothing, and a green skip would be a lie." A differential harness testing the wrong binary is the same lie with extra steps.
  3. Consider defaulting to release-fast when it exists and is newer than release.

Related trap

./scripts/test-client-compat.sh | tail reports tail's exit status, not the harness's. Any CI/scripted use must capture the real code. Worth a note in the script header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions