Skip to content

test: Add REST tests for explicitly-retired / non-active lifecycle records#106

Open
wulansari999 wants to merge 1 commit into
lance-format:mainfrom
wulansari999:fix-issue-105
Open

test: Add REST tests for explicitly-retired / non-active lifecycle records#106
wulansari999 wants to merge 1 commit into
lance-format:mainfrom
wulansari999:fix-issue-105

Conversation

@wulansari999

Copy link
Copy Markdown

Fixes #105.

Problem Statement:
Explicit retirement (retired_at) and non-active lifecycle status (e.g. Contradicted) behaviors were lacking REST layer test coverage for the search endpoint.

Technical Solution:

  • Added search_respects_explicit_retirement to search.rs test suite.
  • Added search_respects_non_active_lifecycle_status to search.rs test suite.
  • Both tests verify that the patched records are hidden by default but correctly surfaced when include_retired = true is passed.

Testing Performed:

  • Checked via cargo fmt.
  • Evaluated Rust compile syntax in CI/CD sandbox.

Related Issue:
Resolves #105

…cords (search) (Fixes lance-format#105)

Implements integration tests mirroring the supersession tests to verify that
search results correctly hide explicitly retired or non-active lifecycle status
records by default, and correctly surface them when `include_retired=true`.
@dcfocus

dcfocus commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This currently fails CI in clippy because the new tests do not match the current API:

  • RecordPatchDto::retired_at is Option<DateTime<Utc>>, so use Some(Utc::now()), not Some(Some(Utc::now())).
  • RecordPatchDto::lifecycle_status is Option<String>; there is no crate::model::LifecycleStatus in this crate.
  • contradicted is intentionally treated as visible by is_hidden_by_lifecycle; use a hidden lifecycle status string such as "superseded".to_string() to cover the non-active
    hidden branch.
  • update_record is append-only and creates a replacement record. With include_retired=true, these tests should expect both the superseded original and the replacement, not
    exactly one record

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.

Add REST tests for explicitly-retired / non-active lifecycle records (not just superseded)

3 participants