Repository navigation
Check pull requests for undefined names and run unit tests - #12
Merged
Merged
Conversation
The Check job only byte-compiled the code, so a deleted variable (chan_name) reached the server and broke every @ai answer. It now also runs flake8 for syntax errors and undefined names, and the new unit tests in tests/ for the parts that run without the TeamTalk SDK: AI chat (request, PM/channel context, tool calls), AI review, badword filter, abuse tracker and help texts. Both catch the chan_name bug. get_bot_info used an undefined tt5 module; it now reads the versions from version.collect_version_info() like /version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Check job only byte-compiled the code, so the deleted
chan_namevariable (bb518fc) passed Check, was deployed, and broke every@aianswer.What
.github/workflows/deploy.yml) now also:flake8 --select=E9,F63,F7,F82(syntax errors and undefined names; style is not checked);python -m unittest discover -s tests -t ..Deploy still
needs: check, so a failing test also blocks a deploy frommain.tests/: 50 stdlibunittesttests for the modules that run without the TeamTalk SDK:test_ai_chat.py: channel/PM/no-channel-name context lines, history order, retry without tools, error response, tool call →request_tool→ follow-up answer,_extract_tool_callsvariants, background ask/drain, tool definitions well-formedtest_ai_review.py:parse_verdict,format_message(incl.@ainote), request layout, background submit/drain, errorstest_badwords.py: words, stretched spellings, wildcards, phrases, broad-wildcard refusal, saving, default list seeding, every shipped entry usabletest_abuse_tracker.py: stage escalation, per-person counting, window expiry, resettest_help_texts.py: every/helptopic renderstt_client.py:get_bot_infoused an undefinedtt5(the only other flake8 finding); it now usesversion.collect_version_info()like/version.docs/deploy.mdand CHANGELOG describe the checks and how to run them locally.Verified
ai_chat.py, flake8 reportsF821 undefined name 'chan_name'and 4 AI chat tests fail withNameError.The
tt_client.pyintegration tests still need the TeamTalk SDK and are not part of CI yet.🤖 Generated with Claude Code