Repository navigation
docs(drive): specify oversized file handling for sync [skip deploy] - #135
Merged
Merged
Conversation
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,dashboard 顯示DRIVE_PATH_ERROR: HTTP 413,看起來像路徑出錯,其實是檔案太大被拒收。使用者不知道上限是多少;CLI 也會先把整個檔案讀進記憶體、整檔送出才被拒。檔案每天 append,所以即使 CLI 0.13.0 已會記住拒收,每次變動仍會再整檔上傳一次。背景
tod_01M2S85BY0A38RM37TMNC4KTDY。本 PR 只新增 spec,實作另開ready-for-agentTodo。sadcoderlabs/wspcpackages/drive/worker/src/limits.ts:2),沒有 multipart/resumable upload,也沒有透過 API 公開上限。因此 Todo 原本列的 chunked upload 解不了問題:換傳輸方式仍會被同一個上限擋下。FILE_TOO_LARGE)。message,event contract 不變。問題出在哪裡
executeDrivePathAction()直接readStableUploadBody()讀整檔再api.uploadFile()。driveHttpError()只從 body 取code。edge 回的 413 沒有 JSON body,drivePathErrorSummary()就退回DRIVE_PATH_ERROR,失去「太大」的語意。修法(spec 內容)
docs/superpowers/specs/2026-09-18-drive-oversized-file-design.md,內容如下:size_bytes> 104857600)在決策為 upload 時:不讀、不傳,每輪回報FILE_TOO_LARGE、retryable: false,message帶實際大小與上限;該檔不計入 progresstotal,也不寫入state.json。code,一律視為FILE_TOO_LARGE。CONTEXT.md新增 Oversized File 詞彙;README roadmap 加上連結。這個 PR 不修什麼
只新增 spec,不改程式。讓大檔可以同步、server 公開上限、conflict 流程的大小預檢,都列在 spec 的 Out of Scope 與後續方向。
測試
文件變更,沒有 regression test 可寫。已執行
git diff --check。內文引用的程式位置都已逐一核對:serverlimits.ts:2、files-service.ts:181、errors.ts:47,本 repospec/openapi.json的drive_file_uploadresponses,以及.github/workflows/pr.yml:10。另在本機量測 sparse file:blocks: 0,hash 約 91 ms。未完成驗收
無(本 PR 範圍)。Spec 的 AC 1–9 由實作 Todo 驗收。
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.