Repository navigation
[AI-3479] Link codes per app, deleted once claimed #2240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
625812a
fix(channels): link codes are per app and deleted once claimed
kanat 98d66fb
AI-3479: answer another agent's code as an unknown one, and count it
kanat 9731111
AI-3479: answer a code the router cannot write as a 500
kanat b8ad6b0
chore(store): squash the migration history into one initial migration…
tbarbugli 15efcfa
AI-3479: merge origin/main
kanat 8657283
AI-3479: test that Link draws a fresh code per call
kanat 83ebe0c
Merge main into tommaso/squash-migrations
tbarbugli f729893
fix(store): start on a database a later release migrated
tbarbugli 5d0839a
Merge tommaso/squash-migrations into fix/ai-3479-link-codes
tbarbugli 5d36bef
AI-3479: set a lock timeout before the channel_links key swap
kanat 70ecda5
Merge remote-tracking branch 'origin/main' into tommaso/squash-migrat…
tbarbugli 3b91e04
Merge remote-tracking branch 'origin/tommaso/squash-migrations' into …
tbarbugli a6dbeac
Merge tommaso/squash-migrations into fix/ai-3479-link-codes
tbarbugli 16b7840
AI-3479: merge origin/fix/ai-3479-link-codes
kanat fe90e4e
AI-3479: one lock_timeout per migration section
kanat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Should fix] R1.1 No test checks that this call site draws a fresh code. A mutant that replaces
linkCodewithfunc() (string, error) { return "123456", nil }passes all ofTestChannelsSuite. Every test mints at most one live code per app, so a second person who links before the first texts gets a 500, and nothing catches it. Fix: add this test toChannelsSuiteininternal/api/channels_test.go. I ran it in a scratch copy: it fails under the mutant (the second POST is not a 200) and passes on head.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8657283:
TestTwoPeopleLinkingOnOneAgentGetTwoCodes(ChannelsSuite). With the constant-code mutant at theInsertcall it fails; it passes on head.