SuperAPI AI 工具集

scenarios

通用与其它

查看项目

更新于 10-16 06:43

技能介绍

用途:本技能用于对已提交的 fixture 做检查,并对准备好的场景应用做运行时证明。验证路径按已登记的 scenario key 选择,提交的 fixtures/* 只作为来源,可运行应用位于 tmp/scenarios/*。约定是证明路径成功后即停止,不要反复试探应用。

主要能力与规则:绝不就地运行提交的 fixtures/;始终准备到 tmp/scenarios/<name>/project。fixtures: 负责提交快照的同步/检查,scenario:* 负责可运行的临时应用。证明成功或失败后要停止已启动的开发进程。若包或脚手架变更后临时应用过期,可重跑一次 bun run scenario:prepare -- <name>,仍失败则排查原因,不要无限循环。若场景没有真实浏览器认证界面,不要虚构;对引导密集的 Convex 通道,以 bun run scenario:check -- <name> 为证明,不要用临时的 scenario:dev 替代。

规范命令:bun run fixtures:sync、bun run fixtures:check、bun run scenario:prepare -- <name>、bun run scenario:dev -- <name>、bun run scenario:check -- <name>、bun run scenario:test -- <name>、bun run test:runtime、bun run test:auth -- <name|url>、bun run test:e2e -- <name|url>。其中 test:auth 与 test:e2e 假定场景已在运行;scenario:test 封装证明矩阵;test:runtime 运行 scenario:test -- all,是默认的非浏览器运行时闸门;test:e2e 是独立的认证浏览器通道,仅在认证界面变更时运行。

证明矩阵:普通运行时证明适用于 next、vite、create-convex-bare、create-convex-nextjs-shadcn、create-convex-react-vite-shadcn,执行 scenario:prepare 与 scenario:dev,等待就绪日志后停止,或直接 scenario:test。认证演示证明适用于 next-auth、start-auth,执行 prepare、dev、test:auth 后停止,或 scenario:test;scenario:test 只证明运行时加认证冒烟,浏览器认证证明属于显式的 test:e2e 通道。无浏览器认证的认证后端证明适用于 vite-auth,执行 prepare 与 dev 后停止,或 scenario:test;当前没有 /auth 页面或等价浏览器认证界面,不要伪造 test:e2e,也不要添加 test:auth,除非注册表出现专门的认证证明通道。引导密集的 Convex 证明适用于 convex-next-auth-bootstrap、convex-vite-auth-bootstrap、convex-next-all、create-convex-nextjs-shadcn-auth,执行 scenario:check 后停止,或 scenario:test。

其他:重新准备规则为包或脚手架来源变更、临时应用早于该变更、或临时应用缺少预期本地环境变量或生成文件时,重跑一次 scenario:prepare,否则复用已准备的应用。文档给出了 next-auth、vite-auth、convex-next-all 的示例命令,包括短路径与浏览器通道。限制方面,未提供收费、平台或效果等信息。