fix: resolve UAT audit findings in BYO pinning and migration flows#479
Conversation
Entire-Checkpoint: 3fda50dc5d1d
…art progress polling on new migration Entire-Checkpoint: 882a574381e9
…ess accounting idempotent Entire-Checkpoint: 3ca03e3156a3
…ls not applicable Entire-Checkpoint: c3b1c8c3f8bc
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
WalkthroughIncrease the TEE /migrate batch timeout to 300,000ms; deduplicate reported failed CIDs and clamp migrated/failed counters; add tests for timeout and progress edge cases; improve migration UI lifecycle and BYO-status save wiring; update an audit gap record and bump release config versions. ChangesTEE Migration Robustness Improvements
Release configuration bumps
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Release Preview
Cascade Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #479 +/- ##
==========================================
+ Coverage 62.34% 62.35% +0.01%
==========================================
Files 135 135
Lines 10157 10162 +5
Branches 1081 1083 +2
==========================================
+ Hits 6332 6337 +5
Misses 3601 3601
Partials 224 224
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
Closes out the outstanding
/gsd:audit-fixfindings from the cross-phase UAT/verification audit (sources: phase 21 BYO IPFS UAT, phase 35 Phala TEE UAT). Four findings resolved — three code fixes and one documentation disposition.Changes
F-03 — BYO quota badge was unreachable (high)
StorageTabsave flow now callsPATCH /vault/byo-status(vaultControllerSetByoStatus) after persisting the pinning config:isByo: truefor external/dual mode,falsefor cipherbox. The call is non-fatal — a failure logs a warning and never trips the save error. The existingfetchQuota()immediately after picks up the advisory flag, so the quota badge updates in the same save.Key files:
apps/web/src/components/settings/StorageTab.tsxF-04 — stale failed migration rendered as active, polling never restarted (medium)
MigrationProgressnow renders terminal failed jobs as> migration failed: X/Y pins migrated(error styling) instead of the active-lookingmigrating: X/Y pins.StorageTabremountsMigrationProgress(Reactkeykeyed on amigrationRunIdcounter incremented aftermigrationApi.start) so a new migration restarts the poll loop instead of displaying the previous terminal job until remount.Key files:
apps/web/src/components/settings/MigrationProgress.tsx,apps/web/src/components/settings/StorageTab.tsxF-05 — migration stats double-counted on batch timeout race (medium)
MigrationService.updateProgressis now self-consistent:failedCidListis deduped and becomes the source of truth for the failed count, andmigratedCidsis clamped somigrated + failednever exceedstotalCidson double-reported batches.Key files:
apps/api/src/migration/migration.processor.ts,apps/api/src/migration/migration.service.tsF-08 — orphaned Phala staging credentials (medium)
Marked not-applicable in
35-UAT.md: Phala credits are expected, the staging TEE will likely return to Phala Cloud, soPHALA_CLOUD_API_KEY/PHALA_TEE_WORKER_URLstay inert intentionally.Verification
apps/apimigration specs: 38/38 passing (3 new dedup/clamp tests + a 300s timeout assertion)apps/webtest suite: 23/23 passingtsc --noEmitand eslint clean on all touched filesKey Decisions
failedCidListis the failure source of truth; per-CID success tracking (full idempotency) was deliberately deferred.keychosen over lifting poll state for F-04 — smallest change that restarts polling in the product flow.TDD Audit
779510385fix(web): resolve F-03 — wire byo-status flag into storage tab save flowe4276235dfix(web): resolve F-04 — render failed migrations distinctly and restart progress polling on new migration97ee0a56ffix(api): resolve F-05 — raise migration batch timeout and make progress accounting idempotentaadc6c9e0chore(planning): resolve F-08 — mark orphaned phala staging credentials not applicableAggregate: 0 skill, 0 fallback, 0 exempt — 4 missing (audit-fix pipeline commits; F-05 tests landed with the impl commit).
🤖 Generated with Claude Code
gate_status: skill=0, fallback=0, exempt=0, missing=4
Summary by CodeRabbit
New Features
Bug Fixes
Tests