decomposer: fix validation failure for Migrate the kab_ingestion domain models, ports, GitHub SCM connector, and SharePoint CMS connector into the repository's app/ package.; Wire the migrated ingestion components into the agent application entry point, card, settings, triggers, governance, publication, and validation layers.; Populate every remaining placeholder file with working application, package, test, dependency, and Kubernetes content.; Verify the migrated agent and completed repository end to end.
Some checks failed
quality-gates / verify (push) Failing after 7s

This commit is contained in:
2026-09-01 14:40:29 +00:00
parent 0437539ea2
commit b080080e26
29 changed files with 355 additions and 134 deletions

View File

@@ -1,11 +1,22 @@
from .domain.models import Document, IngestionRequest
from dataclasses import dataclass
def validate_request(request: IngestionRequest) -> list[str]:
errors = []
if not request.source.repository.strip(): errors.append("repository is required")
if not request.source.path.strip(): errors.append("path is required")
if request.destination not in {"sharepoint"}: errors.append("unsupported destination")
return errors
from .kab_ingestion.domain.models import SourceDocument
def validate_document(document: Document) -> list[str]:
return [] if document.content.strip() else ["document content is empty"]
@dataclass(frozen=True)
class ValidationReport:
valid: bool
errors: tuple[str, ...]
def validate_document(document: SourceDocument) -> ValidationReport:
errors: list[str] = []
if not document.identifier.strip():
errors.append("identifier is required")
if not document.title.strip():
errors.append("title is required")
if not document.body.strip():
errors.append("body is required")
if not document.source.strip():
errors.append("source is required")
return ValidationReport(not errors, tuple(errors))