Code-quality fixes before merge (parallel-array, terminal flag, error naming, manifest dup)
wayfinder:task
## Question (execution)
Apply the **code-quality fixes** agreed before merge (Q9). Land on `feat/immutable-course-manifests` (or a stacked branch).
- **(a) Parallel-array coupling** in `course-publish-dropbox.ts`: `stagedVideos` is built by iterating `sections`, then re-iterated with a manual `stagedVideoIndex++` assuming identical traversal. Fix — iterate once, or key the staged list by `videoId` instead of positional index.
- **(b) `UPLOAD_FATAL_ERROR` sets `retryCount: 3`** as a sentinel to bypass auto-retry. Replace with an explicit `terminal`/`noRetry` flag on the entry rather than overloading the counter.
- **(c) `DropboxCommitPendingError` naming** — see recovery ticket #<T3>; a recoverable pending state should not travel as an SSE `"error"` / exit code 4 without clearer modelling. (Land the rename decided there.)
- **(d) `manifest.json` duplicates root `course.json` byte-for-byte** — confirm intent (self-describing bundle + root marker) and either document why both exist or drop the duplicate.
Blocked by the lifecycle ticket (naming/terminal-flag must align with the Pending model). Output: the applied diffs.
关闭于 2026-07-17 1 条评论