fix: address audit low-hanging fruit — docs accuracy, auction timing, stubs, tests

- Docs: "No Cloud" → "No Cloud AI" (frontend uses CDN for Bootstrap/HTMX/fonts)
- Docs: "600+" → "640+" tests, "20+" → "58" endpoints (actual counts)
- Docs: LND described as "scaffolded" not "gRPC-ready"; remove "agents earn sats"
- Fix auction timing: coordinator sleep(0) → sleep(AUCTION_DURATION_SECONDS)
- agent_core: implement remember() with dedup/eviction, communicate() via swarm comms
- Tests: add CLI tests for chat, think, and backend/model-size forwarding (647 passing)

https://claude.ai/code/session_01SZTwAkTg6v4ybv8g9NLxqN
This commit is contained in:
Claude
2026-02-24 18:29:21 +00:00
parent 0367fe3649
commit 96c9f1b02f
8 changed files with 102 additions and 36 deletions

View File

@@ -27,3 +27,45 @@ def test_status_does_not_use_inline_string():
call_args = mock_timmy.print_response.call_args
assert call_args[0][0] != "Brief status report — one sentence."
def test_chat_sends_message_to_agent():
"""chat command must pass the user message to the agent with streaming."""
mock_timmy = MagicMock()
with patch("timmy.cli.create_timmy", return_value=mock_timmy):
runner.invoke(app, ["chat", "Hello Timmy"])
mock_timmy.print_response.assert_called_once_with("Hello Timmy", stream=True)
def test_think_sends_topic_to_agent():
"""think command must pass the topic wrapped in a prompt with streaming."""
mock_timmy = MagicMock()
with patch("timmy.cli.create_timmy", return_value=mock_timmy):
runner.invoke(app, ["think", "Bitcoin self-custody"])
mock_timmy.print_response.assert_called_once_with(
"Think carefully about: Bitcoin self-custody", stream=True
)
def test_chat_passes_backend_option():
"""chat --backend airllm must forward the backend to create_timmy."""
mock_timmy = MagicMock()
with patch("timmy.cli.create_timmy", return_value=mock_timmy) as mock_create:
runner.invoke(app, ["chat", "test", "--backend", "airllm"])
mock_create.assert_called_once_with(backend="airllm", model_size=None)
def test_think_passes_model_size_option():
"""think --model-size 70b must forward the model size to create_timmy."""
mock_timmy = MagicMock()
with patch("timmy.cli.create_timmy", return_value=mock_timmy) as mock_create:
runner.invoke(app, ["think", "topic", "--model-size", "70b"])
mock_create.assert_called_once_with(backend=None, model_size="70b")