You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Small, well-scoped PR: adds an explanatory comment to clear_table_bounded and trims scaffolding from sql_efficiency.rs. A couple of notes:
1. Removed regression guard has no replacement (medium)
The deleted sql_efficiency_catalog_has_stable_unique_ids_and_documented_scans test enforced two invariants that no longer exist anywhere in the suite:
Uniqueness of query ids across the catalog (previously also checked against CORRECTNESS_ONLY_QUERIES/EXCLUDED_QUERIES, but the uniqueness check applied to query_catalog() itself too). A future duplicate id in query_catalog() will no longer be caught, it'll just silently produce a confusing/ambiguous failure message instead of a clear "duplicate id" assertion.
Minimum inventory size (original_len >= 50), which acted as a tripwire against someone accidentally deleting query cases over time without adding coverage elsewhere.
Given rivetkit-rust/packages/rivetkit-core/CLAUDE.md's policy that this suite is the enforcement mechanism for "every new/modified internal SQL statement needs coverage," losing this tripwire is a real reduction in the safety net, not just dead weight. Worth confirming this loss was intentional, or restoring a lightweight uniqueness/count check.
2. New top-of-file comment doesn't cover everything the deleted EXCLUDED_QUERIES explained (low)
The new comment:
// This suite covers SQL owned by rivetkit-core. User-provided SQL, including// Actor Runtime Socket requests, is intentionally outside its scope.
only accounts for the actor_runtime_socket.sql exclusion. The other three removed EXCLUDED_QUERIES entries (inspector.schema_catalog, inspector.table_count, inspector.table_rows) were excluded for different reasons (schema metadata enumeration; user-selected table capped at 500 rows), those are core-owned SQL, not "user-provided SQL," so the new comment doesn't actually justify why they're absent from query_catalog(). A future reader auditing coverage has no way to tell whether these are intentionally excluded or just missing.
The 13 former CORRECTNESS_ONLY_QUERIES (singleton upserts/point inserts) are on firmer ground since the general policy in CLAUDE.md ("simple inserts... need correctness... but no plan assertion") already covers that class, so dropping their per-query reasons is a more defensible simplification.
3. Minor: duplicated comment (nit)
internal_storage.rs: the new comment on clear_table_bounded (private helper) largely restates the existing comment on its only caller, clear_imported_storage, a few lines up:
// Delete bounded sets of rows in separate commits. A single `DELETE FROM`// over a large interrupted import can itself exceed depot's dirty-page// limit, permanently preventing the importer from recovering.
...asyncfn clear_table_bounded(...){// An interrupted legacy import can leave enough data that one `DELETE FROM`// exceeds depot's dirty-page commit limit. Delete estimated-size chunks in// separate transactions so cleanup can always make progress.
Consider keeping the rationale in one place (probably on clear_table_bounded, since that's where the chunking actually happens) to avoid drift if the reasoning changes later.
Other
Verified no other references to the removed CORRECTNESS_ONLY_QUERIES/EXCLUDED_QUERIES/meta-test exist elsewhere in the tree, so the deletion doesn't leave dangling references.
No security or performance concerns, this is test-only plus a comment change.
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
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.
No description provided.