Initial commit: Agentic OS troubleshooting platform
Self-hosted, Docker-based agentic troubleshooting platform: FastAPI backend + LangGraph agent, Next.js UI, tiered LLM routing (local Ollama -> Gemini -> DeepSeek -> OpenRouter), MCP server manager, encrypted device credentials, RBAC, audit log, project-memory + Obsidian integrations, and editable troubleshooting decision rules tuned for the GeneseasX vessel stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
backend/tests/test_task_runtime.py
Normal file
28
backend/tests/test_task_runtime.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Tests for per-task runtime flags."""
|
||||
from app.services.task_runtime import (
|
||||
CANCELLABLE_STATUSES,
|
||||
TaskCancelledError,
|
||||
apply_min_tier_floor,
|
||||
)
|
||||
|
||||
|
||||
def test_cancellable_statuses():
|
||||
assert "running" in CANCELLABLE_STATUSES
|
||||
assert "queued" in CANCELLABLE_STATUSES
|
||||
assert "succeeded" not in CANCELLABLE_STATUSES
|
||||
|
||||
|
||||
def test_task_cancelled_error_message():
|
||||
err = TaskCancelledError("Task cancelled by user")
|
||||
assert "cancelled" in str(err).lower()
|
||||
|
||||
|
||||
def test_apply_min_tier_floor_skips_local():
|
||||
assert apply_min_tier_floor(["local", "economy", "premium"], "economy") == [
|
||||
"economy",
|
||||
"premium",
|
||||
]
|
||||
|
||||
|
||||
def test_apply_min_tier_floor_premium():
|
||||
assert apply_min_tier_floor(["local", "economy"], "premium") == ["premium"]
|
||||
Reference in New Issue
Block a user