Skip to content

fix: clear the two main breaks in backend tests - #34646

Merged
buluoray merged 1 commit into
mainfrom
crew/conductor/slack-code-channel-slot-double
Nov 10, 2026
Merged

buluoray merged 1 commit into
mainfrom
crew/conductor/slack-code-channel-slot-double

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

  1. 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_header
    • test/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_id

    fix: bind every approval decide to an owner-bound target #27511 (15:10Z) made _sweep_pending_approvals in dashboard/chat_api/slot_approval.py call slot.approval_instance(aid). feat(slack): pick each code channel's agent #21991 (15:24Z) added these tests with a SimpleNamespace slot that has no such method, so a Trust change through apply_approval_mode raises AttributeError (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.

  2. 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

What changed (motivation → approach → change)

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

  • The seven Slack tests and test_session_markdown.py pass locally on this head; all test/test_slack_code_channel*.py passed 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 _slot double)
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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project Apache-2.0 license.

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 16:14
@RohanK6
RohanK6 requested a review from CrysisDeu November 10, 2026 16:14
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision c358a03111849303ec09ec5d8a848a10a64ea9a4 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of c358a03111849303ec09ec5d8a848a10a64ea9a4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change is a test-double method that matches the real _ChatSlot.approval_instance signature, plus a reversible upper pin that defers the markdown-it-py 4.3 change to #34654.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed c358a03111849303ec09ec5d8a848a10a64ea9a4 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c358a03

Verdict parsed from the review's SHA-scoped output markers for commit c358a03111849303ec09ec5d8a848a10a64ea9a4.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c358a03111849303ec09ec5d8a848a10a64ea9a4 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision c358a03111849303ec09ec5d8a848a10a64ea9a4 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of c358a03111849303ec09ec5d8a848a10a64ea9a4 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c358a03

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c358a03111849303ec09ec5d8a848a10a64ea9a4 false-positive: <reason, 20 to 500 characters>

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.
@RohanK6
RohanK6 force-pushed the crew/conductor/slack-code-channel-slot-double branch from 90a570e to c358a03 Compare November 10, 2026 17:09
@RohanK6 RohanK6 changed the title test(slack): give the code-channel slot double approval_instance fix: clear the two main breaks in backend tests Nov 10, 2026
@RohanK6

RohanK6 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Goal widened on request: the Slack test fix and the markdown-it-py <4.3 pin (same as #34655, follow-up #34654) each still fail on the other break, so neither PR can go green alone. Both now land here in one commit.

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.py now calls slot.approval_instance(aid), and the _slot fake in test_slack_code_channel_trust_from_slack.py had no such attribute. That one fake is imported by test_slack_code_channel_mode_reaches_workers.py and test_slack_code_channel_approval_prepush.py too, 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.3 keeps installs on the 4.2 line, where test_a_condition_one_opener_is_closed_as_the_parser_reads_it passes (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:

  • The red "Publish readiness signal" on this head is that lane's own GitHub API read retry, not a test failure; it republishes once CI settles.
  • #34666 and #34669 fix only the Slack half, so they cannot turn main green alone. Once this merges they can close.

@buluoray
buluoray enabled auto-merge (squash) November 10, 2026 17:35
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@buluoray
buluoray merged commit 4477b72 into main Nov 10, 2026
159 of 173 checks passed
@buluoray
buluoray deleted the crew/conductor/slack-code-channel-slot-double branch November 10, 2026 18:56

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at c358a03. Both main breaks are fixed, and the diff is minimal.

  • test/test_slack_code_channel_trust_from_slack.py: the SimpleNamespace slot fake now has approval_instance=lambda request_id, message=None: None. That matches the signature of the real _ChatSlot.approval_instance that #27511 added, and the pending-approval sweep now reads it. Returning None is 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 the test_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).

bolichen97 added a commit that referenced this pull request Nov 11, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants