Skip to content

Spec 001 T009: the analysis service's answers, measured - #112

Closed
adamjohnwright wants to merge 1 commit into
mainfrom
t009/analysis-answers
Closed

adamjohnwright wants to merge 1 commit into
mainfrom
t009/analysis-answers

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T009 (research R6).

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 (read from analysis-core's Tokenizer and TokenUtils), plus one small submitted analysis.

What it answers (all in its JSON error form):

  • a token dated within 7 days with no stored result: 410; one dated 8 days ago or more, or with no date: 404. The boundary is whole days.
  • a token that isn't Base64, or fails URL-decoding: the catch-all 500, the same as any internal failure.
  • found/interactors/{pathway} with none found: 404, whether or not the analysis included interactors.

What changes in the spec:

  • The service reads the stored result first and judges the date only when there is none, so a result kept past 7 days is still answered. Judging the date in pdf-export would refuse results the website still shows. pdf-export now checks only the token's form, and the --retention setting is gone (spec edge case, contracts/service.md and cli.md, data-model, T021, T022).
  • Neither the summary nor result.json (468 KB for four identifiers) carries the count of identifiers found. The found identifiers' CSV does, built from the same set today's book counts. T010's stub gains that CSV and a 500.

The PR also records #111's three low review findings under T008.

Documents only; no code changes.

🤖 Generated with Claude Code

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>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Closed after its review: the pathways-hit count depends on includeDisease, the recorded retention is the 410 window rather than the service's cleanup, the malformed-token rule misses wrong padding and '/', and older R6 text contradicts the new. 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