Repository navigation
fix: clear the two main breaks in backend tests - #34646
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change is a test-double method that matches the real Notes
[DESIGN-REVIEWED] c358a03 Description read[DESCRIPTION-READ] 311d23353848fcf4fc41b4ffeb1871d0f407c3f1a5db00b8bb48dcd7a38f1475 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: |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
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: |
The pending-approval sweep in apply_approval_mode reads slot.approval_instance(aid) since #27511. #21991 landed its code-channel tests right after with a SimpleNamespace slot that lacks the method, so a Trust change raised AttributeError and seven tests in test_slack_code_channel_approval_prepush.py and test_slack_code_channel_trust_from_slack.py fail on main. Add the method to the shared slot double. markdown-it-py 4.3.0 reads an HTML block opener differently, which fails test_session_markdown on fresh installs. Keep it below 4.3 until #34654 adapts the renderer.
90a570e to
c358a03
Compare
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Approve at c358a03. This clears both breaks that turn main's Backend Tests (3.12) red on 096f6d9: shard 4 (test_session_markdown.py, assert '' == '</script>') and shards 6 and 7 (the Slack code-channel approval and trust tests, assert 'refused' == 'set' and InvalidStateError: Result is not set).
Checked:
- The Slack cause is as described. The sweep in
slot_approval.pynow callsslot.approval_instance(aid), and the_slotfake intest_slack_code_channel_trust_from_slack.pyhad no such attribute. That one fake is imported bytest_slack_code_channel_mode_reaches_workers.pyandtest_slack_code_channel_approval_prepush.pytoo, so adding the method there covers all three failing files. With this PR merged onto current main, those three files pass locally: 153 tests. - The markdown pin is test-environment only in effect:
markdown-it-py>=3,<4.3keeps installs on the 4.2 line, wheretest_a_condition_one_opener_is_closed_as_the_parser_reads_itpasses (5 passed locally on 4.2.0). I could not reproduce the 4.3.0 failure locally, so that half rests on this PR's own CI run. The real renderer change is tracked in #34654. - No product code changes.
Non-blocking:
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed at c358a03. Both main breaks are fixed, and the diff is minimal.
test/test_slack_code_channel_trust_from_slack.py: theSimpleNamespaceslot fake now hasapproval_instance=lambda request_id, message=None: None. That matches the signature of the real_ChatSlot.approval_instancethat #27511 added, and the pending-approval sweep now reads it. ReturningNoneis the same "no row carries a mid" answer that the other fakes in the suite give.setup.cfg:markdown-it-py>=3,<4.3, down from<5, with a comment pointing at #34654 for the 4.3.0 HTML-block change behind thetest_session_markdown.py[long-s]failure. This keeps 3.x and 4.0 to 4.2 allowed, so it is a cap, not a forced downgrade.
All checks are green on this head. The red entries that remain are older runs: cancelled duplicates of PR Hygiene, PR Policy, Sensitive Change Review and GPT 6.1 Review, and two earlier Publish readiness signal runs. Each has a newer passing run of the same check on this head. Earlier failures on this head, all with passing reruns:
- The Dependency License Gate hit a dependency-graph API rate limit.
- The AI lanes failed in their merge-base fetch and human-override steps.
- Backend shard 7 failed on a timing assertion in
test_denied_commands_security_cost.py(0.501s).
The backport of the update fix used main's string dismiss state in UpdateModal, which is a boolean on release, so tsc failed the wheel and desktop builds. The updates facade's type-checking block lacked the _running_version name the step-up module now serves, and the boot apply SIGTERM test waited 10 s, under the 30 s wait-ratchet ceiling. markdown-it-py 4.3.0 (2026-11-10) reads an HTML block opener as ASCII only, which fails test_session_markdown on a fresh install. Keep it below 4.3, as main does since #34646.
Problem / Motivation
Goal: Main’s backend tests pass again: this clears both breaks that fail every branch, the Slack code-channel test fake and the markdown-it-py 4.3 change.
Two separate breaks fail Backend Tests on main and on every PR based on it. Neither can go green alone, because each fix still meets the other break, so both land here.
Seven Slack code-channel tests:
test/test_slack_code_channel_approval_prepush.py:test_a_card_trust_answered_is_rewritten_without_buttons,test_the_clicked_trust_card_is_rewritten_without_buttons,test_a_raise_to_trust_says_ran_under_trust_on_a_worker_card,test_trust_on_a_worker_card_answers_the_click_that_worked,test_a_worker_card_the_cascade_swept_is_written_once_with_its_headertest/test_slack_code_channel_trust_from_slack.py:test_trust_this_channel_approves_the_call_and_puts_the_channel_on_trust,test_a_trust_click_never_answers_another_sessions_call_with_the_same_idfix: bind every approval decide to an owner-bound target #27511 (15:10Z) made
_sweep_pending_approvalsindashboard/chat_api/slot_approval.pycallslot.approval_instance(aid). feat(slack): pick each code channel's agent #21991 (15:24Z) added these tests with aSimpleNamespaceslot that has no such method, so a Trust change throughapply_approval_moderaisesAttributeError(assert refused == set,InvalidStateError: Result is not set). Not fix(telegram): report a Trust press whose grant failed as approved #34517: the same seven fail at feat(slack): pick each code channel's agent #21991’s own merge commit.test/test_session_markdown.py::test_a_condition_one_opener_is_closed_as_the_parser_reads_it[long-s]fails on a fresh install: markdown-it-py 4.3.0 reads an HTML block opener differently (assert "" == "</script>").Why it matters
Every open PR’s Backend Tests (3.12) shards fail on these, so no PR can reach readiness until main is green.
Not a goal
approval_instanceis a real_ChatSlotmethod, and the sweep is right to read it.What changed (motivation → approach → change)
test_slack_code_channel_trust_from_slack.pygainsapproval_instance, returningNonelike a slot whose card names no row;test_slack_code_channel_approval_prepush.pyuses the same double.setup.cfgnarrowsmarkdown-it-py>=3,<5to>=3,<4.3, with a one-line comment pointing at markdown-it-py 4.3.0 no longer reads <ſcript> as a script block; session Markdown export test fails #34654. This is the same change as fix(deps): keep markdown-it-py below 4.3 #34655.Backwards compatibility
Compatible: the test double is test-only, and the pin keeps the 4.x versions already in use (4.2 and below).
Removes nothing: no product behaviour or API changes.
Tests
test_session_markdown.pypass locally on this head; alltest/test_slack_code_channel*.pypassed earlier (1292 passed), and the setup.cfg readers plus these files passed together (1956 passed).Proof: not provable -- test-only change
Manual verification
N/A — unit coverage sufficient: a test double and a version pin.
Related Issues
Follow-up: #34654
Sibling sweep
Swept: git grep -n "_approval_futures" -- test/test_slack_code_channel*.py
Sibling: test/test_slack_code_channel_trust_from_slack.py -- changed here (the shared
_slotdouble)Sibling: test/test_slack_code_channel_approval_prepush.py -- not affected -- it uses the double from trust_from_slack
Sibling: test/test_slack_code_channel_mode_reaches_workers.py -- not affected -- passes on main
Sibling: test/test_slack_code_channel_worker_approvals.py -- not affected -- passes on main
Pattern harvest
Not generalizable: a merge race between two PRs that each passed on their own base, plus an upstream minor release.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project Apache-2.0 license.