Skip to content

id(currency_poc): TigerBeetle pin check is a substring test — a drifted 0.17.99 binary passes verify_pinned_version for pinned 0.17.9 #4127

Closed

Description

@dezren39

Problem

verify_pinned_version (pkgs/id/src/currency_poc/harness.rs:46-60) checks the TigerBeetle pin with a substring test:

let text = String::from_utf8_lossy(&output.stdout);
if !output.status.success() || !text.contains(TIGERBEETLE_PINNED_VERSION) {

TIGERBEETLE_PINNED_VERSION is "0.17.9" (harness.rs:28), and "0.17.99", "0.17.90", "0.17.9-anything" — and any other output that merely contains the digits, e.g. in a commit hash or a build suffix — all satisfy contains. The module's stated purpose is the opposite (harness.rs:9-13): the pin "is verified against tigerbeetle version output before a cluster starts, so a developer-machine-only or drifted binary fails loudly instead of silently testing against the wrong release." A drifted 0.17.99 binary passes the gate today and the PoC scenarios run against the wrong release while the harness claims the pin was verified.

Evidence (verified this run, laptop probe, main caacf3a)

Probe crate with a verbatim copy of harness.rs (md5 9dc31fc00143dfb6655f2a7946940005, matching main caacf3a), calling the real verify_pinned_version against stub shell scripts as the "binary":

  • script printing tigerbeetle 0.17.9 → Ok(()) (intended).
  • script printing tigerbeetle 0.17.99 → Ok(()) (the bug: a different, drifted release passes the pin).
  • script printing tigerbeetle 0.16.0 → Err(...) (control: unrelated versions are rejected, so the check works — it is the boundary that is wrong).

Why it matters

The harness is step 0 of the #2289 PoC: its whole value is that scenario results against a "real cluster" are results against the pinned 0.17.9 release. A substring check silently voids that guarantee for any version whose spelling extends the pin (0.17.90+ is a plausible future patch line), producing test evidence attributed to a release that never ran.

Acceptance criteria

  • verify_pinned_version accepts only an exact version match: the version token parsed from the binary's output must equal TIGERBEETLE_PINNED_VERSION (word/token boundary, not substring).
  • Tests (the function is testable without a real binary via a stub executable, as in the probe): 0.17.9 accepted; 0.17.99, 0.17.90, and 0.16.0 rejected; output that contains 0.17.9 only inside a longer token (hash/suffix) rejected.
  • The real binary's actual version output format is accounted for (parse the version field rather than scanning the whole stdout), and the existing ignored cluster smoke test still works with a genuine 0.17.9 binary.
  • All existing currency_poc tests pass unchanged.

Related: #2289 (the PoC this harness belongs to).

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 2, 2026
  4. 33 remaining items

  5. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  8. added a commit that references this issue on Nov 2, 2026
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 | task 6321 done | PR #4526 merged as ad5cb37 (origin/main). verify_pinned_version now parses the first output line for the exact TigerBeetle version <pin> token instead of substring matching. Targeted tests: currency_poc::harness 3 passed, 1 ignored (real-binary smoke). Full pkgs/id lib suite hits a pre-existing stack overflow in cli::tests::module_trust_keys_are_repeatable_and_require_world_mode, reproduced on clean main primary checkout, unrelated to this change. CI on #4526: basic SUCCESS, CodeRabbit NEUTRAL, Codex no findings. Labels status/in-progress, queue/claimed, work/assigned removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions