There are not enough tests, and the puzzle lacks clarity in the description.
It appears that the complex case = nested paths to the same end.
example given the following sequence
the max length appears to be 2. However since 1 directly influences 3, the 1,2,3 chain appears to be invalid. That is not reflected in the puzzle description, or any test that you have access to. By the definition of the description the 1, 2, 3 chain is the longest, one could even describe it as such.
Author 1 had giants with axes in his story, which author 2 used.
Author 1 had fairy princesses with magic wands, which author 3 used.
Author 2 used giants with axes in his story, and author 3 in his later years also added an axe wielding giant.
The influence chain of 1, 2, 3 is valid, irrespective of the influence 1 had on 3 directly. I would suggest (as above) that you include a complex case test, OR, change the description of the puzzle to reflect that fact.
I tend toward the increase of test cases, because I've not figured out yet why I can pass all the tests, and now the complex, but still fail some of the tests in the submission.
- after finishing I would suggest the addition of two tests, a single relationship, and a nested relationship as above.