Skip to content

Add backwards compatibility tests and fix concurrent mutation data loss#59

Merged
xumaple merged 8 commits intomainfrom
xumaple/copilot/backcompat-test
Apr 11, 2026
Merged

Add backwards compatibility tests and fix concurrent mutation data loss#59
xumaple merged 8 commits intomainfrom
xumaple/copilot/backcompat-test

Conversation

@xumaple
Copy link
Copy Markdown
Owner

@xumaple xumaple commented Apr 11, 2026

Summary

  • Adds a permanent "backcompat" test user with known credentials (created via backcompat_setup.rs, run once manually)
  • Rust integration tests verify auth, key listing, and password retrieval against the permanent user
  • E2E tests log in through the real UI and verify passwords decrypt correctly
  • Fixes a data loss bug in change_master_password: the stored passwords count check and re-encryption used stale data from before the lock, so a concurrent add_stored_password could silently have its password dropped
  • CI now runs concurrency tests 10x to catch intermittent races

Closes #56

Test plan

  • Backcompat setup creates user
  • 3 backcompat Rust tests pass
  • E2E backcompat tests verify login + decryption through UI
  • Concurrency tests pass consistently (10x local)
  • 19 integration tests pass
  • Clippy clean

🤖 Generated with Claude Code

xumaple and others added 2 commits April 11, 2026 00:40
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
One-time setup creates a permanent user with known credentials and
stored passwords. Tests verify auth, key listing, and password
retrieval still work — guarding against breaking changes to auth,
encryption, or data format. Closes #56.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment Apr 11, 2026 5:59am

Single source of truth for test credentials and expected values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
xumaple and others added 2 commits April 11, 2026 01:19
Use SHA-3 hashed credentials and AES-encrypted password values
matching the frontend's crypto flow. E2E tests now go through the
actual UI login. Added backcompat tests to CI workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Include concurrency_tests and metrics_tests alongside
integration_tests and backcompat_tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No need to list each test file individually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread passwords/api/tests/backcompat_tests.rs Outdated
Comment thread passwords/api/tests/common.rs Outdated
Comment thread passwords/api/tests/common.rs Outdated
Comment thread passwords/app/e2e/passwords.spec.js Outdated
Remove verbose doc headers, remove OLD_RAW_USER cleanup code that was
never needed on main, and update e2e test to verify passwords decrypt
to expected plaintext values through the UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…in CI

Use current_user (re-read after lock) instead of stale user from auth
time for stored_passwords count check and re-encryption. Prevents
silent data loss when a concurrent add_stored_password runs between
auth and lock acquisition.

Run concurrency tests 10 times in CI to catch intermittent races.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xumaple xumaple changed the title Add backwards compatibility tests Add backwards compatibility tests and fix concurrent mutation data loss Apr 11, 2026
@xumaple xumaple merged commit 49c2cda into main Apr 11, 2026
5 checks passed
@xumaple xumaple deleted the xumaple/copilot/backcompat-test branch April 11, 2026 06:20
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.

Backwards compatibility test

1 participant