Skip to content

Spec 001 T009: the analysis service's answers, measured (replaces #112) - #113

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
t009/review-1
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
t009/review-1

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T009 (research R6). This replaces #112, which was closed after its review; the second commit here holds the review's fixes.

Measured against a non-production instance of the analysis service on release 98, never production. Nothing in its storage was touched: each case is a token the service reads by its own rules, plus one small submitted analysis.

What it answers:

  • A token with no stored result gets 410 if it is dated within 7 whole days or in the future, and 404 otherwise. Both bodies are in the service's JSON form.
  • A token that isn't Base64 gets the catch-all 500. A / in a token gets a 400 page if encoded, and reaches another route if raw.
  • found/interactors with none found is a 404.
  • Results are deleted by the service's own cleanup job. It acts only when the results folder grows large, and then removes the files least recently read; a token's age plays no part.

What changes in the spec:

  • pdf-export checks only the token's form, accepting exactly the form the service issues. Whether a token has expired is left to the service. The --retention setting is gone.

  • The counts:

    • the found count comes from the found identifiers' CSV;
    • the total adds the not-found count;
    • the pathways hit are pathwaysFound, asked for with includeDisease=true.

    All three count the same sets as today's book.

From #112's review:

  • High: pathwaysFound depends on whether the analysis included disease pathways.
  • Medium: the service's cleanup was recorded as its retention.
  • Medium: the token rule missed wrong padding and /.
  • Medium: R6's older text contradicted the new measurements.
  • Low: the 7-day boundary, the time zone, the CSV header and a placeholder for the help-desk address.

This PR also records #111's three low review findings under T008. It changes documents only.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits November 3, 2026 12:35
Against a non-production instance on release 98, with tokens the
service reads by its own rules and one small analysis; nothing in its
storage was touched.

- The service reads a stored result first and judges a token's date
  (7 days, a constant in analysis-core) only when there is none: 410
  within it, 404 after. A result kept longer is still answered, so
  pdf-export checks only the token's form, and the --retention setting
  is gone.
- A malformed token is the service's catch-all 500, in its JSON form.
- found/interactors with none is a 404, with or without interactors.
- Neither the summary nor result.json carries the found count; the
  found identifiers' CSV does, from the same set as today's book.

Also records #111's three low review findings under T008.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- pathwaysFound follows the analysis's includeDisease (229 with, 191
  without here); it is asked for with includeDisease=true, as today's
  book counts the unfiltered list.
- How long a result is kept is the service's own cleanup (by the
  results folder's size and last access), recorded as such; the 7 days
  only tell 410 from 404.
- The malformed-token rule is now the form the service issues: wrong
  padding (QQ=) and '/' (a 400 page, or another route) were missed.
- R6's older text, which contradicted the measurement, is corrected;
  the boundary (whole days, future-dated is 410), the time zone, the
  CSV's header and the help-desk placeholder are stated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Closed after its review: the token rule accepts Base64 of '_' (the service 500s), R6 misdescribes how today's book counts, the cleanup isn't the only deletion, and spec 002 still says 410 means a release deleted it. Replaced by a new PR.

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