fix(vault): drain and replay the pin retry queue
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, javascript, localization, typescript
Research direction
Read frontend/src/features/vault-pinning/lib/sync-queue.ts and frontend/src/features/vault-pinning/hooks/use-pin.ts to understand queue storage and enqueue behavior. Then inspect the pin UI and the /api/vault/pin handler to trace manual retry, startup and online triggers, and idempotent replay. Add tests in the frontend/tests/*.test.mjs style and run them with bun test; done means retries are ordered and bounded, successful entries are removed, and persistent failures appear in the UI.
Written by the indexing model from the issue text.
Description
Summary
Failed pin-audit writes are queued in the browser but never replayed. Add a drain that retries them safely.
Estimated size: S
Motivation
A pin can succeed at the provider while the audit write fails, leaving quota accounting wrong until someone fixes it by hand.
Current state in this repo
frontend/src/features/vault-pinning/hooks/use-pin.tscallsenqueue(...)when the audit write fails.frontend/src/features/vault-pinning/lib/sync-queue.tsstores entries undervault:pin_queueinlocalStorage; nothing reads and replays them.
Proposal
- Add
drainQueue()that replays entries against/api/vault/pinin timestamp order. - Run it on app start, on the browser
onlineevent, and from a manual retry action in the pin UI. - Exponential backoff with a cap; de-duplicate by
(cid, service, action)keeping the latest entry; stop after N failures and surface the entry in the UI.
Acceptance criteria
- A failed audit write is replayed after reconnect and then removed from the queue.
- Replaying the same entry twice does not change quota (the server write is idempotent).
- Entries that keep failing are surfaced to the user instead of retrying forever.
Out of scope
- Syncing the queue across devices.
Dependencies
- None; can be picked up independently.
Testing plan
- Unit tests with a fake
fetchand fake timers (frontend/tests/*.test.mjsstyle, run withbun test).
Part of #43. Ground rules for the content layer: no secrets in the repo, content-layer failures must never block or discard quantum execution, and tests and docs ship with every PR.
- Dominant language
- Python
- Stars
- 2
- Forks
- 4
- Avg merge
- 6h 54m
- Merged PRs (30d)
- 7
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QMeshPy/distributed-quantum
-
enhancement good first issue helia storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QMeshPy/distributed-quantum#53 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments research-spike tier-2
Difficulty 4/5 3-5 days Newbie friendliness 55/100
QMeshPy/distributed-quantum#78 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments research-spike tier-2
Difficulty 3/5 1-2 days Newbie friendliness 66/100
QMeshPy/distributed-quantum#77 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments tier-2
Difficulty 5/5 Over a week Newbie friendliness 35/100
QMeshPy/distributed-quantum#76 ·
Maintainers usually reply within 1 day
-
documentation good first issue kubo storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
QMeshPy/distributed-quantum#75 ·
Maintainers usually reply within 1 day
All issues in QMeshPy/distributed-quantum
Similar issues
-
comp/tools P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#142908 · 1 comment ·
-
[oblt-aw][autodoc] Fix malformed headings in new Buildkite docs pagesPossibly taken @github-actions claimed this today. Opendocumentation
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlinePossibly taken @r2jaff claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ComposioHQ/composio#5054 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pytorch/tensordict#3286 ·
Maintainers usually reply within 1 day