Skip to content

Spec 006 T104: node answers /query/abridged/{id}, its attributes, and /query/{id}/more - #897

Merged
adamjohnwright merged 6 commits into
mainfrom
spec006/t104-abridged
Nov 11, 2026
Merged

adamjohnwright merged 6 commits into
mainfrom
spec006/t104-abridged

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 006 T104 (specs/006-content-service-to-node): node answers three ContentService graph reads that Java answers but leaves out of its published description.

  • GET /data/query/abridged/{id} returns graph-core's findByIdNoRelations: the node on its own, found by the id as getIdentifier reads it, and written the way /query/{id} writes an object.
  • GET /data/query/abridged/{id}/{attributeName} is ControllerUtils.getProperty on that object. A relationship getter loads its relationship, outgoing ones too, as LazyFetchAspect does. So hasEvent gives the pathway's events.
  • GET /data/query/{id}/more is /query/enhanced/v2/{id} with its flags fixed: incoming relationships, no summary, and disease data only when nothing is found without it. It reads no parameters. It shares enhancedAnswer with v2.

Routing.

  • The registry keeps Spring's order: /query/abridged/more and /query/enhanced/more are the object called "more", measured against Java. Six new pairs are in registry.spec.ts, and fixtures/route-order.json is updated.
  • nginx and the dev proxy now send every /query/{id}/{x} to node through one location, and /query/abridged/{id}/{x} through another. The exclusions they needed for these paths are gone, and so are those in classify.ts and the /query/{id}/{attribute} handler.
  • nginx -t passes for dev, release and production (deploy/nginx/test-config.sh).

A parity fix on the way. An id of only dots is Java's 500 (Index 0 out of bounds for length 0) on all three endpoints, and on /enhanced/v2/{id}, which answered a 404 until now.

Contract. /query/{id}/more joins projects/contract/routes.ts as v2's answer (GraphObject<JsogReference>), and the description is regenerated. The two abridged routes stay "not yet", like /query/{id}: an object without its relationships doesn't fit GraphObject's required fields.

Compared with Java (local, 7 Nov 2026, spaced requests):

  • Abridged answers: Java's answers for 26 objects of 14 classes (no Person or InstanceEdit). Node's writer, given each object's own properties, wrote all of them identically in the flatten, nested and includeRef=true views (78 of 78).
  • Errors: the same as Java's apart from the error body's url, which is the existing declared difference. This covers the 404 for an unknown id, the attribute's 404, abridged/more, MORE as an attribute, the 500 for dots and the 500 for a dbId past a long.
  • What wasn't compared: node was not run against the graph, because this environment has no graph credentials. Its queries were checked against a stand-in graph in query-abridged.spec.ts, whose expected bodies are Java's bytes. A live diff after deploy is still needed: npm run content:diff -- --path /ContentService/data/query/abridged/{id} and the other two.

Seen failing. The new spec fails 8 of 10 against main's handlers. Mutating outgoingLoaded: false to true fails the hasEvent test. The route specs failed (12) before the routes changed.

Declared differences. None new.

🤖 Generated with Claude Code

adamjohnwright and others added 6 commits November 7, 2026 23:07
… /query/{id}/more

Three endpoints Java answers but leaves out of its description, now in
the data-query family:

- /query/abridged/{id}: graph-core's findByIdNoRelations, the node alone
  by the id as getIdentifier reads it, written as /query/{id} writes an
  object.
- /query/abridged/{id}/{attributeName}: ControllerUtils.getProperty on
  that object; a relationship getter loads its relationship, outgoing
  ones too, as LazyFetchAspect does.
- /query/{id}/more: /query/enhanced/v2/{id} with its flags fixed, reading
  no parameter (enhancedAnswer, shared with v2).

Spring's order is kept in the registry: /query/abridged/more and
/query/enhanced/more are the object called more. Dots alone are Java's
500 on all three and on /enhanced/v2/{id}, which answered a 404.

Routed in nginx and the dev proxy: one location now takes every
/query/{id}/{x}, and another the abridged attributes. /query/{id}/more
joins the contract as v2's answer; the description is regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as nothing calls it

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

/query/enhanced/{id} answered 404 for an id of dots alone, where Java
answers 500 ("Index 0 out of bounds for length 0"), as v2 now does here;
measured live today and checked against Java after the change.

The /more test now compares what the graph is asked with v2's own under
/more's flags (seen failing with incoming relationships off), and the MORE
test checks the attribute route answers as for any other attribute name.
The ranking comment moves to /query/abridged/{id}, which it describes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 823fa26 into main Nov 11, 2026
8 checks passed
@adamjohnwright
adamjohnwright deleted the spec006/t104-abridged branch November 11, 2026 20: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