Skip to content

test(iisa): check requests and replies against IISA's schema - #814

Open
MoonBoi9001 wants to merge 9 commits into
mainfrom
mb9/check-iisa-request-and-reply-shapes-against-iisa
Open

MoonBoi9001 wants to merge 9 commits into
mainfrom
mb9/check-iisa-request-and-reply-shapes-against-iisa

Conversation

@MoonBoi9001

@MoonBoi9001 MoonBoi9001 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Tests now fail when what dipper sends to IISA, or reads from its replies, no longer fits IISA's own API description, recorded from IISA at a named commit by a new script, and a daily job runs them against a fresh recording of IISA's main branch. Writing them found 1 disagreement: dipper could ask for indexers with a missing or empty chain, which IISA refuses, so dipper now refuses to send that.

IISA refuses a request to pick indexers that does not name the deployment's chain, yet the
request dipper builds could leave it out. Dipper now always names it, and stops before sending
when it does not know it; the only place that asks for indexers always knows it already.
Dipper's requests to IISA and its reading of the replies are kept in step with IISA by hand, so
a field renamed on either side would be dropped without an error. A script now records IISA's
API description at a named commit, and tests fail when dipper's side no longer fits it.
The contract tests compare dipper's IISA client with a recording committed here, so a field
IISA renames passed CI until someone re-recorded. A daily job now records IISA's main branch
afresh and runs the same tests against it, and on changes to the check it runs on the PR too.
The reply checks built 1 reply per type, always taking the first non-null choice where IISA
allows several, so a field IISA made nullable would pass and then fail in production. Every
choice, null included, and every empty list is now tried at each place it can appear.
The token check only made sure IISA reads the token wherever dipper sends it. If IISA started
asking for it on another call, every such call would be refused while the tests passed; a
call where IISA reads the token or answers 401 must now carry it.
The schema check passed any value where IISA used a rule it did not know, and ignored the least
values and lengths IISA sets. It now enforces those, fails on any other rule, and dipper refuses
to ask for indexers with an empty chain, which IISA would refuse, as it does a missing one.
2 checks make sure no type the client sends or reads and no path it calls is left out of the
tests, but they read only 1 layout of the code and skipped the rest without a word. They now
read every file and layout, and fail on any they cannot account for.
@MoonBoi9001
MoonBoi9001 marked this pull request as ready for review November 10, 2026 23:44
…nst-iisa

# Conflicts:
#	dipper-iisa/src/http_client.rs
2 tests that arrived from main build a request to pick indexers with no chain, which this
branch refuses to send. They now set the chain every real request carries, so they test the
request's size again rather than fail on the refusal.
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