实例巡检自动修复失败根因定位(2026-06-25 23:59)

实例巡检自动修复失败根因定位(2026-06-25 23:59)

Objective

追查 Project 实例巡检发现的 28 个问题自动修复全部失败的原因。

调查过程

  1. 用户指出默认用户是 root 而非 admin
  2. 查看 .env 发现:SCSAI_USERNAME=root, SCSAI_PASSWORD=gyc123456;
  3. 检查 ai-inspector.js:getAuthUser() 只从 config.yaml(空)读取,fallback 到 'admin'
  4. 用 admin/Agent 测试编辑 Project → InsufficientPermissionsException
  5. 用 root/gyc123456; 测试 → 编辑成功 ✅

结论

修复失败的唯一原因是认证用户不对,不是代码逻辑问题。

修改内容

  • ai-inspector.js:getAuthUser() 默认值从 'admin' → 'root'
  • ai-inspector.js:getAuthUser()/getAuthPass() 增加 process.env.SCSAI_USERNAME / process.env.SCSAI_PASSWORD 作为备选
  • 之前误改为 fixType: 'manual' 的实例规则恢复为 fixType: 'auto'
← 返回案例列表

Try 左帮右臂 Industrial Agent — your digital workforce

Available as a WeChat mini program, web app (ylxt.chat) and desktop client. Start from whichever fits your workflow.

🌐 Web App 💻 Desktop Download 📞 Call 189-8606-6876
WeChat mini program QR
Scan for the WeChat mini program
Share:
🤖 Try Now →
🤖
🎁