Repository navigation
Fix cursor pagination with ORDER BY returning zero items on subsequent pages - #3
Merged
makr-code merged 3 commits intoNov 5, 2025
Conversation
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Fix cursor pagination ORDER BY+LIMIT behaviour and make test robust
Fix cursor pagination with ORDER BY returning zero items on subsequent pages
Nov 3, 2025
makr-code
approved these changes
Nov 3, 2025
makr-code
marked this pull request as ready for review
November 3, 2025 12:23
makr-code
deleted the
copilot/fix-150588092-1085539157-63ec51c6-6e96-4b34-a99a-9b67bd231ecf
branch
November 30, 2025 11:50
makr-code
added a commit
that referenced
this pull request
Dec 6, 2025
…-63ec51c6-6e96-4b34-a99a-9b67bd231ecf Fix cursor pagination with ORDER BY returning zero items on subsequent pages
This was referenced Dec 17, 2025
Copilot AI
added a commit
that referenced
this pull request
Dec 22, 2025
… Write Buffer optimization docs Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Jan 5, 2026
…EmbeddedLLM Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Jan 5, 2026
Protect iterator operations from concurrent database closure: - Added db_lifecycle_mutex_ to guard database lifecycle - Added active_operations_ atomic counter to track ongoing operations - Implemented OperationGuard RAII class for safe operation scoping - Updated scanPrefix(), scanRange(), scanAll() to use OperationGuard - Modified close() to wait for active operations before shutting down This prevents use-after-free crashes when close() is called while long-running iterations are in progress. Note: newIterator() and newAsyncIterator() methods still have lifecycle issues as they return iterators to callers - these require API changes or shared_ptr conversion for complete fix. Co-authored-by: makr-code <[email protected]>
This was referenced Jan 5, 2026
This was referenced Jan 5, 2026
Merged
Merged
7 of 22 tasks
Merged
8 of 21 tasks
Copilot AI
added a commit
that referenced
this pull request
Mar 23, 2026
…ecordingCoTTracer + CoTTraceCollector (v1.7.0) - IChainOfThoughtTracer: onStepBegin/onStepEnd noexcept + CoTSpanRecord - RecordingCoTTracer: in-memory span store (spans/reset/toJson) - CoTTraceCollector: fan-out tracer (addTracer/removeTracer/totalStepsTraced) - ChainOfThoughtBuilder: attachTracer/detachTracer/hasTracer; build() fires per-step callbacks - 30 tests, CI: cot-tracer-ci.yml - CHANGELOG [1.7.0], ROADMAP Phase 5 item 1 done, FUTURE_ENHANCEMENTS ✅ - German docs + missing-implementations.md item #3 resolved Co-authored-by: makr-code <[email protected]> Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/285c4136-94c2-42d9-9fc4-4a5544ceda78
Copilot AI
added a commit
that referenced
this pull request
Apr 7, 2026
- TODO #1: Add idle-timeout background thread to TumblingWindow and SlidingWindow (idleTimeoutLoop). When no events arrive for idle_timeout duration the watermark is advanced to now minus max_out_of_orderness and expired windows are closed and emitted. Tracks last_event_us_ atomically; thread started only when idle_timeout > 0ms; stopped safely before state teardown. - TODO #2: Store partition_key in TumblingWindow::InternalWindow and SlidingWindow::InternalWindow. Set on window creation from the creating record's partition_key. Propagate to WindowResult in computeResult(). Update SlidingWindow::ensureWindowsExist signature to accept const std::string& partition_key. - TODO #3: Track Session::has_late_records (default false). Set to true whenever a late record (ev_us < wm with allow_late_data) is added to a session in ingest(). Pass to computeResult() in ingest(), flush(), and expiryLoop() so is_late_firing is correctly set on timer-driven and gap-triggered session closures. - TODO #4: Add session_expiry_interval_ms to StreamingWindowPipeline::Config. Update session() factory to accept optional expiry_interval_ms parameter. Forward to SessionWindowConfig::session_expiry_check_interval_ms in build(). - TODO #5: Replace O(N) inner loop in SlidingWindow::ensureWindowsExist and HoppingWindow::ensureWindowsExist with unordered_set<int64_t> window_start_set_ for O(1) duplicate detection. Keep set in sync on window creation and pruning in closeExpiredWindows(). - TODO #7: SessionWindow::computeResult() now accepts bool late = false and sets r.is_late_firing = late. All call-sites in ingest(), flush(), and expiryLoop() pass s.has_late_records. - TODO #8: RESOLVED (no code change needed) — closeExpiredWindows() duplicate results on shutdown. Co-authored-by: Copilot <[email protected]> Co-authored-by: makr-code <[email protected]>
This was referenced Apr 7, 2026
Copilot AI
added a commit
that referenced
this pull request
Apr 13, 2026
…(Issue #3 Maßnahme #7) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/8f538ca2-68d5-4ff7-96b3-a88d8cf99a11 Co-authored-by: makr-code <[email protected]>
4 of 25 tasks
makr-code
added a commit
that referenced
this pull request
Apr 13, 2026
…(Issue #3 Maßnahme #7) (#4599) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/8f538ca2-68d5-4ff7-96b3-a88d8cf99a11 Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
6 of 25 tasks
Copilot AI
added a commit
that referenced
this pull request
Apr 13, 2026
…te gate, add CI workflow
- Add explicit add_executable(bench_policy_evaluation) to benchmarks/CMakeLists.txt.
The file only uses a mock PolicyEngine (no real deps), so it only links
${BENCHMARK_LIBS} + Threads::Threads.
- Fix cmake/SuiteGating.cmake: security suite group was gated behind enterprise
features (THEMIS_ENABLE_HSM_REAL, THEMIS_ENABLE_S3, etc.) or ENTERPRISE edition.
Core security benchmarks (AES-GCM, RBAC, policy evaluation, audit log) rely
only on OpenSSL + themis_core, so the gate is now unconditional (set TRUE).
This ensures bench_security, bench_policy_evaluation,
bench_governance_policy_latency, and bench_compliance_security_governance are
included in themis_benchmarks_all_eligible in every build configuration.
- Update tools/perf_expectations_audit.py check #3 to also verify
bench_policy_evaluation source + CMake target.
- Add .github/workflows/02-feature-modules_security_security-governance-benchmark-ci.yml:
dedicated CI job that builds all four security/governance benchmark targets and
smoke-runs them (--benchmark_min_time=0.1s). Triggers on PR/push touching
security/governance sources, benchmarks/CMakeLists.txt, or SuiteGating.cmake.
Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/d6e2f482-7cef-4e7c-9aa1-4761870b3176
Co-authored-by: makr-code <[email protected]>
makr-code
added a commit
that referenced
this pull request
Apr 13, 2026
…ile (#4634) * Initial plan * fix(benchmarks): add bench_policy_evaluation target, fix security suite gate, add CI workflow - Add explicit add_executable(bench_policy_evaluation) to benchmarks/CMakeLists.txt. The file only uses a mock PolicyEngine (no real deps), so it only links ${BENCHMARK_LIBS} + Threads::Threads. - Fix cmake/SuiteGating.cmake: security suite group was gated behind enterprise features (THEMIS_ENABLE_HSM_REAL, THEMIS_ENABLE_S3, etc.) or ENTERPRISE edition. Core security benchmarks (AES-GCM, RBAC, policy evaluation, audit log) rely only on OpenSSL + themis_core, so the gate is now unconditional (set TRUE). This ensures bench_security, bench_policy_evaluation, bench_governance_policy_latency, and bench_compliance_security_governance are included in themis_benchmarks_all_eligible in every build configuration. - Update tools/perf_expectations_audit.py check #3 to also verify bench_policy_evaluation source + CMake target. - Add .github/workflows/02-feature-modules_security_security-governance-benchmark-ci.yml: dedicated CI job that builds all four security/governance benchmark targets and smoke-runs them (--benchmark_min_time=0.1s). Triggers on PR/push touching security/governance sources, benchmarks/CMakeLists.txt, or SuiteGating.cmake. Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/d6e2f482-7cef-4e7c-9aa1-4761870b3176 Co-authored-by: makr-code <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
makr-code
added a commit
that referenced
this pull request
Apr 14, 2026
…ile (#4634) * Initial plan * fix(benchmarks): add bench_policy_evaluation target, fix security suite gate, add CI workflow - Add explicit add_executable(bench_policy_evaluation) to benchmarks/CMakeLists.txt. The file only uses a mock PolicyEngine (no real deps), so it only links ${BENCHMARK_LIBS} + Threads::Threads. - Fix cmake/SuiteGating.cmake: security suite group was gated behind enterprise features (THEMIS_ENABLE_HSM_REAL, THEMIS_ENABLE_S3, etc.) or ENTERPRISE edition. Core security benchmarks (AES-GCM, RBAC, policy evaluation, audit log) rely only on OpenSSL + themis_core, so the gate is now unconditional (set TRUE). This ensures bench_security, bench_policy_evaluation, bench_governance_policy_latency, and bench_compliance_security_governance are included in themis_benchmarks_all_eligible in every build configuration. - Update tools/perf_expectations_audit.py check #3 to also verify bench_policy_evaluation source + CMake target. - Add .github/workflows/02-feature-modules_security_security-governance-benchmark-ci.yml: dedicated CI job that builds all four security/governance benchmark targets and smoke-runs them (--benchmark_min_time=0.1s). Triggers on PR/push touching security/governance sources, benchmarks/CMakeLists.txt, or SuiteGating.cmake. Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/d6e2f482-7cef-4e7c-9aa1-4761870b3176 Co-authored-by: makr-code <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Apr 19, 2026
…rce code - analytics/README.md: add streaming_join.cpp to interface table; note SARIMA/PROPHET are enum-defined but not yet implemented in forecasting.cpp - analytics/ARCHITECTURE.md: same forecasting clarification; add streaming_join.cpp row; update Known Limitations (AutoML/SARIMA status) - analytics/AUDIT.md: fix test paths to tests/analytics/; update findings with Evidence: file:line format per AUDIT.md rules - analytics/ROADMAP.md: correct AutoMLEngine → AutoML class name; add note that SARIMA/PROPHET enum values exist but switch-case handlers are missing - prompt_engineering/ARCHITECTURE.md: add all 23 implemented components to Key Components table; update Known Limitations (token counting now provided via ContextWindowBudgetManager) - prompt_engineering/AUDIT.md: close OI-01..OI-04 (all implemented) - prompt_engineering/CHANGELOG.md: remove already-implemented items from Unreleased; merge duplicate [2.0.0] header into single release block - prompt_engineering/SECURITY.md: update Supported Versions (2.0.x active); correct KL-01 (ContextWindowBudgetManager exists; approximation noted) - rpc_grpc/README.md: update version 0.0.1 → 0.2.0; add BidiStreamAdapter to Component Table - rpc_grpc/ARCHITECTURE.md: update version/date; add BidiStreamAdapter class row; fix Known Limitations (uptime tracking done; reloadTls implemented) - rpc_grpc/SECURITY.md: fix GRPC-SEC-01 (hot-reload IS implemented in v0.2.0; only existing-session renegotiation is by-design limitation) - rpc_grpc/FUTURE_ENHANCEMENTS.md: mark BidiStreamAdapter (#3) and TLS Hot-Reload (#4) as ✅ Implemented (v0.2.0) - src/rpc_grpc/grpc_plugin.cpp: fix getVersion() return value from "1.0.0" to "2.0.0" to match CHANGELOG v0.2.0 entry and test expectation Co-authored-by: Copilot <[email protected]> Co-authored-by: makr-code <[email protected]>
11 of 25 tasks
Copilot AI
added a commit
that referenced
this pull request
May 8, 2026
…ry update, MCP StdioReadFn Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/5af5fc0a-679f-4a34-83d1-d92dfd294401 Co-authored-by: makr-code <[email protected]>
Merged
15 of 18 tasks
14 of 57 tasks
makr-code
added a commit
that referenced
this pull request
Jul 16, 2026
…ld-strategy [EPIC #3] Define recovery, rebuild, and erasure strategy for distributed tensor artifacts
makr-code
added a commit
that referenced
this pull request
Jul 17, 2026
…rk-implications [EPIC #3] Hardware & network assessment for distributed tensor artifact fabric
Merged
14 of 59 tasks
Copilot AI
added a commit
that referenced
this pull request
Aug 15, 2026
Add comprehensive test suite for Phase 5 C++ safety fixes:
1. test_index_destructor_safety.cpp (338 lines, 10 tests)
- VectorIndexManager destructor exception handling
- GPUVectorIndex destructor exception safety
- Noexcept verification (static_assert)
- HNSW resource cleanup validation
- Tests: destructor no-throw, exception during shutdown, stack unwinding,
multiple calls, concurrent destruction, GPU variants
2. test_index_iterator_validity.cpp (411 lines, 10 tests)
- Snapshot pattern validation for iterator safety
- Partition removal stress tests (500+ partitions)
- Concurrent add/remove patterns (TSan validation)
- Data operations concurrent with partition removal
- Tests: safe removal, stress, concurrent access, interleaved patterns,
snapshot semantics, edge cases (empty, duplicates)
3. test_index_gpu_memory_safety.cpp (458 lines, 10 tests)
- GPU resource allocation/deallocation pairing (RAII)
- Memory leak detection across init/destroy cycles
- Exception safety during GPU initialization
- Large allocation handling near GPU memory limits
- Tests: basic allocation, leak detection, exception cleanup, large allocations,
concurrent management, explicit shutdown, idempotency, state validation
CMakeLists.txt Updates:
- Auto-discovery of test_index_*.cpp files preserved
- Conditional CUDA linkage for GPU tests when THEMIS_CUDA_ENABLED=ON
- Proper test registration via themis_register_module_focused_test()
Validation Coverage:
✓ 30 comprehensive tests (10 per test file)
✓ Exception safety (try/catch scenarios)
✓ RAII patterns (noexcept destructors)
✓ Memory safety (allocation/deallocation tracking)
✓ Concurrency (TSan-compatible multi-threaded tests)
✓ Edge cases (empty, large scale, duplicate operations)
✓ Timeout: 120s per test (reasonable for Phase 5 workloads)
Build Integration:
- Compile: cmake --build . -j 16 (automatically discovered)
- Run: ctest -R "test_index_(destructor|iterator|gpu)" --output-on-failure
- Sanitizers: Built-in support for ASan/TSan/UBSan
- No additional dependencies beyond existing test infrastructure
Fixes Phase 5 Blocker #6 (MEDIUM) by providing regression test coverage
for fixes #1-4:
Fix #1: VectorIndexManager::~VectorIndexManager() noexcept (line 94)
Fix #2: releaseHnswResources_() helper for safe cleanup (line 304)
Fix #3: GPUVectorIndex::~GPUVectorIndex() noexcept (line 121)
Fix #4: Iterator invalidation fix via snapshot pattern (line 107)
All tests are production-ready and CI/CD compatible.
Co-authored-by: makr-code <[email protected]>
Merged
17 of 57 tasks
Copilot AI
added a commit
that referenced
this pull request
Aug 17, 2026
…critical gate, integrate SRG benchmarks BLOCKER_FIX_1: Add release_critical label to SCR-01..16 tests - File: tests/sharding/CMakeLists.txt:421 - Enables fail-closed verification in Wave A gate BLOCKER_FIX_2: Add Wave A Release-Critical CI verification step - File: .github/workflows/ci-build.yml (new step after main ctest) - Runs 108 release_critical tests (TXC/FLR/FI/SCR suites) - Expected runtime: ~5-10 min - Verifies Wave A exit criterion #3 BLOCKER_FIX_3: Integrate SRG-01..06 benchmarks in CI pipeline - File: .github/workflows/ci-benchmarks.yml (new sharding-release-gates job) - Runs all 6 Wave A baseline benchmarks - Validates p95/p99 against thresholds - Expected runtime: ~20-30 min - Verifies Wave A exit criterion #4 All fixes ready for immediate deployment to develop branch. Co-authored-by: makr-code <[email protected]>
35 of 57 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cursor pagination with
ORDER BY + LIMITcould return zero items on page 2+ when the query engine's cursor-anchored scan fetched exactlylimititems, then equality predicates filtered some out post-positioning.Changes:
HTTP server (
src/server/http_server.cpp): Added safety margin to fetch limit for cursor queriesScales margin with predicate count to handle filtering after cursor positioning.
Test (
tests/test_http_aql.cpp): Enhanced diagnostics to log full response bodies and cursor token when batch_size is zero.Fixes job ref:
7e043e7ac8cba31c61c9812621298ea3ef7122b1Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.