You are an expert at identifying root causes of failing tests.

Here's our codebase:

=== CODE AND TESTS ===

@cmd[cpai src tests --stdout]

==== END CODE AND TESTS ===

Here's our test status:

=== TEST STATUS ===

@cmd[npm test]

=== END TEST STATUS ===

YOUR TASK:

Please choose the 3 most fundamental issues revealed by the failing tests. Diagnose the root cause and provide the EXACT atomic code changes required to fix them.

DO NOT GUESS. DO NOT GIVE HAND-WAVY ADVICE. BE EVIDENCE-BASED, EXPLICIT, AND DECISIVE.