Skip to content

Neo4j::Driver false properties compare as empty strings on both backends #2017

Closed

Description

@fglock

Summary

Neo4j::Driver 1.02 returns an unexpected false value for a Neo4j boolean property on PerlOnJava. Its upstream test for false fails on both PerlOnJava backends, although it passes under system Perl 5.42.2.

The observed mismatch is:

got: ''
expected: '0'

This is specific to the Neo4j result path exercised by the test. A standalone JSON::PP decode of false, compared with JSON::PP::false and the string "0", passes on both PerlOnJava backends, so the failure should not be assumed to originate in JSON::PP::Boolean itself.

CPAN evidence

  • Distribution: Neo4j-Driver 1.02 (Neo4j::Driver)
  • CPAN run: 20261109-091152-39587
  • Failing test: t/types.t, subtest Property types: scalar type semantics, assertion false (line 56 in the release)
  • PerlOnJava result: 209/210 assertions pass; 1/21 test programs fails
  • System Perl: all 21 test files and 210 assertions pass under Perl 5.42.2
  • Backends: reproduced on both JVM and interpreter
  • Environment: the upstream test uses its bundled Neo4j HTTP simulator when no Neo4j password is configured; no external Neo4j service is required for this case
  • Native code: the target distribution is pure Perl; no XS/native prerequisite is involved

The focused upstream t/types.t also passes on system Perl and fails on both PerlOnJava backends in the archived build environment.

Reproducer

Run the unmodified upstream t/types.t from Neo4j-Driver-1.02 with its normal lib and t/lib paths and dependencies available:

perl -Ilib -It/lib t/types.t

With no TEST_NEO4J_PASSWORD, Neo4j_Test uses the distribution's local simulator. The failing assertion is:

is $r->get(6), JSON::PP::false, 'false';

Expected: all assertions pass, as on system Perl.

Observed on PerlOnJava: got: '', expected: '0' for the false value on both execution backends.

Related issues and duplicate check

Expected behavior

The decoded false property should compare with JSON::PP::false as it does under system Perl. Add a project-owned regression test that reproduces the Neo4j result conversion using a small local fixture, validates the expected behavior with system Perl first, and passes on both PerlOnJava backends. Investigate the result conversion and boolean representation boundary before changing the general JSON::PP::Boolean contract.

Activity

  1. added
    bug
    area:runtime
    area:cpan-port
    area:backend
    on Nov 10, 2026
  2. fglock commented on Nov 11, 2026

    @fglock
    OwnerAuthor

    State: active
    Agent/session: Codex root-runtime-semantics-20261111
    Scope: #2017 false Neo4j property conversion and stringification.
    Work: fix/runtime-semantics-2007-2017-2006-1980, based on 308a379fc; added JSON boolean equality handling for native booleans compared with JSON::PP/Cpanel/JSON::XS boolean objects and a project regression.
    Checkpoint: 2026-11-11 UTC. neo4j_false_property_boolean.t passes on system Perl and both PerlOnJava backends. The unmodified Neo4j-Driver 1.02 t/types.t passes on system Perl and now passes on PerlOnJava; see /tmp/neo4j-types-system-542.log and /tmp/neo4j-types-jperl-after.log. Full nice -n 19 timeout 3600 make and make check-links pass. The test does not change builtin false stringification.
    Blockers: none.
    Next: include in the combined pull request after final tree review.

  3. fglock commented on Nov 12, 2026

    @fglock
    OwnerAuthor

    Resolved in merged PR #2028. Native booleans now compare consistently with JSON booleans on both backends, without changing builtin false stringification. The focused regression and unmodified Neo4j-Driver t/types.t pass. Closing this report.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendarea:cpan-portarea:runtimebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions