根因:Makefile vendor-wheels 用 pip download --dest 只加不清空,跨多次 vendor-sync 累積出同套件多版本(certifi 三版/numpy 二版等共 17 wheel)→ agent bootstrap 的 ensureBundledPython 把目錄所有 .whl 當獨立參數丟 pip install → 版本衝突 ResolutionImpossible → pip 失敗 → venv 建了但空 → 無 Kneron PLUS SDK → bridge scan 走 pyusb fallback 回假序號 0x00000000 → 裝置「尚未回報序號」+ 載入模型 device not connected。 修法(3 個 vendor-wheels target): - 開頭 rm -f vendor/wheels/<plat>/*.whl 清空,確保每次 sync 單版本 - 結尾 dedup 驗證(sort|uniq -d 偵測多版本 → exit 1 fail-fast) - linux 補「無專屬 KneronPLUS wheel 時退回複製 macos py3-none-any」 - .gitignore 補 local-agent/vendor|payload|dist 對稱規則(保留 ffmpeg binary + .gitkeep 例外),防 vendor-sync 後 git add -A 撈進 build 產物 決定性 evidence(agent 實際 bundled runtime):清空 runtime → 起剛 build 的 .app → agent 自己 bootstrap 裝 9 個乾淨單版 wheel(修前 17 含重複必失敗) → venv 有 kp → GET /api/devices 回真序號 0xB906162C(非 0x00000000)。 Reviewer 通過(0C/0M/4Mi/3Sug)。win/linux 同邏輯已補、未在對應 runner 驗證(已知限制)。follow-up:ensureBundledPython 列舉 wheel 脆弱設計建議 改 find-links 自解析(backend 另案)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
# OS
|
||
.DS_Store
|
||
Thumbs.db
|
||
.AppleDouble
|
||
.LSOverride
|
||
|
||
# Editor
|
||
.vscode/
|
||
.idea/
|
||
*.swp
|
||
*.swo
|
||
|
||
# ─────────────────────────────────────
|
||
# local-tool 子專案的 build 產物
|
||
# ─────────────────────────────────────
|
||
|
||
# 不進 git 的依賴與產物(決策 R4-D2)
|
||
# 注意:使用 /** 而非 /,否則後面的 ! 例外無法 re-include(git 規則:
|
||
# 父目錄被排除時無法 re-include 檔案)— R5-6b 需要 macOS ffmpeg binary 進 git
|
||
local-tool/vendor/**
|
||
local-tool/dist/
|
||
local-tool/payload/
|
||
# R5-6b:macOS LGPL ffmpeg binary 進 git(沒有現成 LGPL binary 來源,自 build 成本高,
|
||
# commit 後開發者 clone 即可用,不必每次重 build ~15 分鐘)
|
||
!local-tool/vendor/ffmpeg/
|
||
!local-tool/vendor/ffmpeg/macos/
|
||
!local-tool/vendor/ffmpeg/macos/**
|
||
|
||
# local-agent 對稱規則(build 產物 wheel/python/ffmpeg 不進 git,避免 vendor-sync
|
||
# 後 git add -A 撈進大量 build 產物;同 local-tool 保留 macOS LGPL ffmpeg binary 例外)
|
||
local-agent/vendor/**
|
||
local-agent/dist/
|
||
local-agent/payload/**
|
||
!local-agent/payload/.gitkeep
|
||
!local-agent/vendor/.gitkeep
|
||
!local-agent/vendor/ffmpeg/
|
||
!local-agent/vendor/ffmpeg/macos/
|
||
!local-agent/vendor/ffmpeg/macos/**
|
||
|
||
# Go server 的 embed 與 build 產物
|
||
local-tool/server/web/out/
|
||
local-tool/server/visiona-local-server
|
||
|
||
# Frontend
|
||
local-tool/frontend/node_modules/
|
||
local-tool/frontend/.next/
|
||
local-tool/frontend/out/
|
||
|
||
# Wails 產物
|
||
local-tool/visiona-local/build/bin/
|
||
local-tool/visiona-local/build/darwin/Resources/
|
||
local-tool/visiona-local/build/windows/Resources/
|
||
local-tool/visiona-local/build/linux/Resources/
|
||
local-tool/visiona-local/visiona-local
|
||
local-tool/visiona-local/visiona-local.exe
|
||
local-tool/visiona-local/payload/
|
||
|
||
# 環境變數
|
||
.env
|
||
.env.local
|
||
.env.*.local
|
||
# dev 環境(docker-compose.dev.yml)
|
||
.env.dev
|
||
.env.dev.generated
|
||
# stage 環境(docker-compose.stage.yml)— 不進 git,由人工放到 stage host
|
||
# 用 .env.stage*(而非精確匹配)涵蓋人工備份檔(如 .env.stage.backup-YYYYMMDD-*),
|
||
# 這些備份含 stage secrets,一個 git add -A 就會進 git(進了就沒救)
|
||
.env.stage*
|
||
# 範本檔不含 secrets,明確 re-include 進 git
|
||
!.env.stage.example
|
||
|
||
# 簡報 / office 文件不進 git(repo 內出現的多半是內部討論素材,可能含內部資訊)
|
||
*.pptx
|
||
|
||
# Claude Code 本地 session / memory,不入 git
|
||
.claude/
|
||
|
||
# Autoflow Agent(由 autoflow-agent init 自動產生)
|
||
# 整包 ignore(progress.md / review 報告 / 個人筆記皆 per-branch)
|
||
# 共享文件(PRD / 設計 / 架構 / 交付)走 docs/ 進 git
|
||
graphify-out/
|
||
|
||
# sub-agent 工作 log(per-branch、不進 git)
|
||
.autoflow-logs/
|
||
**/.autoflow-logs/
|
||
|
||
# 本機執行 log(如 local-tool/server/scripts/.logs/,per-branch、不進 git)
|
||
.logs/
|
||
**/.logs/
|
||
|
||
.autoflow/
|
||
.autoflow/CLAUDE.md.backup.*
|
||
.autoflow/.backups/
|
||
.mcp.json
|