Skip to content

feat: Device trust management & recognition (closes #125)#462

Open
noxxxxybot-sketch wants to merge 2 commits intorohitdash08:mainfrom
noxxxxybot-sketch:feat/device-trust-management
Open

feat: Device trust management & recognition (closes #125)#462
noxxxxybot-sketch wants to merge 2 commits intorohitdash08:mainfrom
noxxxxybot-sketch:feat/device-trust-management

Conversation

@noxxxxybot-sketch
Copy link

Summary

Adds device trust management so users can view and manage their trusted devices.

Changes

  • New model: TrustedDevice with device fingerprinting (SHA-256 of User-Agent + IP)
  • New routes: GET/POST/PATCH/DELETE /devices for full CRUD
  • Device fingerprinting: Auto-detects same device, updates last_seen_at on re-trust
  • Tests: Comprehensive coverage for all endpoints including edge cases

Closes #125

Nox and others added 2 commits March 15, 2026 12:08
…08#91)

- Rule-based auto-categorization with 60+ keyword mappings across 10 categories
- Confidence scoring (0.0-1.0) with alternatives ranking
- Learning from user corrections via POST /categorize/learn
- Batch categorization endpoint for multiple transactions
- User-specific learned rules stored in categorization_rules table
- 26 comprehensive tests (all passing, 48 total)

API Endpoints:
- POST /categorize — Categorize single transaction
- POST /categorize/batch — Batch categorize up to 100 transactions
- POST /categorize/learn — Learn from user corrections
- GET /categorize/rules — List learned rules
- DELETE /categorize/rules/:id — Delete a learned rule
- Added TrustedDevice model with user_id, device_name, fingerprint,
  user_agent, ip_address, trusted status, and timestamps
- Added CRUD endpoints: GET /devices, POST /devices,
  DELETE /devices/<id>, PATCH /devices/<id>
- Device fingerprinting via SHA-256 of User-Agent + IP
- Re-trust updates existing records instead of duplicating
- Comprehensive test coverage for all endpoints
- Includes tests for edge cases (missing name, not found, re-trust)
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.

Device trust management & recognition

1 participant