Browse Source

docs: record verified speed and monthly earnings rollout

彭峰 11 hours ago
parent
commit
2c987dac15

+ 89 - 0
perf/speed-round3-2026-11-10/admin-release-verification.json

@@ -0,0 +1,89 @@
+{
+  "at": "2026-11-10T09:20:28.451Z",
+  "origin": "https://admin.xiaoshu.pro",
+  "releaseId": "admin-speed2-e72a405025aa-20261110T062158898Z",
+  "commit": "e72a405025aa102680c1ee30404fae656b029d6c",
+  "filesVerified": 96,
+  "deepRoutesVerified": 12,
+  "readOnly": true,
+  "measurement": "One production smoke sample per page; not comparable to controlled p75",
+  "pages": [
+    {
+      "page": "dashboard",
+      "readyMs": 2702,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "members",
+      "readyMs": 1390,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "stores",
+      "readyMs": 1905,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "schedule",
+      "readyMs": 2521,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "coaches",
+      "readyMs": 1989,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "payroll",
+      "readyMs": 6853,
+      "passed": true,
+      "primaryRequests": 1,
+      "verificationDisabled": true,
+      "coachDetailMs": 473,
+      "exportVerified": true
+    },
+    {
+      "page": "lessons",
+      "readyMs": 4421,
+      "passed": true,
+      "primaryRequests": 1,
+      "menuReturn": {
+        "ms": 89,
+        "primaryRequests": 0
+      }
+    },
+    {
+      "page": "learning-reports",
+      "readyMs": 2070,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "support-requests",
+      "readyMs": 853,
+      "passed": true,
+      "primaryRequests": 1,
+      "menuReturn": {
+        "ms": 63,
+        "primaryRequests": 0
+      }
+    },
+    {
+      "page": "vocabulary",
+      "readyMs": 2419,
+      "passed": true,
+      "primaryRequests": 1
+    },
+    {
+      "page": "special-training",
+      "readyMs": 1022,
+      "passed": true,
+      "primaryRequests": 1
+    }
+  ]
+}

+ 11 - 0
perf/speed-round3-2026-11-10/cleanup-verification.json

@@ -0,0 +1,11 @@
+{
+  "guards": {
+    "digest": true,
+    "source": true,
+    "snapshot": true
+  },
+  "diagnosticSchemasRemaining": 0,
+  "sessionTemporaryReadHelpers": 1,
+  "diagnosticFunctionsRemaining": 0,
+  "note": "No private speed3 schemas or standalone diagnostic endpoints remain. A session-local read-only SQL probe may remain until its pooled PostgreSQL backend closes; cross-session deletion was denied, and no pool/backend was terminated. It has no business writes or secrets."
+}

+ 14 - 0
perf/speed-round3-2026-11-10/mobile-release-verification.json

@@ -0,0 +1,14 @@
+{
+  "at": "2026-11-10T09:21:55.049Z",
+  "origin": "https://h5.xiaoshu.pro",
+  "releaseId": "mobile-speed3-592919581ec4-20261110T090242570Z",
+  "commit": "592919581ec48a5ef6cc974ba852f72a35e44073",
+  "publicAssetsVerified": 107,
+  "deepRoutesVerified": 6,
+  "login": {
+    "passed": true,
+    "unauthenticatedGate": true
+  },
+  "readOnly": true,
+  "limitations": "Public asset and unauthenticated login-gate acceptance. Role journeys were checked separately with anonymous fixtures; real-record API projections separately. No real teacher/student password login or native-device acceptance."
+}

+ 184 - 0
perf/speed-round3-2026-11-10/release-verification.json

@@ -0,0 +1,184 @@
+{
+  "at": "2026-11-10T09:24:01.911Z",
+  "sourceCommit": "592919581ec48a5ef6cc974ba852f72a35e44073",
+  "gateways": [
+    {
+      "scope": "operations",
+      "hash": "959369b4261294ed62d263aeb89afc2e9d56adb82d43c60e7b2f1847da0071ac"
+    },
+    {
+      "scope": "mobile",
+      "hash": "6be6e3cefff302995abe3cdf77b5711b4508b2ea089ba204cbb1d691f96ef363"
+    }
+  ],
+  "database": {
+    "installed": {
+      "digest": true,
+      "source": true,
+      "snapshot": true
+    },
+    "rollbackRehearsed": true,
+    "original39FunctionsUnchanged": true,
+    "derivedFunctionDefinitions": 28
+  },
+  "mobile": {
+    "at": "2026-11-10T09:21:55.049Z",
+    "origin": "https://h5.xiaoshu.pro",
+    "releaseId": "mobile-speed3-592919581ec4-20261110T090242570Z",
+    "commit": "592919581ec48a5ef6cc974ba852f72a35e44073",
+    "publicAssetsVerified": 107,
+    "deepRoutesVerified": 6,
+    "login": {
+      "passed": true,
+      "unauthenticatedGate": true
+    },
+    "readOnly": true,
+    "limitations": "Public asset and unauthenticated login-gate acceptance. Role journeys were checked separately with anonymous fixtures; real-record API projections separately. No real teacher/student password login or native-device acceptance.",
+    "cdnRefreshTask": "8145662520"
+  },
+  "admin": {
+    "at": "2026-11-10T09:20:28.451Z",
+    "origin": "https://admin.xiaoshu.pro",
+    "releaseId": "admin-speed2-e72a405025aa-20261110T062158898Z",
+    "commit": "e72a405025aa102680c1ee30404fae656b029d6c",
+    "filesVerified": 96,
+    "deepRoutesVerified": 12,
+    "readOnly": true,
+    "measurement": "One production smoke sample per page; not comparable to controlled p75",
+    "pages": [
+      {
+        "page": "dashboard",
+        "readyMs": 2702,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "members",
+        "readyMs": 1390,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "stores",
+        "readyMs": 1905,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "schedule",
+        "readyMs": 2521,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "coaches",
+        "readyMs": 1989,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "payroll",
+        "readyMs": 6853,
+        "passed": true,
+        "primaryRequests": 1,
+        "verificationDisabled": true,
+        "coachDetailMs": 473,
+        "exportVerified": true
+      },
+      {
+        "page": "lessons",
+        "readyMs": 4421,
+        "passed": true,
+        "primaryRequests": 1,
+        "menuReturn": {
+          "ms": 89,
+          "primaryRequests": 0
+        }
+      },
+      {
+        "page": "learning-reports",
+        "readyMs": 2070,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "support-requests",
+        "readyMs": 853,
+        "passed": true,
+        "primaryRequests": 1,
+        "menuReturn": {
+          "ms": 63,
+          "primaryRequests": 0
+        }
+      },
+      {
+        "page": "vocabulary",
+        "readyMs": 2419,
+        "passed": true,
+        "primaryRequests": 1
+      },
+      {
+        "page": "special-training",
+        "readyMs": 1022,
+        "passed": true,
+        "primaryRequests": 1
+      }
+    ]
+  },
+  "teacher": {
+    "at": "2026-11-10T09:20:17.781Z",
+    "gatewayHash": "6be6e3cefff302995abe3cdf77b5711b4508b2ea089ba204cbb1d691f96ef363",
+    "guards": {
+      "source": true,
+      "snapshot": true,
+      "digest": true
+    },
+    "exactGross": true,
+    "checks": [
+      {
+        "oldMs": 1845,
+        "newMs": 1120,
+        "monthly": {
+          "available": true,
+          "matched": 28,
+          "computed": 0
+        }
+      },
+      {
+        "oldMs": 1587,
+        "newMs": 631,
+        "monthly": {
+          "available": true,
+          "matched": 28,
+          "computed": 0
+        }
+      }
+    ],
+    "scope": "Two production operator-bound teacher read projections; current original source vs released monthly/indexed algorithm. Derived monthly rows may be stored. No business source/payroll/payment writes. Not teacher login or production p75."
+  },
+  "cleanup": {
+    "guards": {
+      "digest": true,
+      "source": true,
+      "snapshot": true
+    },
+    "diagnosticSchemasRemaining": 0,
+    "sessionTemporaryReadHelpers": 1,
+    "diagnosticFunctionsRemaining": 0,
+    "note": "No private speed3 schemas or standalone diagnostic endpoints remain. A session-local read-only SQL probe may remain until its pooled PostgreSQL backend closes; cross-session deletion was denied, and no pool/backend was terminated. It has no business writes or secrets."
+  },
+  "tests": {
+    "mobile": 350,
+    "backend": 102,
+    "finalIndexAndPatch": 14,
+    "cloudDefinitions": 11,
+    "build": "mobile production passed with existing CSS/CommonJS warnings"
+  },
+  "scope": {
+    "mobileH5": true,
+    "adminStaticChanged": false,
+    "nativePackage": false,
+    "businessSourceWrites": false,
+    "payrollLedgerWrites": false
+  }
+}

+ 5 - 1
perf/speed-round3-2026-11-10/report.md

@@ -41,4 +41,8 @@
 - 选择性 AST 补丁仅包含本批移动端14个、管理端6个函数;其余线上函数声明和执行语句保持一致。数据库39个原有函数定义在安装/回滚演练前后比对。
 - 静态发布为学生/老师共用的移动H5,管理端本批无静态变更;没有重新打原生安装包,没有真实手机设备或真实教师/学生密码登录验收。
 
-发布记录将补充公网哈希、真实管理端十一模块、费用明细/导出、移动端入口与回滚演练结果。详细脚本与计时排除项见同目录JSON和README。
+本批已发布,源码提交 `5929195`。两个网关代码回读匹配,28个新派生函数及三个健康检查通过,39个原函数定义未变,实际删除派生结构的事务回滚演练通过。管理端96个静态文件/12个深路由、全部11个模块以及费用明细/完整导出通过;移动端107个公网文件/6个深路由及登录入口通过,CDN刷新任务 `8145662520`。原生安装包未打包。
+
+线上单次冒烟中,费用页新浏览器上下文完整可用为6.853秒、老师明细473ms;这是实际页面、鉴权、网络与服务全链路的单次结果,不是前表3.257秒隔离服务p75,说明全新打开仍有继续提速空间,不能声称线上费用页已1秒打开。生产教师收入两次服务投影1120/631ms,28个月均可复用,金额与原算法相同。
+
+随机私有数据schema与独立诊断端点均已清理;一个连接会话内的只读SQL探针会随数据库连接结束清理,跨会话删除权限被拒绝,未为清理它中断连接池。详细证据见 `release-verification.json`、各验收JSON和README。

+ 31 - 0
perf/speed-round3-2026-11-10/teacher-release-verification.json

@@ -0,0 +1,31 @@
+{
+  "at": "2026-11-10T09:20:17.781Z",
+  "gatewayHash": "6be6e3cefff302995abe3cdf77b5711b4508b2ea089ba204cbb1d691f96ef363",
+  "guards": {
+    "source": true,
+    "snapshot": true,
+    "digest": true
+  },
+  "exactGross": true,
+  "checks": [
+    {
+      "oldMs": 1845,
+      "newMs": 1120,
+      "monthly": {
+        "available": true,
+        "matched": 28,
+        "computed": 0
+      }
+    },
+    {
+      "oldMs": 1587,
+      "newMs": 631,
+      "monthly": {
+        "available": true,
+        "matched": 28,
+        "computed": 0
+      }
+    }
+  ],
+  "scope": "Two production operator-bound teacher read projections; current original source vs released monthly/indexed algorithm. Derived monthly rows may be stored. No business source/payroll/payment writes. Not teacher login or production p75."
+}

+ 6 - 0
perf/speed-round3-2026-11-10/verify-teacher-live.mjs

@@ -0,0 +1,6 @@
+// Operator-bound production read projection. Only the derived month store may write.
+import fs from 'node:fs';import assert from 'node:assert/strict';import {createHash} from 'node:crypto';import {parse,withGateway} from './server-util.mjs';
+const root='/Users/mac/.local/state/xiaoshu/cloud-releases/2026-11-10-speed-round3',before=JSON.parse(fs.readFileSync(root+'/mobile-gateway.json')),manifest=JSON.parse(fs.readFileSync(root+'/manifest.json')),after=await parse('/classes/Function/'+before.objectId),hash=x=>createHash('sha256').update(x).digest('hex');assert.equal(hash(after.code),manifest.scopes.mobile.candidateHash);
+const factory=(code,monthly)=>'(()=>{'+code+'\nreturn {summary:teacherIncomeSummary'+(monthly?',monthly:teacherMonthlyLessonEarnings':'')+'};})()';
+async function run(){const co='7pIbDBJmKx',teacher=await Psql.one('SELECT u."legacyUserId" coach FROM "_User" u JOIN (SELECT jsmz::text coach,count(*) n FROM "LessonRecord" WHERE company=$1 GROUP BY jsmz::text) c ON c.coach=u."legacyUserId"::text WHERE u.company=$1 AND u."legacyGroupId"=3 AND NOT COALESCE(u."isDeleted",false) ORDER BY c.n DESC,u."objectId" LIMIT 1',[co]);const checks=[];for(let i=0;i<2;i++){const at=Date.now(),original=await baseline.summary(co,Number(teacher.coach)),oldMs=Date.now()-at,started=Date.now(),current=await candidate.summary(co,Number(teacher.coach)),newMs=Date.now()-started;checks.push({original,current,oldMs,newMs,monthly:(await candidate.monthly(co,Number(teacher.coach))).monthlyReuse});}return{checks,guards:await Psql.one('SELECT xs_payroll_source_index_ready() source,xs_payroll_read_snapshot_authority_ready() snapshot,xs_payroll_digest_ready() digest')};}
+const result=await withGateway('const baseline='+factory(before.code,false)+';const candidate='+factory(after.code,true)+';'+run.toString(),call=>call({}));for(const row of result.checks){assert.deepEqual(row.original,row.current);assert.equal(row.monthly.available,true);assert.equal(row.monthly.computed,0);}assert.ok(Object.values(result.guards).every(Boolean));fs.writeFileSync('tmp/speed-round3-2026-11-10/teacher-live-private.json',JSON.stringify(result),{mode:0o600});const receipt={at:new Date().toISOString(),gatewayHash:hash(after.code),guards:result.guards,exactGross:true,checks:result.checks.map(({oldMs,newMs,monthly})=>({oldMs,newMs,monthly})),scope:'Two production operator-bound teacher read projections; current original source vs released monthly/indexed algorithm. Derived monthly rows may be stored. No business source/payroll/payment writes. Not teacher login or production p75.'};fs.writeFileSync('perf/speed-round3-2026-11-10/teacher-release-verification.json',JSON.stringify(receipt,null,2));console.log(JSON.stringify(receipt));