ci: preserve complete NexVerse workflow and add simulator web smoke gate

This commit is contained in:
OpenGenesis (MPL 2.0) committed 2026-11-17 16:53:41 +01:00
1 parent 62b0ea3d69
commit a542ced14c
1 file changed
+650
+650
View File
@@ -998,3 +998,653 @@ jobs:
- name: Runtime smoke test World API
shell: bash
run: |
set -euo pipefail
cd bin
dotnet Robust.dll -inifile Robust.NexVerseApi.Tests.ini > ../nexverse-api-smoke.log 2>&1 &
ROBUST_PID=$!
cleanup() {
kill "$ROBUST_PID" 2>/dev/null || true
wait "$ROBUST_PID" 2>/dev/null || true
}
trap cleanup EXIT
READY=0
# Robust startup time varies on shared CI runners after full native builds.
# Give the control plane 30 seconds while still failing immediately if the process exits.
for i in $(seq 1 120); do
if curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/health > /tmp/nexverse-health.json; then
READY=1
break
fi
if ! kill -0 "$ROBUST_PID" 2>/dev/null; then
echo "::error::Robust exited before World API became ready."
cat ../nexverse-api-smoke.log
exit 1
fi
sleep 0.25
done
if [ "$READY" -ne 1 ]; then
echo "::error::World API did not become ready."
cat ../nexverse-api-smoke.log
exit 1
fi
grep -F '"status": "ok"' /tmp/nexverse-health.json
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/version > /tmp/nexverse-version.json
grep -F '"server_version": "OpenGenesisLINK Generation 1"' /tmp/nexverse-version.json
grep -F '"generation": "Generation 1"' /tmp/nexverse-version.json
grep -F '"release_channel": "dev"' /tmp/nexverse-version.json
grep -F '"api_version": "v1"' /tmp/nexverse-version.json
grep -F '"language": "de-DE"' /tmp/nexverse-version.json
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/openapi.json > /tmp/nexverse-openapi.json
grep -F '"openapi": "3.1.0"' /tmp/nexverse-openapi.json
python3 - <<'PY'
import json
with open("/tmp/nexverse-openapi.json", "r", encoding="utf-8") as handle:
doc = json.load(handle)
schemas = doc["components"]["schemas"]
for required in (
"Error",
"Pagination",
"User",
"Region",
"GridRegionPlacement",
"GridCell",
"GridLayoutResponse",
"GridCellResponse",
"GridPlacementValidationResponse",
"NodeRegion",
"Node",
"NodeListResponse",
"NodeResponse",
"InventoryPermissions",
"InventoryFolder",
"InventoryItem",
"InventoryTreeResponse",
"InventoryFolderContentResponse",
"InventoryItemResponse",
"InventorySearchScan",
"InventorySearchResponse",
"InventoryItemCreateRequest",
"InventoryItemCreateResponse",
"InventoryLinkCreateRequest",
"InventoryLinkCreateResponse",
"InventoryItemCopyRequest",
"InventoryItemCopyResponse",
"InventoryRestoreRequest",
"InventoryFolderRestoreResponse",
"InventoryItemRestoreResponse",
"Estate",
"EstateListResponse",
"EstateResponse",
"EstatePolicies",
"EstateManagement",
"EstateCreateRequest",
"EstateUpdateRequest",
"EstateManagementResponse",
"EstateRegionAssignmentResponse",
"RegionCreateRequest",
"RegionPlacementRequest",
"RegionLifecycleRequest",
"RegionOperation",
"RegionMutationAcceptedResponse",
"RegionOperationResponse",
"UserCreateRequest",
"UserCreateResponse",
"ApiKey",
"AuditEvent",
):
assert required in schemas, f"missing OpenAPI schema: {required}"
user_post = doc["paths"]["/api/v1/users"]["post"]
assert user_post["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/UserCreateRequest"
assert user_post["responses"]["201"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/UserCreateResponse"
user_schema = schemas["User"]
for required in ("username", "display_name", "is_display_name_default"):
assert required in user_schema["required"], f"User schema missing required display-name field: {required}"
assert user_schema["properties"]["display_name"]["maxLength"] == 31
assert user_schema["properties"]["display_name_changed"]["minimum"] == 0
assert user_schema["properties"]["display_name_next_update"]["minimum"] == 0
assert schemas["UserUpdateRequest"]["properties"]["display_name"]["maxLength"] == 31
estates_get = doc["paths"]["/api/v1/estates"]["get"]
assert estates_get["x-nexverse-scope"] == "estates:read"
assert estates_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateListResponse"
assert {p["name"] for p in estates_get["parameters"]} == {"q", "owner_id", "limit", "offset"}
assert schemas["Estate"]["required"] == ["estate_id", "name", "owner_id", "parent_estate_id", "region_count"]
estate_get = doc["paths"]["/api/v1/estates/{estateId}"]["get"]
assert estate_get["x-nexverse-scope"] == "estates:read"
assert estate_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateResponse"
assert [p["name"] for p in estate_get["parameters"]] == ["estateId"]
assert estate_get["parameters"][0]["in"] == "path" and estate_get["parameters"][0]["required"]
estate_post = doc["paths"]["/api/v1/estates"]["post"]
assert estate_post["x-nexverse-scope"] == "estates:manage"
assert estate_post["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateCreateRequest"
assert estate_post["responses"]["201"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateManagementResponse"
estate_patch = doc["paths"]["/api/v1/estates/{estateId}"]["patch"]
assert estate_patch["x-nexverse-scope"] == "estates:manage"
assert estate_patch["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateUpdateRequest"
assert estate_patch["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateManagementResponse"
estate_management = doc["paths"]["/api/v1/estates/{estateId}/management"]["get"]
assert estate_management["x-nexverse-scope"] == "estates:manage"
assert estate_management["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateManagementResponse"
estate_region_put = doc["paths"]["/api/v1/estates/{estateId}/regions/{regionId}"]["put"]
assert estate_region_put["x-nexverse-scope"] == "estates:manage"
assert estate_region_put["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/EstateRegionAssignmentResponse"
assert [p["name"] for p in estate_region_put["parameters"]] == ["estateId", "regionId"]
assert schemas["EstateCreateRequest"]["required"] == ["name", "owner_id"]
for prop in ("managers", "allowed_residents", "banned_residents", "allowed_groups"):
assert schemas["EstateManagement"]["properties"][prop]["type"] == "array"
assert schemas["EstatePolicies"]["properties"]["allow_voice"]["type"] == "boolean"
region_get = doc["paths"]["/api/v1/regions"]["get"]
assert region_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionSearchResponse"
region_post = doc["paths"]["/api/v1/regions"]["post"]
assert region_post["x-nexverse-scope"] == "regions:manage"
assert region_post["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionCreateRequest"
assert region_post["responses"]["202"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionMutationAcceptedResponse"
placement_patch = doc["paths"]["/api/v1/regions/{regionId}/placement"]["patch"]
assert placement_patch["x-nexverse-scope"] == "regions:manage"
assert placement_patch["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionPlacementRequest"
assert placement_patch["responses"]["202"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionMutationAcceptedResponse"
lifecycle_post = doc["paths"]["/api/v1/regions/{regionId}/lifecycle"]["post"]
assert lifecycle_post["x-nexverse-scope"] == "regions:manage"
assert lifecycle_post["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionLifecycleRequest"
assert lifecycle_post["responses"]["202"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionMutationAcceptedResponse"
assert {p["name"] for p in lifecycle_post["parameters"]} == {"regionId", "Idempotency-Key"}
assert schemas["RegionLifecycleRequest"]["properties"]["action"]["enum"] == ["start", "stop", "restart"]
assert schemas["RegionOperation"]["properties"]["operation"]["enum"] == ["create", "move", "start", "stop", "restart"]
operation_get = doc["paths"]["/api/v1/region-operations/{operationId}"]["get"]
assert operation_get["x-nexverse-scope"] == "regions:read"
assert operation_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/RegionOperationResponse"
grid_layout = doc["paths"]["/api/v1/grid/layout"]["get"]
assert grid_layout["x-nexverse-scope"] == "regions:read"
assert grid_layout["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/GridLayoutResponse"
assert {p["name"] for p in grid_layout["parameters"]} == {"min_x", "max_x", "min_y", "max_y"}
assert all(p["schema"]["type"] == "integer" for p in grid_layout["parameters"])
grid_cell = doc["paths"]["/api/v1/grid/cells/{x}/{y}"]["get"]
assert grid_cell["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/GridCellResponse"
assert [p["name"] for p in grid_cell["parameters"]] == ["x", "y"]
assert all(p["in"] == "path" and p["required"] for p in grid_cell["parameters"])
placement = doc["paths"]["/api/v1/grid/validate-placement"]["get"]
assert placement["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/GridPlacementValidationResponse"
assert {p["name"] for p in placement["parameters"]} == {"x", "y", "size_x", "size_y"}
assert schemas["GridCell"]["properties"]["status"]["enum"] == ["free", "occupied", "reserved", "conflict"]
assert schemas["GridRegionPlacement"]["properties"]["size_x"]["maximum"] == 4096
for field in ("grid_x", "grid_y", "world_x", "world_y"):
assert field in schemas["Region"]["required"], f"Region schema missing coordinate: {field}"
assert schemas["Region"]["properties"][field]["type"] == "integer"
assert "node_id" in schemas["GridRegionPlacement"]["properties"]
assert "node_state" in schemas["GridRegionPlacement"]["properties"]
assert schemas["Node"]["properties"]["managed_region_commands"]["type"] == "boolean"
assert schemas["Node"]["properties"]["cross_region_object_messaging"]["type"] == "boolean"
assert schemas["Node"]["properties"]["cross_owner_object_messaging"]["type"] == "boolean"
assert schemas["Node"]["properties"]["object_messages_per_second"]["maximum"] == 200
assert schemas["Node"]["properties"]["object_message_max_age_seconds"]["maximum"] == 300
nodes_get = doc["paths"]["/api/v1/nodes"]["get"]
assert nodes_get["x-nexverse-scope"] == "simulators:read"
assert nodes_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/NodeListResponse"
node_get = doc["paths"]["/api/v1/nodes/{nodeId}"]["get"]
assert node_get["x-nexverse-scope"] == "simulators:read"
assert node_get["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/NodeResponse"
assert [p["name"] for p in node_get["parameters"]] == ["nodeId"]
assert node_get["parameters"][0]["in"] == "path" and node_get["parameters"][0]["required"]
assert schemas["Node"]["properties"]["state"]["enum"] == ["online", "stale", "offline"]
inventory_search = doc["paths"]["/api/v1/inventory/search"]["get"]
assert inventory_search["x-nexverse-scope"] == "inventory:read"
assert [p["name"] for p in inventory_search["parameters"]] == ["owner_id", "q", "limit"]
inventory_create = doc["paths"]["/api/v1/inventory/items"]["post"]
assert inventory_create["x-nexverse-scope"] == "admin:*"
assert inventory_create["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryItemCreateRequest"
assert inventory_create["responses"]["201"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryItemCreateResponse"
inventory_links = doc["paths"]["/api/v1/inventory/links"]["post"]
assert inventory_links["x-nexverse-scope"] == "inventory:write"
assert inventory_links["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryLinkCreateRequest"
assert inventory_links["responses"]["201"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryLinkCreateResponse"
assert schemas["InventorySearchResponse"]["properties"]["scan"]["$ref"] == "#/components/schemas/InventorySearchScan"
assert schemas["InventoryItem"]["properties"]["permissions"]["$ref"] == "#/components/schemas/InventoryPermissions"
inventory_copy = doc["paths"]["/api/v1/inventory/items/copy"]["post"]
assert inventory_copy["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryItemCopyRequest"
folder_restore = doc["paths"]["/api/v1/inventory/folders/{folderId}/restore"]["post"]
assert folder_restore["requestBody"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryRestoreRequest"
item_restore = doc["paths"]["/api/v1/inventory/items/{itemId}/restore"]["post"]
assert item_restore["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == "#/components/schemas/InventoryItemRestoreResponse"
for inventory_path in (
"/api/v1/inventory/tree",
"/api/v1/inventory/folders",
"/api/v1/inventory/folders/{folderId}",
"/api/v1/inventory/items",
"/api/v1/inventory/items/{itemId}",
"/api/v1/inventory/items/copy",
"/api/v1/inventory/folders/{folderId}/restore",
"/api/v1/inventory/items/{itemId}/restore",
"/api/v1/inventory/links",
"/api/v1/inventory/lost-and-found",
"/api/v1/inventory/trash/empty",
):
assert inventory_path in doc["paths"], f"Inventory OpenAPI path missing: {inventory_path}"
for discovery_path in (
"/api/v1/search",
"/api/v1/places",
"/api/v1/places/{placeId}",
"/api/v1/events",
"/api/v1/classifieds",
"/api/v1/land-portal",
"/api/v1/land-portal/owned",
"/api/v1/destinations",
"/api/v1/destinations/categories",
"/api/v1/destinations/{destinationId}",
"/api/v1/destinations/{destinationId}/visit",
"/api/v1/destinations/{destinationId}/moderation",
):
assert discovery_path in doc["paths"], f"Discovery OpenAPI path missing: {discovery_path}"
assert doc["paths"]["/api/v1/search"]["get"]["security"] == []
assert doc["paths"]["/api/v1/places"]["get"]["security"] == []
assert doc["paths"]["/api/v1/places"]["post"]["x-nexverse-scope"] == "discovery:manage"
assert doc["paths"]["/api/v1/destinations"]["post"]["x-nexverse-scope"] == "discovery:submit"
assert doc["paths"]["/api/v1/destinations/{destinationId}/moderation"]["post"]["x-nexverse-scope"] == "discovery:manage"
assert doc["components"]["securitySchemes"]["apiKeyAuth"]["name"] == "X-NexVerse-Api-Key"
assert doc["x_nexverse_idempotency"]["protected_operations"] == [
"POST /api/v1/users",
"POST /api/v1/regions",
"PATCH /api/v1/regions/{regionId}/placement",
"POST /api/v1/regions/{regionId}/lifecycle",
]
assert "/api/v1/docs" in doc["paths"]
assert doc["x_nexverse_language"] == "de-DE"
assert doc["x_nexverse_version_history"][0]["api_version"] == "v1"
history = doc["x_nexverse_version_history"]
assert [item["server_line"] for item in history[:9]] == [
"0.9.4.0", "0.9.3.13", "0.9.3.12", "0.9.3.10", "0.9.3.8",
"0.9.3.7", "0.9.3.6", "0.9.3.5", "0.9.3.4",
]
assert history[0]["status"] == "development"
assert [item["status"] for item in history[:9]] == [
"development", "release", "release", "release", "release",
"completed", "completed", "completed", "release",
]
assert doc["x_nexverse_changelog"]
assert doc["x_nexverse_changelog"][0]["version"] == "0.9.4.0"
assert doc["x_nexverse_changelog"][0]["status"] == "development"
assert "0.9.3.1 Dev" not in json.dumps(doc, ensure_ascii=False)
assert "Resident and Hypergrid statistics dashboard" not in json.dumps(doc, ensure_ascii=False)
assert "Legacy Cleanup and Platform Foundation" not in json.dumps(doc, ensure_ascii=False)
display_change = next(
item for item in doc["x_nexverse_changelog"]
if item["title"] == "Persistente Display-Name-Grundlage"
)
assert display_change["status"] == "implemented"
assert display_change["category"] == "identity"
assert "/api/v1/users/{principalId}" in display_change["endpoints"]
dev_start = next(item for item in doc["x_nexverse_changelog"] if item["title"] == "NexVerse 0.9.3.3 Dev gestartet")
assert dev_start["status"] == "development"
estate_change = next(item for item in doc["x_nexverse_changelog"] if item["title"] == "Estate-Verwaltung: Owner, Listen, Policies und Regionszuordnung")
assert estate_change["status"] == "implemented"
assert "/api/v1/estates" in estate_change["endpoints"]
assert "/api/v1/estates/{estateId}" in estate_change["endpoints"]
assert "/api/v1/estates/{estateId}/management" in estate_change["endpoints"]
assert "/api/v1/estates/{estateId}/regions/{regionId}" in estate_change["endpoints"]
roadmap = doc["x_nexverse_roadmap"]
assert roadmap["current_milestone"] == "0.9.4.0"
assert roadmap["current_codename"] == "Generation 1"
milestones = {item["version"]: item for item in roadmap["milestones"]}
assert milestones["0.9.3.1"]["status"] == "released"
assert milestones["0.9.3.2"]["status"] == "completed"
assert milestones["0.9.3.2"]["checklist"] == {"completed": 36, "total": 36, "open": 0}
assert milestones["0.9.3.3"]["status"] == "completed"
assert milestones["0.9.3.4"]["status"] == "released"
assert milestones["0.9.3.5"]["status"] == "completed"
assert milestones["0.9.3.5"]["checklist"] == {"completed": 83, "total": 83, "open": 0}
assert milestones["0.9.3.6"]["status"] == "completed"
assert milestones["0.9.3.7"]["status"] == "completed"
assert milestones["0.9.3.8"]["status"] == "released"
assert milestones["0.9.3.9"]["status"] == "deferred"
assert milestones["0.9.3.10"]["status"] == "released"
assert milestones["0.9.3.12"]["status"] == "released"
assert milestones["0.9.3.13"]["status"] == "released"
assert milestones["0.9.4.0"]["status"] == "active"
assert "Pathfinding 2.0" in milestones["0.9.3.10"]["summary"]
assert "My Outfits 2.0" in milestones["0.9.3.10"]["summary"]
from pathlib import Path
roadmap_text = Path("../doc/NexVerse/ROADMAP.md").read_text(encoding="utf-8")
sections = {}
current = None
for line in roadmap_text.splitlines():
if line.startswith("# Milestone "):
current = line[len("# Milestone "):].strip()
sections[current] = {"completed": 0, "total": 0}
continue
if current and (line.startswith("- [x]") or line.startswith("- [X]") or line.startswith("- [ ]")):
sections[current]["total"] += 1
if line.startswith("- [x]") or line.startswith("- [X]"):
sections[current]["completed"] += 1
for source_name, api_version in (
("0.9.3.1 — NEXJAST", "0.9.3.1"),
("0.9.3.2", "0.9.3.2"),
("0.9.3.3", "0.9.3.3"),
("0.9.3.5", "0.9.3.5"),
):
published = milestones[api_version]["checklist"]
parsed = sections[source_name]
assert published["completed"] == parsed["completed"]
assert published["total"] == parsed["total"]
assert published["open"] == parsed["total"] - parsed["completed"]
stats_get = doc["paths"]["/api/v1/statistics/summary"]["get"]
assert stats_get["x-nexverse-scope"] == "statistics:read"
assert {} in stats_get["security"], "statistics aggregate mode must permit anonymous access"
stats_schema = schemas["StatisticsSummaryResponse"]
for required in ("detail_level", "protected_details"):
assert required in stats_schema["required"], f"statistics schema missing required field: {required}"
assert doc["paths"]["/api/v1/users"]["post"]["x-nexverse-audience"] == ["admin"]
assert doc["paths"]["/api/v1/nodes"]["get"]["x-nexverse-audience"] == ["admin", "service"]
assert doc["paths"]["/api/v1/economy/balance"]["get"]["x-nexverse-audience"] == ["citizen", "admin", "service"]
assert doc["paths"]["/api/v1/inventory/tree"]["get"]["x-nexverse-audience"] == ["citizen", "admin", "service"]
# Real simulator Experience routes must appear in OpenAPI with
# their method, service-only security and typed responses.
for experience_path, methods in {
"/api/v1/experiences/script/info": ("get",),
"/api/v1/experiences/script/search": ("get",),
"/api/v1/experiences/script/resolve": ("get",),
"/api/v1/experiences/script/details": ("get",),
"/api/v1/experiences/script/permission": ("get",),
"/api/v1/experiences/script/location": ("get",),
"/api/v1/experiences/script/kv": ("post",),
"/api/v1/experiences/viewer/permissions": ("get", "put"),
"/api/v1/experiences/viewer/group": ("get",),
"/api/v1/experiences/viewer/manage": ("post", "put"),
}.items():
for method in methods:
assert method in doc["paths"][experience_path], (experience_path, method)
viewer = doc["paths"]["/api/v1/experiences/viewer/permissions"]
assert viewer["put"]["x-nexverse-scope"] == "experiences:viewer:permissions"
manager = doc["paths"]["/api/v1/experiences/viewer/manage"]
for method, schema, result_code in (
("post", "ExperienceViewerAcquireRequest", "201"),
("put", "ExperienceViewerProfileRequest", "200"),
):
operation = manager[method]
assert operation["x-nexverse-audience"] == ["service"]
assert operation["x-nexverse-scope"] == "experiences:viewer:manage"
assert operation["security"] == [{"apiKeyAuth": []}]
assert operation["requestBody"]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/" + schema)
assert operation["responses"][result_code]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceViewerManageResponse")
assert schemas["ExperienceViewerAcquireRequest"]["required"] == ["owner_id"]
assert "experience_id" in schemas["ExperienceViewerProfileRequest"]["required"]
assert viewer["put"]["x-nexverse-audience"] == ["service"]
assert viewer["put"]["security"] == [{"apiKeyAuth": []}]
assert viewer["put"]["requestBody"]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceViewerDecisionRequest")
assert viewer["get"]["responses"]["200"]["content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceViewerPermissionReadResponse")
assert {p["name"] for p in viewer["get"]["parameters"]} == {
"resident_id", "experience_id"}
assert "oneOf" in schemas["ExperienceViewerPermissionReadResponse"]
assert doc["paths"]["/api/v1/experiences/script/kv"]["post"]["requestBody"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperienceKvRequest")
assert doc["paths"]["/api/v1/experiences/script/info"]["get"]["responses"]["200"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/ExperiencePublicInfoResponse")
assert "check_original" in schemas["ExperienceKvRequest"]["properties"]
assert doc["x_nexverse_version_history"][0]["status"] == "development"
assert doc["x_nexverse_version_history"][0]["codename"] == "Generation 1"
for path, required_methods in {
"/api/v1/profiles/{principalId}/image": ("get",),
"/api/v1/events/{eventId}": ("get", "patch", "delete"),
"/api/v1/classifieds/{classifiedId}": ("get", "patch", "delete"),
"/api/v1/groups/mine": ("get",),
}.items():
for method in required_methods:
assert method in doc["paths"][path], (path, method)
profile_image = doc["paths"]["/api/v1/profiles/{principalId}/image"]["get"]
assert "image/png" in profile_image["responses"]["200"]["content"]
assert profile_image["responses"]["200"]["content"]["image/png"]["schema"]["format"] == "binary"
assert doc["paths"]["/api/v1/events/{eventId}"]["patch"]["x-nexverse-scope"] == "discovery:manage"
assert doc["paths"]["/api/v1/groups/mine"]["get"]["x-nexverse-scope"] == "groups:read"
assert doc["paths"]["/api/v1/events/{eventId}"]["patch"]["requestBody"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/DiscoveryEventPatch")
assert doc["paths"]["/api/v1/classifieds/{classifiedId}"]["patch"]["requestBody"][
"content"]["application/json"]["schema"]["$ref"] == (
"#/components/schemas/DiscoveryClassifiedPatch")
assert "/api/v1/chatgpt-instructions.md" in doc["paths"]
assert "/api/v1/chatgpt-buergerportal.md" in doc["paths"]
assert "/api/v1/chatgpt-admin.md" in doc["paths"]
assert "x-nexverse-ai-instruction" in doc["paths"]["/api/v1/users"]["post"]
assert "x-nexverse-security-constraints" in doc["paths"]["/api/v1/users"]["post"]
print("NexVerse OpenAPI 3.1 schema contract smoke: OK")
PY
STATS_STATUS=$(curl --silent --max-time 2 -o /tmp/nexverse-statistics.json -w '%{http_code}' http://127.0.0.1:19090/api/v1/statistics/summary)
test "$STATS_STATUS" = "503"
grep -F '"error": "statistics_data_unavailable"' /tmp/nexverse-statistics.json
if [ "$STATS_STATUS" = "404" ]; then
echo "::error::Statistics route disappeared while privileged endpoints are disabled."
exit 1
fi
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/docs > /tmp/nexverse-api-docs.html
grep -F 'OpenGenesisLINK – Control Center' /tmp/nexverse-api-docs.html
# Same-path POST must reach the dedicated auth handler, never return
# the HTML login shell with a misleading HTTP 200. This synthetic
# smoke runs in public-only mode, so real admin login is disabled.
DOCS_LOGIN_STATUS="$(curl --silent --max-time 3 --output /tmp/ogl-docs-login.json --write-out '%{http_code}' \
-X POST -H 'Content-Type: application/json' \
--data '{"username":"ci-user","password":"not-a-real-password"}' \
http://127.0.0.1:19090/api/v1/docs)"
test "$DOCS_LOGIN_STATUS" = 503
grep -F '"error":"admin_login_unavailable"' /tmp/ogl-docs-login.json
# Full Control Center HTML must never be returned without a
# server-verified local administrator token, regardless of UI scripts.
DOCS_STATUS="$(curl --silent --output /tmp/ogl-docs-denied.txt --write-out '%{http_code}' --max-time 3 http://127.0.0.1:19090/api/v1/docs/panel)"
test "$DOCS_STATUS" = 401
if grep -F 'id="page-explorer"' /tmp/ogl-docs-denied.txt; then
echo "::error::Protected OGL admin HTML was exposed anonymously"
exit 1
fi
# The full dashboard is protected and cannot be downloaded anonymously.
# Verify retained explorer/grid functions in its compiled HTML source.
DOCS_SOURCE=../NexVerse/Server/Api/NexApiDocsPage.cs
grep -F 'Was ist neu?' $DOCS_SOURCE
grep -F 'OpenGenesisLINK Entwicklungsplan' $DOCS_SOURCE
grep -F 'Was ist neu?' $DOCS_SOURCE
grep -F 'OpenGenesisLINK Entwicklungsplan' $DOCS_SOURCE
grep -F 'x_nexverse_changelog' $DOCS_SOURCE
grep -F 'x_nexverse_roadmap' $DOCS_SOURCE
grep -F '/api/v1/openapi.json' $DOCS_SOURCE
grep -F 'ChatGPT / Portale' $DOCS_SOURCE
grep -F '/api/v1/chatgpt-instructions.md' $DOCS_SOURCE
grep -F '/api/v1/chatgpt-buergerportal.md' $DOCS_SOURCE
grep -F '/api/v1/chatgpt-admin.md' $DOCS_SOURCE
grep -F 'data-audience-target="citizen"' $DOCS_SOURCE
grep -F 'data-endpoint-audience="admin"' $DOCS_SOURCE
grep -F 'Interaktiver Grid-Planer' $DOCS_SOURCE
grep -F '/api/v1/grid/layout' $DOCS_SOURCE
grep -F '/api/v1/grid/validate-placement' $DOCS_SOURCE
grep -F 'regions:read' $DOCS_SOURCE
grep -F 'Simulator-Nodes' $DOCS_SOURCE
grep -F '/api/v1/nodes' $DOCS_SOURCE
grep -F 'simulators:read' $DOCS_SOURCE
grep -F 'Region erstellen' $DOCS_SOURCE
grep -F 'createGridRegion' $DOCS_SOURCE
grep -F 'moveGridRegion' $DOCS_SOURCE
grep -F 'gridRegionSearch' $DOCS_SOURCE
grep -F 'jumpGridRegion' $DOCS_SOURCE
grep -F 'startGridRegion' $DOCS_SOURCE
grep -F 'stopGridRegion' $DOCS_SOURCE
grep -F 'restartGridRegion' $DOCS_SOURCE
grep -F 'loadGridEstates' $DOCS_SOURCE
grep -F 'gridEstateOptions' $DOCS_SOURCE
grep -F 'loadEstateManagement' $DOCS_SOURCE
grep -F 'createEstateManagement' $DOCS_SOURCE
grep -F 'updateEstateManagement' $DOCS_SOURCE
grep -F 'assignEstateRegion' $DOCS_SOURCE
grep -F 'estates:read' $DOCS_SOURCE
grep -F 'estates:manage' $DOCS_SOURCE
grep -F '/api/v1/estates' $DOCS_SOURCE
grep -F '/api/v1/regions/' $DOCS_SOURCE
grep -F '/lifecycle' $DOCS_SOURCE
grep -F '/api/v1/region-operations/' $DOCS_SOURCE
if grep -F 'localStorage' /tmp/nexverse-api-docs.html || grep -F 'localStorage' "$DOCS_SOURCE"; then
echo "::error::API Control Center must not persist credentials in localStorage."
exit 1
fi
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/chatgpt-instructions.md > /tmp/nexverse-chatgpt.md
grep -F 'OpenGenesisLINK World API - ChatGPT Gesamtanweisung' /tmp/nexverse-chatgpt.md
grep -F 'Buergerportal / Einwohner-Selbstbedienung' /tmp/nexverse-chatgpt.md
grep -F '## Adminbereich' /tmp/nexverse-chatgpt.md
grep -F '/api/v1/openapi.json' /tmp/nexverse-chatgpt.md
grep -F 'experiences:viewer:permissions' /tmp/nexverse-chatgpt.md
grep -F 'experiences:viewer:manage' /tmp/nexverse-chatgpt.md
grep -F 'Script-/Service-Integrationen' /tmp/nexverse-chatgpt.md
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/chatgpt-buergerportal.md > /tmp/nexverse-chatgpt-citizen.md
grep -F 'ChatGPT Anweisung Buergerportal' /tmp/nexverse-chatgpt-citizen.md
grep -F 'admin:* gehoeren nicht in das Buergerportal' /tmp/nexverse-chatgpt-citizen.md
grep -F 'Viewer-CAPS' /tmp/nexverse-chatgpt-citizen.md
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/chatgpt-admin.md > /tmp/nexverse-chatgpt-admin.md
grep -F 'ChatGPT Anweisung Adminbereich' /tmp/nexverse-chatgpt-admin.md
grep -F 'Administrative Mutationen nur mit ausdruecklicher Benutzerabsicht' /tmp/nexverse-chatgpt-admin.md
grep -F 'experiences:viewer:permissions' /tmp/nexverse-chatgpt-admin.md
grep -F 'experiences:viewer:manage' /tmp/nexverse-chatgpt-admin.md
# Validate the actual server-generated Markdown, not merely source
# markers: every documented full-index path must equal the running
# server OpenAPI, and citizen/admin indexes must respect audiences.
curl --silent --fail --max-time 5 \
http://127.0.0.1:19090/api/v1/openapi.json \
> /tmp/nexverse-chatgpt-openapi.json
python3 "$GITHUB_WORKSPACE/tools/ci/verify_worldapi_chatgpt_runtime.py" \
--openapi /tmp/nexverse-chatgpt-openapi.json \
--all /tmp/nexverse-chatgpt.md \
--citizen /tmp/nexverse-chatgpt-citizen.md \
--admin /tmp/nexverse-chatgpt-admin.md
ledger-db-matrix:
name: NV dollar live database matrix
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:11.4
env:
MARIADB_ROOT_PASSWORD: ledgerroot
MARIADB_DATABASE: ogl_ledger_ci
MARIADB_USER: ledger
MARIADB_PASSWORD: ledgerpass
ports:
- 3306
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=5s
--health-timeout=5s
--health-retries=24
postgres:
image: postgres:16
env:
POSTGRES_DB: ogl_ledger_ci
POSTGRES_USER: ledger
POSTGRES_PASSWORD: ledgerpass
ports:
- 5432
options: >-
--health-cmd="pg_isready -U ledger -d ogl_ledger_ci"
--health-interval=5s
--health-timeout=5s
--health-retries=24
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Verify bundled database providers
shell: bash
run: |
test -f bin/MySql.Data.dll
test -f bin/Npgsql.dll
- name: Run live NV dollar ledger matrix
shell: bash
env:
NEX_LEDGER_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
NEX_LEDGER_POSTGRESQL: "Host=127.0.0.1;Port=${{ job.services.postgres.ports[5432] }};Database=ogl_ledger_ci;Username=ledger;Password=ledgerpass;SSL Mode=Disable;"
run: dotnet run --configuration Release --project tools/ci/NexLedgerSqlMatrixRegression/NexLedgerSqlMatrixRegression.csproj
- name: Run real MariaDB OGL profile feed deletion/retention race regression
shell: bash
env:
NEX_FEED_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
run: dotnet run --configuration Release --project tools/ci/OglProfileFeedMariaDbRegression/OglProfileFeedMariaDbRegression.csproj
- name: Run real MariaDB NexPortalIM archive regression
shell: bash
env:
NEX_PORTAL_IM_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
run: dotnet run --configuration Release --project tools/ci/NexPortalImMariaDbRegression/NexPortalImMariaDbRegression.csproj
- name: Run real MariaDB NPC owner direct-IM archive regression (R620)
shell: bash
env:
NEX_NPC_CHAT_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
run: dotnet run --configuration Release --project tools/ci/NexNpcChatStoreRegression/NexNpcChatStoreRegression.csproj
- name: Run real MariaDB NexGroups authorization and invitation regression
shell: bash
env:
NEX_GROUPS_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
run: |
chmod +x runprebuild.sh
./runprebuild.sh
dotnet run --configuration Release --project tools/ci/NexGroupsSqlAuthorizationRegression/NexGroupsSqlAuthorizationRegression.csproj
- name: Run signed bearer HTTP NexGroups authorization regression
shell: bash
env:
NEX_GROUPS_MARIADB: "Data Source=127.0.0.1;Port=${{ job.services.mariadb.ports[3306] }};Database=ogl_ledger_ci;User ID=ledger;Password=ledgerpass;Old Guids=true;SslMode=None;"
run: dotnet run --configuration Release --project tools/ci/NexGroupsHttpRegression/NexGroupsHttpRegression.csproj