Skip to content

test(rust): cover route contracts and acquisition attribution lifecycle - #542

Merged
LIghtJUNction merged 2 commits into
mainfrom
test/rust-route-contract-coverage
Sep 30, 2026
Merged

LIghtJUNction merged 2 commits into
mainfrom
test/rust-route-contract-coverage

Conversation

@LIghtJUNction

@LIghtJUNction LIghtJUNction commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Improve Rust backend confidence around route-contract file safety and the acquisition PostgreSQL lifecycle.

  • Cover route-contract generation/verification, stable-version parsing, permissions, regeneration, malformed digests, missing files and symlink rejection.
  • Add four isolated PostgreSQL acquisition tests:
    • Casbin deny precedence, promotion-link create/list/preview/delete, and idempotent lookback policy history.
    • Consent grant, promotion-link visit replay, self-report create/delete, and privacy withdrawal cleanup.
    • Registration attribution keeps the first touch while selecting the last non-unknown visit inside the lookback window, inherits the latest consent version, and remains replay-idempotent.
    • An explicit consent denial cannot be overwritten by registration attribution and continues to reject authenticated observations.
  • Wire the acquisition suite into the real-integration runner and lock all four tests into its exact inventory.
  • Rebuild this existing PR branch on current main, dropping stale lockfile, frontend and already-merged acquisition-route diffs.

Verification

  • cargo fmt --all --check: passed.
  • cargo test --locked -p lmm-api-rs --test acquisition -- --skip postgres_: 2 passed.
  • cargo clippy --locked -p lmm-api-rs --test acquisition -- -D warnings: passed.
  • python3 tests/scripts/test-new-integration-suites.py: 7 passed.
  • bash tests/scripts/check-real-integration-gates.sh: passed; 95 ignored tests across 10 modules are locked into the real-integration inventory.
  • bash -n tests/scripts/run-real-integration-gates.sh: passed.
  • git diff --check: passed.
  • Targeted non-PostgreSQL acquisition coverage on current main:
    • routes/acquisition.rs: 136/340 lines (40.00%), 15/37 functions (40.54%).
    • routes/acquisition/store.rs: 3/428 lines (0.70%), confirming the database-backed store is the important low-coverage target addressed by the four real PostgreSQL tests.
  • Previous targeted route-contract coverage: 182/194 lines (93.81%), 15/17 functions (88.24%); executable production lines 81/91 (89.01%).
  • GitHub CI run 36651722101: passed. PostgreSQL 18 executed all four acquisition tests (4/4), and the Rust backend, RustSec, route alignment, root-route, workflow/resource-safety, web checks, and CI Quality Gate all succeeded.

No API, schema, persistence contract, frontend or Go implementation changes.

@LIghtJUNction
LIghtJUNction marked this pull request as ready for review September 28, 2026 01:16
Copilot AI lite review requested due to automatic review settings September 28, 2026 01:16

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-28T01:20:50.435037Z 57c028b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction
LIghtJUNction force-pushed the test/rust-route-contract-coverage branch from 57c028b to d54fb06 Compare September 29, 2026 00:22
@LIghtJUNction LIghtJUNction changed the title test(rust): cover route contract file safety test(rust): cover route contracts and acquisition PostgreSQL lifecycle Sep 29, 2026
@LIghtJUNction
LIghtJUNction force-pushed the test/rust-route-contract-coverage branch from d54fb06 to a480c2b Compare September 30, 2026 00:43
@LIghtJUNction LIghtJUNction changed the title test(rust): cover route contracts and acquisition PostgreSQL lifecycle test(rust): cover route contracts and acquisition attribution lifecycle Sep 30, 2026
@LIghtJUNction
LIghtJUNction merged commit 74a455a into main Sep 30, 2026
24 of 26 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