Commit d190ec2
chore(deps): update apache/age, spicedb, and ubi9 base images (#304)
* feat(infrastructure): add SQLAlchemy async database foundation with Alembic
- Add SQLAlchemy 2.0 with asyncpg for async database operations
- Add Alembic for schema migrations
- Add python-ulid for ULID support instead of UUID
- Create read/write engine separation with connection pooling
- Create FastAPI dependency injection for database sessions
- Create SQLAlchemy declarative base with timestamp mixin
- Initialize Alembic with async migration support
- Create initial migration for teams table (ULID primary key)
- Add comprehensive unit tests for engines and dependencies
- Configure Alembic to use settings module for database URL
- Enable ruff post-write hook for migration formatting
Refs: AIHCM-121
* feat(shared-kernel): add authorization abstractions and SpiceDB client
- Add authzed library for SpiceDB integration
- Add python-ulid for ULID support
- Create ResourceType, RelationType, Permission enums (using Group not Team)
- Create AuthorizationProvider protocol for swappable implementations
- Implement SpiceDBClient with async methods for relationships and permissions
- Create SpiceDB schema (.zed) with Tenant→Workspace→Group hierarchy
- Create AuthorizationProbe for domain-oriented observability
- Move ObservationContext to shared_kernel (fix architectural boundary)
- Add 35 unit tests for types and probes
- All 410 tests passing
Refs: AIHCM-122
* ci: automerge mintmaker non-major upgrades if tests pass
* fix(deploy): set postgres uid/gid to 001379999
* refactor(api.iam): rename Role to GroupRole
* refactor(api.iam): add TenantMember value object
* refactor(api.iam): add TenantMemberAdded event and method
* refactor(api.iam): add TenantMemberRemoved event and method
* feat(iam.presentation): add workspace DTOs and router skeleton
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* feat(iam.presentation): implement POST /workspaces endpoint with TDD
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* feat(iam.presentation): implement GET /workspaces/{id} endpoint and add route documentation
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* feat(iam.presentation): implement GET /workspaces list endpoint with TDD
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* feat(iam.presentation): implement DELETE /workspaces/{id} endpoint with TDD
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* fix(shared_kernel): align SpiceDB schema with translator implementation
Fix workspace definition in schema.zed and ConfigMap to match the
relationships actually created by the IAM outbox translator.
Schema changes (workspace definition):
- Add `relation tenant: tenant` for organizational ownership
- Change `relation parent: tenant` to `relation parent: workspace` for hierarchy
- Rename `owner` to `admin` for consistency with tenant/group definitions
- Rename `permission delete` to `permission manage` for consistency
- Add Phase 3 comments for member/permission usage
ConfigMap changes (full sync with schema.zed):
- Apply all workspace definition fixes above
- Add missing `relation member: user` to tenant definition
- Fix tenant `permission view = admin` to `permission view = admin + member`
- Add missing `permission administrate = admin` to tenant definition
- Add missing `api_key` definition (was in schema.zed but not ConfigMap)
- Add future resource type comments
Inconsistencies found and documented:
1. Schema had `relation parent: tenant` but translator writes
`workspace#tenant@tenant` (relation name 'tenant') and
`workspace#parent@workspace` (parent type 'workspace')
2. ConfigMap was missing tenant `member` relation, `administrate`
permission, and entire `api_key` definition
3. RelationType.WORKSPACE enum exists but is unused by any translator
4. Permission.DELETE enum value corresponds to removed `permission delete`
in workspace; may need cleanup in Phase 3
5. Schema `owner` relation on workspace renamed to `admin` to align with
tenant and group naming conventions
All 970 unit tests pass (3 pre-existing SSL failures unrelated).
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* refactor(shared_kernel): remove unused authorization enum values
Remove RelationType.WORKSPACE and Permission.DELETE which have no usage
in the codebase. Neither value corresponds to any relation or permission
in the current SpiceDB schema. They can be re-added when future resource
types (knowledge_graph, data_source) are implemented.
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* fix(shared_kernel): update future schema references to use admin relation
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
* chore(deps): update apache/age, spicedb, and ubi9 base images
- apache/age: release_PG17_1.6.0 → release_PG18_1.7.0
- authzed/spicedb: v1.48.0 → v1.50.0
- ubi9/python-312: pin to digest sha256:d7b4607a...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(deps): pin spicedb-migrate version and update postgres client to PG18
- Pin spicedb-migrate to v1.50.0 to match spicedb service
- Update db-init job and compose postgres client from 17-alpine to 18-alpine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>1 parent d9cb51f commit d190ec2
File tree
7 files changed
+13
-13
lines changed- .github/workflows
- deploy/apps/kartograph/base
- src/api
7 files changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments