Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a43b9b676 | ||
|
|
206873b62a |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@govoplan/access-webui",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.21",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "webui/src/index.ts",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "govoplan-access"
|
||||
version = "0.1.19"
|
||||
version = "0.1.21"
|
||||
description = "GovOPlaN access platform module with identity, auth, RBAC, and scope primitives."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""GovOPlaN access platform module."""
|
||||
|
||||
__version__ = "0.1.19"
|
||||
__version__ = "0.1.21"
|
||||
|
||||
@@ -850,6 +850,7 @@ class ConfigurationPackageApplyResponse(BaseModel):
|
||||
diagnostics: list[dict[str, Any]] = Field(default_factory=list)
|
||||
created_refs: dict[str, str] = Field(default_factory=dict)
|
||||
updated_refs: dict[str, str] = Field(default_factory=dict)
|
||||
rollback: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class ConfigurationPackageExportRequest(BaseModel):
|
||||
@@ -865,6 +866,7 @@ class ConfigurationPackageExportResponse(BaseModel):
|
||||
fragments: list[dict[str, Any]] = Field(default_factory=list)
|
||||
data_requirements: list[dict[str, Any]] = Field(default_factory=list)
|
||||
diagnostics: list[dict[str, Any]] = Field(default_factory=list)
|
||||
provenance: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class SystemSettingsItem(BaseModel):
|
||||
|
||||
@@ -1036,6 +1036,7 @@ def configuration_package_apply_endpoint(
|
||||
diagnostics=[item.to_dict() for item in result.diagnostics],
|
||||
created_refs=dict(result.created_refs),
|
||||
updated_refs=dict(result.updated_refs),
|
||||
rollback=result.rollback.to_dict() if result.rollback is not None else None,
|
||||
)
|
||||
|
||||
|
||||
@@ -1056,6 +1057,7 @@ def configuration_package_export_endpoint(
|
||||
fragments=[item.to_dict() for item in result.fragments],
|
||||
data_requirements=[item.to_dict() for item in result.data_requirements],
|
||||
diagnostics=[item.to_dict() for item in result.diagnostics],
|
||||
provenance=result.provenance.to_dict() if result.provenance is not None else None,
|
||||
)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,10 @@ from types import SimpleNamespace
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from govoplan_access.backend.api.v1.admin_schemas import (
|
||||
ConfigurationPackageApplyResponse,
|
||||
ConfigurationPackageExportResponse,
|
||||
)
|
||||
from govoplan_access.backend.api.v1.routes import _configuration_context
|
||||
from govoplan_core.core.infrastructure_capabilities import (
|
||||
InfrastructureCapabilityReceiptError,
|
||||
@@ -16,6 +20,39 @@ from govoplan_core.core.provider_governance import (
|
||||
|
||||
|
||||
class ConfigurationPackageContextTests(unittest.TestCase):
|
||||
def test_api_responses_preserve_rollback_and_redacted_export_provenance(self) -> None:
|
||||
applied = ConfigurationPackageApplyResponse(
|
||||
rollback={
|
||||
"status": "database_restore_required",
|
||||
"summary": "Snapshot is the generic rollback boundary.",
|
||||
"recovery_action": "Retain the snapshot.",
|
||||
}
|
||||
)
|
||||
exported = ConfigurationPackageExportResponse(
|
||||
provenance={
|
||||
"exported_at": "2026-08-22T12:00:00+00:00",
|
||||
"source_core_version": "0.1.35",
|
||||
"module_versions": {"forms": "0.1.20"},
|
||||
"tenant_id": "tenant-1",
|
||||
"exporter_id": "user-1",
|
||||
"selection": {
|
||||
"scopes": ["tenant"],
|
||||
"module_ids": ["forms"],
|
||||
"object_refs": [],
|
||||
},
|
||||
"redacted_secret_keys": ["credential_ref"],
|
||||
}
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
"database_restore_required",
|
||||
applied.model_dump()["rollback"]["status"],
|
||||
)
|
||||
self.assertEqual(
|
||||
["credential_ref"],
|
||||
exported.model_dump()["provenance"]["redacted_secret_keys"],
|
||||
)
|
||||
|
||||
def test_context_carries_operator_scopes_and_validated_infrastructure_receipt(self) -> None:
|
||||
receipt = SimpleNamespace(installation_id="deployment-1")
|
||||
principal = SimpleNamespace(
|
||||
|
||||
@@ -6,6 +6,18 @@ from govoplan_access.backend.manifest import manifest
|
||||
|
||||
|
||||
class InterfaceDocumentationContractTests(unittest.TestCase):
|
||||
def test_all_static_topics_have_complete_german_content(self) -> None:
|
||||
for topic in manifest.documentation:
|
||||
german = (topic.translations or {}).get("de", {})
|
||||
self.assertEqual(
|
||||
{"title", "summary", "body"},
|
||||
set(german),
|
||||
topic.id,
|
||||
)
|
||||
self.assertTrue(
|
||||
all(str(value).strip() for value in german.values()), topic.id
|
||||
)
|
||||
|
||||
def test_access_admin_topics_publish_stable_help_contexts(self) -> None:
|
||||
topics = {topic.id: topic for topic in manifest.documentation}
|
||||
|
||||
@@ -112,9 +124,7 @@ class InterfaceDocumentationContractTests(unittest.TestCase):
|
||||
)
|
||||
|
||||
def test_access_admin_surfaces_remain_declared(self) -> None:
|
||||
surface_ids = {
|
||||
surface.id for surface in manifest.frontend.view_surfaces
|
||||
}
|
||||
surface_ids = {surface.id for surface in manifest.frontend.view_surfaces}
|
||||
self.assertTrue(
|
||||
{
|
||||
"access.admin.system-roles",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@govoplan/access-webui",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.21",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user