Two token creates at once can lose a token
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- backend
Research direction
Start at src/http/token-store.ts:81-83 and read the whole TokenStore.create path to see where tokens.json is read and rewritten. Look for existing locking/queue helpers or similar async-serialisation patterns elsewhere in the repo before introducing one. Done means two concurrent create calls both persist — verify with the e2e test that used Promise.all (referenced from #423) and any unit tests covering token-store.
Written by the indexing model from the issue text.
Description
TokenStore.create (src/http/token-store.ts:81-83) reads tokens.json, adds one record and writes the file back. Nothing serialises these calls, so two token creates at the same time can lose one token.
Seen during the review of #423: an e2e test that creates two tokens with Promise.all got 401 once, because one token was lost.
Written by an agent.
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 1
- Avg merge
- 8h 23m
- Merged PRs (30d)
- 136
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 callstackincubator/simlock
-
bug:new
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
callstackincubator/simlock#422 ·
Maintainers usually reply within 1 day
-
bug:new
Difficulty 1/5 Under an hour Newbie friendliness 88/100
callstackincubator/simlock#420 ·
Maintainers usually reply within 1 day
-
bug:new
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
callstackincubator/simlock#350 · 1 comment ·
Maintainers usually reply within 1 day
-
Flaky e2e: gateway-fleet reads a worker's capacity before the worker has left startingPossibly taken @V3RON claimed this 2 days ago. Openbug:ready flaky-test
Difficulty 4/5 1-2 days Newbie friendliness 48/100
callstackincubator/simlock#414 · 1 comment ·
Maintainers usually reply within 1 day
-
feature:spec
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstackincubator/simlock#412 ·
Maintainers usually reply within 1 day
All issues in callstackincubator/simlock
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
answerLoops/answerLoops#345 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
siyuan-note/siyuan#20313 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LanternOps/breeze#8254 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
gofish-graphics/gofish-graphics#1084 ·
Maintainers usually reply within 1 day