Add fail-closed regression tests for high-blast-radius helpers that recent coverage PRs (#331–#338) did not lock. Main has not moved (e2d5f95e); this does not duplicate those open files.
permission_denied, not internal_error. Provider, backup, observability, and validation strings must keep their codes. Structured { code, source } wins over heuristic message text; unknown codes fail closed... / . / empty filenames are rejected before size checks. Rollback deletes only files/dirs the transaction still owns (dev/ino + realpath). A rename replacement or symlink swap is left intact so a canceled send cannot delete user data. commit() makes rollback a no-op.jsonEqual is key-order sensitive (JSON.stringify contract).test/session/turnErrorClassifier.test.tstest/session/userMessageAttachments.materialization.test.tstest/server/tasks/TaskArtifacts.register.test.tstest/server/spreadsheet/ooxml-color.test.tstest/server/artifacts/diffUtils.test.tsThese paths sit on shared turn, task, preview, and comparison flows. A classifier miss hides a permission denial as an internal error. A rollback miss deletes the wrong file after a TOCTOU swap. A revision-guard miss attaches the wrong artifact. OOXML/diff misses corrupt previews or unbounded comparison work. The new tests lock those contracts without changing production code.
test/platform-boundary.test.ts: pass (including after commit, so the ratchet sees the new files)bun run check and bun run typecheck: passSign in to comment.
Update README.md
#125 mobile-fixes ← main
Updated 4 months ago
test: cover turn errors, attachment rollback, and artifact registration
#339 main ← cursor/missing-test-coverage-46f9
Updated 2 weeks ago