Final integration tweaks with detector lambda#250
Merged
Conversation
** Why are these changes being introduced: Now that the detector lambda has been deployed and can do real work, it seems like some last-minute tweaks are needed for TACOS to communicate reliably. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/tco-187 ** How does this address that need: Three small tweaks are needed to Detector::MlCitation: 1. Add a Content-Type header to the communication with the detector 2. Sort and re-hash the hash of features (the order of parameters matters for scikit-learn) 3. The response parsing in the fetch method needs to account for a capitalized response "True" instead of "true". ** Document any side effects to this change: Along with these changes comes a few tweaks around the tests. - Making sure we explicitly test for both responses via the .new() method - Setting the sequence test to use its own cassette with multiple interactions (avoids a first-time-through test failure when renegenerating cassettes) - Scrubbing the challenge secret from cassettes as a defense in depth - Regenerating all cassettes
JPrevost
approved these changes
Jun 16, 2025
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.
Developer
Now that the detector lambda has been deployed and can do real work, it seems like some last-minute tweaks are needed for TACOS to communicate reliably.
How does this address that need:
Three small tweaks are needed to Detector::MlCitation:
Document any side effects to this change:
Along with these changes comes a few tweaks around the tests.
Ticket(s)
https://mitlibraries.atlassian.net/browse/TCO-187
Accessibility
all issues introduced by these changes have been resolved or opened
as new issues (link to those issues in the Pull Request details above)
Documentation
ENV
Stakeholders
Dependencies and migrations
NO dependencies are updated
NO migrations are included
Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing