09-01 调度机制修复落地+并发方案A+全链路复测通过
- 调度根因修复:工作台/api/run 显式写 next_run_at=now+5s(17列),scheduledAt=now+5s 带秒 - 新增 自动化任务调度机制.md(根因/硬规则/状态机/并发上限≈3/排查命令) - 并发方案A(浏览器锁):/api/run 对浏览器类任务自动注入锁约束;浏览器搜索抖音账号操作规范.md 新增5.6并发互斥 - 端口 8899→8900 可传参(8899被小米MiPCAudio.exe系统服务占用且杀后复活) - cdp-test-junxi.mjs 支持 --port 参数 - SKILL.md 工作台段落同步修正(旧认知 scheduled_at=now 已废弃) - 俊希全流程 TC-01~11 复测全通过(验收表更新):并行解析6条+AI写脚本会话链路完整跑通
This commit is contained in:
1 parent
e906e6616a
commit
b2e472bf27
12 files changed
+265
-49
No files matched your search
@@ -2,16 +2,19 @@
|
||||
// 覆盖测试用例 TC-09 的界面交互环节(真实模拟用户点击,非仅文字步骤)
|
||||
//
|
||||
// 前置:
|
||||
// 1. 工作台服务运行中(node server.js,端口 8899)
|
||||
// 1. 工作台服务运行中(node server.js,端口 8899 默认;若 8899 被小米占用则用 8900)
|
||||
// 2. 浏览器 9223 调试实例已启动(browser-harness 调试实例)
|
||||
// 3. 账号列表(hot_accounts)含「俊希」
|
||||
// 用法:
|
||||
// node cdp-test-junxi.mjs # 只验证到「选题生成」,不触发创作任务(安全模式)
|
||||
// node cdp-test-junxi.mjs --confirm # 选题生成后继续点「确认执行」,真实触发创作任务
|
||||
// node cdp-test-junxi.mjs --port 8900 # 指定工作台端口(默认 8899)
|
||||
// 说明:脚本在 9223 实例新开标签页操作,不干扰用户已打开的页面;结束后自动关闭新开标签页。
|
||||
|
||||
const argPort = process.argv.indexOf('--port');
|
||||
const PORT = argPort > -1 && process.argv[argPort + 1] ? process.argv[argPort + 1] : '8899';
|
||||
const CONFIRM = process.argv.includes('--confirm');
|
||||
const BASE = 'http://localhost:8899';
|
||||
const BASE = 'http://localhost:' + PORT;
|
||||
|
||||
// 1) 连接 9223 调试实例
|
||||
const list = await fetch('http://localhost:9223/json').then((r) => r.json());
|
||||
@@ -30,10 +33,10 @@ await send('Page.enable'); await send('Runtime.enable');
|
||||
// 2) 新开标签页打开账号列表(不干扰现有页面)
|
||||
const { targetId } = await send('Target.createTarget', { url: BASE + '/#/accounts' });
|
||||
await sleep(2500);
|
||||
let targetPage = list2 => list2.find((t) => t.type === 'page' && t.url.includes('localhost:8899') && t.id === targetId);
|
||||
let targetPage = list2 => list2.find((t) => t.type === 'page' && t.url.includes('localhost:' + PORT) && t.id === targetId);
|
||||
let pages = await fetch('http://localhost:9223/json').then((r) => r.json());
|
||||
let tp = targetPage(pages);
|
||||
if (!tp) { console.log('ERR: 新开标签页未找到 8899 页面'); process.exit(1); }
|
||||
if (!tp) { console.log('ERR: 新开标签页未找到 ' + PORT + ' 页面'); process.exit(1); }
|
||||
// 切换 WS 到新页面
|
||||
const ws2 = new WebSocket(tp.webSocketDebuggerUrl);
|
||||
let id2 = 0; const pending2 = new Map();
|
||||
|
||||
Reference in new issue
Block a user