feat: add RAG corpus versioning and source policy backend
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 34s
CI / test-python-backend-compliance (push) Successful in 32s
CI / test-python-document-crawler (push) Successful in 23s
CI / test-python-dsms-gateway (push) Successful in 18s

Part 1 — RAG Corpus Versioning:
- New DB table compliance_corpus_versions (migration 017)
- Go CorpusVersionStore with CRUD operations
- Assessment struct extended with corpus_version_id
- API endpoints: GET /rag/corpus-status, /rag/corpus-versions/:collection
- RAG routes (search, regulations) now registered in main.go
- Ingestion script registers corpus versions after each run
- Frontend staleness badge in SDK sidebar

Part 3 — Source Policy Backend:
- New FastAPI router with CRUD for allowed sources, PII rules,
  operations matrix, audit trail, stats, and compliance report
- SQLAlchemy models for all source policy tables (migration 001)
- Frontend API base corrected from edu-search:8088/8089 to
  backend-compliance:8002/api

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-02 07:58:08 +01:00
parent 187dbf1b77
commit a228b3b528
15 changed files with 2020 additions and 11 deletions

View File

@@ -102,6 +102,9 @@ const initialState: SDKState = {
// IACE (Industrial AI Compliance Engine)
iaceProjects: [],
// RAG Corpus Versioning
ragCorpusStatus: null,
// Security
sbom: null,
securityIssues: [],

View File

@@ -975,6 +975,22 @@ export interface SBOMDependency {
to: string
}
// RAG Corpus Versioning
export interface RAGCorpusCollectionStatus {
id: string
current_version: string
documents_count: number
chunks_count: number
regulations: string[]
last_updated: string
digest: string
}
export interface RAGCorpusStatus {
collections: Record<string, RAGCorpusCollectionStatus>
fetchedAt: string
}
export interface SBOM {
format: 'CycloneDX' | 'SPDX'
version: string
@@ -1504,6 +1520,9 @@ export interface SDKState {
// IACE (Industrial AI Compliance Engine)
iaceProjects: IACEProjectSummary[]
// RAG Corpus Versioning
ragCorpusStatus: RAGCorpusStatus | null
// Security
sbom: SBOM | null
securityIssues: SecurityIssue[]