Skip to content

test(rust): cover acquisition link lifecycle - #563

Merged
LIghtJUNction merged 1 commit into
mainfrom
test/rust-acquisition-link-lifecycle
Oct 3, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
test/rust-acquisition-link-lifecycle

Conversation

@LIghtJUNction

@LIghtJUNction LIghtJUNction commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to merged Rust acquisition coverage PR #557.

Add one isolated PostgreSQL regression test for the remaining promotion-link storage lifecycle in PgAcquisitionStore:

  • Invalid create inputs do not persist partial rows.
  • Updating a link changes only name and archived; attribution fields and creation time remain immutable.
  • The test reloads the persisted PostgreSQL row, rather than trusting the pre-update object returned by save_link.
  • Status filters distinguish active, archived and soft-deleted records.
  • Case-insensitive search escapes SQL LIKE wildcards (_ and %).
  • Pagination compares the exact IDs across both pages, detecting repeated or omitted rows.
  • Invalid list/delete inputs fail closed.
  • A deleted link cannot be deleted again or revived through the update path.

The acquisition PostgreSQL inventory increases from six to seven tests, and the repository real-integration inventory from 97 to 98 ignored tests across ten modules.

The branch is rebased on current main and contains one commit. Both review threads about persisted-state and pagination assertions are addressed and resolved.

No production code, API, schema, frontend or Go changes.

Verification

Local:

  • cargo fmt --all --check: passed.
  • cargo clippy --locked -p lmm-api-rs --test acquisition -- -D warnings: passed.
  • cargo test --locked -p lmm-api-rs --test acquisition -- --skip postgres_: 2 passed.
  • cargo test --locked -p lmm-api-rs --test acquisition -- --ignored --list: all 7 PostgreSQL tests compiled and listed.
  • python3 tests/scripts/test-new-integration-suites.py: 7 passed.
  • bash tests/scripts/check-real-integration-gates.sh: passed; 98 ignored tests across 10 modules.
  • bash -n tests/scripts/run-real-integration-gates.sh: passed.
  • git diff --check: passed.

GitHub Actions CI run 37083490347: passed.

  • Rust formatting, Clippy and tests: passed.
  • PostgreSQL 18 and Valkey integration gate: passed.
  • postgres_link_updates_filters_searches_and_deletes_are_durable: passed.
  • Acquisition PostgreSQL suite: 7 passed, 0 failed.
  • RustSec, route/behavior alignment and CI Quality Gate: passed.

Coverage check

Targeted non-PostgreSQL acquisition coverage:

  • routes/acquisition.rs: 136/340 lines (40.00%), 15/37 functions (40.54%).
  • routes/acquisition/data.rs: 7/221 lines (3.17%), 2/26 functions (7.69%).
  • routes/acquisition/store.rs: 3/428 lines (0.70%), 1/43 functions (2.33%).

The local coverage command excludes ignored PostgreSQL tests, so the store percentage does not credit this database test; the successful PostgreSQL 18 gate provides execution evidence for the persisted update and pagination paths.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 01:13
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@LIghtJUNction LIghtJUNction left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Two regression-coverage gaps in the new lifecycle test, identified from the assertions and current store implementation:

Comment thread apps/api-rust/tests/acquisition.rs
Comment thread apps/api-rust/tests/acquisition.rs Outdated
@LIghtJUNction
LIghtJUNction force-pushed the test/rust-acquisition-link-lifecycle branch from 003ff31 to 49571e9 Compare October 3, 2026 00:46
@LIghtJUNction
LIghtJUNction merged commit f4de21a into main Oct 3, 2026
23 checks passed
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.

2 participants