Commit 415d7f5
fix(tests): mark YOLO endpoint tests agent-dependent so CI doesn't false-fail
The /api/session/yolo endpoint relies on tools.approval.{enable,disable,
is_session}_yolo from hermes-agent. routes.py falls back to no-op lambdas
when the import fails — so without the agent:
* POST returns the input value echoed back ({"yolo_enabled": True}),
making POST-only tests false-pass.
* GET always returns False, breaking POST→GET round-trip tests like
test_yolo_post_persists_within_session, which is exactly the test
that's been failing on every CI run for over a day.
This is the same pattern used by other agent-dependent endpoints
(cron, skills) — mark the endpoint test classes with
@requires_agent_modules so they auto-skip when tools.approval is not
importable, and run normally in environments that have hermes-agent.
The 17 static-analysis tests (slash command registration, HTML elements,
CSS classes, i18n coverage) keep running everywhere — they don't need
the agent.
Local suite: 2564 passed, 7 skipped (the YOLO endpoint cluster) on
agent-less environments. Will run all 24 in CI if hermes-agent is wired,
or cleanly skip the 7 endpoint tests when not.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent e1a02d6 commit 415d7f5
1 file changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| 81 | + | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
73 | 92 | | |
74 | 93 | | |
75 | 94 | | |
| |||
0 commit comments