Take-home assignment — Bug reports, fixes, and assign feature#19
Open
Himanshu0k wants to merge 4 commits into
Open
Take-home assignment — Bug reports, fixes, and assign feature#19Himanshu0k wants to merge 4 commits into
Himanshu0k wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I'd Test Next
If I had more time I'd focus on:
how the API behaves under a large number of tasks (1000+) and whether
pagination holds up under stress
I'd test whether two simultaneous POST requests with the same title and
dueDate could both slip past the duplicate check
you try to assign a task that has already been marked as done
What Surprised Me in the Codebase
A few things stood out:
completeTask()function silently resets priority to"medium"regardless of the original value — this looked intentional at first
but is almost certainly a bug
getPaginated()offset usedpage * limitinstead of(page - 1) * limit, meaning page 1 always skipped the first setof results and the true first page was never accessible
getByStatus()filter used.includes()instead of strictequality, so querying
?status=dowould return bothtodoanddonetasksQuestions I'd Ask Before Shipping to Production
restart. Is a database like PostgreSQL or MongoDB planned, or is this
intentionally ephemeral?
protected? Who is allowed to assign, complete, or delete tasks?
a free-text name. Should it reference an actual user ID from an auth
system instead?
same time, can the duplicate check be bypassed due to a race condition?
to prevent abuse?