Skip to content

fix: correct SKILL.md path in s1-secops-mcp contract tests - #100

Closed
shoemoney wants to merge 1 commit into
Sentinel-One:mainfrom
shoemoney:fix/hyperautomation-skill-md-test-path
Closed

shoemoney wants to merge 1 commit into
Sentinel-One:mainfrom
shoemoney:fix/hyperautomation-skill-md-test-path

Conversation

@shoemoney

Copy link
Copy Markdown

What

contracts-1.3.9.test.mjs resolves the hyperautomation SKILL.md relative
to its own file location:

const SKILL_MD = new URL('../../hyperautomation/SKILL.md', import.meta.url);

That resolves to mcp/hyperautomation/SKILL.md, a directory that does not
exist anywhere in this repo. The real file is at
plugins/s1-secops-skills/skills/hyperautomation/SKILL.md.

Impact

Running the documented dev workflow (npm test inside mcp/s1-secops-mcp,
per the README) fails two tests with ENOENT:

✖ A: the SKILL.md smoke test documents both the raw-API and the MCP form
✖ A: both documented forms reach the API as a single data envelope
  Error: ENOENT: no such file or directory, open '.../mcp/hyperautomation/SKILL.md'

This has been broken since the test was added for 1.3.9. No workflow in
.github/workflows runs the mcp test suite (only TruffleHog + release), so
nothing has caught it in CI; it only surfaces to a contributor who runs
npm test locally.

Fix

Corrected the relative path to point at the real location of SKILL.md,
three directories up from the tests folder into
plugins/s1-secops-skills/skills/hyperautomation/.

Also added tests/regressions-2026-09-25.test.mjs, following this repo's
existing dated-regression-test convention, which pins that the resolved path
exists and still contains the smoke-test section the contract tests parse.
Wired it into the test script in package.json.

Test plan

  • npm test in mcp/s1-secops-mcp: 130 pass / 2 fail before this change,
    134 pass / 0 fail after (132 existing + 2 new).
  • Verified the two failures reproduce with the old path (ENOENT) and are
    gone with the fix by stashing the change and re-running.

AI was used for drafting/refactoring. Tool: Claude Code.

contracts-1.3.9.test.mjs resolved the hyperautomation SKILL.md relative to
its own location as mcp/hyperautomation/SKILL.md, a directory that has never
existed in this repo. The real file lives at
plugins/s1-secops-skills/skills/hyperautomation/SKILL.md. Both tests that
read it failed with ENOENT on a plain npm test since the test was added in
1.3.9, and no CI workflow runs the mcp test suite so it went unnoticed.

Corrects the relative path and adds a regression test pinning it so a future
restructure of either directory fails loudly here instead of silently
reintroducing the ENOENT.
@shoemoney

Copy link
Copy Markdown
Author

Upstream commit 40ff0bb supersedes this fix. Its resolver supports both repository layouts and adds an existence regression. I ran npm test in mcp/s1-secops-mcp at main commit 38b513c: all 141 tests passed.

The current conflicts overlap that resolver and the test script. I have left this branch unchanged to preserve the broader upstream fix.

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