Repository navigation
docs(drive): specify permanent upload rejection handling [skip deploy] - #133
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
使用者遇到的問題
wspc-drive 使用者的 library 裡有一個 291 MB 的
heart-rate.jsonl,server 每次都拒收(HTTP 413)。從 2026-09-15 起,app 大約每 5 秒就重讀、重傳整個 291 MB 一次,三天累積 444 次失敗,到 2026-09-18 還在持續。這個 PR 只新增設計 spec,定義修正後的行為,不改程式碼。背景
tod_01M2S8NHVDB66Y6971M4D1269V;相關:tod_01M2S85BY0A38RM37TMNC4KTDY(413 錯誤碼、大檔上傳)。docs/superpowers/specs/2026-06-21-drive-sync-watch-design.md、docs/superpowers/specs/2026-07-24-drive-sync-exclude-rules-design.md。.wspc-drive/debug.log:最近 71 次sync_start中有 60 次由trigger: local觸發,而同期 71 次fs_event全部是 root.DS_Store,但.wspc-drive/ignore早就排除了**/.DS_Store*。問題出在哪裡
有兩件事疊在一起:
executeDrivePathAction()上傳失敗時,錯誤只放進該輪summary.path_errors,不寫入state.json。下一輪decideDriveAction()仍判定upload_update,於是整檔重傳。平常上傳失敗多半是暫時性的,下一輪重傳本來就是對的,所以一直沒人注意到;只有 server 永遠拒收的檔案會變成無限重傳。runDriveWatch()對 excluded path 的 fs event 照樣排程 sync。exclude rules spec 當初刻意延後 watcher 端過濾,理由是這些 sync 什麼事都不會做,這個前提平常成立。但只要有一個失敗檔,每輪 sync 就是一次 291 MB 上傳。Finder 持續改寫.DS_Store,就形成了迴圈。修法
新增
docs/superpowers/specs/2026-09-18-drive-permanent-upload-rejection-design.md:state.json的 optionalupload_rejections記下該檔的mtime_ms、size_bytes、sha256與 CLI version。之後的輪次若 fingerprint 與 CLI version 都相同,就不再上傳,但每輪仍回報同一筆path_errors,dashboard 照樣顯示「1 file needs attention」。ignore變動時重新載入規則。README.mdroadmap 加上連結;CONTEXT.md新增 Permanent Upload Rejection 詞條。這個 PR 不修什麼
ready-for-agentTodo 處理。FILE_TOO_LARGE錯誤碼仍歸tod_01M2S85BY0A38RM37TMNC4KTDY。已知副作用
無。只有文件變動。
測試
只有文件變動,regression test 不適用。已確認 spec 引用的函式、欄位與 script(
npm run typecheck、npm test、npm run build)都存在於目前的main。未完成驗收
無(spec PR 本身沒有驗收項目;AC 12 的 live 驗收在實作發佈後進行)。
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.