Repository navigation
Spec 001 T010: the analysis stub, from T009's answers - #123
Closed
adamjohnwright wants to merge 1 commit into
Closed
adamjohnwright wants to merge 1 commit into
adamjohnwright wants to merge 1 commit into
Conversation
test/stubs/analysis.ts serves the analysis service's answers on loopback, reading a token by the service's own rules, so its 404s and 410s come from the tokens' dates. A case per row of research R6's table; forget() for a result that goes mid-PDF; refuse() for 503; the found lists, the CSV with one identifier on two rows, and the 406 to JSON alone. 14 tests, each of ten mutants caught. Also the lows carried from #119's and #122's reviews: R6's summary fields, the cover's figure in T048, and the file-name rule's unmeasured claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Replaced by #124 after review. |
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.
Spec 001, task T010.
What:
test/stubs/analysis.ts, a loopback stand-in for the analysis service that T020–T022 test against. It answers what T009 recorded (research R6):pathwaysFoundfollowsincludeDisease(the request's, else the analysis's own) andspecies;Accept: application/jsonalone;forget(token, after)for a result that goes while a PDF is made (a later 410 or 404),refuse(times)for 503;/, the framework's 404 for a raw one.Identifiers are made up. Like the render stub, it answers 400 to a parameter pdf-export never sends.
Tests: 14 in
test/stubs/analysis.test.ts. Each of ten mutants made one fail (includeDiseaseorspeciesignored, CSV rows deduplicated, date judged before the stored result, anyAccepttaken, a forgotten result kept,_read as undated, 8 days alive, no 503, an encoded/passed through).Also: three lows carried from #119's and #122's reviews: R6's summary fields, the cover's figure in T048, and the file-name rule's unmeasured claim in data-model.
tasks.md ticks T010 with this PR.
🤖 Generated with Claude Code