fix(store): drop the replaced archive when the new one cannot be written

This commit is contained in:
bchanot committed 2026-10-14 23:15:54 +02:00
1 parent e5e2211476
commit a37c50b9ee
4 files changed
+23 -5

No files matched your search

@@ -10,6 +10,10 @@ B. Fix the case where an unreadable archive or draft cannot be quarantined for l
C. Remove `supabase/.temp/cli-latest` from git tracking while keeping the local copy; add the relevant .gitignore rules so Supabase temporary files are not tracked again; do not delete files needed for migrations or reproducibility.
Document the fixes briefly.
## CLARIFICATIONS
- `supabase/.temp/cli-latest` leaves the index by REQUEST C (the Supabase CLI version cache, not a test file; the floor classifier matches "test" inside "cli-latest").
- Pass 2 (after verifier pass 1): a refused archive write at a session edge removes the replaced session's archive instead of leaving it beside the new draft (test added); counts below updated.
## ACCEPTANCE CRITERIA
1. rustls is at 0.23.46 or later in the lock and the RustSec advisories check is clean.
CHECK: grep -A1 'name = "rustls"' Cargo.lock | tail -1; . scripts/rust-env.sh && cargo deny check advisories 2>&1 | tail -1
@@ -37,10 +41,10 @@ Document the fixes briefly.
EXPECT: 19/19 / fr.ts:1 en.ts:1 / 0
9. The tests cover quota errors, refused writes, an occupied slot, corrupted data (non-JSON, unknown version, lone surrogate), the pair rollback, the pre-rebase original, an orphan archive, later overwriting actions (new report, import, reset, unrelated store changes) and the panel flows.
CHECK: grep -cE "^\s+it\(" apps/app/tests/unit/state.heldSession.test.ts apps/app/tests/unit/routes.heldSession.test.tsx; grep -c "expectEveryLaterActionRefused(before)" apps/app/tests/unit/state.heldSession.test.ts
EXPECT: state.heldSession.test.ts:19 routes.heldSession.test.tsx:6 / ≥ 5
10. The Node gate is green on the rebuilt module (typecheck, every suite, lint 0 warnings, build), the app at 345 tests.
EXPECT: state.heldSession.test.ts:20 routes.heldSession.test.tsx:6 / ≥ 5
10. The Node gate is green on the rebuilt module (typecheck, every suite, lint 0 warnings, build), the app at 346 tests.
CHECK: bash scripts/wasm-build.sh > /dev/null 2>&1; ./node_modules/.bin/pnpm check > /tmp/maint-verify-check.log 2>&1; echo "exit $?"; grep "apps/app test:run: Tests" /tmp/maint-verify-check.log
EXPECT: exit 0 / Tests 345 passed (345)
EXPECT: exit 0 / Tests 346 passed (346)
11. The fixes are documented.
CHECK: grep -c "maintenance after R2" CHANGELOG.md; grep -c "maintenance B" docs/development/RUST.md
EXPECT: 2 / ≥ 2