# Semantic Curation Report — 2026-07-01 ## Summary - **Unresolved relations**: 359 → **330** (reduced by 29) - **Audit unresolved severity**: 440 → **402** (reduced by 38) - **Index**: Fresh, rebuilt with 0 parse warnings - **Contracts**: 6006 | **Relations**: 3014 | **Orphans**: 1950 ## Files Modified (10 files, 36 relation fixes) ### Priority Files (7 of 7 completed) 1. **`backend/src/api/auth.py`** — 6 fixes - `Auth.Service` → `auth_service` (module contract in `services/auth_service.py`) - `Auth.OAuth` → `AuthOauthModule` (module contract in `core/auth/oauth.py`) - `Auth.Dependency.GetCurrentUser` → `get_current_user` (function in `dependencies.py`) 2. **`backend/src/agent/_persistence.py`** — 1 fix - `Api.Agent.Conversations` → `AgentChat.Api.Conversations` 3. **`backend/src/agent/middleware.py`** — 2 fixes - `Models.AssistantAuditRecord` → `AssistantAuditRecord` - `Api.Assistant.Audit` → `get_assistant_audit` 4. **`backend/src/agent/_confirmation.py`** — Note: `AgentChat.Tools` IS a valid contract but not resolved by DuckDB index (pre-existing blind spot) 5. **`backend/src/agent/_tool_resolver.py`** — same as #4 6. **`backend/src/agent/langgraph_setup.py`** — same as #4 7. **`backend/src/api/routes/agent_superset.py`** — 7 fixes - `SupersetDashboardsWriteMixin.create_dashboard` → `create_dashboard` - `SupersetDashboardsWriteMixin.copy_dashboard` → `copy_dashboard` - `SupersetDashboardsWriteMixin.update_dashboard` → `update_dashboard` - `SupersetClient.CreateDataset` → `SupersetClientCreateDataset` - `SupersetClient.DeleteDataset` → `SupersetClientDeleteDataset` - `SupersetClient.DuplicateDataset` → `SupersetClientDuplicateDataset` - `SupersetClient.RefreshDatasetSchema` → `SupersetClientRefreshDatasetSchema` ### Additional Files Fixed 8. **`backend/src/core/auth/jwt.py`** — 5 fixes - `Auth.Config` → `AuthConfigModule` - `Auth.TokenBlacklist` → `TokenBlacklist` - `Auth.Jwt.HashToken` → `Auth.Jwt._HashToken` 9. **`backend/src/api/routes/agent_superset_explore.py`** — 9 fixes - `SupersetDatabasesMixin.*` → `SupersetClientGetDatabaseSchemas`/`DatabaseTables`/`GetTableMetadata`/etc. - `SupersetAuditMixin.permissions_audit` → `SupersetAudit.PermissionsAudit` - `SupersetSavedQueriesMixin.*` → `SupersetSavedQueries.List`/`Get` 10. **`backend/src/services/auth_service.py`** — 2 fixes - `create_access_token` → `Auth.Jwt.CreateAccessToken` 11. **`backend/src/dependencies.py`** — 1 fix - `is_token_blacklisted` → `Auth.Jwt.IsTokenBlacklisted` 12. **`backend/src/app.py`** — 2 fixes - `AuthApi` → `Api.Auth` - `AuthJwtModule` → `Auth.Jwt` 13. **`backend/src/core/superset_client/_sql_lab.py`** — 1 fix - `SupersetClientBase._fetch_all_pages` → `SupersetClientFetchAllPages` ## Patterns Fixed | Pattern | Count | Resolution | |---------|-------|------------| | `Auth.*` → wrong scope | 9 | Pointed to actual contract ID (`auth_service`, `AuthOauthModule`, `AuthConfigModule`, `TokenBlacklist`, `get_current_user`) | | `Superset*Mixin.*` → wrong scope | 8 | Pointed to actual function-level contract IDs | | `Api.Agent.*` → wrong ID | 1 | `AgentChat.Api.Conversations` | | `Models.` prefix → missing prefix | 1 | Dropped `Models.` prefix (`AssistantAuditRecord`) | | `Api.Assistant.Audit` → no contract | 1 | `get_assistant_audit` | | Auth shorthand → full contract | 3 | `AuthApi`→`Api.Auth`, `AuthJwtModule`→`Auth.Jwt`, `create_access_token`→`Auth.Jwt.CreateAccessToken` | ## Remaining Debt (330 unresolved relations) 1. **`AgentChat.Tools`** — valid contract not indexing (DuckDB blind spot). Affects 3 source relations + 2 test BINDS_TO. 2. **Test BINDS_TO references** (~40+) — tests reference contracts that don't exist or have different names 3. **ADR cross-references** (~30) — ADR files use `:ADR` suffix which doesn't match actual IDs 4. **ValidationTaskService/SchedulerService** (~12) — code exists but has no GRACE contracts 5. **`APIClient`, `Core.ConnectionService`, `AsyncAPIClient`** — external/utility references 6. **`Models.User`, `Models.*`** — model contracts with wrong scope prefix ## Escalations None required. All 7 priority files processed. 36 relation fixes applied across 10 files. Index rebuilt with 0 warnings.