Skip to content

chore: ensure consistent Rust dependencies#658

Merged
shumkov merged 3 commits into
v0.24-devfrom
cargo-lock
Dec 7, 2022
Merged

chore: ensure consistent Rust dependencies#658
shumkov merged 3 commits into
v0.24-devfrom
cargo-lock

Conversation

@shumkov
Copy link
Copy Markdown
Collaborator

@shumkov shumkov commented Dec 7, 2022

Issue being fixed or feature implemented

In different environments might be used different versions of dependencies since they are not locked. For example, there is no guarantee that code that works in development will work on CI. Also possible that some of the dependencies will be updated and released as Drive's docker image without even testing or auditing.

As a side effect, CI cache will be much more efficient so we should expect a speed boost in our builds.

Platform and Drive should be considered as end product:
https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

What was done?

  • Committed Cargo.lock

How Has This Been Tested?

With CI

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone
@shumkov shumkov added this to the v0.24.0 milestone Dec 7, 2022
@shumkov shumkov requested a review from antouhou as a code owner December 7, 2022 15:51
@shumkov shumkov merged commit c226dec into v0.24-dev Dec 7, 2022
@shumkov shumkov deleted the cargo-lock branch December 7, 2022 16:38
QuantumExplorer added a commit that referenced this pull request May 11, 2026
…logists

Sweeps the new comments introduced in this PR for narrative phrases
that age poorly — "PR #3623 review comment r3214794852", "Codex review
finding #3", "grovedb#656/#658", "what used to be ~30-line per-mode
match arms", "the prior merge-based code", "earlier drafts of the v12
endpoint", "pre-refactor behavior", etc. — and rewrites them to
explain what the code does and why, without requiring the reader to
have lived through the PR's history.

Specific rewrites:

- `rs-drive-abci/src/query/document_count_query/v0/mod.rs`:
  - `test_documents_count_with_in_and_prove_returns_proof` docstring
    drops the "PR #3623 review comment" + commit-hash narrative and
    states the two end-to-end guarantees the test pins (routing →
    PointLookupProof; dispatcher → threads order_by).
  - `test_documents_count_range_with_prove_and_distinct_returns_proof`
    drops the "earlier commits rejected this" + commit-hash phrasing
    and describes the dispatch path + wire-shape contract directly.

- `rs-drive/src/query/drive_document_count_query/`:
  - `drive_dispatcher.rs`: module + impl docstrings drop "collapse
    what used to be ~30-line per-mode match arms" framing; describe
    the per-mode contract on its own terms.
  - `execute_point_lookup.rs`: "Codex review finding #3" → describes
    the dedupe invariant directly.
  - `execute_range_count.rs`: "cursor field used to exist but was
    removed before v12 shipped" → "no cursor field because single-
    `bytes` would be ambiguous for compound queries"; "the prior
    merge-based code" → "bounded by the contract author's index
    choice".
  - `tests.rs`: drops "Codex review finding #3" and "pre-refactor
    behavior" framings.

- `rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs`:
  - `range_count_with_in_on_prefix_returns_per_brand_color_entries`:
    "cross-fork merging was dropped (originally bg of Codex…)" →
    explains why merging pre-limit can undercount.
  - `range_count_executor_accepts_starts_with_in_all_four_modes`:
    drops "earlier commits rejected `StartsWith`, this is the
    rewrite".
  - `aggregate_count_proof_verifies_on_compound_index_with_equal_prefix`:
    "grovedb#658's multi-layer envelope" → "grovedb's multi-layer
    aggregate-count proof envelope".
  - `aggregate_count_proof_counts_cars_in_parking_lots_greater_than_b`:
    "Real-world scenario test for grovedb#656's primitive" → "Scale
    test for the AggregateCountOnRange proof primitive".
  - `range_count_executor_returns_per_lot_counts_…`: drops "no-proof
    companion to grovedb#656's primitive" framing.
  - `distinct_count_proof_with_in_on_prefix_returns_…`: "this was the
    original motivation for the no-merge design, Codex finding 1" →
    direct explanation of why server-side merging would undercount
    under per-fork limits.

- `rs-sdk/src/platform/documents/document_count_query.rs`:
  - struct docstring drops "added in PR #3623" framing.
  - `limit` field's pagination note drops the "cursor field existed
    earlier but was removed before v12 shipped" narrative.

- `wasm-sdk/src/queries/document.rs`:
  - `getDocumentsCount` docstring drops "unified successor to the
    previous getDocumentsCount / getDocumentsSplitCount pair"
    framing.

- `book/src/drive/document-count-trees.md`:
  - Pagination paragraph drops "existed in earlier drafts of the v12
    endpoint but was removed before shipping" narrative.

No behavior change, no public-API surface change. Verified clippy +
fmt clean across the touched crates with `-D warnings`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants