Repository navigation
test(e2e): cover the remote extractor in Kind - #2118
Merged
ramizpolic merged 2 commits intoSep 8, 2026
Merged
ramizpolic merged 2 commits into
ramizpolic merged 2 commits into
Conversation
Signed-off-by: Conor Bronsdon <[email protected]>
Signed-off-by: Conor Bronsdon <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ramizpolic
approved these changes
Sep 8, 2026
ramizpolic
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @conorbronsdon!
akijakya
added a commit
that referenced
this pull request
Sep 8, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- returned classes checked against the node's own OASF schema endpoint
by pushing a record built from them, tried across the four taxonomy
versions the extractor draws from
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to
force the in-process backend for the CLI. `dirctl init` inherits the
machine-wide saved remote address whenever the flag is unset, which
would otherwise leave the CLI dialing an OASF-SDK server while the
daemon uses local assets — and the parity spec compares the two
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
that referenced
this pull request
Sep 8, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- returned classes checked against the node's own OASF schema endpoint
by pushing a record built from them, tried across the four taxonomy
versions the extractor draws from
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to
force the in-process backend for the CLI. `dirctl init` inherits the
machine-wide saved remote address whenever the flag is unset, which
would otherwise leave the CLI dialing an OASF-SDK server while the
daemon uses local assets — and the parity spec compares the two
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
that referenced
this pull request
Sep 8, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- returned classes checked against the node's own OASF schema endpoint
by pushing a record built from them, tried across the four taxonomy
versions the extractor draws from
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to
force the in-process backend for the CLI. `dirctl init` inherits the
machine-wide saved remote address whenever the flag is unset, which
would otherwise leave the CLI dialing an OASF-SDK server while the
daemon uses local assets — and the parity spec compares the two
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
that referenced
this pull request
Sep 8, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- every returned class checked against the node's own OASF schema
endpoint by pushing a record carrying it, tried across the four
taxonomy versions the extractor draws from. One class per record: a
single response holds classes no one version accepts together, since
OASF renamed whole trees between 1.0.0 and 1.1.0, and for this phrase
the skills and the domains each straddle that boundary
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to pin
the CLI to the extractor the daemon resolves. `dirctl init` fills
every extractor flag left unset from the machine-wide saved config —
asset dir, OASF URL and remote address alike — so on a machine
carrying custom saved values the CLI would load a different extractor
than the daemon uses, and both the readiness gate and the parity spec
depend on the two agreeing
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
that referenced
this pull request
Sep 9, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- every returned class checked against the node's own OASF schema
endpoint by pushing a record carrying it, tried across the four
taxonomy versions the extractor draws from. One class per record: a
single response holds classes no one version accepts together, since
OASF renamed whole trees between 1.0.0 and 1.1.0, and for this phrase
the skills and the domains each straddle that boundary
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to pin
the CLI to the extractor the daemon resolves. `dirctl init` fills
every extractor flag left unset from the machine-wide saved config —
asset dir, OASF URL and remote address alike — so on a machine
carrying custom saved values the CLI would load a different extractor
than the daemon uses, and both the readiness gate and the parity spec
depend on the two agreeing
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
akijakya
added a commit
that referenced
this pull request
Sep 9, 2026
Adds end-to-end coverage for the two extractor-backed gateway endpoints
against a real node. The handler unit tests drive a fake extractor, so
they cannot catch a gateway that resolved no backend, dialed the wrong
address, or ranks differently from `dirctl search`.
POST /v1/search (18_ai_finder_search_test.go):
- relevance-ranked entries for a free-text query, entries identified by
catalog URN, and a record matching no signal left out
- ranking by number of signals matched, asserted with two seeds that
share a description and differ only in carrying the extracted skill,
so the keyword surface is held equal
- stable ranking across repeated identical requests
- disjoint pages that reconstruct a prefix of the unpaged order, and no
continuation token on the last page
- parity with `dirctl search`, compared over the seeded records only:
the gateway restricts candidates to catalog-projectable records and
the CLI does not, so the shared ordering is the assertable contract
- empty and over-long queries rejected with 400
POST /v1/extract (20_ai_finder_extract_test.go):
- scored skills and domains with hierarchical names, OASF uids, and
descending score
- every returned class checked against the node's own OASF schema
endpoint by pushing a record carrying it, tried across the four
taxonomy versions the extractor draws from. One class per record: a
single response holds classes no one version accepts together, since
OASF renamed whole trees between 1.0.0 and 1.1.0, and for this phrase
the skills and the domains each straddle that boundary
- empty and over-long text rejected with 400
Both spec files run wherever the environment declares an extractor, so
the local backend is covered by local:local and the remote backend by the
Kind job #2118 added. The parity spec skips outside local mode, where the
CLI and the gateway load the same assets; under Kind the OASF-SDK Service
is ClusterIP-only and the CLI cannot reach the gateway's backend.
For the case with no extractor at all, daemon/default now enables the
gateway with its extractor asset dir pointed at a path that does not
exist. 02_no_extractor_test.go asserts both endpoints answer 503, that
GET /v1/agents still serves — so a 503 means the extractor is missing
rather than the gateway being down — and that an empty query is still a
400, pinning argument validation ahead of the extractor check.
Rebased onto #2118, which landed overlapping Kind coverage:
- collapses its remote_extractor_enabled boolean into extractor_mode
and updates the single call site in 19_remote_extractor_test.go. Two
fields for one fact let an environment set only one and have the
specs disagree about skipping, and the mode also has to tell "local"
apart from "no extractor", which a boolean cannot
- numbers the extract specs 20_ so #2118 keeps the 19_ slot
- the suite-level readiness gate added here also covers Kind, so its
specs no longer wait on a cold extractor pod one spec at a time
Also:
- setup-dir-node gains DIRCTL_INIT_ARGS, and local:local uses it to pin
the CLI to the extractor the daemon resolves. `dirctl init` fills
every extractor flag left unset from the machine-wide saved config —
asset dir, OASF URL and remote address alike — so on a machine
carrying custom saved values the CLI would load a different extractor
than the daemon uses, and both the readiness gate and the parity spec
depend on the two agreeing
- daemon/default skips extractor provisioning, dropping an 89 MB
download from three cross-platform runners that never used it
Signed-off-by: András Jáky <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Kind job to the e2e matrix and exercises the deployed HTTP gateway's
/v1/extractand/v1/searchendpoints without restoring or provisioning extractor assets on the runner. The tests publish a local fixture, check relevant extracted taxonomy, and require natural-language search to return that fixture's exact CID.The job installs the pinned Kind/Kubectl tools and locked Helm dependencies. Extraction has a bounded startup wait; a persistently wrong remote address or unregistered extractor service fails the test. The Kind naming fixture uses its fully qualified Service hostname so the existing naming tests can run in the newly enabled job.
Closes #2091.
Validation:
OASF_SDK_EXTRACTOR_OASF_URL: pod passes readiness, but the test fails; apiserver logs confirmunknown service agntcy.oasfsdk.extractor.v1.ExtractorService. Restoring configuration returns both new tests to green.git diff --checkpass.Local deployment validation reused server images from #2117's successful CI build (its changes are UI-only). This PR's CI builds its own revision.
Implemented with Codex assistance and independent model review.