Skip to content

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

Closed
adamjohnwright wants to merge 4 commits into
mainfrom
t009/review-3
Closed

adamjohnwright wants to merge 4 commits into
mainfrom
t009/review-3

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 001, task T009 (research R6). This replaces #114, which replaced #113 and #112; each was closed after its review. Each commit after the first holds one review's fixes.

Measured against a non-production instance of the analysis service on release 98, never production. Nothing in its storage was touched.

Results:

  • Token answers: with no stored result, a token dated within 7 whole days (or in the future) gets 410, and an older one 404. Malformed tokens get the catch-all 500, Tomcat's HTML 400, or another route.
  • Expiry: the service decides it, so pdf-export checks only the token's form. It must decode to {14 digits}_{1 to 19 digits}. There is no --retention setting.
  • Counts: the pathways hit are pathwaysFound with includeDisease=true and no species. That matches today's book, which counts every species. The identifiers found come from the found identifiers' CSV, which can differ from the book's count in a rare case; the comparison (FR-012) records it if it happens.

From #114's review:

  • Medium: the counter now has an upper bound.
  • Medium: the account of how today's book counts was wrong about species.
  • Medium: the p-value caveat was attached to the wrong count.
  • Lows:
    • the precise alternative is named, with why it isn't used;
    • the ambiguous found/… 404 is recorded;
    • T010's 500 and non-JSON 400 cases are corrected;
    • the instance's date digits are recorded;
    • spec 002's formatting is tidied.

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

🤖 Generated with Claude Code

adamjohnwright and others added 4 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>
…'s counts

- Base64 of '_' alone passed the form rule and the service fails on it
  (500); the rule now also requires the decoded {14 digits}_{digits}.
- Today's book counts after its own species and resource filter, not
  the stored list: recorded, with the edge for a pathway without a
  p-value, left to the comparison (FR-012).
- Results are also removed outside the service's cleanup, access times
  depend on the mount, and a resubmission can bring a token back.
- Spec 002: "410 for one a release deleted" corrected; whether its
  report checks the token's form is left to its tasks.

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

- The token's counter is bounded to 1-19 digits (a Java long): a
  7,000-digit one passed the rule and reached the servlet container's
  HTML 400.
- Today's book counts over every species (its resource filter writes
  back across species); the pathways hit match pathwaysFound with
  includeDisease=true, and the p-value edge belongs to the identifiers
  count, as spec 002 already says.
- A found/... 404 may mean the result went mid-PDF; T010 gains a
  non-JSON 400 and the right reason for its 500; the instance's ASCII
  dates are recorded; spec 002's paragraph and parentheses tidied.

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

Copy link
Copy Markdown
Contributor Author

Closed after its review: the token's bound applies after decoding, so a token nested in %25 layers still reaches the HTML 400 unless the canonical token is what is sent. 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