修复 AGC 生成准备依赖全量素材库的问题
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m33s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m41s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m41s
Project CI / Backend tests (pull_request) Failing after 3m38s
Project CI / Frontend tests (pull_request) Successful in 2m27s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m56s
Project CI / Repository checks (pull_request) Successful in 3m1s
Project CI / Native shell tests (pull_request) Successful in 6m12s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m33s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m41s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m41s
Project CI / Backend tests (pull_request) Failing after 3m38s
Project CI / Frontend tests (pull_request) Successful in 2m27s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m56s
Project CI / Repository checks (pull_request) Successful in 3m1s
Project CI / Native shell tests (pull_request) Successful in 6m12s
新增站内与 External v1 单目录读取接口并校验账号归属,保持既有 API 兼容 将已有绑定与 partial 恢复改为按目录 ID 确认,首次建绑不再读取全库 目录缺失或查询失败时停止并保留恢复证据,保持生成幂等与账号隔离 同步 OpenAPI、生成绑定、技术文档及目录读取和生成恢复回归测试
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6203,15 +6203,17 @@ mod tests {
|
||||
"projectId": "source-binding-project"
|
||||
}]}}),
|
||||
);
|
||||
} else if request_line.starts_with("GET /api/external/v1/editor/assets/library ")
|
||||
|| request_line.starts_with("GET /api/editor/assets/library ")
|
||||
} else if request_line.starts_with(
|
||||
"GET /api/external/v1/editor/assets/folders/source-binding-folder ",
|
||||
) || request_line
|
||||
.starts_with("GET /api/editor/assets/folders/source-binding-folder ")
|
||||
{
|
||||
write_json(
|
||||
&mut stream,
|
||||
"200 OK",
|
||||
serde_json::json!({"data": {"library": {"folders": [{
|
||||
serde_json::json!({"data": {"folder": {
|
||||
"folderId": "source-binding-folder"
|
||||
}]}}}),
|
||||
}}}),
|
||||
);
|
||||
} else if request_line
|
||||
.starts_with("POST /api/external/v1/assets/direct-upload-tickets ")
|
||||
@@ -6900,7 +6902,7 @@ mod tests {
|
||||
"generated/owner-b-source.{}",
|
||||
if is_image { "png" } else { "mp4" }
|
||||
);
|
||||
let request_count = if is_image { 6 } else { 7 };
|
||||
let request_count = 6;
|
||||
let server_upload_url = upload_url.clone();
|
||||
let server_object_key = owner_b_object_key.clone();
|
||||
let (sender, receiver) = mpsc::channel();
|
||||
@@ -6935,18 +6937,12 @@ mod tests {
|
||||
serde_json::json!({"data": {"project": {"projectId": "owner-b-project"}}}),
|
||||
);
|
||||
} else if request_line
|
||||
.starts_with("GET /api/external/v1/editor/assets/library ")
|
||||
.starts_with("GET /api/external/v1/editor/assets/folders/owner-b-folder ")
|
||||
{
|
||||
write_json(
|
||||
&mut stream,
|
||||
"200 OK",
|
||||
if is_image {
|
||||
serde_json::json!({"data": {"library": {"folders": [{
|
||||
"folderId": "owner-b-folder"
|
||||
}]}}})
|
||||
} else {
|
||||
serde_json::json!({"data": {"library": {"folders": []}}})
|
||||
},
|
||||
serde_json::json!({"data": {"folder": {"folderId": "owner-b-folder"}}}),
|
||||
);
|
||||
} else if request_line
|
||||
.starts_with("POST /api/external/v1/editor/assets/folders ")
|
||||
@@ -7417,7 +7413,9 @@ mod tests {
|
||||
assert!(requests.iter().all(|request| {
|
||||
let line = request.lines().next().unwrap_or_default();
|
||||
line.starts_with("GET /api/external/v1/editor/projects?view=summary ")
|
||||
|| line.starts_with("GET /api/external/v1/editor/assets/library ")
|
||||
|| line.starts_with(
|
||||
"GET /api/external/v1/editor/assets/folders/source-binding-folder ",
|
||||
)
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -9582,7 +9580,7 @@ mod tests {
|
||||
let server_generated_video = generated_video.clone();
|
||||
let (sender, receiver) = mpsc::channel();
|
||||
let server = std::thread::spawn(move || {
|
||||
for request_index in 0..11 {
|
||||
for request_index in 0..10 {
|
||||
let mut stream = accept_resource_editor_fixture_connection(
|
||||
&listener,
|
||||
"External video fixture",
|
||||
@@ -9608,12 +9606,6 @@ mod tests {
|
||||
"projectId": "external-video-project"
|
||||
}}}),
|
||||
);
|
||||
} else if request_line.starts_with("GET /api/external/v1/editor/assets/library ") {
|
||||
write_json(
|
||||
&mut stream,
|
||||
"200 OK",
|
||||
serde_json::json!({"data": {"library": {"folders": []}}}),
|
||||
);
|
||||
} else if request_line.starts_with("POST /api/external/v1/editor/assets/folders ") {
|
||||
write_json(
|
||||
&mut stream,
|
||||
@@ -9731,7 +9723,7 @@ mod tests {
|
||||
.expect("derive External video");
|
||||
server.join().expect("join External video server");
|
||||
let requests = std::iter::from_fn(|| receiver.try_recv().ok()).collect::<Vec<_>>();
|
||||
assert_eq!(requests.len(), 11);
|
||||
assert_eq!(requests.len(), 10);
|
||||
assert!(requests.iter().all(|request| {
|
||||
!request.starts_with("POST /api/assets/")
|
||||
&& !request.starts_with("GET /api/runtime/external-generation/")
|
||||
|
||||
+6
-4
@@ -400,13 +400,15 @@ fn respond_canvas_context_request(stream: &mut TcpStream, request: &str) -> bool
|
||||
serde_json::json!({"data": {"projects": [{"projectId": REMOTE_PROJECT_ID}]}}),
|
||||
);
|
||||
true
|
||||
} else if line.starts_with("GET /api/external/v1/editor/assets/library ")
|
||||
|| line.starts_with("GET /api/editor/assets/library ")
|
||||
{
|
||||
} else if line.starts_with(&format!(
|
||||
"GET /api/external/v1/editor/assets/folders/{REMOTE_FOLDER_ID} "
|
||||
)) || line.starts_with(&format!(
|
||||
"GET /api/editor/assets/folders/{REMOTE_FOLDER_ID} "
|
||||
)) {
|
||||
write_json(
|
||||
stream,
|
||||
"200 OK",
|
||||
serde_json::json!({"data": {"library": {"folders": [{"folderId": REMOTE_FOLDER_ID}]}}}),
|
||||
serde_json::json!({"data": {"folder": {"folderId": REMOTE_FOLDER_ID}}}),
|
||||
);
|
||||
true
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user