Repository navigation
tests: add Python tests for bridges TOFU, Py3.9 compat, and task-file fields (29 tests) - #1226
Closed
bassilkhilo-ag2 wants to merge 1 commit into
Closed
bassilkhilo-ag2 wants to merge 1 commit into
bassilkhilo-ag2 wants to merge 1 commit into
Conversation
VasiliyRad
suggested changes
May 27, 2026
VasiliyRad
left a comment
Contributor
There was a problem hiding this comment.
Same 4-file bundle as #1196/#1194/#1225/#1227/#1228 (build_log.md + health-check.py + multi-PID test + sync-memory-memory-dir test). Plus 2 file-path collisions:
tests/slack-bridge-tofu.test.py(+239) — same path as #1190 (already approved this session, +239 lines). Identical filename, both add from /dev/null.tests/py39-compat-remaining.test.py— yet another py39-compat test, overlapping with #1188 + #1199 (both flagged this session for duplicating the same CI gate).
Strip the bundle, dedupe vs #1190, and reconcile the py39 cluster (pick one of #1188/#1199/this PR's variant) — then this lands as a small clean PR with just tests/discord-bridge-task-file-fields.test.py + tests/telegram-bridge-allowlist.test.py (which appear novel).
This was referenced May 27, 2026
… fields (29 tests) - discord-bridge-task-file-fields.test.py — static audit: channel_name, guild_name, source_message_id fields present in task write block; DM fallback present - py39-compat-remaining.test.py — 5 tests verifying dashboard.py, telegram-bridge.py, and slack-bridge.py parse cleanly under Python 3.9 (no f-string walrus, no match/case) - slack-bridge-tofu.test.py — 10 tests for Slack TOFU access-control onboarding (load_allowed, tofu_onboard, race guard, chmod 600, null username) - telegram-bridge-allowlist.test.py — 8 tests for Telegram allowlist and TOFU onboarding (load_allowed edge cases, tofu_onboard, mode 600, no-clobber) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bassilkhilo-ag2
force-pushed
the
tests/py-bridges-tofu-compat
branch
from
May 27, 2026 00:46
0f77433 to
1b518a6
Compare
Collaborator
Author
|
Rebased onto origin/main (dropped the 4 local-only commits that were contaminating the diff). The branch now has exactly 1 commit — the actual change. Sorry for the noise. |
Collaborator
Author
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.
Summary
discord-bridge-task-file-fields.test.py— static audit verifyingchannel_name,guild_name,source_message_idare written to task files; DM fallback presentpy39-compat-remaining.test.py— 5 tests:dashboard.py,telegram-bridge.py,slack-bridge.pyparse cleanly under Python 3.9 (no f-string walrus, nomatch/case, no duplicate imports)slack-bridge-tofu.test.py— 10 tests for Slack TOFU access-control onboarding:load_allowededge cases,tofu_onboardwritesallowFrom+ timestamps, race guard,chmod 600,nullusername handlingtelegram-bridge-allowlist.test.py— 8 tests for Telegram allowlist and TOFU:load_allowedreturnsNone/empty-set/string-set;tofu_onboardwrites access file, sets mode 600, doesn't clobber existing fileTotal: 29 tests, all passing.
Test plan
python3 -m pytest tests/py39-compat-remaining.test.py tests/slack-bridge-tofu.test.py tests/telegram-bridge-allowlist.test.py --import-mode=importlib→ 24 passedpython3 tests/discord-bridge-task-file-fields.test.py→ PASSorigin/maincontains only test files🤖 Generated with Claude Code