Migrate schema 2 ports through frozen readers and expose schema 3 source API
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-09-05 18:23:33 +03:00
parent 0d14438b7b
commit b9f88ce1f3
21 changed files with 7513 additions and 152 deletions
+330 -35
View File
@@ -3,7 +3,7 @@
"info": {
"title": "Arcadia Studio model API",
"version": "1.0.0",
"description": "Current schema-2 snapshots and conditional atomic writes. Request body limit: 8 MiB; at most 200 nested commands; no retained revisions, request receipts, automatic retries or persistent transition plans. See docs/api.rst. Fixed store capacity: 128 models / 256 MiB serialized envelopes. Stateless transition preview/apply. Artifact URI/revision strings remain opaque core fields. Model admission before structural validation: 5,000 graph objects, 20,000 total records and 50,000 ordered references. Preparation uses snapshots outside the catalog lock; final commits recheck the exact ETag."
"description": "Current schema-3 snapshots and conditional atomic writes. Request body limit: 8 MiB; at most 200 nested commands; no retained revisions, request receipts, automatic retries or persistent transition plans. See docs/api.rst. Fixed store capacity: 128 models / 256 MiB serialized envelopes. Stateless transition preview/apply. Artifact URI/revision strings remain opaque core fields. Model admission before structural validation: 5,000 graph objects, 20,000 total records and 50,000 ordered references. Preparation uses snapshots outside the catalog lock; final commits recheck the exact ETag."
},
"servers": [
{
@@ -389,7 +389,7 @@
}
}
},
"description": "Schema-2 native JSON is described below. Schema-1 JSON is also accepted via the core's explicit migration adapter; see docs/language.rst for the legacy contract. Export emits schema 2."
"description": "Schema-3 native JSON is described below. Schema-1 and schema-2 JSON/source are accepted through explicit frozen readers and migration, also on replacement and candidate validation. Reports list preserved Legacy contracts, generated FE endpoint IDs/aliases and boundary orientation defaults. Export emits schema 3 / arcadia 3. See docs/language.rst."
}
},
"/api/v1/projects/{id}": {
@@ -1711,7 +1711,8 @@
"CapabilityExtend",
"CapabilityGeneralization",
"MissionInvolvement",
"SequenceLink"
"SequenceLink",
"PortAllocation"
]
},
"Position": {
@@ -2269,19 +2270,13 @@
"Port": {
"type": "object",
"properties": {
"direction": {
"type": "string",
"enum": [
"In",
"Out",
"InOut"
]
"contract": {
"$ref": "#/components/schemas/PortContract"
},
"interface": {
"legacy": {
"anyOf": [
{
"type": "string",
"format": "uuid"
"$ref": "#/components/schemas/LegacyPortContract"
},
{
"type": "null"
@@ -2290,8 +2285,8 @@
}
},
"required": [
"direction",
"interface"
"contract",
"legacy"
],
"additionalProperties": false
}
@@ -3005,12 +3000,17 @@
"type": "string",
"format": "uuid"
}
},
"oriented": {
"type": "boolean",
"description": "Independent of component port kind/orientation. Old V2 exchanges migrate to true."
}
},
"required": [
"source",
"target",
"items"
"items",
"oriented"
],
"additionalProperties": false
}
@@ -3035,26 +3035,12 @@
"format": "uuid"
},
"source_port": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
"type": "string",
"format": "uuid"
},
"target_port": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
"type": "string",
"format": "uuid"
},
"items": {
"type": "array",
@@ -3322,6 +3308,33 @@
"SequenceLink"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"PortAllocation": {
"type": "object",
"properties": {
"source": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"format": "uuid"
}
},
"required": [
"source",
"target"
],
"additionalProperties": false
}
},
"required": [
"PortAllocation"
],
"additionalProperties": false
}
]
},
@@ -3616,7 +3629,7 @@
"properties": {
"schema_version": {
"type": "integer",
"const": 2
"const": 3
},
"id": {
"type": "string",
@@ -3707,6 +3720,17 @@
},
"model": {
"$ref": "#/components/schemas/Project"
},
"migration": {
"anyOf": [
{
"$ref": "#/components/schemas/MigrationReport"
},
{
"type": "null"
}
],
"description": "Present after legacy import/reopen; excluded from persisted envelopes. Resource identity and revision are unchanged by reopening."
}
},
"required": [
@@ -3745,6 +3769,16 @@
"relations": {
"type": "integer",
"minimum": 0
},
"migration": {
"anyOf": [
{
"$ref": "#/components/schemas/MigrationReport"
},
{
"type": "null"
}
]
}
},
"required": [
@@ -4618,6 +4652,16 @@
"items": {
"$ref": "#/components/schemas/Issue"
}
},
"migration": {
"anyOf": [
{
"$ref": "#/components/schemas/MigrationReport"
},
{
"type": "null"
}
]
}
},
"required": [
@@ -4678,6 +4722,16 @@
"items": {
"$ref": "#/components/schemas/Issue"
}
},
"migration": {
"anyOf": [
{
"$ref": "#/components/schemas/MigrationReport"
},
{
"type": "null"
}
]
}
},
"required": [
@@ -5438,6 +5492,247 @@
"additionalProperties": false
}
]
},
"PortContract": {
"oneOf": [
{
"type": "object",
"properties": {
"FunctionInput": {
"type": "object",
"properties": {
"incoming_items": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
"required": [
"incoming_items"
],
"additionalProperties": false
}
},
"required": [
"FunctionInput"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"FunctionOutput": {
"type": "object",
"properties": {
"outgoing_items": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
"required": [
"outgoing_items"
],
"additionalProperties": false
}
},
"required": [
"FunctionOutput"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Component": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"Standard",
"Flow"
]
},
"orientation": {
"type": "string",
"enum": [
"Unset",
"In",
"Out",
"InOut"
]
}
},
"required": [
"kind",
"orientation"
],
"additionalProperties": false
}
},
"required": [
"Component"
],
"additionalProperties": false
},
{
"type": "string",
"enum": [
"Legacy"
]
}
],
"description": "FunctionInput/Output are SA Function-owned item contracts. Component is SA System/SystemActor-owned; Standard requires Unset. Legacy requires a preserved legacy record and emits compatibility warnings. Mixed Standard/Flow component connections are invalid."
},
"LegacyPortContract": {
"type": "object",
"properties": {
"direction": {
"type": "string",
"enum": [
"In",
"Out",
"InOut"
]
},
"interface": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"direction",
"interface"
],
"additionalProperties": false
},
"MigrationReport": {
"type": "object",
"properties": {
"from_schema": {
"type": "integer",
"enum": [
1,
2
]
},
"to_schema": {
"type": "integer",
"const": 3
},
"preserved_ports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"alias": {
"type": "string"
},
"required_resolution": {
"type": "string"
}
},
"required": [
"id",
"alias",
"required_resolution"
],
"additionalProperties": false
}
},
"generated_endpoints": {
"type": "array",
"items": {
"type": "object",
"properties": {
"exchange": {
"type": "string",
"format": "uuid"
},
"side": {
"type": "string",
"enum": [
"source",
"target"
]
},
"port": {
"type": "string",
"format": "uuid"
},
"owner": {
"type": "string",
"format": "uuid"
},
"alias": {
"type": "string"
}
},
"required": [
"exchange",
"side",
"port",
"owner",
"alias"
],
"additionalProperties": false
}
},
"orientation_defaults": {
"type": "array",
"items": {
"type": "object",
"properties": {
"exchange": {
"type": "string",
"format": "uuid"
},
"oriented": {
"type": "boolean",
"const": true
}
},
"required": [
"exchange",
"oriented"
],
"additionalProperties": false
}
},
"required_resolutions": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
"required": [
"from_schema",
"to_schema",
"preserved_ports",
"generated_endpoints",
"orientation_defaults",
"required_resolutions"
],
"additionalProperties": false,
"description": "Transient observations from explicit V1→V2→V3 or V2→V3 migration. No save or revision increase occurs merely by reading an old envelope."
}
}
}