Skip to content

Prepare composable exact chemistry search and generated Ruby importer SDK - #6

Draft
xrl wants to merge 64 commits into
cheminee/distributed-graph-searchfrom
cheminee/importer-campaign
Draft

xrl wants to merge 64 commits into
cheminee/distributed-graph-searchfrom
cheminee/importer-campaign

Conversation

@xrl

@xrl xrl commented Oct 17, 2026 •

Copy link
Copy Markdown

Exact-head CI at d2db5ee7: all five workflows passed — general CI, chemistry, DataFusion, dependency comparison, and pilot qualification. Existing inherited security and merge/publication holds remain.

CA-root repair qualified at d2db5ee7df68ae376f56dbf2c40a4fad77d579b7 in successful pilot run 39911775203. The runtime now includes the distro CA bundle (120 parsed CA certificates), hash-bound provenance and SSL_CERT_FILE. Actual-image S3 initialization passed signed HEAD200→GET403 control; a fresh empty-root control reproduced the expected TrustStore panic with zero requests. TLS verification was not bypassed. Native catalog import/query, refresh/rollback, clean restart and fresh-root restore/rollback also passed. Hosted checks:45 Python guard tests,71 Ruby tests/696 assertions and13 scoped Rust schema/API tests. Independent Astra review verified source and runtime evidence.

Replacement artifact 12483324160 — 962,804,294 bytes, expires October 30; ZIP SHA256 704dc3e31061b106f9835ea3c25aae53ad1cb6254dbdb63b84ff18fd9136cc3d. Image tar SHA256 dd687a5d4189d9cfd0609881045f4b52a03dab1a514b5027aa553f8dbfc7fdeb; paired gem SHA256 a31273132502dca6698e408da2fae74550701ed6078ba3e7eba48a31fa27d28e. This supersedes 7a303e31 for the paused PR7 kind/SeaweedFS test. The S3 smoke uses a local HTTP fixture and does not establish TLS-handshake or object-store qualification; PR7 must rerun real 100k acceptance. Logs/artifact metadata were verified; raw artifact bytes were not downloaded here. No merge/publication occurred.

October 23 pilot: 7a303e31c88a611f54cd57d2a01de28a64a00d10 passed native image/paired SDK qualification. Real installed-gem/native HTTP acceptance covered 10,001 synthetic offers repeating 20 structures, complete partition audits, native queries, refresh/rollback, clean restart/readback and quiesced restore into distinct fresh data/journal roots followed by rollback. This is local-file lifecycle evidence, not 100k/kind/object-store, crash/WAL, HA or sizing proof. Hosted checks also passed 26 Python guards, 13 scoped Rust schema/API tests and 71 Ruby tests / 696 assertions; counts overlap prior reports. Independent Astra source/readiness review is recorded.

Accepted artifact 12479274343, expires October 30: ZIP SHA256 afd5f309c00195f12aa90910f3a81135b263d5feaa4ef02d7b57d622717c83d3. It contains the image, matching generated SDK, schema/model/build provenance, acceptance and restore inventories. Image archive: 962,048,000 bytes, SHA256 e9aaeb4ebf6214f2bb1da9d10e22ea845b43232e96046102695710829167f75e. Gem: 99,840 bytes, SHA256 b7eb3baf426a1f7578346ada9fc61e9c04ec8b3a8ce1be482f736618abd2cc0f. The logs and artifact metadata were verified; bytes were not downloaded through the workspace's blocked artifact proxy. No registry/package publication occurred. Separate hosted 100k acceptance owns the next integration gate.

Merge/release security hold remains: PR #3's dependency comparison reports protobuf 2.27.1 (RUSTSEC-2024-0437) and ZIP 0.6.6 (RUSTSEC-2026-0367/0368/0369), RustSec database 640bf5a9f06e66d8721e8772766531fe77c8630d. PR #6's green delta against PR #3 does not clear those findings.

The separate fresh task owns the real 100k native Cheminee/Ruby/kind/object-store acceptance. The local hosts remain capacity/network constrained; the owner has authorized the separate task to implement bounded GitHub Actions kind/SeaweedFS acceptance using this prebuilt candidate. No completed kind run is claimed. See build instructions and acceptance requirements. Cheminee remains the public facade; Quickwit is the engine. RX search is untouched. No merge, production deployment, registry/package publication or credential creation occurred. Earlier results below retain their original revisions and scope.

Description

Prepare exact composable chemistry queries and a generated Ruby importer client for supplier catalog search. The candidate adds explicit candidate-domain verification, split-schema and timestamp-boundary fixes, ingest acknowledgement handling, a fail-closed Ruby exact-search adapter, and local Compose/readiness/resource tooling. Catalog-generation examples distinguish acceptance, persistence, publication and searchable state; local journal tests do not establish distributed durability.

Stacked base: cheminee/distributed-graph-search at 6bf1e29cdbf03409287b2f7d0e59a4c19534d8fa (open PR #3). The original unpublished chemistry history is preserved. Do not retarget main, which lacks these prerequisites.

Dependency remediation updates compatible Rust/AWS/OpenDAL/Inferno packages, preserves per-operator verified TLS and profiling, updates generated Ruby to Faraday 2.14.3, and replaces vulnerable Python bootstrap vendors with hash-bound wheel installation. Narrow LRU panic-safety and separate mutable-borrow lifetime backports retain the existing Tantivy/Chitchat pins and dependency graph, without changing format or protocol code. Verified vendor provenance and separate registry-identity scans retain both original advisory rows: the historical October 19 database reported 9 raw and 11 identity-preserving matches (10 advisory IDs), with zero introduced. Fresh October 22 CI initially reported 14 matches, including newly introduced RUSTSEC-2026-0382. Commit 74489aae precisely updates rustls-webpki to 0.103.16 and roots/root-certs to 1.0.10; the same current RustSec database now reports 11 retained matches and zero introduced. The reviewed LRU defects are technically repaired; retained original-identity matches do not mean those defects remain in the patched source. The four-combination Chitchat UDP parent gate now passes; the disposable published-index reopen gate also passes; broader Quickwit compatibility remains open. This is not a clean full audit.

Draft for independent review only. Merge, package publication, deployment and production-catalog changes remain held. No optimization benchmark trial has started.

Validation

Historical October 22 head: 92f70212, a documentation-only result/claim correction after executable head cacccfca928dd85e0d9914cd19c17cda341bdc27. New-head checks are separate; the results below belong to cacccfca.

All four workflows passed: general CI, chemistry, DataFusion, and dependency review.

  • 2,908 workspace tests passed, six skipped; explicit transport (8), TLS (7), GCS (4), profiling (4), REST and lint checks passed. Counts overlap.
  • 1,050 chemistry oracle checks, generated-client parity and 17 HTTP probe oracle/lifecycle tests passed.
  • Actual revision-pair index qualification passed: freshly built c774b166 baseline and cacccfca candidate, baseline write → candidate reopen/append → candidate restart → baseline reopen. The probe enforces embedded revisions, full source equality, counts, ordered pagination, selective/empty queries and clean shutdowns. This qualifies the disposable local-file published-index path; crash/WAL recovery and HA remain open.
  • All four real-UDP Chitchat 0.11.1 parent combinations passed across registry/repaired LRU: 68.828 seconds, sampled aggregate peer RSS 26,050,560 bytes. These are probe costs, not performance benchmarks. Accelerated timing does not qualify production timers, 500-entry history eviction, Quickwit gRPC catchup or rolling HA.
  • Fresh RustSec database 59ef7abf8ce56ea80fe7eba97ba3835449009fa4: 11 retained matches, zero introduced, after precise verifier/trust-store fixes. Full security admission remains open.

Independent gpt-6-astra/max design, implementation and readiness reviews found no blocking source defect for these scoped checks. CI first exposed archive-only checkout before Git installation; the fix installs Git first and verifies exact checkout identity before native builds. Positive/wrong-head/archive-only controls passed.

Chemistry evidence artifact: SHA256 8af0ca1a89a3c5890c48e21865352d4d6380d25032a601cbf3dd37a2e5d2a1ee. Job logs and artifact metadata were inspected; direct workspace artifact download returned proxy 403 and was stopped. Archived JSON was not independently downloaded. Claim boundaries and the benchmark recovery inventory are in quickwit/scripts/ci/PR6_QUALIFICATION_2026-10-22.md.

Local retained checks also include LRU panic/lifetime tests, 28 audit-policy tests and a same-binary HTTP rehearsal; they are supporting evidence, not substitutes for the completed revision-pair CI.

Additional scoped local evidence:

  • Installed Ruby client: 24 wire tests / 420 assertions and 9 loaded-JSON guard tests / 10 assertions, using the actual pinned native JSON 3.1.0. The Faraday template/lock/gemspec/provenance were regenerated together. The schema retains its recorded older server revision; this is not final-server release provenance.
  • Python: 14 locked-installer tests, three Boto3 fixture tests, and successful fresh REST/CLI environment installs with exactly seven distributions each. Live LocalStack validation remains separate from these stubs and from ordinary PR CI.
  • Isolated Rust checks: three flamegraph tests and two transport/deletion checks. The latter cover a range read and a single-item delete iterator's 204/404/403 outcomes, not multipart qualification.
  • Independent gpt-6-astra/max implementation and separate readiness reviews accept the partial checkpoint, with the broader gate explicitly blocked.

Earlier recorded evidence includes 39 old-schema HTTP cases, 18 timestamp-boundary HTTP cases, scoped exact-search Ruby/native checks, local journal/process recovery tests and a bounded searcher-loss probe. These remain attributed to their recorded revisions and do not establish HA or storage-loss durability. Historical benchmark comparisons are not current-candidate performance results.

Open gates

  • Renewed archived upstream protobuf comparison completed without source mutation or advisory clearance. An isolated protobuf prototype passes 20 checks against both baseline and candidate, with independent Astra max review. It bounds reproduced generated-message recursion gaps; direct root envelopes now count one level. It is not integrated and does not establish advisory clearance, general parser recovery, native TensorFlow parity or compatibility.
  • Remaining Cargo paths: Azure, TensorFlow protobuf/ZIP and RSA consumers; LRU source repair is reviewed and scoped-tested, while broader application compatibility remains open. Generator 7.11.0 has affected bundled components; a latest-version bump alone is also insufficient. Native/runtime OS, chemistry-tooling transitives and bundled bootstrap coverage remain incomplete. See docs/cheminee-campaign/DEPENDENCY_PREFLIGHT.md and its hash-bound evidence record.
  • Benchmarks: zero new trials. Historical reports and corpus recipe survive, but original immutable corpus, selection manifest, archive parts and indexes were not found. About 648 MiB workspace space remains against a 640 MiB emergency floor; full build admission requires 5 GiB. No current-head speedup is claimed.
  • Current Compose import/search/restart and measured coexistence with Elasticsearch; representative corpus recovery and stage profiling; measured batch/concurrency/pagination guidance; distributed promotion/CAS, uncertain ACKs, corruption, overload and recovery. Resource and egress admission precede benchmark work.
  • Broader Boolean relevance/count-only semantics, final-server SDK release provenance and release readiness. ARM64 is unvalidated. No general Searchkick/Elasticsearch compatibility is claimed.

The full stacked diff retains generated SDK/evidence whitespace findings; clean incremental diffs do not mean the full PR diff is whitespace-clean. No runtime images, indexes or archives are added by this remediation.

Reviewer map

  • Query/error domains: quickwit/quickwit-query/src/query_ast/, elastic_query_dsl/bool_query.rs, tests/chemistry_operators.rs.
  • Exact scoring/schema/search: quickwit/tantivy-rdkit/src/, quickwit/quickwit-doc-mapper/src/query_builder.rs, quickwit/quickwit-search/src/{leaf,root}.rs.
  • Ingest: quickwit/quickwit-ingest/src/ingest_v2/, quickwit/quickwit-serve/src/ingest_api/.
  • Generated contract and Ruby behavior: sdk/ruby/, quickwit/quickwit-serve/examples/export_openapi.rs, .github/workflows/prepare-ruby-sdk.yml. Generated spec scaffolding is not executed contract proof.
  • Dependency changes: workspace lock/manifests, quickwit-storage/src/opendal_storage/, quickwit-serve/src/developer_api/flamegraph.rs, quickwit/scripts/ci/python_test_env.py, and CI workflows.
  • Operations/evidence: docker-compose.yml.example, distribution/cheminee-local/, docs/cheminee-campaign/, quickwit/scripts/ci/CAMPAIGN_RUNBOOK.md. Use the existing Kerberos compatibility wrapper for relevant workspace checks.

xrl added 30 commits October 13, 2026 17:20

xrl commented Oct 17, 2026

Copy link
Copy Markdown
Author

Independent review: PR #6 (composable exact chemistry search + generated Ruby importer SDK)

Revision reviewed: base 6bf1e29cdbf03409287b2f7d0e59a4c19534d8fa (= merge-base, = PR #3 head), head dca8e59f44e5d2cf6770b0076a5092b097aa237d. Both SHAs were checked against refs/pull/6/head and the base branch before review. I reviewed the code and tests first, then compared against the evidence and earlier review notes. No code was modified. Nothing was merged, released or deployed. No settings were changed.

Checks actually run at head dca8e59

These ran in a disposable cloud container (x86_64, 4 CPU, Rust 1.96.1 from rust-toolchain.toml, Ruby 3.3.6). It is not the campaign's cheminee-native-builder, so the campaign_phase.py lock/admission protocol could not be used. The native and workspace phases it governs were not run. I ran only scoped, non-native crates and watched disk: about 29 GiB free at start, about 3.7 GiB total growth, well above the policy's 1 GiB reserve.

Check Result
cargo test --locked -p tantivy-rdkit -p quickwit-query (no native-chemistry) quickwit-query lib 168 ✓, tests/chemistry_operators.rs 3 ✓ (the native graph case is cfg-gated out), tantivy-rdkit composable.rs 7 ✓, scoring.rs 4 ✓
cargo test --locked -p quickwit-doc-mapper -p quickwit-search --lib -- tag_pruning timestamp chemistry narrow remove_redundant doc-mapper 30 ✓, search 17 ✓ (filtered subset). protoc had to be installed in the container.
cargo test --locked -p quickwit-ingest --lib -- workbench router lost_replica 35 ✓ (filtered subset)
Ruby: bundle install (frozen, from Gemfile.lock) → JSON::VERSION=3.1.0 with JSON::Ext::Parser; generated gem built and installed from a copy wire_test.rb 20 runs / 392 assertions, 0 F; loaded_json_check_test.rb 9 / 10; examples/catalog_generation_test.rb 16 / 86; projection_test.py 7 ✓; every hash in provenance.json recomputed and matching
python3 -m unittest resource harness 9 ✓
python3 -m unittest scripts/ci/test_campaign_phase.py 11 run, 2 F / 3 E on a host with any visible cargo/rustc; 11 ✓ under unshare --pid --fork --mount-proc (see M6)

Not run: full-workspace Clippy/nextest, native-chemistry builds and tests (RDKit), REST/gRPC integration through a live server, Compose, Elasticsearch, any multi-node test. Nothing here is current-head runtime evidence.

JSON 3.1.0 evidence check. The json31-local logs show "json":"3.1.0" with the extension .so files loaded from the isolated GEM_HOME. The counts (20/392, 9/10, 16/86) match the PR body, and the reviewed file hashes match head. My independent run reproduces the same counts on Ruby 3.3.6 (the evidence used 3.3.8). Caveats:

  • The evidence README says it ran on "f8c633d plus the fix", an uncommitted tree, and the logs record no git SHA.
  • The "independent" and "pinned" reruns share seed 10109.
  • The withdrawn 2.7.2 attribution is consistent: catalog-recovery/tests.log shows Ignoring json-3.1.0 because its extensions are not built.
  • Note B2 below: the tested JSON version is not what gem consumers get.

Summary of the query/search core (no confirmed defect)

I traced the Boolean, candidate and timestamp logic by hand and found it sound:

  • narrow_chemistry_candidates (quickwit-query/src/query_ast/chemistry_candidates.rs). Guards come only from must/filter of the enclosing Bool and are truncated at scope exit. Pushing them into chemistry nodes under should/must_not of the same Bool is sound, because no document failing a sibling must/filter can affect the outer result. The original candidates are kept inside a filter wrapper, so should requirements survive. Cache state is reset, and the post-expansion serde depth check runs at the root.
  • ES minimum_should_match NoMatch → Some(should.len()+1). Validation stays eager and the compiler returns match_none after building all children. Tag pruning, timestamp extraction and narrowing over such a Bool can only remove splits from a query that matches nothing.
  • Tag pruning. The And(candidates, Uninformative) term correctly blocks NOT chem(NOT tag) from collapsing to tag.
  • Timestamp pruning. Exclusive lower bounds now use div_euclid with no +1, and upper bounds use Euclidean rounding. Pre-epoch widening (lib.rs timestamp_start, list_relevant_splits pruning_end) only widens. CanSplitDoBetter switches from div_ceil to truncation, which matches into_timestamp_secs; this fixes a real pre-existing top-k drop of 1.x s hits in another split. Unknown bounds never prove a split uncompetitive. timestamp_literal avoids numeric unit inference for pre-1972 and extreme dates.
  • Physical schema deferral. Eager validation runs against the declared chemistry_schema. Physical split validation happens only once a live, non-deleted candidate exists, and warmup is skipped for invalid physical fields. The test matrix covers 11 contracts × 3 operators × live/absent candidates.

Confirmed defects

B1 — Major: definite, pre-append rejections are now terminal "outcome unknown" 500s with no retry

  • Where: quickwit/quickwit-ingest/src/ingest_v2/workbench.rs:401-405 maps Persist(NoShardsAvailable | NodeUnavailable | Unspecified) to IngestFailureReason::Internal; :392 maps Unavailable to Internal. :436-448 (last_failure_is_transient, _ => false) makes all of these terminal.
  • Triggers that provably wrote nothing:
    • The leader's per-shard rate limiter returns NoShardsAvailable before any append (ingester.rs:544-558).
    • An ingester not accepting writes returns NodeUnavailable for every subrequest (ingester.rs:459-470), e.g. on decommission or before it is ready.
    • Transport connect failures.
  • Expected vs actual: before the PR these were retried within the 5 attempts on another shard or leader. Now the REST client gets 500 internal error, which the new OpenAPI (ingest_api/rest_handler.rs:146) describes as "outcome may be uncertain". On single-node Compose the leader rate limiter is local, so this hits Steven's bulk importer under ordinary burst load. A fail-closed importer stops; a retrying one is told the outcome is "unknown" when it is actually "not written".
  • Tests: two existing tests were changed to match the regression. In router.rs, test_router_retry… was switched from NoShardsAvailable to CircuitBreaker, and test_router_returns_rate_limited_failure became test_router_remote_no_shards_has_unknown_outcome and now expects Internal.
  • Smallest remedy: keep the leader's own pre-append NoShardsAvailable and not-ready NodeUnavailable retryable. Map only replicate-path failures and missing acknowledgements to the ambiguous class. Better, add a distinct pre-append PersistFailureReason. Add a router test where a rate-limited leader is followed by a healthy leader and assert success after retry.

B2 — Major (provenance / fail-closed): the gem does not constrain json; the tested 3.1.0 behaviour is not what consumers get

  • Where: sdk/ruby/generated/quickwit-cheminee.gemspec:31-33 declares faraday, faraday-multipart and marcel only. Ruby 3.3 ships json 2.7.2 as a default gem.
  • Reproduced:
    • {"timed_out":true,"timed_out":false} parses to false (last key wins) on 2.7.2 but raises ParserError on 3.1.0. Responses are parsed in api_client.rb:278, so whether ExactSearch fails closed on a duplicate-key response depends on which JSON the host app resolves.
    • Binary-encoded but valid UTF-8 strings, typical of scraper HTTP bodies, are accepted by 2.7.2 and raise GeneratorError on 3.1.0 (exact_search.rb:71, catalog_generation.rb:43).
  • Smallest remedy: add s.add_runtime_dependency 'json', '>= 3.1', '< 4' via the gemspec template, or test the matrix explicitly. Add a duplicate-key response case to wire_test.rb.

B3 — Major: a missing or relocated catalog journal silently becomes a fresh one, and every identity and sequence guard is lost

  • Where: sdk/ruby/examples/catalog_generation.rb:24-31 creates the directory and scope.json when absent. :36 and :62 read a missing active.json as revision 0 with empty high_water. :64 reads a missing identities.json as {}. :219-222 returns nil for missing files.
  • Trigger: the volume is not mounted, the path is wrong, or the directory was restored empty after a host loss.
  • Reproduced (Ruby agent run): after moving the journal directory and reopening, all of these were accepted and promoted without error:
    • a manifest reusing the already-consumed sequence 1,
    • offer o1 re-keyed from record_id 1 to 77,
    • record_id 1 reused for a different offer.
  • Expected vs actual: an existing deployment should fail closed when its journal is missing. Instead it is treated as a first run. This is the local-journal recovery path the PR's 16/86 tests cover, and they do not cover journal loss.
  • Smallest remedy: split an explicit init! from opening. open requires scope.json, identities.json and active.json. Optionally refuse to init if offers-* generations already exist on the server.

B4 — Major: the Compose restart policy can hide a crash or OOM from the smoke and resource verdicts

  • Where: docker-compose.yml.example:24 (restart: unless-stopped); distribution/cheminee-local/smoke.py:172-188, readiness.py:30-33, resource-measurements/run.py:28-31.
  • Trigger: Quickwit is OOM-killed at the 768m limit or crashes between requests or during the restart phase. Docker restarts it, wait_ready absorbs the gap, and the new cgroup resets memory.events/memory.peak. The final OOMKilled check only describes the current incarnation.
  • Expected vs actual: the verdict should fail on any restart the smoke did not issue. In practice RestartCount and StartedAt are never read.
  • Remedy: record RestartCount and StartedAt at admission and at the end. Require the count unchanged and StartedAt to change only across the explicit docker restart. Add a harness unit test for a 0→1 restart count.

M1 — Minor/Major: catalog example silently overwrites offer-level supplier and observed_at, and truncates time

  • Where: catalog_generation.rb:49 (Time…utc.iso8601 drops fractional seconds) and :54 (offer.merge('supplier' =>…, 'observed_at' =>…)).
  • Reproduced: an offer carrying supplier: 'Acme-EU-Reseller' and its own observed_at is stored with the snapshot's supplier and time. 12:00:00.987Z becomes 12:00:00Z. Reseller provenance and dated availability (price-as-of) are lost without an error.
  • Remedy: reject conflicting keys, or store the snapshot time as snapshot_observed_at. Use iso8601(9).

M2 — Minor: detailed_response=true can panic after a successful persist (existing code, newly documented)

  • Where: quickwit-serve/src/ingest_api/response.rs:94, String::from_utf8(doc.to_vec()).unwrap().
  • Trigger: an NDJSON line with invalid UTF-8, common in scraped data, becomes a parse failure. The valid documents persist, then building the response panics. The client sees a dropped connection, which is ambiguous, so a retry duplicates the valid documents. This PR newly exposes detailed_response in the OpenAPI.
  • Remedy: from_utf8_lossy or base64. Add a REST test with body b"\xff\n{}" and detailed_response=true.

M3 — Minor: the campaign disk guard measures the path the operator names, not where Cargo writes

  • Where: quickwit/scripts/ci/campaign_phase.py:217, 274, 299 (shutil.disk_usage(args.filesystem)), default /workspace at :316. The measured path is not recorded in state (:223-230).
  • Trigger: --filesystem /tmp while target/ or CARGO_HOME sits on a nearly full /workspace. Admission passes and the 640 MiB floor never trips.
  • Also: growth_budget_mib is checked only at admission (:236). maximum_observed_drawdown_bytes is never compared with it, although the runbook describes it as a growth allowance.
  • Remedy: require st_dev of --filesystem to equal st_dev of cwd, the resolved target dir and CARGO_HOME, as run.py:101,115 already does. Record the filesystem in state. Stop or flag exceeded_budget when drawdown exceeds the budget.

M4 — Minor: lock/state crash window

  • Where: campaign_phase.py:231 writes the new state path into the lock before the first write_state (:250/:266).
  • Effect: dying in that window makes every later run hit FileNotFoundError in inspect_previous (:127-129). The reviewed-SHA escape can't apply to a file that doesn't exist, and the runbook forbids replacing the lock inode.
  • Remedy: write the state before updating the lock, or treat a missing prior file as an explicit review-required case.

M5 — Minor: stale or contradictory docs

  • sdk/ruby/README.md:17 still says "Sixteen … tests / 319 assertions" (now 20/392).
  • :240 still calls the local pinned rerun "still-blocked", contradicting json31-local.
  • sdk/ruby/live_smoke.rb:6 defaults SDK_EXPECTED_VERSION to 0.9.1.pre.dsl, so it fails against the contract1 gem unless overridden.
  • REMAINING_GATES.md:14, distribution/cheminee-local/README.md:3,89-90 and root README.md:8-10 describe the native Compose smoke as passing or tested without saying it ran on an image built from 8009925c with older smoke scripts. INTEGRATOR_HANDOFF.md and ERROR_DOMAIN_REVIEW.md attribute it correctly, so the docs contradict each other.
  • distribution/cheminee-local/README.md:22-26 packages target/debug/quickwit without saying the binary is unoptimized, so the 768m/2-CPU bounds describe a debug build.

M6 — Minor: test_campaign_phase.py is not hermetic

5 of 11 tests fail whenever any compiler process is visible in the PID namespace, because only one test patches unmanaged_builds(). Patch it in setUp and keep one dedicated detection test.


Risks (code-traced, not reproduced)

  • R1 — Major (ingest, multi-node/replicated only): a timed-out or lost replica acknowledgement leaves the shard wedged.
    • Where: ingester.rs:675-683 (the replication Err branch still continues; "close and evict" is a TODO); ingester.rs:776-782 (return Err(Internal("bad replica position")) for the whole PersistRequest); follower replication.rs:580 (if replication_position != from_position_exclusive { // TODO }).
    • Timeout scenario: the follower appends after the leader's timeout. The new code correctly reports the first batch as unknown, but the shard stays open with the leader behind the follower. On the next batch the follower appends regardless, the leader appends locally, sees the position mismatch, and returns Internal for the whole request. Data is in both WALs but the client gets 500, on every later batch.
    • Lost-ack scenario: the ack stream ends, so every later replicate fails Closed until the process restarts.
    • Scope: the logic is mostly pre-existing upstream, and the default single-node Compose (no replication) does not hit it. It still blocks any "fail closed and recoverable" claim for replicated deployments.
    • Missing test: lost_replica_ack_preserves_real_wal_and_reports_unknown_outcome stops after the first batch. Delay rather than drop the ack, send a second batch, and assert neither Err(Internal) nor a success that wasn't reported.
  • R2 — Major: no REST error contract tells a client whether a retry is safe.
    • 503 covers both router NoShardsAvailable (not written) and router Timeout (unknown). 500 covers SourceNotFound (error.rs:106), the definite cases in B1, and real ambiguity (Timeout → Internal("request timed out")).
    • The body is only {"message"}, and no error schema is declared, so the generated gem can't branch on outcome.
    • No new HTTP-path test covers the new mappings, contrary to CLAUDE.md.
    • Remedy: a machine-readable outcome: not_persisted | unknown plus an error schema in the OpenAPI.
  • R3 — Major: ExactSearch always sorts _score first (exact_search.rb:41).
    • BM25 statistics are per split, so for the documented scored term examples (MIGRATION.md:19, sdk/ruby/README.md:110), a background merge between page requests can reorder hits. Every page then validates, yet offers are duplicated or skipped across pages.
    • Tanimoto/graph scores are split-independent and match_all audits are unaffected.
    • Remedy: a record_id-only ordering mode for enumeration, or wrap non-chemistry predicates in bool.filter.
  • R4 — Major: an explicitly complete but empty scrape promotes and withdraws a supplier's whole catalog. The smoke asserts this at catalog_generation_smoke.rb:167. There is no shrink-ratio or minimum-count guard with an explicit override.
  • R5: the raw ES _search path claims more than it knows.
    • relation is always eq (elasticsearch_api/rest_handler.rs:1218), including the default CountHits::Underestimate.
    • timed_out:false, skipped:0 and failures:[] are hard-coded. With the default allow_partial_search_results=true, failed splits still return 200.
    • ExactSearch defends against all of this (strict mode, track_total_hits:true, _shards arithmetic, record_id and page-length checks), so several of its checks can never fire against this server.
    • Callers of the unchecked generated method get none of that protection. The new resp.errors check (:1177-1185) is dead, since SearchResponse.errors is always empty in quickwit-search.
    • The new search OpenAPI declares only post, while the route also accepts GET. It omits 408/429/503, and every body is Object.
  • R6: the request-level start_timestamp/end_timestamp bound the query but not the chemistry candidate domain. They are applied as an outer filter (leaf.rs remove_redundant_timestamp_range) after root narrowing. A REST time window therefore does not stop verification of out-of-window candidates in the same split; an old-schema document outside the window can fail the query. Narrowing them in at the root would match the AST behaviour. ES and Ruby callers are not affected.
  • R7 (unmeasured): eager candidate verification allocates Vec<(DocId, Score)> plus an ordinal cache per segment, proportional to live candidates (tantivy-rdkit/src/lib.rs:285, graph.rs:155). With no narrowing (default MatchAll candidates), this is a full-segment pass on every query. No representative-corpus profile exists.
  • R8: chemistry identity is not tracked by the importer. The only structure check is non-empty SMILES. There is no canonical SMILES, RDKit/preparation version, or structure ID per offer, and nothing flags a SMILES change between generations. The example mapping has no native chemistry, so a promoted generation is not structure-searchable. This is documented.
  • R9: Compose.
    • There is no memswap_limit, so on a host with swap the 768m bound can be masked.
    • pids_limit: 256 is below tokio's default 512 blocking threads, and the smoke never runs concurrent load.
    • Recreating with down/up and WAL replay without commit=wait_for are never exercised. Persistence paths do resolve correctly to the named volume.
  • R10: audit brittleness (catalog_generation.rb:152-156, 194-197). Exact document equality will quarantine every generation if the server normalises floats, nulls, empty containers or dates, and a transient read error quarantines a good generation.

Unmeasured gates (agreeing with REMAINING_GATES.md, plus)

  • Full-workspace CI (wrapped Clippy plus nextest with --all-features) at head.
  • Native-chemistry tests at head.
  • REST/gRPC integration at head.
  • prepare-ruby-sdk.yml never run in GitHub. It runs only wire_test and projection_test, not the catalog or loaded-JSON tests; it uses plain ruby, not bundle exec; it does not diff regenerated output against the committed sdk/ruby/generated; and apt packages are unpinned. The JAR SHA-256, image digest and action SHAs are pinned.
  • SDK server_revision is 8009925, 16 commits behind head, and no Ruby live smoke has run against a head server.
  • Current Compose runtime import/search/restart and resource measurements. The only live evidence is from the 8009925c image.
  • Elasticsearch coexistence.
  • Representative 100k-corpus recovery and stage profiling.
  • Distributed promotion/CAS, durability, node/storage loss and HA. The 62/62 single-searcher SIGKILL result is not HA evidence.
  • Record IDs above 2^53 live.
  • ARM64 (not claimed, and prepare_runtime.py:22 enforces amd64).
  • Arbitrary Elasticsearch/Searchkick compatibility (not claimed).
  • sdk/ruby/generated/spec/** is empty rspec scaffolding (# assertion here). It is excluded from the gem and correctly not cited as evidence.

Judgments

  • Ready for further draft review: yes. The query/search core is careful and well tested at the unit level, and the Ruby adapter's fail-closed checks are strong. B1–B4 are bounded, fixable issues with clear tests.
  • Ready for release: no. Blocking items:
    • B1: a regression in retry semantics that hits single-node bulk import.
    • B2: the gem does not pin the JSON behaviour it was tested with.
    • B3: the journal fails open on loss.
    • B4: smoke/resource verdicts can hide OOM.
    • R2: no machine-readable retry-safety contract.
    • The gates above: no current-head CI, runtime, Compose or SDK-provenance evidence, and no replicated-ingest recovery (R1).

Generated by Claude Code

xrl added 20 commits October 17, 2026 17:36
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