From 188553a61313674628d9faf6f9e2962b5cdebe42 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 11 Nov 2026 19:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9C=A8=E7=BA=BF=E7=9B=AE?= =?UTF-8?q?=E5=BD=95SQL=E6=95=B0=E5=AD=97=E5=BA=8F=E5=88=97=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E8=A6=86=E7=9B=96=E7=9C=9F=E5=AE=9E=E5=8E=9F=E7=94=9F?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/tests/online_luts.php | 3 ++- Backend/wp-content/mu-plugins/dayu-color-online-luts.php | 2 +- verification/OnlineLUTBackendContracts.json | 6 +++++- verification/OnlineLUTBuildRecovery.json | 9 +++++---- verification/OnlineLUTCatalogLive.json | 9 +++++++++ 开发交接.md | 2 ++ 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 verification/OnlineLUTCatalogLive.json diff --git a/Backend/tests/online_luts.php b/Backend/tests/online_luts.php index ecc28e7..8521d90 100644 --- a/Backend/tests/online_luts.php +++ b/Backend/tests/online_luts.php @@ -27,7 +27,7 @@ class DB { public $prefix='test_'; function prepare($sql,...$args){if(count($args)===1&&is_array($args[0]))$args=$args[0];return array($sql,$args);} function get_var($q){global $bound;$sql=is_array($q)?$q[0]:$q;if(strpos($sql,'app_login_records')!==false)return $bound;if(strpos($sql,'COUNT(')!==false)return 1;return null;} - function get_results($q,$mode=null){global $rows;return array_map(function($r){return (array)$r;},array_values(array_filter($rows,function($r){return $r->status==='published';})));} + function get_results($q,$mode=null){global $rows;return array_map(function($r){$row=(array)$r;$row['id']=(string)$row['id'];$row['file_size']=(string)$row['file_size'];return $row;},array_values(array_filter($rows,function($r){return $r->status==='published';})));} function get_col($q){return array('测试分类');} function esc_like($s){return addcslashes($s,'_%\\');} function get_row($q){global $rows;$id=$q[1][0];$row=$rows[$id]??null;return $row&&$row->status==='published'&&$row->material_type==='lut'?$row:null;} } @@ -76,6 +76,7 @@ $path=$root.'/materials/test.cube';file_put_contents($path,$cube); $rows[1]=(object)array('id'=>1,'title'=>'测试 LUT','category'=>'测试分类','file_size'=>strlen($cube),'checksum'=>hash('sha256',$cube),'material_type'=>'lut','status'=>'published','relative_path'=>'test.cube'); $rows[2]=clone $rows[1];$rows[2]->id=2;$rows[2]->status='draft'; check(count(body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'])===1,'catalogue excludes private drafts'); +$serialized=body(Dayu_Color_Online_LUTs::catalog(new Request(array(),$token)))['items'][0];check(is_int($serialized['id'])&&is_int($serialized['file_size']),'SQL string identifiers and sizes serialize as JSON numbers for the native client'); check(body(Dayu_Color_Online_LUTs::download(new Request(array('id'=>1),$token))) instanceof Dayu_Color_LUT_Binary,'authorized published LUT streams original bytes'); check(denied(Dayu_Color_Online_LUTs::download(new Request(array('id'=>2),$token)),404),'private LUT cannot be downloaded by guessed ID'); $rows[1]->relative_path='../outside.cube';file_put_contents($root.'/outside.cube',$cube); diff --git a/Backend/wp-content/mu-plugins/dayu-color-online-luts.php b/Backend/wp-content/mu-plugins/dayu-color-online-luts.php index c53740f..cea6968 100644 --- a/Backend/wp-content/mu-plugins/dayu-color-online-luts.php +++ b/Backend/wp-content/mu-plugins/dayu-color-online-luts.php @@ -142,7 +142,7 @@ final class Dayu_Color_Online_LUTs { $total=intval($wpdb->get_var($values ? $wpdb->prepare($count, $values) : $count)); $rows=$wpdb->get_results($wpdb->prepare("SELECT id,title,category,file_size,checksum FROM {$table} WHERE {$where} ORDER BY title ASC,id ASC LIMIT %d OFFSET %d", array_merge($values, array($limit,($page-1)*$limit))), ARRAY_A); $categories=$wpdb->get_col("SELECT DISTINCT category FROM {$table} WHERE material_type='lut' AND status='published' AND category<>'' ORDER BY category ASC"); - foreach ((array)$rows as &$row) { $row['id']=intval($row['id']); $row['file_size']=intval($row['file_size']); } unset($row); + $rows=(array)$rows; foreach ($rows as &$row) { $row['id']=intval($row['id']); $row['file_size']=intval($row['file_size']); } unset($row); return self::response(array('items'=>(array)$rows, 'categories'=>array_values((array)$categories), 'page'=>$page, 'total'=>$total, 'per_page'=>$limit)); } private static function material($id) { diff --git a/verification/OnlineLUTBackendContracts.json b/verification/OnlineLUTBackendContracts.json index 8282d83..004471c 100644 --- a/verification/OnlineLUTBackendContracts.json +++ b/verification/OnlineLUTBackendContracts.json @@ -1,6 +1,6 @@ { "pass": true, - "count": 43, + "count": 44, "scope": "Isolated PHP\/GD contracts; synthetic users, purchases and frames; no production credentials or account data.", "checks": [ { @@ -115,6 +115,10 @@ "name": "catalogue excludes private drafts", "pass": true }, + { + "name": "SQL string identifiers and sizes serialize as JSON numbers for the native client", + "pass": true + }, { "name": "authorized published LUT streams original bytes", "pass": true diff --git a/verification/OnlineLUTBuildRecovery.json b/verification/OnlineLUTBuildRecovery.json index f9bd366..764aae3 100644 --- a/verification/OnlineLUTBuildRecovery.json +++ b/verification/OnlineLUTBuildRecovery.json @@ -1,8 +1,9 @@ { - "sourceCommit": "0631e8b6c3aa6ef1cbcdb919d1267d9beeea7632", + "sourceCommit": "d979f8958caf36cc7b97ea838960c69f7fbb4d91", "independentHTTPSClone": true, - "verifiedBuildInputFiles": 259, + "verifiedBuildInputFiles": 254, + "committedProjectBaselineMatches": true, "version": "1.22.0", - "build": "130", - "scope": "Final application, templates and colour-management build inputs; existing unrelated project-reference ordering retained in the original checkout." + "build": "131", + "scope": "Actual application, template and colour-management inputs match independent checkout. Existing unrelated project-reference ordering remains uncommitted in the working tree." } diff --git a/verification/OnlineLUTCatalogLive.json b/verification/OnlineLUTCatalogLive.json new file mode 100644 index 0000000..b71d1ae --- /dev/null +++ b/verification/OnlineLUTCatalogLive.json @@ -0,0 +1,9 @@ +{ + "passResult": true, + "pagesVerified": 21, + "uniquePublishedLUTs": 1233, + "categoryCount": 17, + "categoryFilterVerified": true, + "titleSearchVerified": true, + "scope": "Authorized production catalogue only; no account identifiers, tokens or media retained." +} diff --git a/开发交接.md b/开发交接.md index 034cfa4..2c97187 100644 --- a/开发交接.md +++ b/开发交接.md @@ -19,3 +19,5 @@ - 后端:`Backend/` 为源码备份,本机专项工程 `/Users/mac/Downloads/dayumedia/dayu-color-beta`;NAS 仅生产部署,不在其上编译。生产相对路径与校验见专项记录及 `Backend/deploy_online_luts.py`。 - 继续测试时先在主 APP 自动识别硬件绑定账号,未绑定时微信登录,再在插件切换“在线 LUT”;手动预览当前帧后核对真实目录、下载和云端图像,不能把未登录界面验收视为已授权链路验收。 - [恢复说明](RECOVERY.md) · [此前版本交接归档](research/HandoffHistory-20261111-before-online-release.md)。凭据、私钥和账号令牌留在钥匙串,不进入仓库。 + +131 已公证安装,主 APP 自动识别、退出和刷新恢复通过;FCP 共享登录与 1,233 总数正常。真实宿主发现目录 SQL 字符串被原生类型校验过滤,正在修正服务端编号/大小序列化并补充合约后继续验收。