Skip to content

fix(tests): point nl-search e2e guard at the extractor manifest path - #2099

Merged
lgecse merged 2 commits into
agntcy:mainfrom
rohitsux:fix/nl-search-extractor-manifest-path
Sep 22, 2026
Merged

lgecse merged 2 commits into
agntcy:mainfrom
rohitsux:fix/nl-search-extractor-manifest-path

Conversation

@rohitsux

@rohitsux rohitsux commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Problem

tests/e2e/local/15_nl_search_test.go never runs. Its BeforeAll guard checks for the OASF extractor manifest at the wrong path, so the "Natural-language search" suite skips in every environment — including the e2e:test:local:local CI job — and has silently reported green while executing nothing since it was added in #1770.

Root cause

The guard looked for the manifest directly under .agntcy/oasf-sdk:

manifest := filepath.Join(home, ".agntcy", "oasf-sdk", "manifest.json")

but dirctl init provisions it under .agntcy/oasf-sdk/extractor/, per extractor.DefaultAssetDir (utils/extractor/config.go). tests/e2e/local/16_extractor_enricher_test.go already checks the correct path.

Fix

Point the guard at the same extractor/manifest.json path that dirctl init provisions and 16_extractor_enricher_test.go checks (and align the comment wording). The os.Stat-then-Skip structure is unchanged, so an unprovisioned machine still skips cleanly.

Verification

  • go vet ./e2e/local/ passes; gofmt clean.
  • Unprovisioned machine: manifest absent, guard still skips cleanly via ginkgo.Skip.
  • Provisioned machine (dirctl init): the manifest now resolves, so the suite executes instead of skipping — CI's e2e:test:local:local job will exercise it.

Acceptance criteria

Note: because this re-enables a suite dormant since #1770, any assertions that have drifted will surface on the first provisioned CI run — flagging for reviewer visibility, as the issue anticipated.

Closes #2090

@rohitsux
rohitsux requested a review from a team as a code owner September 3, 2026 08:52
@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Sep 3, 2026
ramizpolic
ramizpolic previously approved these changes Sep 8, 2026
The BeforeAll guard in tests/e2e/local/15_nl_search_test.go checked for
the OASF manifest at ~/.agntcy/oasf-sdk/manifest.json, but `dirctl init`
provisions it at ~/.agntcy/oasf-sdk/extractor/manifest.json (see
extractor.DefaultAssetDir in utils/extractor/config.go). Because the path
never matched, the natural-language search suite silently skipped in every
environment, including the e2e:test:local:local CI job, and had not run
since it was added in agntcy#1770.

Point the guard at the same path 16_extractor_enricher_test.go already
uses, so the suite runs on a provisioned machine and still skips cleanly
when the extractor is not provisioned.

Closes agntcy#2090

Signed-off-by: Rohit <71192000+rohitsux@users.noreply.github.com>
@lgecse
lgecse force-pushed the fix/nl-search-extractor-manifest-path branch from 051b487 to 0d77f14 Compare September 22, 2026 10:55
@lgecse
lgecse enabled auto-merge (squash) September 22, 2026 10:56
…into the shared daemon

Re-enabling the natural-language search suite exposed a test-isolation leak:
its BeforeAll pushes directory-record.json (named "org.agntcy/directory", the
same name the daemon self-publishes its skill record under) into the shared
daemon but never deletes it. A later suite that searches by that name
(14_skill_record_test.go) then pulls the leaked record and fails on its
artifact media type. Delete the pushed record in AfterAll, mirroring
16_extractor_enricher_test.go.

Signed-off-by: Rohit <71192000+rohitsux@users.noreply.github.com>
@lgecse
lgecse force-pushed the fix/nl-search-extractor-manifest-path branch from 0d77f14 to 442ce37 Compare September 22, 2026 10:59
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@lgecse lgecse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @rohitsux for the contribution!

@lgecse
lgecse merged commit 8cb3b7c into agntcy:main Sep 22, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-49 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Natural-language search e2e suite always skips: manifest guard checks the wrong path

4 participants