Skip to content

test: recursion_limit=1024 on remaining 22 test files (final fan-out)#8

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/phase-2-recursion-batch
May 16, 2026
Merged

test: recursion_limit=1024 on remaining 22 test files (final fan-out)#8
AdaWorldAPI merged 1 commit into
mainfrom
claude/phase-2-recursion-batch

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Final fan-out of the #[recursion_limit = "1024"] pattern started in Sprint O (#1, tests/create.rs) and Sprint S (#5, 7 CRUD files). Brings all 30 surrealdb/core/tests/*.rs files to a uniform state so the full upstream integration suite can be exercised under SURREAL_TEST_KV=lance without compile-time recursion errors.

Files (22)

access.rs       cache.rs        function.rs    param.rs    sequence.rs
alter.rs        changefeeds.rs  future.rs      query.rs    table.rs
asyncevent.rs   complex.rs      index.rs       remove.rs   timeout.rs
auth_limit.rs   define.rs       info.rs        script.rs   util.rs
field.rs        live.rs

Why

When both kv-lance and kv-mem features are enabled (the combination is needed for SURREAL_TEST_KV=lance routing via helpers.rs::new_ds, because upstream iam/file.rs requires tempfile which is kv-mem-gated), the async-trait expansion in surrealdb_core::expr::expression::Expr::compute exceeds rustc's default recursion limit of 128.

Same compile-time error pattern as #1 + #5:

error: queries overflow the depth limit!
  help: consider increasing the recursion limit
  note: query depth increased by 130 when computing layout of
        {async fn body of surrealdb_core::expr::expression::Expr::compute()}

Mechanical change

Each file gets a single line: #[recursion_limit = "1024"] prepended to line 1. Rust permits inner attributes in any order, so files that already had #[allow(...)] or #[cfg(...)] inner attrs are unaffected. Zero runtime cost.

Coverage after this PR

Sprint PR Files
O #1 create.rs
S #5 select.rs, update.rs, delete.rs, insert.rs, upsert.rs, merge.rs, relate.rs
V this 22 files (the rest)

Total: 30/30 integration test files.

Test plan

  • CI default build untouched (no feature change, prepend is pure inner-attribute).
  • cargo check --tests --features "kv-lance kv-mem" --no-default-features compiles all 30 test binaries (verified locally; running in background at PR-creation time).
  • Behavioral pass-rate signal per test file under SURREAL_TEST_KV=lance is the next-sprint deliverable; that data will be aggregated into .claude/lance-backend/KNOWN_DIFFERENCES.md as semantic gaps are found.

Followups

After this PR, the open KNOWN_DIFFERENCES items are:

  • Mixed writes+deletes commit non-atomic (Lance API limitation; sequential).
  • Multi-bucket BindSpace sharding (Phase 2 throughput; architectural).
  • lance-graph Cypher engine as SurrealQL function (Phase 3).
  • blasgraph GraphBLAS algebra (Phase 3).
  • Benchmarks vs RocksDB / SurrealKv.
  • Per-file pass rate aggregation under SURREAL_TEST_KV=lance.

Generated by Claude Code

Completes the recursion_limit fan-out started in Sprints O (#1) and
S (#5). All surrealdb/core/tests/*.rs files now carry the attribute
so the upstream integration suite can be exercised against kv-lance
via SURREAL_TEST_KV=lance without compile-time recursion errors.

Files in this PR (alphabetical):
- access.rs
- alter.rs
- asyncevent.rs
- auth_limit.rs
- cache.rs
- changefeeds.rs
- complex.rs
- define.rs
- field.rs
- function.rs
- future.rs
- index.rs
- info.rs
- live.rs
- param.rs
- query.rs
- remove.rs
- script.rs
- sequence.rs
- table.rs
- timeout.rs
- util.rs

Each file gets a single line: `#![recursion_limit = "1024"]` at the
top (prepended to line 1). Inner attributes can appear in any order
in Rust, so files that already had `#![allow(...)]` etc. are
unaffected by the prepend.

Combined with the 8 files done in O + S (create, select, update,
delete, insert, upsert, merge, relate), this covers all 30
integration test files in surrealdb/core/tests/.

Verification: per-PR cargo check + targeted per-file test runs
under SURREAL_TEST_KV=lance will surface real semantic gaps in the
kv-lance backend (separate from compile errors). Those land as
followup sprints.
Copy link
Copy Markdown
Owner Author

Meta-V verified locally

cargo check --tests --features "kv-lance kv-mem" --no-default-features
→ Finished `dev` profile in 2m 59s, 0 errors

All 30 test binaries (including the 22 in this PR) compile cleanly under the combined kv-lance + kv-mem feature set. The remaining warnings (e.g., (test "remove") generated 1 warning) are pre-existing and unrelated to the recursion_limit additions.

Ready for merge.


Generated by Claude Code

@AdaWorldAPI AdaWorldAPI marked this pull request as ready for review May 16, 2026 02:25
@AdaWorldAPI AdaWorldAPI merged commit 0c0f0da into main May 16, 2026
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.

2 participants