快速傅立叶变换调试

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用该技能

当运行时行为失败、降级或不一致时使用。在调查提供商接线、路由、日志或 IPC 状态时使用。在任何修复尝试之前生成可重现的分类输出时使用。

什么时候不应该使用这个技能

不要用作正常功能工作的默认路径。当请求纯粹是产品行为而不是事件/调试时,请勿使用。未经明确批准,请勿用来证明破坏性清理的合理性。

护栏

除非明确要求,否则切勿使用破坏性的 git 命令。保留不相关的工作树更改。仅将管理员/编码器控制保留在主聊天中;不要绕过主聊天限制。

快速分诊

确认单实例锁定:ls -la data/fft_nano.lock 检查启动/运行时日志:tail -n 200 logs/fft_nano.log tail -n 200 logs/fft_nano.error.log

常见故障模式

缺少提供商密钥:Pi 报告没有可用的型号。错误的PI_API/PI_MODEL:找不到型号/提供商。多个机器人实例:Telegram getUpdates 冲突。 Docker 守护进程不可用或运行时权限问题。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@0-CYBERDYNE-SYSTEMS-0 · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
Docker
运行环境要求
Docker
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# FFT Debug

Use this skill for incident triage and deterministic debugging of FFT_nano host and container paths.

## When to use this skill

- Use when runtime behavior is failing, degraded, or inconsistent.
- Use when investigating provider wiring, routing, logs, or IPC state.
- Use when producing reproducible triage output before any fix attempt.

## When not to use this skill

- Do not use as the default path for normal feature work.
- Do not use when the request is purely product behavior, not incident/debug.
- Do not use to justify destructive cleanup without explicit approval.

## Guardrails

- Never use destructive git commands unless explicitly requested.
- Preserve unrelated worktree changes.
- Keep admin/coder controls in main chat only; do not bypass main-chat restrictions.

## Fast Triage

1. Confirm single instance lock:
   - `ls -la data/fft_nano.lock`
2. Check startup/runtime logs:
   - `tail -n 200 logs/fft_nano.log`
   - `tail -n 200 logs/fft_nano.error.log`
3. Check per-group container logs:
   - `ls -la groups/<group>/logs`
   - `tail -n 200 groups/<group>/logs/*`
4. Inspect registration + IPC state:
   - `cat data/registered_groups.json`
   - `find data/ipc -maxdepth 3 -type f`

## Common Failure Modes

- Provider key missing: Pi reports no models available.
- Wrong `PI_API`/`PI_MODEL`: model/provider not found.
- Multiple bot instances: Telegram getUpdates conflict.
- Docker daemon unavailable or runtime permission issues.

## Recommended Debug Commands

- Build/runtime checks:
  - `npm run typecheck`
  - `npm test`
- Dry-run routing check (no live model call):
  - `FFT_NANO_DRY_RUN=1 ./scripts/start.sh dev telegram-only`
- Runtime detail logging:
  - `LOG_LEVEL=debug ./scripts/start.sh dev telegram-only`

## Telegram Debug Path

- Verify bot token present at runtime.
- In bot DM: `/id`, `/status`, `/help`.
- Admin checks in main chat only: `/tasks`, `/groups`, `/panel`, `/coder`, `/coder-plan`.
- If `/main <secret>` fails, verify `TELEGRAM_ADMIN_SECRET` and restart.

## Container Runtime Debug

- Docker runtime:
  - `docker info`
  - `docker ps`
- Host runtime (unisolated):
  - verify explicit flags: `CONTAINER_RUNTIME=host`, `FFT_NANO_ALLOW_HOST_RUNTIME=1`

## Database/State Debug

- SQLite file location: `store/messages.db`
- Router state: `data/router_state.json`
- Group registry: `data/registered_groups.json`
- Per-group Pi state: `data/pi/<group>/.pi/`

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。