Skip to content

docs: correct the statements the api no longer matches - #146

Merged
olavgg merged 2 commits into
mainfrom
docs/correct-api-mismatches
Sep 24, 2026
Merged

olavgg merged 2 commits into
mainfrom
docs/correct-api-mismatches

Conversation

@JosteinGj

Copy link
Copy Markdown
Contributor

The backend's errors/* unification and platform #131 landed, and a number of statements in this repo describe behaviour it no longer has. Each claim was checked against the backend source in datahub-api, and the load-bearing ones against a live backend.

All three "red on purpose" tests are green

Each was written against intended behaviour the api did not yet provide, deliberately red rather than softened to match the bug. All three server-side fixes have landed, so the prose is what is now wrong. The tests stay on as regression guards.

Test Documented as Actually
a_missing_id_is_typed_like_every_other_refusal "the one gap — by-id 404s carry no type" type: .../not-found
mcp_response_is_a_json_object "nearly every test here fails" all 17 MCP tests pass
test_duplicate_relationship_type_conflicts "200 with an empty body" 409 Conflict

ObjectNotFoundExceptionHandler now calls Problems.notFound(), so problem_integration's pending group is empty — its one test moves into unified.

Refusals

  • a 401 carries a full problem document naming the check that failed, rather than an empty body
  • geoLocation on a plain resource is a 400 unknown field (verified live), not accepted-and-never-echoed — only Asset declares it
  • dataSetId on a DATASET/POLICY is a 400 telling you to remove it, not a silent drop
  • a duplicate externalId on /resources/create is a clean 409; the asymmetry with /timeseries/create is gone

Reads and filters

  • /functions/byids, /filter and /search exist — the SDK has not wired them. That is a different statement from "the api lacks them", and the fix is to call them rather than ask for a bigger page.
  • an unreadable cursor is a 400 (verified live), not a silent restart from page one
  • graph reads carry metadata; /datasets/filter pages; GET /events/{id} is a 404; /events/search is an unranked substring match over externalId, description and metadata values, newest first
  • a literal externalId on the event filter matches case-sensitively, unlike every other pattern list — event writers hash verbatim where node filters lowercase first

Deletes docs/api-coverage.md

A point-in-time audit baselined against a backend and SDK from before all of this. It lists /edges as 0-covered, the dataset methods as panicking todo!() stubs, /resources/filter as missing, and omits /assets entirely — every one of which is implemented today. Nothing links to it. AGENTS.md carries the living per-service contract.


Stack, 2 of 4 — based on #145. Reviewable on its own; merge after it.

Docs impact: prose only, no caller-visible change. Worth an issue on datahub-sdk-docs if any page repeats the "functions have no byids/filter/search" or "by-id 404s are typeless" claims.

🤖 Generated with Claude Code

The errors/* unification and platform #131 landed on the backend, and a
number of statements here describe behaviour it no longer has. Each was
checked against the backend source and, where it could be, against a live
backend.

Refusals:
- a `GET /<collection>/{id}` miss carries `type: .../not-found` now;
  `ObjectNotFoundExceptionHandler` calls `Problems.notFound()` instead of
  hand-building the document. That was the last typeless refusal, so
  `problem_integration`'s `pending` group is empty and its one test moves
  to `unified` as a regression guard.
- a 401 carries a full problem document naming the check that failed.
- the MCP double-encoding regression is fixed, so nothing in that suite is
  red on purpose; same for `test_duplicate_relationship_type_conflicts`,
  which is a 409 now. All stay on as guards.
- `geoLocation` on a plain resource and `dataSetId` on a DATASET/POLICY are
  400s rather than silent drops, and a duplicate `externalId` on
  `/resources/create` is a clean 409 rather than a constraint violation.

Reads and filters:
- `/functions/byids`, `/filter` and `/search` exist; the SDK has not wired
  them, which is a different statement from the api lacking them.
- graph reads carry `metadata`; `/datasets/filter` pages; `GET /events/{id}`
  is a 404; `/events/search` is an unranked substring match over externalId,
  description and metadata values, newest first.
- a literal `externalId` on the event filter matches case-sensitively,
  unlike every other pattern list.
- an absent event sort is `eventTime` ascending, not "no particular order".

Deletes docs/api-coverage.md: a point-in-time audit baselined against a
backend and an SDK from before all of this, now wrong in nearly every row —
it lists /edges as uncovered, the dataset methods as panicking stubs, and
omits /assets entirely. AGENTS.md carries the living per-service contract.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: jgjesdal <jostein@intellistream.ai>
@JosteinGj
JosteinGj requested a review from olavgg September 24, 2026 09:14
Base automatically changed from fix/reenable-label-canonicalisation-test to main September 24, 2026 09:47
@olavgg
olavgg merged commit 78f66ee into main Sep 24, 2026
14 checks passed
@olavgg
olavgg deleted the docs/correct-api-mismatches branch September 24, 2026 09:51
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.

2 participants