fix(sessions): keep the interactive exclusion spelled as a literal

tests/test_issue2841_show_cron_sessions_toggle.py reads this call site as
SOURCE TEXT (`'("cron", "webhook", "kanban") if source_filter is None'`), so
routing it through the new BACKGROUND_CLI_SOURCES constant turned a
pre-existing test in the maintainer's own shard gate red for a
behaviour-neutral refactor.

Put the literal back at that one call site. BACKGROUND_CLI_SOURCES stays where
the kanban-chip fix actually needs it (the background-source check in
_interactive_row_project_id, and interactive_excluded for both recovery
passes). A new test builds the expected literal FROM the constant and asserts
it appears verbatim in api/models.py, so the two spellings cannot drift
without failing here rather than in an unrelated file.
This commit is contained in:
Rodrigo Gomes da Silva committed 2026-09-24 11:03:46 -03:00
1 parent 05816be3c2
commit 283bf6a047
2 files changed
+26 -1

No files matched your search

+4 -1
View File
@@ -8454,7 +8454,10 @@ def _load_cli_sessions_uncached(
# Background sources have independent bounded passes below. Keeping them
# out of this 20-row interactive window prevents a busy worker source
# (especially kanban) from evicting every CLI/TUI/ACP conversation.
exclude_sources=BACKGROUND_CLI_SOURCES if source_filter is None else None,
# Spelled as a literal on purpose: tests/test_issue2841_show_cron_sessions_toggle.py
# reads this line as source text. Must stay equal to BACKGROUND_CLI_SOURCES
# (pinned by test_background_source_exclusion_literal_matches_the_constant).
exclude_sources=("cron", "webhook", "kanban") if source_filter is None else None,
include_sources=None if source_filter is None else (source_filter,),
)
if source_filter is None: