Skip to content

Spec 001 T010: the analysis stub, from T009's answers - #124

Merged
adamjohnwright merged 2 commits into
mainfrom
t010/analysis-stub-2
Nov 3, 2026
Merged

adamjohnwright merged 2 commits into
mainfrom
t010/analysis-stub-2

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T010. Replaces #123 after its review (one medium, fixed in the last commit).

What: test/stubs/analysis.ts, a loopback stand-in for the analysis service that T020–T022 test against, answering what T009 recorded (research R6): tokens read by the service's own rules with a case per row of R6's table; the summary whose pathwaysFound follows includeDisease and species; found entities and interactors, and a 404 for none; the found identifiers' CSV (one identifier on two rows) and its 406 to JSON alone; forget() for a result that goes mid-PDF; refuse() for 503; the catch-all 500, the container's HTML 400, the framework's 404. Identifiers are made up.

From #123's review: the stub took any resource and importableOnly and answered as for FR-006's defaults, so a client breaking them would pass; it now answers 400 (a test, seen failing first). The 7-day boundary is tested at 7 days 12 hours; two counts that coincided now differ; q=0 refuses its type.

Tests: 15; each of fourteen mutants made one fail.

Also: three lows carried from #119's and #122's reviews (R6's summary fields, the cover's figure in T048, the file-name rule's unmeasured claim). tasks.md ticks T010 with this PR.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits November 3, 2026 16:01
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>
The stub took any resource and either importable-only setting and answered
as for FR-006's defaults, so a client sending others passed; it now answers
400 to them, on the summary, found/... and the CSV's path (a test, seen
failing first). Also: the 7-day boundary tested at 7 days 12 hours; human
alone and the analysis's own setting no longer share a count; q=0 refuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 40dd6be into main Nov 3, 2026
2 checks passed
adamjohnwright added a commit that referenced this pull request Nov 3, 2026
Spec 001 T010, from #124's review: the service ignores q=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant