feat/tenants-table-polish #86

Merged
clawdie merged 2 commits from feat/tenants-table-polish into main 2026-06-19 21:41:45 +02:00

2 commits

Author SHA1 Message Date
7da32bafe9 fix(store): polish tenants table — UNIQUE constraints + export + tests
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
- Add UNIQUE on jail_root_path and collection_id to enforce
  the 1:1:1 contract at the schema level
- Include tenants in export_json() so parity diffs are complete
- Add test_tenant_lifecycle: register → get → status transitions
  through full lifecycle (provisioned → active → stopped →
  destroyed) + NotFound errors
- Add test_tenant_uniqueness: duplicate path and collection
  rejected with UNIQUE constraint violations
- Extend test_export_json to assert tenants array present

All 9 store tests pass, full suite green.
2026-06-19 21:38:30 +02:00
6b16281e05 feat(store): tenants table — 1:1:1 map for colibri-vault provision
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
- schema.rs: CREATE TABLE tenants (tenant_id, jail_root_path, collection_id, status)
- lib.rs: Tenant struct + register_tenant/list_tenants/get_tenant/set_tenant_status
- FreeBSD: jail_root_path = /usr/local/bastille/jails/<name>/root
- Linux: jail_root_path = container volume path (portable column)
- Step 2 of HIVE-ONBOARDING plan
2026-06-19 21:30:42 +02:00