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
{{ message }}
Repository navigation
Add REST tests for explicitly-retired / non-active lifecycle records (not just superseded) #105
REST-layer lifecycle tests only cover the superseded branch of is_hidden_by_lifecycle. Add coverage for an explicitly retired record (and a non-active lifecycle_status) so all hiding branches are tested at the REST layer.
Background
is_hidden_by_lifecycle (crates/lance-context-core/src/record.rs) hides a record for three reasons:
superseded_by_id is set,
retired_at is set,
lifecycle_status is not active/contradicted.
The existing REST tests only exercise (1):
search_respects_retired_visibility (crates/lance-context-server/src/routes/search.rs:257) — supersedes via update_record, then checks include_retired surfaces the original.
list_respects_retired_visibility (crates/lance-context-server/src/routes/records.rs:881) — same supersession setup.
Branches (2) and (3) are untested at the REST layer, even though RecordPatchDto exposes retired_at / retired_reason / lifecycle_status (records.rs:425), so a client can put a record into those states over REST.
Proposed work
Add REST tests (mirroring the existing supersession tests) that:
patch a record to set retired_at (without supersession) and assert it is hidden from default search / list, and surfaced when include_retired = true;
patch a record to a non-active/contradicted lifecycle_status and assert the same default-hidden / include_retired-surfaced behavior.
Acceptance criteria
New REST tests cover the retired_at and lifecycle_status hiding branches for both search and list.
Tests assert default-hidden and include_retired = true-visible for each branch.
Notes
Small, self-contained test-coverage gap (flagged during the #89 / #92 REST filter work). good first issue.
Activity
test: REST search tests for retired / non-active lifecycle records