Files
Genarrative/deploy/pingora/nginx-route-parity.matrix.json
T
kdletters c2c5e1ced5 发行包上限提升到 200 MiB 并支持 AGC 分片续传上传
- 发行包上限 100→200 MiB、展开总量 250→500 MiB,整包路由请求体上限继续从包上限派生;发行静态资源进程内缓存预算提到 256 MiB
- 反代放行量同步放宽到 210 MiB:Nginx 三份模板的 client_max_body_size、Pingora 网关默认值与 env 样例、路由对照矩阵
- platform-oss 新增内部对象追加写 append_internal_object(_with_retry),以 OSS 返回的 next-append-position 作为权威已收字节
- api-server 新增 upload-state / chunk / complete / reset 四条分片路由,抽出共享收口 confirm_validated_package;偏移不符返回 409 与权威偏移,校验失败删除半包并落 upload_failed
- AGC 新增原生上传器 game_package_upload.rs(内容寻址暂存、分片续传、受控重试、进度事件)与 prepare / upload 两条命令,退役整包回传命令
- 渲染进程改为 prepare → 创建游戏 → 创建版本 → 原生分片上传 → 送审,LocalProjectExportPackagePayload 整包类型退役
- 同时修正 live 用例无法指向本地栈的两处基础设施问题:平台基址按传入 URL 选择,桥接层把 jsdom realm 的 Headers / Blob / FormData 降级成 Node 原生值
- 测试:platform-oss 74、api-server game_distribution 23、AGC 原生 4、发布相关前端 20;live 用例补真实栈「中断 → 续传 → 确认」断言(分片偏移序列 [0, 8388608])
- 文档:玩法创作主规范的上传合同、运维与 Pingora 文档、决策记录、发行里程碑口径,以及新增的续传里程碑与实施计划
2026-09-23 19:06:02 +08:00

372 lines
10 KiB
JSON

{
"version": 1,
"description": "Pingora shadow gateway routes that must stay aligned with the current Genarrative Nginx production/development templates before any public cutover.",
"routes": [
{
"id": "acme_challenge",
"samplePath": "/.well-known/acme-challenge/token",
"expect": {
"kind": "static",
"root": "acme",
"mode": "exact"
},
"nginx": {
"production": [
"location /.well-known/acme-challenge/",
"root /var/www/html;"
]
},
"docs": ["`/.well-known/acme-challenge/*`"]
},
{
"id": "shadow_probe",
"samplePath": "/__genarrative_pingora/healthz",
"expect": {
"kind": "shadow_probe"
},
"docs": ["`/__genarrative_pingora/healthz`"]
},
{
"id": "admin_redirect",
"samplePath": "/admin",
"expect": {
"kind": "redirect_permanent",
"location": "/admin/"
},
"nginx": {
"production": ["location = /admin", "return 301 /admin/;"],
"development": ["location = /admin", "return 301 /admin/;"]
},
"docs": ["`/admin`", "301 到 `/admin/`"]
},
{
"id": "admin_api_proxy",
"samplePath": "/admin/api/users",
"expect": {
"kind": "proxy",
"target": "api",
"bodyLimit": null,
"protectionClass": "admin_api"
},
"nginx": {
"production": [
"location ^~ /admin/api/",
"proxy_pass http://genarrative_api/admin/api/;",
"limit_conn genarrative_api_conn 64;",
"limit_req zone=genarrative_admin_rps burst=16 nodelay;"
],
"development": [
"location ^~ /admin/api/",
"proxy_pass http://genarrative_api/admin/api/;",
"limit_conn genarrative_api_conn 64;",
"limit_req zone=genarrative_admin_rps burst=16 nodelay;"
]
},
"docs": ["`/admin/api/*`"]
},
{
"id": "admin_assets",
"samplePath": "/admin/assets/index.js",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["location ^~ /admin/assets/", "try_files $uri =404;"],
"development": ["location ^~ /admin/assets/", "try_files $uri =404;"]
},
"docs": ["`/admin/assets/*`"]
},
{
"id": "admin_spa_fallback",
"samplePath": "/admin/settings",
"expect": {
"kind": "static",
"root": "web",
"mode": "spa_fallback"
},
"nginx": {
"production": [
"location ^~ /admin/",
"try_files $uri $uri/ /admin/index.html;"
],
"development": [
"location ^~ /admin/",
"try_files $uri $uri/ /admin/index.html;"
]
},
"docs": ["`/admin/*`"]
},
{
"id": "web_assets",
"samplePath": "/assets/app.js",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["location ^~ /assets/", "try_files $uri =404;"],
"development": ["location ^~ /assets/", "try_files $uri =404;"]
},
"docs": ["`/assets/*`"]
},
{
"id": "generic_api_proxy",
"samplePath": "/api/assets/history",
"expect": {
"kind": "proxy",
"target": "api",
"bodyLimit": "default",
"protectionClass": "api"
},
"nginx": {
"production": [
"location ~ ^/api(?:/|$)",
"client_max_body_size 210m;",
"limit_conn genarrative_api_conn 64;",
"limit_req zone=genarrative_api_rps burst=64 nodelay;",
"add_header X-Accel-Buffering no always;"
],
"development": [
"location ~ ^/api(?:/|$)",
"client_max_body_size 210m;",
"limit_conn genarrative_api_conn 64;",
"limit_req zone=genarrative_api_rps burst=64 nodelay;",
"add_header X-Accel-Buffering no always;"
]
},
"docs": ["`/api`、`/api/*`"]
},
{
"id": "spacetime_subscribe",
"samplePath": "/v1/database/genarrative/subscribe",
"expect": {
"kind": "proxy",
"target": "spacetime",
"bodyLimit": null,
"protectionClass": "spacetime"
},
"nginx": {
"production": [
"location ~ ^/v1/database/[^/]+/subscribe$",
"proxy_pass http://127.0.0.1:3101;",
"proxy_set_header Upgrade $http_upgrade;",
"proxy_set_header Connection \"Upgrade\";",
"proxy_read_timeout 3600s;"
],
"development": [
"location ~ ^/v1/database/[^/]+/subscribe$",
"proxy_pass http://127.0.0.1:3101;",
"proxy_set_header Upgrade $http_upgrade;",
"proxy_set_header Connection \"Upgrade\";",
"proxy_read_timeout 3600s;"
]
},
"docs": ["`/v1/database/{db}/subscribe`"]
},
{
"id": "spacetime_identity",
"samplePath": "/v1/identity",
"expect": {
"kind": "proxy",
"target": "spacetime",
"bodyLimit": null,
"protectionClass": "spacetime"
},
"nginx": {
"production": [
"location ^~ /v1/identity",
"proxy_pass http://127.0.0.1:3101;",
"proxy_set_header Upgrade $http_upgrade;",
"proxy_set_header Connection \"Upgrade\";"
],
"development": [
"location ^~ /v1/identity",
"proxy_pass http://127.0.0.1:3101;",
"proxy_set_header Upgrade $http_upgrade;",
"proxy_set_header Connection \"Upgrade\";"
]
},
"docs": ["`/v1/identity*`"]
},
{
"id": "v1_forbidden",
"samplePath": "/v1/ping",
"expect": {
"kind": "not_found"
},
"nginx": {
"production": ["location ^~ /v1/", "return 404;"],
"development": ["location ^~ /v1/", "return 404;"]
},
"docs": ["`/v1/*`"]
},
{
"id": "healthz_forbidden",
"samplePath": "/healthz",
"expect": {
"kind": "not_found"
},
"nginx": {
"production": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
],
"development": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
]
},
"docs": ["`/healthz*`"]
},
{
"id": "readyz_forbidden",
"samplePath": "/readyz",
"expect": {
"kind": "not_found"
},
"nginx": {
"production": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
],
"development": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
]
},
"docs": ["`/readyz*`"]
},
{
"id": "generated_assets_forbidden",
"samplePath": "/generated-puzzle-assets/foo.webp",
"expect": {
"kind": "not_found"
},
"nginx": {
"production": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
],
"development": [
"location ~ ^/(generated-|healthz|readyz)",
"return 404;"
]
},
"docs": ["`/generated-*`"]
},
{
"id": "web_spa_fallback",
"samplePath": "/project",
"expect": {
"kind": "static",
"root": "web",
"mode": "spa_fallback"
},
"nginx": {
"production": [
"# BEGIN GENARRATIVE MAIN SPA ROUTES",
"try_files $uri /index.html =404;"
],
"development": [
"# BEGIN GENARRATIVE MAIN SPA ROUTES",
"try_files $uri /index.html =404;"
]
},
"docs": ["主站 SPA allowlist", "失败回退 `/index.html`"]
},
{
"id": "profile_spa_fallback",
"samplePath": "/profile",
"expect": {
"kind": "static",
"root": "web",
"mode": "spa_fallback"
},
"nginx": {
"production": [
"# BEGIN GENARRATIVE MAIN SPA ROUTES",
"try_files $uri /index.html =404;"
],
"development": [
"# BEGIN GENARRATIVE MAIN SPA ROUTES",
"try_files $uri /index.html =404;"
]
},
"docs": ["主站 SPA allowlist", "失败回退 `/index.html`"]
},
{
"id": "web_spa_case_trailing_slash",
"samplePath": "/PROJECT/",
"expect": {
"kind": "static",
"root": "web",
"mode": "spa_fallback"
},
"nginx": {
"production": ["location ~*", "try_files $uri /index.html =404;"],
"development": ["location ~*", "try_files $uri /index.html =404;"]
},
"docs": ["大小写不敏感", "一个尾部斜杠"]
},
{
"id": "web_unknown_path_exact",
"samplePath": "/some/spa/path",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["location /", "try_files $uri $uri/ =404;"],
"development": ["location /", "try_files $uri $uri/ =404;"]
},
"docs": ["其它 Web 路径", "缺失时返回真实 404"]
},
{
"id": "creation_unknown_path_exact",
"samplePath": "/creation/not-exist",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["try_files $uri $uri/ =404;"],
"development": ["try_files $uri $uri/ =404;"]
},
"docs": ["`/creation/not-exist`"]
},
{
"id": "runtime_unknown_path_exact",
"samplePath": "/runtime/not-exist",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["try_files $uri $uri/ =404;"],
"development": ["try_files $uri $uri/ =404;"]
},
"docs": ["`/runtime/not-exist`"]
},
{
"id": "puzzle_unknown_path_exact",
"samplePath": "/puzzle/not-exist",
"expect": {
"kind": "static",
"root": "web",
"mode": "exact"
},
"nginx": {
"production": ["try_files $uri $uri/ =404;"],
"development": ["try_files $uri $uri/ =404;"]
},
"docs": ["`/puzzle/not-exist`"]
}
]
}