🧪 Retro 2026-10-12: CI gate, known-failure baselines, devboot regression test, workbench smoke, review standards
Six follow-ups from the round8-12 hotfix retrospective: - web-ci.yml: lint + Go/frontend tests on every push and PR (nothing ran app checks before; the round10 dev-mode regression shipped green) - tests/known-failures.json + check-test-baseline.mjs: gate by exact failing-test id instead of hand-counted failure totals (14 frontend, 70 Go upstream debts recorded from the dev tip) - devboot.test.mjs: boots the real Vite dev server and pins the movi loader contract that broke round10 (query-less DEV url, /vendor stays off the module pipeline) - scripts/local/smoke-workbench.mjs: pre-release smoke covering the seven recurring acceptance points (login/pool/claim/play-while-loading/ captions/4x/playhead), 3x green against the local replica - docs/CODING_STANDARDS.md + AGENTS pointer: eligibility flags are server-shipped, the UI renders them (rounds 9+12 lesson) - vendor README host-element quirks section, HANDOFF gate pointers and movi-path verification rule, perf-audit report pinned with the post-round12 production 500 observation - husky pre-commit: lint-staged (repo prettier scope) + tsc + gofmt - gofmt: restore lint:go green on the dev tip (drift shipped silently in the perf merge and round12 because nothing gated it)
This commit is contained in:
parent
5b58c36f41
commit
58e0e50570
29
.gitea/workflows/web-ci.yml
Normal file
29
.gitea/workflows/web-ci.yml
Normal file
@ -0,0 +1,29 @@
|
||||
name: web-ci
|
||||
|
||||
# App-code checks (tsc/gofmt/script syntax, Go tests, frontend tests) gated
|
||||
# against tests/known-failures.json. Before this workflow existed nothing ran
|
||||
# these on push/PR — a 2026-10-12 regression (source-import of a cache-busted
|
||||
# /vendor asset) shipped to production green through every local check that
|
||||
# didn't boot the dev server.
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run test:go:gate
|
||||
- run: npm run test:frontend:gate
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,3 +19,4 @@ __pycache__/
|
||||
local-runs/
|
||||
.venv/
|
||||
local-data/
|
||||
.husky/_/
|
||||
|
||||
3
.husky/pre-commit
Normal file
3
.husky/pre-commit
Normal file
@ -0,0 +1,3 @@
|
||||
npx lint-staged
|
||||
npm run lint:web
|
||||
npm run lint:go
|
||||
5
.lintstagedrc
Normal file
5
.lintstagedrc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"src/**/*.{ts,tsx,css}": "prettier --write",
|
||||
"src/services/api/*.js": "prettier --write",
|
||||
"tests/frontend/**/*.mjs": "prettier --write"
|
||||
}
|
||||
84
.scratch/workflow-perf-audit-report.md
Normal file
84
.scratch/workflow-perf-audit-report.md
Normal file
@ -0,0 +1,84 @@
|
||||
# 工作流全链路性能与数据 footprint 审计汇总报告
|
||||
|
||||
汇总自四份只读审计笔记(2026-10-09):
|
||||
- A1 API 热路径:`.scratch/audit-notes/api-hotpaths.md`(P1–P9)
|
||||
- A2 DB 足迹与清洗候选:`.scratch/audit-notes/db-footprint.md`(C1–C8)
|
||||
- A3 Worker/交付管道 + part-index 激活:`.scratch/audit-notes/worker-delivery.md`(W1–W6)
|
||||
- A4 前端工作流页面:`.scratch/audit-notes/frontend-workflow.md`(F1–F11)
|
||||
|
||||
本报告不新增任何未验证结论,仅做合并、排序与交叉印证。已排除 slow-page-fix 已修复项(认证缓存、human-items 分页/投影、S4 点查等)。
|
||||
|
||||
## 1. 合并后的根因:视频强制服务端转码(F1 × A1/P5 × 部署线)
|
||||
|
||||
三线交叉印证的同一根因:前端 `src/lib/video-preview.js:120-148` 无条件加 `transcode=browser`,`CaptureAnnotationWorkbench` 的 `browserReadyMedia` 默认 false 且页面未传 → 所有标注/审核/验收视频走 API 进程 ffmpeg 实时转码(`internal/api/human_loop.go:538-552` → serveRunArtifactContent),叠加全局 `Compress(5)` 再 gzip 视频流。
|
||||
- **影响**:打开任务首帧分钟级等待;API CPU 被转码占用并与 JSON 热路径争抢;多标注员并行打满。
|
||||
- **修复方向**(A4 建议):先直连(去 transcode,307 跳 BOS 预签名)失败再回退转码;中期在切片物化时产出 browser-ready 副本。收益:首帧分钟级→秒级 + 消除 API 最大 CPU 消耗点。风险:个别编码不可播,保留回退并埋点统计。
|
||||
- **置信度:高**(代码路径三线互证;线上实际回退率需验证后确认中期方案收益)。
|
||||
|
||||
## 2. 按收益 × 置信度排序的优化清单
|
||||
|
||||
| 排名 | 条目 | 来源 | 位置 | 收益 | 置信度 | 风险 |
|
||||
|---|------|------|------|------|--------|------|
|
||||
| 1 | 视频直连 + 回退(根因合并项,见 §1) | F1 | video-preview.js:120-148 等 | 首帧分钟级→秒级;释放 API CPU | 高 | 低(保留回退) |
|
||||
| 2 | annotation-tasks 列表全组织 revision 扫描:`ListSliceRevisions/ListAnnotationRevisions(org,"")` 无 limit 无投影,列表请求拉全组织历史并内存过滤 | P1 | annotation_operations.go:692-693 | 消除数百 MB 级 BSON 解码/请求,随历史线性恶化被止住 | 高 | 低($in+投影不改契约) |
|
||||
| 3 | loadProject 全量重载(9–11 请求 × 22 调用点,含 listTasks 无分页与 4 池各 500 条) | F2/F8/F7 | AnnotationOperations.tsx:953-1138 | 每次操作请求数 ~10→1–2,后端读放大同步大降 | 高 | 中(局部更新需核对旁路状态) |
|
||||
| 4 | 验收池 listAcceptancePools 放大:非管理员 6 次全量分页扫描/次刷新 | F3 | human-loop.ts:62-97 | 全集合游标扫描→单次聚合接口 | 高 | 低 |
|
||||
| 5 | human-batches 非管理员 batch×item 双重 N+1 全量记录 | P2 | human_loop.go:244-261 | B 次全量 item 查询→存在性判断 | 高 | 中(可见性需等价,留 fallback) |
|
||||
| 6 | reviewed 池无界 ID $in + canClaimHumanItem 每条 2 次绕过缓存的 GetHumanBatch(500 条页 → 500–1000 次串行往返) | P3 | human_loop.go:851/856 | 纯冗余往返清除,行为不变 | 高 | 极低 |
|
||||
| 7 | 验收决策写路径:整批串行重写(3N+ 写)+ v5.8 聚合 payload 全量重建(MB 级单文档,16MB 风险) | P4 | human_loop.go:1907-1953、2410-2605 | 决策延迟大降 + 消除文档膨胀 | 高 | 中(acceptance-package/v2 前端契约需同步) |
|
||||
| 8 | workBuffer 3s 常驻轮询(20 req/min/人,无可见性暂停) | F4 | AnnotationOperations.tsx:4477 | 空闲期该端点流量降 80%+ | 高 | 低 |
|
||||
| 9 | 交付管道:逐片 7 文件复制 + 同字节读 3 遍 + 每切片 2 次 ffprobe;上传每文件 4–6 次 BOS API + staging 中转 | W1/W2 | operator.py:1558-1602、capture_delivery.go:45-77 | 打包节点读 IO/子进程开销 −50%+(估) | 高 | 中(staging 直传受"不覆盖他人交付"契约约束) |
|
||||
| 10 | prepareDeliveryTarget 每次全量 ListCaptureRecords 重叠检查 | W3 | capture_delivery.go:109 | 消除每次交付的全表扫描 | 高 | 低 |
|
||||
| 11 | 最终验收打开即全切片全量翻页拉证据目录 | F5 | FinalAcceptanceWorkspace.tsx:170-181 | 打开请求数 O(N×页)→O(页) | 中高 | 低(服务端提交校验兜底) |
|
||||
| 12 | task 详情全历史响应体 + GET 读路径写恢复/转码预热 | P5 | annotation_operations.go:833-911 | 响应体 MB 级→当前 generation | 中高 | 中(前端依赖 revisions 形状需核对) |
|
||||
| 13 | 交付下载 manifest 逐文件串行预签名(最多 5 万文件,分钟级) | P7 | delivery_downloads.go:457-464 | manifest 生成分钟级→秒级 | 中高 | 中(下载器需配合) |
|
||||
| 14 | part.json 全量读+解析 2 遍再读第 3 遍上传 | W4 | capture_delivery.go:317-356 | 消除重复多 MB JSON 解析 | 中 | 低 |
|
||||
| 15 | 任务池无虚拟化 + taskContextById O(n²) | F6 | AnnotationOperations.tsx:5351、2001-2024 | 低配机点选卡顿消除 | 高 | 低 |
|
||||
| 16 | rejects 无分页 N+1;随机领取逐候选全量 GetHumanItem | P6/P8 | human_loop.go:1956-1980;annotation_random_claim.go:226-306 | 中等冗余往返清除 | 高 | 低 |
|
||||
| 17 | ProjectDetail 15s 轮询级联扇出;GET 4 次重试×轮询叠加;普通池 500 条静默截断(正确性问题) | F10/F11/F9 | ProjectDetail.tsx:435;client.ts:99-134;human-loop.ts:36-40 | 常态流量与雪崩放大收敛;截断正确性修复 | 高 | 低 |
|
||||
| 18 | 完成后 ListPrefix 全量核对、小文件 marker 走完整 staging | W5/W6 | capture_delivery.go:282-290、156-167 | 小 | 中 | 低 |
|
||||
|
||||
排位说明:1–8 直接作用于标注/审查/验收日常操作路径(人感最强);9–10 是交付管道结构性开销(part-index 激活后 W1 全免,见 §4);11–18 次之。
|
||||
|
||||
## 3. 数据清洗候选(全部需用户逐项拍板,均未执行任何写操作)
|
||||
|
||||
体量基于 2026-10 快照库(127.0.0.1:27018/drobodata-fanyu,约 6 周数据),线上需按增长系数外推并复核。
|
||||
|
||||
| # | 对象 | 估计体量 | 建议 | 风险 |
|
||||
|---|------|---------|------|------|
|
||||
| C1 | BOS:已 accepted 分区的源目录 + 中间 pose/undistort/blur 产物 | **~50–60GiB**(39.1GiB 源 + ~22GiB 中间,需按 manifest 去重) | 删除(客户已拿 finalExport)| 高:不可逆;必须以 deliveryPackages.acceptanceReviews + finalExportArtifactIds 白名单为准,failed/未验收除外;先导出 manifest 备份 |
|
||||
| C2 | runs.nodeExecutions 的 inputArtifacts/inputLineage/inputBindings 三重重复(占全库 99.8%) | 终态 run 30–40MB,全量 ~60MB | 归档/收缩为引用(>N 天终态 run);保留 status/时间/artifacts 摘要 | 中:重放调试需完整输入;同时使 /api/runs 列表传输降 ~90% |
|
||||
| C3 | poseSummary 在 humanItems 与 annotationTasks 双份冗余 | ~200KB,随任务线性 | 保留 annotationTasks 权威,另一处迁移后 unset | 低 |
|
||||
| C4 | humanEvents 历史事件(651 条,无 TTL/归档) | 现 0.4MB,无上限 | TTL 或 180 天归档 | 中:合规/审计要求需先确认合同 |
|
||||
| C5 | annotationTimelineIndexes.body 内嵌 gzip | 3.9MB(22 条),随 part 增长 | 改 BOS 引用或大小阈值 | 低–中:查询延迟可能回退,与 P1 修复需权衡 |
|
||||
| C6 | runs 15 个快照期 0 访问索引(前缀重叠) | ~0.3MB + 写放大 | 线上 $indexStats 复核后 drop | 中:快照≠线上,必须线上复核 |
|
||||
| C7 | legacyAssignment 残留、终态 annotationDraft、一次性迁移/备份集合 | <100KB | 确认无读方后 unset/drop | 低 |
|
||||
| C8 | 快照实例 9 个测试库 | 仅本地 ~130MB | 本地 drop | 无 |
|
||||
|
||||
## 4. part-index worker 激活执行方案(合并 t3 结论)
|
||||
|
||||
**变更性质**:05f2dc14 → da446d13 属向后兼容(hyperparam `PART_INDEX_DELIVERY` 默认 false,定义于 builtin_operators_catalog.json:7848;唯一读取点 operator.py:1531;worker 按产物特征自动路由(artifact_storage.go:357-366),对旧目录形态零行为变化;backend 与 operator-repos 镜像同步;有 capture_part_index_test.go 契约测试)。
|
||||
|
||||
**执行步骤**:
|
||||
1. 镜像滚动更新(先 1 副本观察再全量),可与 API 同镜像。
|
||||
2. 灰度:仅对新增交付任务的打包节点设 `PART_INDEX_DELIVERY=true`(节点级覆盖,不改 catalog 默认)。
|
||||
3. 验证点:首个灰度 part 的 final part.json owner marker/sha256/manifest kind=="part-index";打包节点耗时与 BOS API 次数应显著下降(W1 全免:不再复制媒体字节)。
|
||||
4. 回滚:开关关回 false 即回到旧形态,无需回滚镜像;已发布 part.json 为冻结交付物不回滚。
|
||||
5. 存量迁移(需专项评审 + 用户批准):`scripts/part_index_migration.py` dry-run 只读(拒绝写对象存储、拒绝覆盖不同 part.json、复用算子源码保证同构);关键约束:存量已交付目录会被 worker "拒绝覆盖无主/已有文件目录"保护挡住,正常交付通道无法追加 part.json——需专项通道或随下一 revision 交付携带。v2 清单、calibration 为空、discard 无 reason 的 part 需人工确认。
|
||||
|
||||
## 5. 客户确认材料清单索引
|
||||
|
||||
需要用户逐项拍板/另行批准的事项及证据出处:
|
||||
1. 优化清单 §2 各条的实施顺序与范围(证据:api-hotpaths.md / frontend-workflow.md / worker-delivery.md 对应条目)。
|
||||
2. 清洗候选 C1–C7(§3;C8 本地即可)。C1 涉及删除线上 BOS 对象、C4 涉及审计保留期限,须明确授权。
|
||||
3. part-index 激活的镜像发布与灰度节点选择(§4);存量迁移正式发布属对已交付目录的写入,需专项评审与批准。
|
||||
4. 待线上验证项(快照证据局限):runs 冗余索引线上访问统计(C6)、C1 的 BOS 实际对象体量与 manifest 去重、Mongo RTT 与线上增长系数(db-footprint.md §5)。
|
||||
5. 契约影响项:P4/F7 验收 payload 改引用需前端 acceptance-package/v2 同步改造;P7 下载器配合改造;P5 详情 history 分页需核对 workbench 调用方。
|
||||
6. 线上观察(2026-10-12,round12 上线后 12h 只读日志):`/api/projects/*/workflows`、`/api/human-items` 等出现 4 次零星 500,无 panic、无慢请求级联——与 F10(ProjectDetail 15s 轮询级联扇出 + GET 4 次重试叠加)、P2/P3(human-batches/reviewed 池扫描压力)特征一致。同事性能分支(codex/slow-page-performance-20261009)覆盖多项后应复测销项;未复测前不算新增回归。
|
||||
|
||||
## 6. 正面项(已确认无需改,避免重复投入)
|
||||
|
||||
- human-items 列表分页 + ListProjection + 请求级 humanListReads 缓存。
|
||||
- delivery 下载媒体走 BOS 预签名直链;claim 幂等 receipt + 乐观版本控制;候选查询投影干净。
|
||||
- 目录发布 BOS 并行度 4;packages-manifest 最后串行发布保证可见性顺序;共享目录文件引用去重。
|
||||
- 会话心跳/续期为设计成本非热点;DataOperations 轮询有 hidden 感知可作 F4 范式;验收元数据按需加载。
|
||||
@ -94,3 +94,7 @@ Use the five default triage roles. Before triaging issues, read `docs/agents/tri
|
||||
### Domain docs
|
||||
|
||||
Use a single-context layout: root `CONTEXT.md` and `docs/adr/`. Before exploring domain concepts or decisions, read `docs/agents/domain.md`.
|
||||
|
||||
### Coding standards
|
||||
|
||||
Before writing or reviewing pool/list eligibility logic (claim buttons, `canClaim`, task-pool gating), read `docs/CODING_STANDARDS.md` — eligibility flags are server-shipped; the UI renders them, it never rebuilds them.
|
||||
|
||||
31
docs/CODING_STANDARDS.md
Normal file
31
docs/CODING_STANDARDS.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Coding standards (review-time rules)
|
||||
|
||||
Rules that cannot be enforced by a linter because they are cross-file
|
||||
consistency contracts between the server and the UI. Apply them while writing
|
||||
or reviewing the matching code; both exist because their violation shipped to
|
||||
production twice in one day (2026-10-12, rounds 9 and 12).
|
||||
|
||||
## Eligibility flags are server-shipped
|
||||
|
||||
Pool and list endpoints ship server-computed eligibility flags (today:
|
||||
`canClaim` on human-item pool entries). The UI renders those flags.
|
||||
|
||||
The UI must not:
|
||||
|
||||
- rebuild eligibility locally from membership or role data it fetched (or
|
||||
failed to fetch) itself — a view that skips a members fan-out then "knows"
|
||||
nobody can claim, and hides entries the server would happily let the user
|
||||
take (round 12: 可领取 3 → "暂无可领取");
|
||||
- add gating conditions the server does not have (round 9: a leftover
|
||||
`!projectId` disable kept the claim button grey in the all-projects view
|
||||
that is now the default).
|
||||
|
||||
Local derivation may at most produce a display hint; it may never hide an
|
||||
entry, disable an action, or change the empty-state message. When a list view
|
||||
needs a flag the payload does not carry, extend the server payload — do not
|
||||
guess client-side.
|
||||
|
||||
Rationale: `AGENTS.md` principle 5 already requires permissions to be enforced
|
||||
on the server; this rule is its list-contract corollary. The server is the
|
||||
only component that sees roles, project scoping, and claim state together;
|
||||
every client-side reconstruction is a second, divergent permission model.
|
||||
@ -37,7 +37,7 @@
|
||||
```bash
|
||||
cd /Users/d-robotics/Desktop/fanyu/droboticflow
|
||||
npm run lint:web # tsc 类型检查,改 ts/tsx 后必跑
|
||||
npm run test:frontend # 98 个 node 内置 runner 测试(无需浏览器),约 1 分钟
|
||||
npm run test:frontend:gate # 全量前端测试(无需浏览器)对照 tests/known-failures.json,只在**新增失败**时报红;基线修剪用 --update
|
||||
```
|
||||
|
||||
**针对性测试**:`node --test tests/frontend/annotation-shortcuts.test.mjs`(换你改的模块对应的测试文件;`ls tests/frontend/ | grep <关键词>` 找)。
|
||||
@ -61,7 +61,7 @@ go test ./internal/api/ -run 'Test<名称>' -count=1 # 针对性测试
|
||||
**已知坑**:
|
||||
- `env-local-snapshot.sh` 里 `DROBOTICFLOW_REQUIRE_SESSION_AUTH=true` 是关键——不设它匿名会回落成默认管理员、登录面板不显示(与线上行为不一致);
|
||||
- API 启动会自动对快照库执行 RunMigrations + EnsureIndexes(幂等,正常);
|
||||
- 全量 `go test ./...` 有约 63 个**上游遗留失败**(旧测试测已删除的接口,405/404),不是回归信号;判断标准是"你改动前后失败数不增加"。
|
||||
- 全量 `go test ./...` 有约 70 个**上游遗留失败**(旧测试测已删除的接口,405/404),不是回归信号;用 `npm run test:go:gate` 对照 `tests/known-failures.json` 按**失败用例名**判新增(不再人工数失败数;修剪基线用 `node scripts/check-test-baseline.mjs go --update`)。**跑 Go 闸前先停本地 API**:个别 worker 测试耦合快照库里的任务领取状态,栈在跑/冒烟刚写过领取时可能误报新增失败;
|
||||
|
||||
**登录本地快照账号**:快照库里的账号是超级管理员与组织管理员两类。`fanyu-admin@...` 是 `isSuperAdmin`,本地未开 `DROBOTICFLOW_LEGACY_ORG_ADMIN` 时登录会被拒;用组织管理员
|
||||
`fanyu-ops-admin@droboticflow.local`(`org-29cd7a684faba19f630f8ad5890e18bb`)即可。登录标识符是 `phone`(形如 `local-test-user-<id>`)不是邮箱,密码按 `docs/annotation-local-deployment.zh-CN.md` 第二步重置到本地 27018。
|
||||
@ -106,7 +106,7 @@ git rebase origin/dev # 历史上零冲突(本地提交
|
||||
# 3. 验证更新后的代码
|
||||
npm run lint:web && go build ./...
|
||||
go test ./internal/api/ -run 'TestContinuous|TestAnnotation|TestDelivery' -count=1 # 他新功能相关
|
||||
# 全量 go test 失败数与更新前对比,不增加即可
|
||||
npm run test:go:gate # 全量 go test 按用例名对照基线,新增失败才报红
|
||||
|
||||
# 4. 重启服务生效(两个终端都要重启)
|
||||
kill $(lsof -nP -iTCP:3001 -sTCP:LISTEN -t) 2>/dev/null
|
||||
@ -127,6 +127,7 @@ kill $(lsof -nP -iTCP:5173 -sTCP:LISTEN -t) 2>/dev/null; npx vite --port 5173 --
|
||||
- `env-local-snapshot.sh` 已导出 `WORKSPACE_MOUNT_PATH=~/Desktop/fanyu/droboticflow/local-data/workspace`,API 启动自动生效。
|
||||
- 操作脚本:`scripts/local/download-capture.sh`(从 BOS 下载 Capture,已获同事放行)→ `scripts/local/wire-local-capture.sh <Capture名> <runId>`(接线+任务归属标注员)。
|
||||
- **新任务没视频/帧范围加载失败的排查定式**:任务属于一个还没接线的 run → 跑 wire 脚本指定该 runId → 页面重试。已接线:`run-c1321...`、`run-f919a129...`(快照内 22 条标注任务全部覆盖)。
|
||||
- **视频功能验证必须走 movi 路径**:断言页面上 `<movi-player>` 真的挂载了(localStorage 的 movi force 键或组件分支都可能回落到原生 `<video>`——原生回退没有 movi 的宿主怪癖,会把 movi 路径的 bug 全部遮住,round11 的"线上字幕从不渲染"就是这样漏掉的)。宿主怪癖清单与升级检查表:`public/vendor/movi-player-0.4.1/README.md` 的 Host-element quirks 节。
|
||||
|
||||
## 5. 本地工具箱索引(scripts/local/,全是纯新增文件)
|
||||
|
||||
@ -136,6 +137,7 @@ kill $(lsof -nP -iTCP:5173 -sTCP:LISTEN -t) 2>/dev/null; npx vite --port 5173 --
|
||||
| `run-operator.sh <slug>` | 单算子直跑(worker 同款调用方式,秒级调试) |
|
||||
| `download-capture.sh` / `wire-local-capture.sh` | 真实数据下载与接线 |
|
||||
| `fetch-mongo-snapshot.sh` | 从集群 PVC 分块拉全库备份并恢复到 27018;本地和远端使用独立临时目录,完整 SHA-256 校验通过后才替换本地容器;成功保留的快照路径由脚本输出 |
|
||||
| `smoke-workbench.mjs` | 发布前工作台冒烟(需本地栈 5173/3001 在跑 + Chromium/Edge):审核员登录 → 池渲染 → 随机领取 → 视频加载中直接点播放 → 字幕叠加 → 4× 倍速 → 进度条推进,7 个高频回归点一次过 |
|
||||
|
||||
配套文档:`docs/local-dev-guide.zh-CN.md`(环境搭建与踩坑)、`docs/annotation-local-deployment.zh-CN.md`(标注模块部署+测试用例 T1-T12)、`docs/release-checklist.zh-CN.md`(发布三道闸门+回滚)。
|
||||
|
||||
|
||||
@ -252,7 +252,6 @@ func TestFanyuV58FirstHumanSubmissionIgnoresSystemSuggestionRevision(t *testing.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestValidateHumanStagesAllowsDirectedReworkToEarlierStage(t *testing.T) {
|
||||
if issues := validateHumanStages(domain.DefaultAnnotationHumanStages()); len(issues) != 0 {
|
||||
t.Fatalf("default stages should be valid: %#v", issues)
|
||||
|
||||
@ -214,7 +214,7 @@ func TestRunsListDefaultsToPaginatedContract(t *testing.T) {
|
||||
run := domain.RunRecord{
|
||||
ID: domain.NewID("run"), OrganizationID: domain.DefaultOrganizationID,
|
||||
ProjectID: "project-v5", WorkflowID: fixture.batch.WorkflowID,
|
||||
Status: domain.RunStatusCompleted,
|
||||
Status: domain.RunStatusCompleted,
|
||||
CreatedAt: time.Now().UTC().Add(-time.Duration(index) * time.Minute).Format(time.RFC3339Nano),
|
||||
}
|
||||
if err := fixture.store.UpsertRun(fixture.ctx, run); err != nil {
|
||||
|
||||
@ -392,13 +392,13 @@ func (server *server) handleHumanItemsList(writer http.ResponseWriter, request *
|
||||
}
|
||||
}
|
||||
// Server-side claim eligibility is authoritative for both review
|
||||
// roles. Quality reviewers previously relied on a client-side
|
||||
// membership guess in the project-scoped workspace; when the member
|
||||
// fan-out is skipped or its load fails, that guess silently emptied
|
||||
// the random-claim candidates while the pool count stayed non-zero
|
||||
// (可见可领取数量却提示无可领取任务). Annotators keep the blind-pool
|
||||
// contract and never receive candidate-level flags.
|
||||
if principal != nil && (principal.User.Role == domain.UserRoleAcceptanceReviewer || principal.User.Role == domain.UserRoleQualityReviewer) {
|
||||
// roles. Quality reviewers previously relied on a client-side
|
||||
// membership guess in the project-scoped workspace; when the member
|
||||
// fan-out is skipped or its load fails, that guess silently emptied
|
||||
// the random-claim candidates while the pool count stayed non-zero
|
||||
// (可见可领取数量却提示无可领取任务). Annotators keep the blind-pool
|
||||
// contract and never receive candidate-level flags.
|
||||
if principal != nil && (principal.User.Role == domain.UserRoleAcceptanceReviewer || principal.User.Role == domain.UserRoleQualityReviewer) {
|
||||
claimable := item.AssignedUserID == "" && (item.Status == domain.HumanItemReady || item.Status == domain.HumanItemRework || item.Status == domain.HumanItemSubmitted) && server.canClaimHumanItem(request.Context(), request, item, annotationRoleForHumanStage(stage))
|
||||
item.CanClaim = &claimable
|
||||
}
|
||||
|
||||
@ -2059,11 +2059,11 @@ func (server *server) handleDashboard(writer http.ResponseWriter, request *http.
|
||||
}
|
||||
if server.tenantEnforced(request) {
|
||||
var (
|
||||
projects []domain.ProjectRecord
|
||||
operators []domain.OperatorRecord
|
||||
runPage domain.RunSummaryPage
|
||||
auditTasks []domain.AuditTaskRecord
|
||||
settings *domain.SettingsRecord
|
||||
projects []domain.ProjectRecord
|
||||
operators []domain.OperatorRecord
|
||||
runPage domain.RunSummaryPage
|
||||
auditTasks []domain.AuditTaskRecord
|
||||
settings *domain.SettingsRecord
|
||||
)
|
||||
g, gctx := errgroup.WithContext(request.Context())
|
||||
g.Go(func() error { var err error; projects, err = server.listProjectsForRequest(gctx, request); return err })
|
||||
|
||||
@ -8,9 +8,13 @@ import (
|
||||
|
||||
func dispositionFixturePayload(t *testing.T, f combinedDraftFixture) sliceDispositionInput {
|
||||
t.Helper()
|
||||
if err:=f.store.UpsertAnnotationLabel(f.ctx,domain.AnnotationLabelRecord{ID:"discard-fixture",OrganizationID:f.item.OrganizationID,Kind:"discard_reason",Code:"discard-fixture",Name:"相机被遮挡",Status:domain.AnnotationLabelActive,Version:1});err!=nil{t.Fatal(err)}
|
||||
if err:=f.store.UpsertProjectDiscardReasonLabels(f.ctx,domain.ProjectAnnotationLabelsRecord{ProjectID:f.item.ProjectID,OrganizationID:f.item.OrganizationID,DiscardReasonLabelIDs:[]string{"discard-fixture"}});err!=nil{t.Fatal(err)}
|
||||
return sliceDispositionInput{ReasonLabelID:"discard-fixture",ReasonVersion:1,combinedAnnotationDraftInput: combinedAnnotationDraftInput{Version: f.item.Version, SliceSegments: []domain.SliceSegment{{ID: "a", Start: 0, End: 3}, {ID: "b", Start: 3, End: 7}, {ID: "c", Start: 7, End: 10}}, Segments: []domain.AnnotationSegment{{ID: "old-description", Start: 3, End: 7, Description: "old text", Source: "manual"}}}, SliceID: "b", Disposition: "discard", Reason: "相机被遮挡"}
|
||||
if err := f.store.UpsertAnnotationLabel(f.ctx, domain.AnnotationLabelRecord{ID: "discard-fixture", OrganizationID: f.item.OrganizationID, Kind: "discard_reason", Code: "discard-fixture", Name: "相机被遮挡", Status: domain.AnnotationLabelActive, Version: 1}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := f.store.UpsertProjectDiscardReasonLabels(f.ctx, domain.ProjectAnnotationLabelsRecord{ProjectID: f.item.ProjectID, OrganizationID: f.item.OrganizationID, DiscardReasonLabelIDs: []string{"discard-fixture"}}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return sliceDispositionInput{ReasonLabelID: "discard-fixture", ReasonVersion: 1, combinedAnnotationDraftInput: combinedAnnotationDraftInput{Version: f.item.Version, SliceSegments: []domain.SliceSegment{{ID: "a", Start: 0, End: 3}, {ID: "b", Start: 3, End: 7}, {ID: "c", Start: 7, End: 10}}, Segments: []domain.AnnotationSegment{{ID: "old-description", Start: 3, End: 7, Description: "old text", Source: "manual"}}}, SliceID: "b", Disposition: "discard", Reason: "相机被遮挡"}
|
||||
}
|
||||
|
||||
func TestSliceDiscardRetainsRangeHistoryAndRestoresDescriptions(t *testing.T) {
|
||||
|
||||
@ -13,25 +13,37 @@ func TestFanyuReleaseCreatesPublicSupplierPoolEvenWithOldSupplierInput(t *testin
|
||||
s := &server{store: ds}
|
||||
project := domain.ProjectRecord{ID: "project-public-flow", OrganizationID: domain.DefaultOrganizationID}
|
||||
template := domain.AnnotationTemplateRecord{ID: "human-public-template", OrganizationID: project.OrganizationID, ProjectID: project.ID, HumanStages: domain.DefaultFanyuV58HumanStages()}
|
||||
if err := ds.UpsertAnnotationTemplate(ctx, template); err != nil { t.Fatal(err) }
|
||||
if err := ds.UpsertAnnotationTemplate(ctx, template); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
release := domain.WorkflowReleaseRecord{Nodes: []domain.WorkflowNode{{Data: domain.WorkflowNodeData{OperatorID: "operator-builtin-annotation-gate", Hyperparams: []domain.HyperParam{
|
||||
{Key: "ANNOTATION_TEMPLATE_ID", Value: template.ID},
|
||||
{Key: "ANNOTATION_SUPPLIER_ID", Value: "old-bound-supplier"},
|
||||
{Key: "PROCESSING_PROFILE", Value: domain.ProcessingProfileRawHuman},
|
||||
}}}}}
|
||||
public, err := s.releaseUsesFanyuSupplierPool(ctx, release)
|
||||
if err != nil || !public { t.Fatalf("Fanyu release public flag=%t err=%v", public, err) }
|
||||
if err != nil || !public {
|
||||
t.Fatalf("Fanyu release public flag=%t err=%v", public, err)
|
||||
}
|
||||
supplier, issues, err := s.resolveProjectWorkflowSupplier(ctx, project, release, "old-bound-supplier")
|
||||
if err != nil || len(issues) != 0 || supplier != "" { t.Fatalf("new workflow remained bound: supplier=%q issues=%+v err=%v", supplier, issues, err) }
|
||||
if err != nil || len(issues) != 0 || supplier != "" {
|
||||
t.Fatalf("new workflow remained bound: supplier=%q issues=%+v err=%v", supplier, issues, err)
|
||||
}
|
||||
bound := bindAnnotationSupplier(release.Nodes, supplier)
|
||||
for _, param := range bound[0].Data.Hyperparams {
|
||||
if param.Key == "ANNOTATION_SUPPLIER_ID" && param.Value != "" { t.Fatalf("new workflow node still bound: %+v", param) }
|
||||
if param.Key == "ANNOTATION_SUPPLIER_ID" && param.Value != "" {
|
||||
t.Fatalf("new workflow node still bound: %+v", param)
|
||||
}
|
||||
}
|
||||
legacy := release
|
||||
legacy.Nodes = bindAnnotationSupplier(release.Nodes, "old-bound-supplier")
|
||||
for i := range legacy.Nodes[0].Data.Hyperparams {
|
||||
if legacy.Nodes[0].Data.Hyperparams[i].Key == "PROCESSING_PROFILE" { legacy.Nodes[0].Data.Hyperparams[i].Value = "" }
|
||||
if legacy.Nodes[0].Data.Hyperparams[i].Key == "PROCESSING_PROFILE" {
|
||||
legacy.Nodes[0].Data.Hyperparams[i].Value = ""
|
||||
}
|
||||
}
|
||||
public, err = s.releaseUsesFanyuSupplierPool(ctx, legacy)
|
||||
if err != nil || public { t.Fatalf("non-Fanyu release expanded to public pool: %t %v", public, err) }
|
||||
if err != nil || public {
|
||||
t.Fatalf("non-Fanyu release expanded to public pool: %t %v", public, err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,12 +87,12 @@ func TestHumanItemsListMongoCursorPagination(t *testing.T) {
|
||||
|
||||
for index := 0; index < 5; index++ {
|
||||
item := domain.HumanItemRecord{
|
||||
ID: fmt.Sprintf("human-item-cursor-%d", index),
|
||||
ID: fmt.Sprintf("human-item-cursor-%d", index),
|
||||
OrganizationID: domain.DefaultOrganizationID, PluginID: "annotation-qa",
|
||||
BatchID: "batch-cursor", ProjectID: "project-cursor", WorkflowID: "workflow-cursor",
|
||||
CurrentStageID: "split_annotation", Status: domain.HumanItemReady,
|
||||
Subject: domain.HumanSubjectRef{ItemKey: "item-key"},
|
||||
Version: 1,
|
||||
Subject: domain.HumanSubjectRef{ItemKey: "item-key"},
|
||||
Version: 1,
|
||||
CreatedAt: time.Now().UTC().Add(time.Duration(index) * time.Minute).Format(time.RFC3339Nano),
|
||||
}
|
||||
item.UpdatedAt = item.CreatedAt
|
||||
|
||||
@ -11,7 +11,6 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
)
|
||||
|
||||
var productionStatsCache = &ttlResultCache[productionstats.Snapshot]{now: time.Now}
|
||||
|
||||
@ -598,8 +598,12 @@ func (s *MongoStore) ConvertSupplierPool(ctx context.Context, org, project, prev
|
||||
return *manifest.Result, nil
|
||||
}
|
||||
count, err := col.CountDocuments(ctx, bson.M{"organizationId": org, "projectId": project, "state": "pending", "_id": bson.M{"$ne": previewToken}}, options.Count().SetLimit(1))
|
||||
if err != nil { return nil, err }
|
||||
if count != 0 { return nil, ErrSupplierPoolConversionPending }
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if count != 0 {
|
||||
return nil, ErrSupplierPoolConversionPending
|
||||
}
|
||||
if manifest.State == "" {
|
||||
if time.Now().After(manifest.ExpiresAt) {
|
||||
return nil, ErrSupplierPoolPreviewChanged
|
||||
|
||||
@ -114,7 +114,9 @@ func TestSupplierPoolConversionMongoStandalone(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
secondToken, err := s.PreviewSupplierPoolConversion(ctx, org, project, actor)
|
||||
if err != nil { t.Fatal(err) }
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
operationID := supplierPoolOperationID(org, project, preview.PreviewToken)
|
||||
journalResult := SupplierPoolConversionResult{ProjectID: project, OperationID: operationID}
|
||||
_, err = db.Collection("supplierPoolPreviews").UpdateOne(ctx, bson.M{"_id": preview.PreviewToken}, bson.M{"$set": bson.M{"state": "pending", "batchIds": bson.A{"batch-interrupted"}, "result": journalResult}, "$unset": bson.M{"expiresAt": ""}})
|
||||
@ -122,9 +124,15 @@ func TestSupplierPoolConversionMongoStandalone(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
recovered, err := restarted.PreviewSupplierPoolConversion(ctx, org, project, actor)
|
||||
if err != nil || recovered.PreviewToken != preview.PreviewToken || recovered.State != "pending" { t.Fatalf("pending preview recovery=%+v err=%v", recovered, err) }
|
||||
if _, err := restarted.PreviewSupplierPoolConversion(ctx, org, project, "other-admin"); err != ErrSupplierPoolConversionPending { t.Fatalf("other admin created parallel preview: %v", err) }
|
||||
if _, err := restarted.ConvertSupplierPool(ctx, org, project, secondToken.PreviewToken, actor); err != ErrSupplierPoolConversionPending { t.Fatalf("second token started parallel conversion: %v", err) }
|
||||
if err != nil || recovered.PreviewToken != preview.PreviewToken || recovered.State != "pending" {
|
||||
t.Fatalf("pending preview recovery=%+v err=%v", recovered, err)
|
||||
}
|
||||
if _, err := restarted.PreviewSupplierPoolConversion(ctx, org, project, "other-admin"); err != ErrSupplierPoolConversionPending {
|
||||
t.Fatalf("other admin created parallel preview: %v", err)
|
||||
}
|
||||
if _, err := restarted.ConvertSupplierPool(ctx, org, project, secondToken.PreviewToken, actor); err != ErrSupplierPoolConversionPending {
|
||||
t.Fatalf("second token started parallel conversion: %v", err)
|
||||
}
|
||||
for _, col := range []*mongo.Collection{s.humanBatches, s.annotationTasks} {
|
||||
id := "batch-interrupted"
|
||||
if col == s.annotationTasks {
|
||||
|
||||
629
package-lock.json
generated
629
package-lock.json
generated
@ -28,6 +28,8 @@
|
||||
"@types/node": "^22.14.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"concurrently": "^10.0.3",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.2.11",
|
||||
"playwright": "^1.59.1",
|
||||
"prettier": "^3.8.4",
|
||||
"tailwindcss": "^4.1.14",
|
||||
@ -1408,6 +1410,22 @@
|
||||
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-escapes": {
|
||||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz",
|
||||
"integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"environment": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
|
||||
@ -1483,6 +1501,19 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.28.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
||||
@ -1555,6 +1586,39 @@
|
||||
"integrity": "sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cli-cursor": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
|
||||
"integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"restore-cursor": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cli-truncate": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",
|
||||
"integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"slice-ansi": "^5.0.0",
|
||||
"string-width": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
|
||||
@ -1579,6 +1643,23 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "2.0.20",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
|
||||
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "13.1.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
|
||||
"integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/concurrently": {
|
||||
"version": "10.0.3",
|
||||
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.3.tgz",
|
||||
@ -1623,6 +1704,21 @@
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-array": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",
|
||||
@ -1878,6 +1974,19 @@
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/environment": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",
|
||||
"integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/es-toolkit": {
|
||||
"version": "1.45.1",
|
||||
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.45.1.tgz",
|
||||
@ -1903,6 +2012,30 @@
|
||||
"integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/execa": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
|
||||
"integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.3",
|
||||
"get-stream": "^8.0.1",
|
||||
"human-signals": "^5.0.0",
|
||||
"is-stream": "^3.0.0",
|
||||
"merge-stream": "^2.0.0",
|
||||
"npm-run-path": "^5.1.0",
|
||||
"onetime": "^6.0.0",
|
||||
"signal-exit": "^4.1.0",
|
||||
"strip-final-newline": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.17"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sindresorhus/execa?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
@ -1920,6 +2053,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/fraction.js": {
|
||||
"version": "5.3.4",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
|
||||
@ -2007,6 +2153,19 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
|
||||
"integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
@ -2022,6 +2181,32 @@
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"node_modules/human-signals": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
|
||||
"integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=16.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "9.1.7",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
|
||||
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"husky": "bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/typicode"
|
||||
}
|
||||
},
|
||||
"node_modules/immer": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz",
|
||||
@ -2041,6 +2226,49 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
|
||||
"integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
||||
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",
|
||||
@ -2329,12 +2557,124 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lilconfig": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
|
||||
"integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antonk52"
|
||||
}
|
||||
},
|
||||
"node_modules/lint-staged": {
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.5.2.tgz",
|
||||
"integrity": "sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^5.4.1",
|
||||
"commander": "^13.1.0",
|
||||
"debug": "^4.4.0",
|
||||
"execa": "^8.0.1",
|
||||
"lilconfig": "^3.1.3",
|
||||
"listr2": "^8.2.5",
|
||||
"micromatch": "^4.0.8",
|
||||
"pidtree": "^0.6.0",
|
||||
"string-argv": "^0.3.2",
|
||||
"yaml": "^2.7.0"
|
||||
},
|
||||
"bin": {
|
||||
"lint-staged": "bin/lint-staged.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.12.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/lint-staged"
|
||||
}
|
||||
},
|
||||
"node_modules/listr2": {
|
||||
"version": "8.3.3",
|
||||
"resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz",
|
||||
"integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cli-truncate": "^4.0.0",
|
||||
"colorette": "^2.0.20",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"log-update": "^6.1.0",
|
||||
"rfdc": "^1.4.1",
|
||||
"wrap-ansi": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
||||
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/log-update": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
|
||||
"integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^7.0.0",
|
||||
"cli-cursor": "^5.0.0",
|
||||
"slice-ansi": "^7.1.0",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"wrap-ansi": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/log-update/node_modules/is-fullwidth-code-point": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",
|
||||
"integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-east-asian-width": "^1.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/log-update/node_modules/slice-ansi": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",
|
||||
"integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.2.1",
|
||||
"is-fullwidth-code-point": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/slice-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
@ -2362,6 +2702,66 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch/node_modules/picomatch": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
|
||||
"integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-fn": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
|
||||
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-function": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
|
||||
"integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/motion": {
|
||||
"version": "12.38.0",
|
||||
"resolved": "https://registry.npmjs.org/motion/-/motion-12.38.0.tgz",
|
||||
@ -2433,6 +2833,61 @@
|
||||
"integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/npm-run-path": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
|
||||
"integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/npm-run-path/node_modules/path-key": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
|
||||
"integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/onetime": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
|
||||
"integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mimic-fn": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
@ -2451,6 +2906,19 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/pidtree": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.1.tgz",
|
||||
"integrity": "sha512-e0F9AOF1JMrCfBsyJOwU9lNvQ0WtXTq0j/4jk0BQ5JSI9VAybPXmDpPRw/2FQ3e5d3ZFN1mLh7jW99m/jjaptw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"pidtree": "bin/pidtree.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.59.1",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.1.tgz",
|
||||
@ -2716,6 +3184,46 @@
|
||||
"integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/restore-cursor": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",
|
||||
"integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"onetime": "^7.0.0",
|
||||
"signal-exit": "^4.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/restore-cursor/node_modules/onetime": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
|
||||
"integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mimic-function": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/rfdc": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
||||
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz",
|
||||
@ -2786,6 +3294,29 @@
|
||||
"integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shell-quote": {
|
||||
"version": "1.8.4",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.4.tgz",
|
||||
@ -2799,6 +3330,36 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/slice-ansi": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
|
||||
"integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.0.0",
|
||||
"is-fullwidth-code-point": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/slice-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
@ -2808,6 +3369,16 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string-argv": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
|
||||
"integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.19"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
|
||||
@ -2842,6 +3413,19 @@
|
||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-final-newline": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
|
||||
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "10.2.2",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
|
||||
@ -2912,6 +3496,19 @@
|
||||
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||
}
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
@ -3087,6 +3684,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"node-which": "bin/node-which"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
|
||||
@ -3121,6 +3734,22 @@
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
|
||||
"integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
|
||||
"devOptional": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/eemeli"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "18.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz",
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
"dev:worker": "go run ./cmd/worker",
|
||||
"dev:drosync-coordinator": "go run ./cmd/drosync-coordinator",
|
||||
"dev:web": "vite",
|
||||
"prepare": "husky",
|
||||
"build": "npm run build:web && npm run build:go",
|
||||
"build:web": "vite build",
|
||||
"build:go": "mkdir -p build && go build -o build/droboticflow-api ./cmd/api && go build -o build/droboticflow-worker ./cmd/worker && go build -o build/drosync-coordinator ./cmd/drosync-coordinator",
|
||||
@ -30,6 +31,8 @@
|
||||
"test": "go test ./...",
|
||||
"test:python": "python3 -m pytest backend/operator-runner tests/backend",
|
||||
"test:frontend": "node --test tests/frontend/*.test.mjs",
|
||||
"test:frontend:gate": "node scripts/check-test-baseline.mjs frontend",
|
||||
"test:go:gate": "node scripts/check-test-baseline.mjs go",
|
||||
"test:drosync": "cargo test --workspace --manifest-path tools/drosync/Cargo.toml",
|
||||
"lint:drosync": "cargo fmt --all --manifest-path tools/drosync/Cargo.toml -- --check && cargo clippy --workspace --all-targets --manifest-path tools/drosync/Cargo.toml -- -D warnings",
|
||||
"generate:drosync-contract": "python3 scripts/generate_drosync_contract.py",
|
||||
@ -94,6 +97,8 @@
|
||||
"@types/node": "^22.14.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"concurrently": "^10.0.3",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.2.11",
|
||||
"playwright": "^1.59.1",
|
||||
"prettier": "^3.8.4",
|
||||
"tailwindcss": "^4.1.14",
|
||||
|
||||
31
public/vendor/movi-player-0.4.1/README.md
vendored
31
public/vendor/movi-player-0.4.1/README.md
vendored
@ -38,6 +38,37 @@ SHA-256 (this directory, element.slim.js includes the patch above):
|
||||
- `element.slim.js` `c243c027397494d93c6e6dd73260e8f9b7fb57525f2993f34067d54a64ca0c5c`
|
||||
- `movi.wasm` `a90da45449126b10b68ac2b816aa28b9ce43cd7d3e307e7201e0ebd73f92f530`
|
||||
|
||||
## Host-element quirks (found in production, 2026-10-12)
|
||||
|
||||
Three hotfix rounds traced back to how this custom element behaves from the
|
||||
outside. None of these are visible in the upstream README; all three re-break
|
||||
silently on an upgrade unless the bridges below are re-checked:
|
||||
|
||||
1. **Host events are incomplete.** The element forwards `play`/`pause`/`ended`
|
||||
to the host, but NOT `timeupdate`, `seeking`, `seeked`, or `waiting`. The
|
||||
workbench transport (progress bar, time display, end-of-slice stop) listens
|
||||
on the host and froze without them. Bridge: `src/components/MoviVideo.tsx`
|
||||
re-dispatches the four events from the shadow `<video>`.
|
||||
2. **Host `videoWidth`/`videoHeight` stay 0 forever**, and the shadow
|
||||
`<video>` is created asynchronously after the host's first `canplay`.
|
||||
Anything measuring the host to position overlays (review captions) must
|
||||
measure the shadow video with bounded retries instead, or it hides itself
|
||||
permanently — which dev never caught because dev's native-video fallback
|
||||
has a real host size. Bridge: review caption overlay measurement.
|
||||
3. **The playback-rate cap is hard-coded** (`getMaxAllowedRate`), patched
|
||||
locally to 4 — see the patch section above.
|
||||
|
||||
**Upgrade checklist**: re-apply the rate patch; verify the event bridge still
|
||||
covers all four events; verify overlay measurement still reads the shadow
|
||||
video. Verify with `<movi-player>` actually mounted (dev default can fall back
|
||||
to a native `<video>` and mask every quirk above — see HANDOFF §4).
|
||||
|
||||
**Loader discipline** (`src/lib/movi-player.ts`): `/vendor` assets must never
|
||||
be module-imported from source in dev — the transform middleware rejects them
|
||||
("Failed to load url") and the error overlay blocks every page; dev loads the
|
||||
element via a plain module `<script>` tag, the built deployment keeps the
|
||||
`?v=`-busted dynamic import. Guarded by `tests/frontend/devboot.test.mjs`.
|
||||
|
||||
Loaded by `src/lib/movi-player.ts` (dynamic import, no bundler processing).
|
||||
Served from `public/` so both `vite dev` and the built web dist expose it at
|
||||
`/vendor/movi-player-0.4.1/`.
|
||||
|
||||
126
scripts/check-test-baseline.mjs
Normal file
126
scripts/check-test-baseline.mjs
Normal file
@ -0,0 +1,126 @@
|
||||
#!/usr/bin/env node
|
||||
// Known-failure baseline gate for the two suites with upstream test debt.
|
||||
//
|
||||
// node scripts/check-test-baseline.mjs frontend # npm run test:frontend:gate
|
||||
// node scripts/check-test-baseline.mjs go # npm run test:go:gate
|
||||
// node scripts/check-test-baseline.mjs <suite> --update
|
||||
//
|
||||
// Exit 0: no NEW failures vs tests/known-failures.json. Exit 1: new failures
|
||||
// (printed by exact id) or a runner crash. Fixed baseline entries are reported
|
||||
// as candidates to prune with --update but never fail the gate.
|
||||
//
|
||||
// Baseline ids: frontend "<file basename> :: <test name>" (spec-reporter
|
||||
// failure detail pairs `test at <file>` with the following `✖ <name>` line);
|
||||
// go "<package path> :: <TestName>" (top-level `--- FAIL:` lines assigned to
|
||||
// the package whose `FAIL\t<pkg>` block marker closes them).
|
||||
|
||||
import { spawn } from "node:child_process";
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { dirname, join } from "node:path";
|
||||
|
||||
const repoRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const baselinePath = join(repoRoot, "tests", "known-failures.json");
|
||||
const suite = process.argv[2];
|
||||
const update = process.argv.includes("--update");
|
||||
|
||||
if (suite !== "frontend" && suite !== "go") {
|
||||
console.error(`usage: check-test-baseline.mjs <frontend|go> [--update]`);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
function run(command, args) {
|
||||
return new Promise((resolve) => {
|
||||
const child = spawn(command, args, { cwd: repoRoot, shell: false });
|
||||
let out = "";
|
||||
let err = "";
|
||||
child.stdout.on("data", (chunk) => {
|
||||
out += chunk;
|
||||
});
|
||||
child.stderr.on("data", (chunk) => {
|
||||
err += chunk;
|
||||
});
|
||||
child.on("error", (error) => resolve({ code: null, out: "", err: String(error) }));
|
||||
child.on("close", (code) => resolve({ code, out, err }));
|
||||
});
|
||||
}
|
||||
|
||||
function parseFrontendFailures(output) {
|
||||
const failures = new Set();
|
||||
const lines = output.split("\n");
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const match = lines[i].match(/^test at (tests\/frontend\/(\S+\.test\.mjs)):\d+:\d+$/);
|
||||
if (match && lines[i + 1]?.startsWith("✖")) {
|
||||
const name = lines[i + 1].replace(/^✖\s*/, "").replace(/\s+\([\d.]+ms\)$/, "");
|
||||
failures.add(`${match[2]} :: ${name}`);
|
||||
}
|
||||
}
|
||||
return failures;
|
||||
}
|
||||
|
||||
function parseGoFailures(output) {
|
||||
const failures = new Set();
|
||||
let pending = [];
|
||||
for (const line of output.split("\n")) {
|
||||
const fail = line.match(/^--- FAIL: (\w+)/);
|
||||
if (fail) {
|
||||
pending.push(fail[1]);
|
||||
continue;
|
||||
}
|
||||
const block = line.match(/^FAIL\t(\S+)\t/);
|
||||
if (block && pending.length > 0) {
|
||||
const pkg = block[1].replace(/^droboticflow\//, "");
|
||||
for (const name of pending) failures.add(`${pkg} :: ${name}`);
|
||||
pending = [];
|
||||
}
|
||||
}
|
||||
return failures;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const baselineFile = JSON.parse(readFileSync(baselinePath, "utf8"));
|
||||
const known = new Set(baselineFile[suite] ?? []);
|
||||
if (known.size === 0 && !update) {
|
||||
console.error(`baseline file has no "${suite}" entries; run with --update first`);
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const result =
|
||||
suite === "frontend"
|
||||
? await run("npm", ["run", "--silent", "test:frontend"])
|
||||
: await run("npm", ["run", "--silent", "test"]);
|
||||
|
||||
const failures =
|
||||
suite === "frontend" ? parseFrontendFailures(result.out + result.err) : parseGoFailures(result.out + result.err);
|
||||
|
||||
const runnerCrashed = result.code === null;
|
||||
const noFailuresParsed = failures.size === 0 && result.code !== 0;
|
||||
if (runnerCrashed || noFailuresParsed) {
|
||||
console.error(`test runner did not produce parseable results (code=${result.code})`);
|
||||
console.error(result.err.slice(0, 2000));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (update) {
|
||||
baselineFile[suite] = [...failures].sort();
|
||||
writeFileSync(baselinePath, JSON.stringify(baselineFile, null, 2) + "\n");
|
||||
console.log(`baseline updated: ${suite} = ${failures.size} known failures -> ${baselinePath}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const fresh = [...failures].filter((id) => !known.has(id));
|
||||
const fixed = [...known].filter((id) => !failures.has(id));
|
||||
|
||||
if (fresh.length > 0) {
|
||||
console.error(`NEW ${suite} failures (${fresh.length}) not in tests/known-failures.json:`);
|
||||
for (const id of fresh) console.error(` + ${id}`);
|
||||
process.exit(1);
|
||||
}
|
||||
if (fixed.length > 0) {
|
||||
console.log(`fixed vs baseline (${fixed.length}) — prune with --update when confirmed:`);
|
||||
for (const id of fixed) console.log(` - ${id}`);
|
||||
}
|
||||
console.log(`${suite}: ${failures.size} failures, all in baseline (${known.size} known). OK`);
|
||||
}
|
||||
|
||||
await main();
|
||||
245
scripts/local/smoke-workbench.mjs
Normal file
245
scripts/local/smoke-workbench.mjs
Normal file
@ -0,0 +1,245 @@
|
||||
#!/usr/bin/env node
|
||||
// Pre-release workbench smoke against the LOCAL replica stack only.
|
||||
//
|
||||
// Covers the seven acceptance points that recurred across the 2026-10-12
|
||||
// hotfix rounds 8-12, replacing per-round hand-written probe scripts:
|
||||
// 1 reviewer login 2 quality pool renders
|
||||
// 3 random claim works 4 play-while-loading starts without a drag
|
||||
// 5 caption overlay on claimed task (movi path, not the native fallback)
|
||||
// 6 4x rate selectable 7 playhead advances while playing
|
||||
//
|
||||
// Prereqs (see docs/HANDOFF.md §2): snapshot Mongo on 27018, API on 3001
|
||||
// (source scripts/local/env-local-snapshot.sh && npm run dev:api), vite dev
|
||||
// on 5173 (npx vite --port 5173 --strictPort), and a Chromium/Edge binary.
|
||||
//
|
||||
// node scripts/local/smoke-workbench.mjs
|
||||
//
|
||||
// Env: LOCAL_TEST_PASSWORD (default Test1234!local), BROWSER_EXECUTABLE,
|
||||
// REPRO_URL (default http://localhost:5173). The random claim WRITES a claim
|
||||
// into the local snapshot replica — never point REPRO_URL at a cluster.
|
||||
import { chromium } from "playwright";
|
||||
|
||||
const base = process.env.REPRO_URL || "http://localhost:5173";
|
||||
const phone = "local-test-user-workspace-layout-qc-reviewer";
|
||||
const password = process.env.LOCAL_TEST_PASSWORD || "Test1234!local";
|
||||
|
||||
const results = [];
|
||||
const step = (name, status, evidence) => {
|
||||
results.push({ name, status, evidence });
|
||||
console.log(`${status === "PASS" ? "✔" : status === "FAIL" ? "✖" : "⚠"} ${name}: ${evidence}`);
|
||||
};
|
||||
|
||||
async function preflight() {
|
||||
const problems = [];
|
||||
for (const [label, url] of [
|
||||
["API 3001", "http://127.0.0.1:3001/api/health"],
|
||||
["web 5173", `${base}/`],
|
||||
]) {
|
||||
try {
|
||||
const res = await fetch(url, { signal: AbortSignal.timeout(3000) });
|
||||
if (!res.ok) problems.push(`${label} unhealthy (${res.status})`);
|
||||
} catch {
|
||||
problems.push(`${label} unreachable — start the stack per docs/HANDOFF.md §2/§3`);
|
||||
}
|
||||
}
|
||||
if (problems.length) {
|
||||
console.error("preflight failed:\n " + problems.join("\n "));
|
||||
process.exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
function findBrowser() {
|
||||
if (process.env.BROWSER_EXECUTABLE) return process.env.BROWSER_EXECUTABLE;
|
||||
for (const candidate of [
|
||||
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
|
||||
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
||||
"/usr/bin/chromium",
|
||||
"/usr/bin/google-chrome",
|
||||
]) {
|
||||
try {
|
||||
require("node:fs").accessSync(candidate);
|
||||
return candidate;
|
||||
} catch {
|
||||
// try next
|
||||
}
|
||||
}
|
||||
return undefined; // playwright bundled chromium
|
||||
}
|
||||
|
||||
async function findVideoElement(page) {
|
||||
return page.evaluate(() => {
|
||||
const host = document.querySelector("movi-player");
|
||||
const shadowVideo = host?.shadowRoot?.querySelector("video");
|
||||
const native = document.querySelector("video");
|
||||
const video = shadowVideo || native;
|
||||
return video
|
||||
? { path: shadowVideo ? "movi-shadow" : "native", paused: video.paused, time: video.currentTime }
|
||||
: null;
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await preflight();
|
||||
const browser = await chromium.launch({
|
||||
...(findBrowser() ? { executablePath: findBrowser() } : {}),
|
||||
headless: true,
|
||||
args: ["--no-proxy-server"],
|
||||
});
|
||||
const context = await browser.newContext({ viewport: { width: 1500, height: 900 } });
|
||||
const page = await context.newPage();
|
||||
page.setDefaultTimeout(30000);
|
||||
const pageErrors = [];
|
||||
page.on("pageerror", (e) => pageErrors.push(e.message));
|
||||
|
||||
try {
|
||||
// 1) login
|
||||
await page.goto(`${base}/login`, { waitUntil: "domcontentloaded" });
|
||||
await page.fill("input[type='text'], input[name='identifier'], input[placeholder*='手机']", phone);
|
||||
await page.fill("input[type='password']", password);
|
||||
await page.click("button:has-text('登录')");
|
||||
await page.waitForTimeout(4000);
|
||||
const loggedIn = !(await page.locator("input[type='password']").count());
|
||||
step("login (qc reviewer)", loggedIn ? "PASS" : "FAIL", loggedIn ? "session established" : "still on login form");
|
||||
if (!loggedIn) throw new Error("login failed — check LOCAL_TEST_PASSWORD");
|
||||
|
||||
// 2) quality pool
|
||||
await page.goto(`${base}/plugins/annotation-qa/workflows/all/quality`, { waitUntil: "domcontentloaded" });
|
||||
await page.waitForTimeout(9000);
|
||||
const poolCards = await page.locator("[data-testid='annotation-task-card']").count();
|
||||
step("quality pool renders", "PASS", `${poolCards} pool card(s) visible`);
|
||||
|
||||
// 3) random claim
|
||||
const claimButton = page.locator("button", { hasText: "随机领取" }).first();
|
||||
let enteredSession = false;
|
||||
if (await claimButton.count()) {
|
||||
await claimButton.click();
|
||||
await page.waitForTimeout(8000);
|
||||
const body = (await page.locator("main").textContent()) || "";
|
||||
const video = await findVideoElement(page);
|
||||
enteredSession = Boolean(video) || /继续处理|当前切片|画面标注/.test(body);
|
||||
if (enteredSession) {
|
||||
step("random claim", "PASS", "entered a review session");
|
||||
} else if (body.includes("没有领取权限")) {
|
||||
step("random claim", "PASS", "explicit no-permission notice (server-shipped flag)");
|
||||
} else if (body.includes("当前暂无可领取") && poolCards > 0) {
|
||||
step("random claim", "FAIL", `misleading empty notice while pool shows ${poolCards} card(s) (round12 class)`);
|
||||
} else {
|
||||
step("random claim", "FAIL", "no session, no explicit notice");
|
||||
}
|
||||
} else {
|
||||
step("random claim", "FAIL", "随机领取 button not visible in the workbench (round9 class)");
|
||||
}
|
||||
|
||||
// 4-7) video checks inside the claimed session
|
||||
let video = await findVideoElement(page);
|
||||
if (!video) {
|
||||
await page.waitForTimeout(5000);
|
||||
video = await findVideoElement(page);
|
||||
}
|
||||
if (!video) {
|
||||
step("video session", "FAIL", "no video element after claim — check wire-local-capture.sh wiring");
|
||||
} else {
|
||||
step(
|
||||
"player engine",
|
||||
video.path === "movi-shadow" ? "PASS" : "WARN",
|
||||
video.path === "movi-shadow"
|
||||
? "movi-player mounted (quirks path)"
|
||||
: "native <video> fallback — movi path untested (HANDOFF §4)",
|
||||
);
|
||||
|
||||
// 4) play while loading, without any drag (round11). Session-entry
|
||||
// overlays can swallow a single early click, so re-click while the
|
||||
// button still reads 播放 (paused) instead of clicking blindly.
|
||||
const playButton = page.locator("button[title='播放/暂停(Space,填写文本时不触发)']").first();
|
||||
let playing = false;
|
||||
let clicks = 0;
|
||||
const stateTrail = [];
|
||||
for (let i = 0; i < 36 && !playing; i++) {
|
||||
const state = await findVideoElement(page);
|
||||
if (state) stateTrail.push(`${state.paused ? "paused" : "playing"}@${state.time.toFixed(2)}`);
|
||||
if (state && !state.paused && state.time > 0) {
|
||||
playing = true;
|
||||
break;
|
||||
}
|
||||
if (i > 0 && i % 5 === 0 && (await playButton.count())) {
|
||||
const label = ((await playButton.textContent()) || "").trim();
|
||||
if (label === "播放") {
|
||||
clicks += 1;
|
||||
await playButton.click({ timeout: 3000 }).catch(() => {});
|
||||
}
|
||||
}
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
if (!playing && (await playButton.count())) {
|
||||
const label = ((await playButton.textContent()) || "").trim();
|
||||
if (label === "播放") {
|
||||
clicks += 1;
|
||||
await playButton.click({ timeout: 3000 }).catch(() => {});
|
||||
for (let i = 0; i < 10 && !playing; i++) {
|
||||
await page.waitForTimeout(500);
|
||||
const state = await findVideoElement(page);
|
||||
if (state) stateTrail.push(`${state.paused ? "paused" : "playing"}@${state.time.toFixed(2)}`);
|
||||
if (state && !state.paused && state.time > 0) playing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
step(
|
||||
"play-while-loading (round11)",
|
||||
playing ? "PASS" : "FAIL",
|
||||
playing
|
||||
? `playback started after ${clicks} click(s), no timeline drag`
|
||||
: `video never played (${clicks} clicks): ${stateTrail.slice(-6).join(" → ")}`,
|
||||
);
|
||||
|
||||
// 5) caption overlay on claimed task (round11/12)
|
||||
const body = (await page.locator("main").textContent()) || "";
|
||||
step(
|
||||
"caption overlay (round11/12)",
|
||||
/当前切片|当前画面标注/.test(body) ? "PASS" : "FAIL",
|
||||
/当前切片|当前画面标注/.test(body) ? "caption panel present" : "no caption markers found",
|
||||
);
|
||||
|
||||
// 6) 4x rate present (round10) — native select[aria-label=播放速度]
|
||||
const rateSelect = page.locator("select[aria-label='播放速度']").first();
|
||||
if (await rateSelect.count()) {
|
||||
const options = await rateSelect.locator("option").allTextContents();
|
||||
const has4x = options.some((t) => /^4(\.0)?×$/.test(t.trim()));
|
||||
step(
|
||||
"4x rate (round10)",
|
||||
has4x ? "PASS" : "FAIL",
|
||||
has4x ? `rate options: ${options.join("/")}` : `no 4x in ${options.join("/")}`,
|
||||
);
|
||||
if (has4x) {
|
||||
await rateSelect.selectOption("4");
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
} else {
|
||||
step("4x rate (round10)", "FAIL", "playback-rate select not found");
|
||||
}
|
||||
|
||||
// 7) playhead advances (round8) — ensure playing first (4x may have re-buffered)
|
||||
const playAgain = page.locator("button[title='播放/暂停(Space,填写文本时不触发)']").first();
|
||||
if ((await findVideoElement(page))?.paused && (await playAgain.count())) await playAgain.click();
|
||||
const first = (await findVideoElement(page))?.time ?? 0;
|
||||
await page.waitForTimeout(2500);
|
||||
const second = (await findVideoElement(page))?.time ?? 0;
|
||||
step(
|
||||
"playhead advance (round8)",
|
||||
second > first ? "PASS" : "FAIL",
|
||||
`currentTime ${first.toFixed(2)}s → ${second.toFixed(2)}s`,
|
||||
);
|
||||
}
|
||||
|
||||
if (pageErrors.length) step("page errors", "WARN", pageErrors.slice(0, 3).join(" | ").slice(0, 300));
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
const failed = results.filter((r) => r.status === "FAIL");
|
||||
console.log(
|
||||
`\n${failed.length ? "SMOKE FAILED" : "SMOKE PASSED"}: ${results.filter((r) => r.status === "PASS").length} pass, ${results.filter((r) => r.status === "WARN").length} warn, ${failed.length} fail`,
|
||||
);
|
||||
process.exit(failed.length ? 1 : 0);
|
||||
}
|
||||
|
||||
await main();
|
||||
58
tests/frontend/devboot.test.mjs
Normal file
58
tests/frontend/devboot.test.mjs
Normal file
@ -0,0 +1,58 @@
|
||||
// Dev-boot regression guard (2026-10-12 round10 class): a source-level import
|
||||
// of a public-dir /vendor/ asset with a cache-bust query ("?v=...") broke every
|
||||
// Vite dev page with an error overlay while the production build stayed green.
|
||||
// This test boots the real dev server and pins the contract from three sides:
|
||||
// the entry pipeline is healthy, the movi loader never routes /vendor assets
|
||||
// through the module pipeline in DEV, and the prod cache-bust URL — if anyone
|
||||
// re-imports it from source — is exactly the shape the pipeline rejects.
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { createServer } from "vite";
|
||||
|
||||
test("vite dev boots and keeps the movi loader off the module pipeline", async () => {
|
||||
const server = await createServer({
|
||||
root: process.cwd(),
|
||||
logLevel: "error",
|
||||
server: { host: "127.0.0.1", port: 0 },
|
||||
});
|
||||
await server.listen();
|
||||
try {
|
||||
const origin = new URL(server.resolvedUrls.local[0]).origin;
|
||||
|
||||
// 1) The dev transform pipeline itself is healthy on the app entry.
|
||||
const entry = await server.transformRequest("/src/main.tsx");
|
||||
assert.ok(entry, "dev server must transform the app entry module");
|
||||
|
||||
// 2) The real loader module, executed in DEV mode, must emit a query-less
|
||||
// /vendor URL: dev serves public assets as static files only, and a
|
||||
// query defeats the static resolver (the round10 overlay break).
|
||||
const movi = await server.ssrLoadModule("/src/lib/movi-player.ts");
|
||||
assert.ok(movi.MOVI_ELEMENT_CACHE_BUST, "cache-bust marker must stay defined");
|
||||
assert.equal(
|
||||
new URL(movi.MOVI_ELEMENT_JS_URL, origin).search,
|
||||
"",
|
||||
"DEV movi URL must not carry a cache-bust query (round10 regression class)",
|
||||
);
|
||||
|
||||
// 3) That DEV URL must be fetchable as a plain static asset (script-tag path).
|
||||
const asset = await fetch(`${origin}${movi.MOVI_ELEMENT_JS_URL}`);
|
||||
assert.equal(asset.status, 200, "dev server must statically serve the movi element script");
|
||||
|
||||
// 4) Negative control — the prod-shaped URL is exactly what the module
|
||||
// pipeline rejects; this is why importing /vendor assets from source is
|
||||
// forbidden in dev and the loader uses a script tag there instead.
|
||||
await assert.rejects(
|
||||
server.transformRequest(
|
||||
`/vendor/movi-player-${movi.MOVI_VERSION}/element.slim.js?v=${movi.MOVI_ELEMENT_CACHE_BUST}`,
|
||||
),
|
||||
/Failed to load url/,
|
||||
"module pipeline must keep refusing /vendor assets (documented break class)",
|
||||
);
|
||||
|
||||
// 5) The shell page itself still responds.
|
||||
const index = await fetch(`${origin}/`);
|
||||
assert.equal(index.status, 200, "dev server must serve the app shell");
|
||||
} finally {
|
||||
await server.close();
|
||||
}
|
||||
});
|
||||
90
tests/known-failures.json
Normal file
90
tests/known-failures.json
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"frontend": [
|
||||
"annotation-five-rules.test.mjs :: three roles hide release controls while counts remain anonymous",
|
||||
"capture-annotation-workbench.test.mjs :: production shell keeps real users, collapsible navigation, and a persisted light-default theme",
|
||||
"capture-automation.test.mjs :: automation keeps advanced settings collapsed and separates saving from listener activation",
|
||||
"capture-automation.test.mjs :: project exposes only its selected dictionary descriptions",
|
||||
"capture-automation.test.mjs :: project workflow exposes complete Capture automatic processing without a scan node",
|
||||
"challenger-m5-empirical.test.mjs :: ProjectDetail.tsx has '运行历史' tab and resets pagination cursors on modeFilter change",
|
||||
"fanyu-comment-followup.test.mjs :: workflow run input renders a per-run automatic HandPose switch",
|
||||
"object-storage-reference-picker.test.mjs :: workflow default and run input surfaces use the reusable BOS browser",
|
||||
"object-sync.test.mjs :: drosync stays reachable from data storage without becoming a ninth primary module",
|
||||
"plugin-page-subnav.test.mjs :: layout removes the redundant product header and keeps only a compact health control",
|
||||
"plugin-page-subnav.test.mjs :: project detail separates released and debug workflows and opens released run history",
|
||||
"project-membership-cascade.test.mjs :: project detail exposes project-scoped human roles and safe workflow deletion",
|
||||
"project-ui-regressions.test.mjs :: creation exposes Capture mode and projects can reference released templates",
|
||||
"raw-human-profile.test.mjs :: raw human UI gates pose controls without weakening legacy defaults"
|
||||
],
|
||||
"go": [
|
||||
"internal/api :: TestAPIHandlerSupportsDashboardCRUDAndRunQueueing",
|
||||
"internal/api :: TestAdversarial_ConcurrentDebugRuns_DBZeroMutationInvariant",
|
||||
"internal/api :: TestAdversarial_DebugRun_GhostAndMalformedOverrides",
|
||||
"internal/api :: TestAdversarial_ReleaseRun_IntermediateNodeHyperparams",
|
||||
"internal/api :: TestAdversarial_ReleaseRun_NonRootInputBindings",
|
||||
"internal/api :: TestAdversarial_SubtreeRerun_SecurityAndProvenancePreservation",
|
||||
"internal/api :: TestCollectionTaskCreateAndStartCarriesTaskIntoRun",
|
||||
"internal/api :: TestCompletedWorkflowCanBeRunAgainManually",
|
||||
"internal/api :: TestCreateAndUpdatePreserveOperatorRunnerImage",
|
||||
"internal/api :: TestDeliveryDownloadScopeAndCompletion",
|
||||
"internal/api :: TestDualTrack_Tier1_FeatureCoverage",
|
||||
"internal/api :: TestDualTrack_Tier2_BoundaryAndCornerCases",
|
||||
"internal/api :: TestDualTrack_Tier3_CrossFeatureCombinations",
|
||||
"internal/api :: TestDualTrack_Tier4_RealWorldApplicationScenarios",
|
||||
"internal/api :: TestEmployeeSupplierFixedLifecycle",
|
||||
"internal/api :: TestFanyuQualityRejectionRequiresProblemSlice",
|
||||
"internal/api :: TestFanyuV3StaysDraftUntilRealHeadposeServiceAndDigestsAreConfigured",
|
||||
"internal/api :: TestFanyuV58AggregateAcceptanceUsesIndependentRoleAndWholeBatchRejection",
|
||||
"internal/api :: TestHumanInTheLoopConvenienceStoreFullLifecycleE2E",
|
||||
"internal/api :: TestPocGPUWorkflowAcceptanceAllowsSharedAPITokenWhenSessionAuthIsEnabled",
|
||||
"internal/api :: TestPocGPUWorkflowAcceptanceRejectsSourceOutsideWorkspace",
|
||||
"internal/api :: TestProductionWorkflowRejectsAIDraftOperator",
|
||||
"internal/api :: TestProjectWorkflowAPICreatesConnectionBackedScanWorkflow",
|
||||
"internal/api :: TestProjectWorkflowAPICreatesScanDraftAndBlocksRunUntilConfigured",
|
||||
"internal/api :: TestProjectWorkflowAPIRejectsDuplicateIncomingEdgesPerInputPort",
|
||||
"internal/api :: TestProjectWorkflowAPIRejectsUnknownNodeStorageConnection",
|
||||
"internal/api :: TestProjectWorkflowAPISupportsNativeScanWorkflows",
|
||||
"internal/api :: TestProjectWorkflowCreateInfersScanConfigFromIncrementalSourceNode",
|
||||
"internal/api :: TestProjectWorkflowCreatePersistsEveryHoursSchedule",
|
||||
"internal/api :: TestProjectWorkflowCreatePreservesBOSSourcePathWhenUsingConnectionReference",
|
||||
"internal/api :: TestProjectWorkflowCreateRejectsInvalidEveryDaysSchedule",
|
||||
"internal/api :: TestProjectWorkflowCreateRejectsInvalidIncrementalDirectoryDepthHyperparam",
|
||||
"internal/api :: TestProjectWorkflowInstanceBindsValidatedSupplier",
|
||||
"internal/api :: TestProjectWorkflowInstancePersistsReleasedProjectWorkflow",
|
||||
"internal/api :: TestProjectWorkflowRejectsInvalidScanSourceDataSource",
|
||||
"internal/api :: TestProjectWorkflowRejectsInvalidScanSourceIncrementalUnit",
|
||||
"internal/api :: TestProjectWorkflowRejectsInvalidScanSourceScanMode",
|
||||
"internal/api :: TestProjectlessScanWorkflowCanRun",
|
||||
"internal/api :: TestRunsRerunSubtreeCreatesQueuedChildRunWithBaseline",
|
||||
"internal/api :: TestRunsRerunSubtreeRebindsHumanReleasePartition",
|
||||
"internal/api :: TestRunsRerunSubtreeRejectsMissingCompletedBaseline",
|
||||
"internal/api :: TestSandboxWorkflowAllowsAIDraftOperator",
|
||||
"internal/api :: TestScanConfigBOSSecretsAreReturnedAndPreserved",
|
||||
"internal/api :: TestScanConfigCreateDraftDoesNotEnsureSystemProject",
|
||||
"internal/api :: TestScanConfigCreateRejectsInvalidDataSource",
|
||||
"internal/api :: TestSubtreeRerunInheritsModeAndProvenance",
|
||||
"internal/api :: TestTemplateCreateInfersScanConfigFromIncrementalSourceNode",
|
||||
"internal/api :: TestTemplateCreatePersistsEveryDaysScheduleDefaultsTimezone",
|
||||
"internal/api :: TestTemplateCreateRejectsDuplicateIncomingEdgesPerInputPort",
|
||||
"internal/api :: TestTemplateExecutionConfigValidationAndPersistence",
|
||||
"internal/api :: TestTemplateUpdateInfersScanConfigFromIncrementalSourceNode",
|
||||
"internal/api :: TestTier5AdversarialHardening",
|
||||
"internal/api :: TestWorkflowAndTemplateMetadataValidationAndNormalization",
|
||||
"internal/api :: TestWorkflowDefinitionReleaseLocksUpdatesAndCreatesNewVersion",
|
||||
"internal/api :: TestWorkflowDraftDebugRunAndOverrides",
|
||||
"internal/api :: TestWorkflowExecutionConfigValidationAndPersistence",
|
||||
"internal/api :: TestWorkflowReleaseRunEndpointSecurityGate",
|
||||
"internal/api :: TestWorkflowRunAcceptsAndPersistsInlineRootInput",
|
||||
"internal/api :: TestWorkflowRunRecordsLightweightCodeManifest",
|
||||
"internal/api :: TestWorkflowRunRejectsAIDraftOperatorInProduction",
|
||||
"internal/api :: TestWorkflowRunRejectsDuplicateIncomingEdgesPerInputPort",
|
||||
"internal/api :: TestWorkflowRunRejectsMissingLightweightCodeDirectory",
|
||||
"internal/api :: TestWorkflowUpdateInfersScanConfigFromIncrementalSourceNode",
|
||||
"internal/api :: TestWorkflowVersionActivationHidesSiblingsAndKeepsHistoryReadable",
|
||||
"internal/api :: TestWorkflowVersionActivationRejectsDraft",
|
||||
"internal/productionstats :: TestLegacyReviewAndPackageAcceptanceFacts",
|
||||
"internal/worker :: TestRuntimeAnnotationGateCreatesTasksAndReturnsAcceptedRevisionArtifact",
|
||||
"internal/worker :: TestRuntimeCommitsIncrementalSourceStateOnlyOnSuccessfulRuns",
|
||||
"internal/worker :: TestRuntimeProcessesXPlatformPipeline",
|
||||
"internal/worker :: TestRuntimeSupportsPreviewAndDatasetBuiltins"
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user