Skip to content

Native tests: no NOTYET left (NA-JVM or read through the Python API) - #73

Merged
tae898 merged 4 commits into
native-two-distfrom
nyet-to-na-jvm
Oct 25, 2026
Merged

tae898 merged 4 commits into
native-two-distfrom
nyet-to-na-jvm

Conversation

@tae898

@tae898 tae898 commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

The native parity run on this branch is green but reports 31 NOTYET skips, and the release workflow runs final releases with --max-notyet 0, so they would block the first final native arcadedb release. After this change none of them is a NOTYET: each is either a correct NA-JVM (the test needs a JVM by design) or a test that now runs on both builds.

Raise site

get_java_database, get_java_document and the Java object a Schema method returns are JVM-only by design (which-package.adoc, installation.adoc). They now raise NotOnNativeYet through a new needs_jvm() whose message says the call needs the JVM build (the arcadedb-jvm package) instead of "is not on the native backend yet". not_yet() stays for a real gap (none today). The exception class and the NOTYET report are unchanged.

Tests

Relabelled as NA-JVM (rows in NATIVE_NA_JVM_TESTS, the purpose of the test is the Java object):

  • test_float_vector_bulk.py: the five TestDecision tests (the bridge's float-vector decision on the Java database, builds FloatVectors.Matrix; 11 test items), test_convert_python_to_java_float32_is_one_float_array (asserts a Java float[]), test_the_set_holds_one_rid_per_string (the Java RID set of _build_allowed_rids_set).
  • test_percall_calls.py: the four tests that compare the glued path with the plain JPype path (get_java_database, Database._java_parameters, core._through_bridge).
  • test_light_edge_and_view_known_issues.py: the two tests that need light edges in an undeclared edge type (4 items). Only the deprecated Java Vertex.newLightEdge writes them; CREATE EDGE and the graph batch write regular edges there, so no statement can build that graph.
  • test_vector_sql.py: test_create_index_with_native_int8_encoding_sql and test_graph_build_settings_reach_the_index, which read encoding, neighborOverflowFactor and alphaDiversityRelaxation from the Java index metadata. VectorIndex.get_metadata() does not return those three and the native library does not expose them, so the native side would need a Java change (the metadata reply of arcadedb_n_vindex) to run them; not done here.

Rewritten to run on both builds (the Java object was only a means to read a value):

  • test_vector_sql.py: test_create_index_with_rich_metadata_sql, test_sql_metadata_gives_the_helper_defaults, and the hierarchy and quantization part of test_add_hierarchy_defaults_differ_between_sql_and_python now read schema.get_vector_index(...).get_metadata(). Its neighborOverflowFactor/alphaDiversityRelaxation defaults moved into a new test, test_sql_graph_settings_default_to_the_engines, which is NA-JVM for the reason above.
  • test_vector_product_quantization.py: the _metadata helper reads get_metadata(); both metadata tests run on native (including the 26.11.1 branch with rerank_oversample and fused_pq).
  • test_percall_calls.py: shared tests test_named_scalars_round_trip, test_positional_scalars_round_trip and test_a_lone_null_or_lone_java_array_binds_as_the_value (split from the plain-path test) check the bound values without the plain path.

Per file on native (ARCADEDB_BACKEND=native, source checkout, image native-lib/nyet-on-cb, 26.10.2 engine)

file before after
test_float_vector_bulk.py 25 passed, 11 NOTYET, 1 NA-JVM, 2 failed (the JClass and Java-set tests; in the wheel the JPype stub reports one of them as NOTYET) 25 passed, 14 NA-JVM
test_percall_calls.py 30 passed, 8 NOTYET, 5 NA-JVM 34 passed, 8+5 NA-JVM
test_light_edge_and_view_known_issues.py 16 passed, 4 NOTYET 16 passed, 4 NA-JVM
test_vector_sql.py 39 passed, 5 NOTYET, 2 NA-JVM 42 passed, 5 NA-JVM (3 new rows with the 2 existing)
test_vector_product_quantization.py 12 passed, 1 NOTYET 13 passed

Total for the five files: 130 passed, 36 NA-JVM, 0 NOTYET, 0 failed. The image is the newest one that exports arcadedb_n_vindex, which this branch's glue calls; p04-port is newer but lacks it (11 vector tests fail there with an undefined symbol), so it does not match this glue.

JVM backend

Same five files, source checkout, ARCADEDB_BACKEND unset, jars from ~/build-scratch/bridge-jars-port-topk (engine 26.11.1-SNAPSHOT, bridge jar of an older branch) and the system JDK 25 as the bundled JRE:

  • test_float_vector_bulk.py: 39 passed in 2.11s
  • test_percall_calls.py: 47 passed in 1.07s
  • test_light_edge_and_view_known_issues.py: 20 passed in 1.36s
  • test_vector_sql.py: 47 passed in 1.71s
  • test_vector_product_quantization.py: 13 passed in 2.39s

Checks

scripts/check_no_embedded_name.py ok; black and isort clean on the touched files; bandit 1.9.4 at --severity-level low --confidence-level low: 0 issues.

🤖 Generated with Claude Code

tae898 and others added 4 commits October 25, 2026 23:31
…through the Python API

The 31 NOTYET skips of the native parity run were calls that are JVM-only by design (get_java_database, a Java object a Schema method returns) reached by shared tests, so a final release (--max-notyet 0) would have been blocked.

Raise site: needs_jvm() replaces not_yet() for those calls; the message says the call needs the JVM build (arcadedb-jvm) instead of "not yet". not_yet() stays for a real gap.

Tests: the ones whose purpose is the Java object (the bridge's float-vector decision, the plain JPype path, a Java RID set, the deprecated Java newLightEdge, metadata fields only the Java index metadata carries) get NA-JVM rows. The ones that used the Java object only to read a value now read it through VectorIndex.get_metadata() (test_create_index_with_rich_metadata_sql, test_sql_metadata_gives_the_helper_defaults, the hierarchy and quantization part of test_add_hierarchy_defaults_differ_between_sql_and_python, both product quantization metadata tests), and scalar and lone-null binding get shared round-trip tests beside the NA-JVM comparisons with the plain path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…k-format database.py

The fused PQ build test still read the Java field (.fusedPQ) from the dict that _metadata() returns now, which failed on the JVM build. black re-wraps the import line that needs_jvm lengthened.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A bare isort run (no --profile black) had re-wrapped the importer import; only the needs_jvm changes remain in the file's diff.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 0f78c3b into native-two-dist Oct 25, 2026
23 checks passed
@tae898
tae898 deleted the nyet-to-na-jvm branch October 25, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant