Skip to content

Shapes for the release check's routes (spec 032, T032) - #1091

Merged
adamjohnwright merged 5 commits into
mainfrom
spec032/release-check-shapes
Nov 25, 2026
Merged

adamjohnwright merged 5 commits into
mainfrom
spec032/release-check-shapes

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 032, T032. The release check (tools/release-check/endpoints.ts) asked 37 routes but shape-checked 14: the API description had no schema for the rest. Now it checks 33; the other four answer text (the database's version and name, two lists of stable ids), which has no shape.

  • Route rows in projects/contract/routes.ts. They use the graph's classes in their dbId form, which is how answers outside the enhanced query refer to an object already written.
  • New types, where an answer is not a graph class:
    • EventProjection (ancestors: inferred/inDisease, no className);
    • ComponentOfEntry, which its writer now satisfies;
    • DiscoverDataset;
    • BareSpecies: three of release 98's species are a dbId and a name alone. Species stays strict for the site; /data/species/all and /data/query/{id} admit them.
  • Fields made optional where real answers lack them. The types had been measured on the enhanced query's recordings only, and the flat view leaves out lists and flags they always had. A sweep of /data/query/{id} over 8 objects of every class, across species, plus those objects' entity and event routes (1,179 answers), found the rest; each class's comment says what was measured.
  • Recordings: twelve of the routes have no recordings, because no call of the site reads them. schema.spec.ts lists them, and the release check checks them live.
  • Size: the description grows from 51 to 66 KB gzipped.

Seen failing: the types as measured before, on species, containedEvents, reactions, polymers and inferred events; mutants dropping BareSpecies and renaming inDisease. Adversarially reviewed; the review's findings (polymers, inferred polymerisations, bare species via /data/query/{id}, a writer not using its type) are addressed in the second commit.

🤖 Generated with Claude Code

adamjohnwright and others added 3 commits November 25, 2026 18:56
The release check asked 37 routes and shape-checked 14: the description had
no schema for the rest. Nineteen rows in the contract's route table, with the
graph's classes in their dbId form, and four new types where an answer is not
a graph class: EventProjection (ancestors), ComponentOfEntry, DiscoverDataset,
and BareSpecies (three species of release 98 are a name alone; Species stays
strict for the site). Measured against beta's answers, the flat view leaves
out lists the enhanced query's recordings always had: those are optional now.
33 of 37 are shape-checked; the other four answer text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sweep of /data/query/{id} over 8 objects of every class, across species,
and the entity and event routes of those objects (1,179 answers), found
required fields the flat view leaves out: polymers' species and unit count,
inferred polymerisations' chimeric flag, gene-expression regulations' entity,
and others. BareSpecies is admitted by /data/query/{id} too. componentOf's
writer satisfies its type; DiscoverPerson is file-local (dead-code ratchet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The public-content check reads a bare /data/ path as a server's.

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

Swagger UI resolves every $ref beneath an operation before drawing it. The
graph's classes refer to one another through their fields, so an operation
answering any of them froze the page: the enhanced query never opened on
main, and with T032's rows a reaction's participating entities did not
either (the API page's deep-link test, seen failing three times in CI and
locally). The page now gives Swagger UI the description with each graph
class's fields naming the graph classes they hold; every class is whole in
Schemas. Opening those operations takes about 3 s. The published description
is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: 'Compartment' did not match Schemas' 'Compartment_number', a union of
classes was said to have fields, and the article was wrong before vowels.
Each now names the schema itself, a class by its fields, a union by its
classes.

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

Copy link
Copy Markdown
Contributor Author

Adversarial review of the API-page fix: no correctness bugs. All 17 operations answering graph objects open; the transform leaves non-graph schemas and the published description alone; the unit test fails without it. Fixed from it: a named class now carries its name in Schemas, and a union says so. Left as known: Expand all on a big union in the page's Schemas (GraphObject_number) still blocks the page for about a minute. Before this change it never finished. Swagger UI's renderer, not reachable from an operation.

🤖 Generated with Claude Code

@adamjohnwright
adamjohnwright merged commit e85835c into main Nov 25, 2026
9 checks passed
@adamjohnwright
adamjohnwright deleted the spec032/release-check-shapes branch November 25, 2026 23:14
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