Skip to content

XPathRecordedMatchIT fails on the EMBEDDED conformance lane (rift 0.23.0 and 0.24.0) #349

Closed as not planned

Description

@EtaCassiopeia

Problem

rift-java-conformance/src/test/java/io/github/achirdlabs/rift/conformance/XPathRecordedMatchIT.java:49 asserts imposter.recorded(RequestMatch.of(List.of(body(equalTo("undefined")).xPath("//a").build()))) returns 1 match (the <a><b/>z</a> request, whose //a selection reads as undefined per rift#1495). On CONFORMANCE_TRANSPORT=EMBEDDED it returns 0. The SPAWN lane passes, and the assertion on the line above (equalTo("x")) passes on both lanes.

Evidence

Proposed fix

First step: dump imposter.recorded() for the XPath request on both lanes and diff the recorded body. Working hypothesis: the embedded journal stores or returns the request body differently from the HTTP path (for example via the FFI rift_get_imposter recorded path), so the client-side XPath filter in verify/PredicateEvaluator sees a different body than over HTTP. Once the root cause is confirmed, either fix the embedded body path so both lanes match, or correct the test if the embedded behaviour is the intended contract. Also confirm which CI job runs XPathRecordedMatchIT on the EMBEDDED lane, and add it there if it is missing.

Provenance

Found by an agent while verifying PR #346 (engine 0.24.0 bump), /ship-issues run 21. Out of scope for that work, filed as a follow-up.

Activity

  1. added
    agent-foundFinding discovered by automated agent review
    needs-triageIssue awaiting triage and prioritization
    on Oct 27, 2026
  2. EtaCassiopeia commented on Oct 27, 2026

    @EtaCassiopeia
    CollaboratorAuthor

    Triage: not a product bug. Root cause: a stale rift-java-core SNAPSHOT in ~/.m2 during the local repro

    Root cause

    The repro command runs ./mvnw verify -pl rift-java-conformance without -am. The conformance module therefore resolves rift-java-core:0.3.8-SNAPSHOT from the local ~/.m2 repository instead of building it. The jar there predated #335 (7c6ab16, 2026-10-16), the change that reads an XPath-selected element as its first child, or "undefined" (rift#1495). That older PredicateEvaluator never yields "undefined", so the second assertion gets 0 matches. The first assertion ("x") passes under both versions, which is exactly the observed split.

    The SPAWN run passed because it was a full-reactor verify, which builds core in the reactor. CI is green on every EMBEDDED job because ci.yml:253 runs ./mvnw -pl rift-java-conformance -am verify.

    Evidence (2026-10-27, macOS arm64, JDK 21, v0.24.0 dylib and binary)

    • Fresh worktree at origin/master (9fbaae7), after ./mvnw install -DskipTests -pl rift-java-conformance -am:
      • CONFORMANCE_TRANSPORT=EMBEDDED … -Dit.test=XPathRecordedMatchIT → Tests run: 1, Failures: 0
      • CONFORMANCE_TRANSPORT=SPAWN → Tests run: 1, Failures: 0
    • The recorded bodies are byte-identical on both lanes (<a>x<b/>y</a>, <a><b/>z</a>), so the embedded journal is not involved.

    Resolution

    Closing as not planned. The local-verify recipe should always pass -am, or install core first. Note also that #337 moves recorded(match) onto the engine's verify, which removes the client-side evaluator from this path entirely.

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

    agent-foundFinding discovered by automated agent review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions