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,8 +1,12 @@
from .domain.models import Document, IngestionResult
from .ports import PublicationPort
from .governance import authorize
from .settings import Settings
from .kab_ingestion.domain.models import IngestionResult, SourceDocument
from .kab_ingestion.ports.cms import CMSConnector
from .governance import review
def publish_document(document: Document, publisher: PublicationPort, settings: Settings) -> IngestionResult:
ok, reason = authorize(document, settings)
return publisher.publish(document) if ok else IngestionResult(False, document, reason)
def publish_document(document: SourceDocument, cms: CMSConnector | None, enabled: bool, require_approval: bool) -> IngestionResult:
decision = review(document, require_approval)
if not decision.approved:
return IngestionResult(document, False, "rejected", decision.reason)
if not enabled or cms is None:
return IngestionResult(document, True, "validated", "publication disabled")
return IngestionResult(document, True, "published", published_url=str(cms.publish(document)))