Repository navigation
test: drop re from the chat_handlers base-name pin - #16695
Conversation
The note-source change replaced chat_handlers' only re.compile with the shared SOURCE_LABEL_CTRL_RE and removed the now-unused import re. The composition contract still listed re as a name the facade must bind, so two surface tests failed on main and on every PR cut from it. Nothing reads re off the facade, so the pin drops it. Fixes #16693
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 7d66718 Description read[DESCRIPTION-READ] 1ac82fb5b0349a372a6bcca3ee9a49be4b60459d16a0895d3fa9d9fc9a89b2cc That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: Make
test/test_chat_handlers_composition_contract.pypass again on main and on every PR cut from it.Two tests in that file fail on main since #15917 merged:
test_every_name_the_handlers_bound_at_the_base_still_resolvesfails withassert ['re'] == [].test_a_fresh_interpreter_sees_every_base_public_namefails because the child interpreter reports['re']missing.Why it matters
Every open PR that runs the backend suite inherits these two failures, so its board is red for a reason unrelated to its own diff (seen on #16673, #16680 and #16682).
Not a goal
chat_handlersbinds or exports.What changed (motivation → approach → change)
Symptom: the contract test says the facade no longer binds
re.Root cause: #15917 replaced
chat_handlers' onlyre.compilewith the sharedSOURCE_LABEL_CTRL_REand removed the now-unusedimport re._BASE_NAMESstill listsreas a name the facade must bind.Choice: the pin is stale, not the module. Nothing reads
reoff the facade: a grep ofsrc/andtest/forchat_handlers.re,ch.re.andfrom ... chat_handlers import refinds nothing, and nochat_apiowner module reads a barereglobal (test_every_global_an_owner_function_reads_is_bound_on_the_facadepasses). Bringing the import back would add an unused stdlib import that flake8 rejects as F401.Change: drop
refrom_BASE_NAMES.Backwards compatibility
Compatible: the change edits a test pin only; no product code changes.
Removes nothing:
realready left the module in #15917; this PR only stops the test from demanding it.Tests
pytest -q -n 0 test/test_chat_handlers_composition_contract.py: on origin/main efd0181, 2 failed and 122 passed; with this change, 124 passed.scripts/check_comment_history.py(selftest and diff scope): passed.Manual verification
N/A: the change is a one-word edit to a test pin, and the test file itself is the verification.
Related Issues
Fixes #16693
Pattern harvest
Not generalizable: the pin is a snapshot of one module's names before a split; a later deliberate removal of an unused import is expected to update it, and the test already caught it on the first run.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement