Skip to content

refactor: trivial removals and deprecation completions#2

Open
devin-ai-integration[bot] wants to merge 7 commits into
masterfrom
devin/1777288809-cleanup-deprecations
Open

refactor: trivial removals and deprecation completions#2
devin-ai-integration[bot] wants to merge 7 commits into
masterfrom
devin/1777288809-cleanup-deprecations

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Apr 27, 2026

Copy link
Copy Markdown

Reference Issues/PRs

What does this implement or fix?

Five self-contained cleanup tasks:

  1. Remove opt_false utility (cpp/arcticdb/util/optional_defaults.hpp)

    • Inlined the expression opt && *opt at all 8 call sites across version_core.cpp, version_store_api.cpp, local_versioned_engine.cpp, and read_options.hpp
    • Deleted the header file, removed #include from all consumers, removed from CMakeLists.txt
  2. Deprecate is_symbol_fragmented (_store.py + library.py)

    • Added warnings.warn(..., DeprecationWarning) to both NativeVersionStore.is_symbol_fragmented and Library.is_symbol_fragmented
    • Added .. deprecated:: directive to docstrings directing users to defragment_symbol_data
  3. Remove iterate_on_failure parameter (_store.py)

    • Removed the deprecated no-op parameter from list_versions and has_symbol signatures, docstrings, and warning logic
    • Removed stale @param iterate_on_failure comment in version_map.hpp
  4. Remove force_uri_lib_config field (s3_library_adapter.py)

    • Removed the field from the ParsedQuery dataclass
    • Moved backward-compatibility handling into _parse_query: force_uri_lib_config=true is silently ignored, force_uri_lib_config=false still raises ValueError
  5. Update BACKUP_SNAPSHOT_REF comment (key.hpp)

    • Confirmed no write paths use this key type (only enum definition, pybind11 binding, and key serialization)
    • Replaced misleading "Temporary - remove_me" comment with documentation that the value is retained for backward compatibility since KeyType enum values are persisted to storage

API changes

  • NativeVersionStore.list_versions: Removed iterate_on_failure parameter (was deprecated, no-op)
  • NativeVersionStore.has_symbol: Removed iterate_on_failure parameter (was deprecated, no-op)
  • NativeVersionStore.is_symbol_fragmented: Now emits DeprecationWarning
  • Library.is_symbol_fragmented: Now emits DeprecationWarning
  • ParsedQuery.force_uri_lib_config: Field removed from dataclass; URI parameter still accepted for backward compatibility

Any other comments?

All changes are low-risk and self-contained. No on-disk format changes. BACKUP_SNAPSHOT_REF enum value (= 20) is intentionally kept to preserve storage compatibility.

Checklist

Checklist for code changes...
  • Have you updated the relevant docstrings, documentation and copyright notice?
  • Is this contribution tested against all ArcticDB's features?
  • Do all exceptions introduced raise appropriate error messages?
  • Are API changes highlighted in the PR description?
  • Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?

Link to Devin session: https://app.devin.ai/sessions/ada4efc2f8bf434fbdc84f6fc291b2a5
Requested by: @chrischappell-cog


Open in Devin Review

devin-ai-integration Bot and others added 7 commits April 27, 2026 11:21
…sites

The opt_false function in optional_defaults.hpp was marked with a TODO to remove.
Inlined the expression (opt && *opt) at each of the 8 call sites across
version_core.cpp, version_store_api.cpp, local_versioned_engine.cpp, and
read_options.hpp. Removed the header file and its includes from all consumers.

Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Add DeprecationWarning to is_symbol_fragmented in both NativeVersionStore
and Library classes, directing users to use defragment_symbol_data instead
which checks fragmentation internally. Addresses the TODO comment at the
method definition.

Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Remove the iterate_on_failure parameter from list_versions and has_symbol
methods in NativeVersionStore. This parameter was deprecated, had no effect
on behavior, and was documented for removal. Also remove the stale @param
comment in version_map.hpp.

Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Remove the force_uri_lib_config field from the ParsedQuery dataclass.
The parameter is handled during URI parsing for backward compatibility:
force_uri_lib_config=true is silently ignored (was always a no-op), and
force_uri_lib_config=false still raises ValueError as before.

Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Replace the misleading 'Temporary - remove_me' comment with documentation
that the key type is no longer written but must be retained because KeyType
enum values are persisted to storage.

Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
Co-Authored-By: Chris Chappell <chris.chappell@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Author

Test Results

Tested Python changes against pip-installed arcticdb (v6.13.0) with branch Python files overlaid, using local LMDB backend.

Task 1 — iterate_on_failure removal (2/2 passed)
  • NativeVersionStore.list_versions(iterate_on_failure=True)TypeError: got an unexpected keyword argument 'iterate_on_failure'
  • NativeVersionStore.has_symbol(iterate_on_failure=True)TypeError: got an unexpected keyword argument 'iterate_on_failure'
Task 2 — is_symbol_fragmented deprecation (2/2 passed)
  • NativeVersionStore.is_symbol_fragmented("sym") → emits DeprecationWarning with message "is_symbol_fragmented is deprecated. Use defragment_symbol_data instead..." ✓
  • Library.is_symbol_fragmented("sym") → emits DeprecationWarning with same message ✓
  • Both methods still return bool as expected ✓
Task 3 — force_uri_lib_config removal (4/4 passed)
  • force_uri_lib_config removed from ParsedQuery dataclass fields ✓
  • _parse_query("?force_uri_lib_config=true") → silently returns ParsedQuery (backward compat) ✓
  • _parse_query("?force_uri_lib_config=false")ValueError with security concerns message ✓
  • Invalid params (e.g. ?bogus_param=true) still correctly rejected ✓
Regression — list_versions / has_symbol integration (4/4 passed)
  • NativeVersionStore.list_versions("sym") → returns correct version data (symbol="sym", version=0, deleted=False) ✓
  • NativeVersionStore.has_symbol("sym")True
  • NativeVersionStore.has_symbol("nonexistent")False
  • Library.has_symbol → works correctly ✓
Not tested (requires full C++ build)
  • opt_false inlining (Task 1): Verified by code inspection — opt && *opt is semantically identical
  • BACKUP_SNAPSHOT_REF comment (Task 5): Comment-only, no behavioral change

Devin session

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