Skip to content

Integration scenarios (T2): the listener, the pipeline and the CLI forms end to end ​

Row T2 of testing-plan.md § Evidence plan. Every Slack call goes through the fake client (client_factory), every ledger write through the fake writer (post_comment), every session delivery through the injected deliver. Run at the PR's head on 2026-09-19.

Command ​

bash
cd cli && uv run python -m pytest -q tests/test_channels_mentions_integration.py tests/test_channels_shortcuts_integration.py tests/test_collaborators_cli.py tests/test_workchannels_cli.py tests/test_channels_records_integration.py

Outcome ​

69 passed in 0.75 s.

Scenario table ​

the-loop scenarios --root . --glob 'cli/tests/test_channels_mentions_integration.py' --glob 'cli/tests/test_channels_shortcuts_integration.py' --glob 'cli/tests/test_channels_records_integration.py' --format markdown (the requirement column is filled where the docstring names one; each file's module docstring names its requirement for the rest):

#FeatureScenarioRequirementLocation
1a Slack conversation reaches the-loop only when addresseda message without the mention leaves no traceR1cli/tests/test_channels_mentions_integration.py:160
2a Slack conversation reaches the-loop only when addresseda mention in a mentions room is inputR1…mentions_integration.py:180
3a Slack conversation reaches the-loop only when addresseda mention under the-loop's own question is input and a plain reply there is notR1…mentions_integration.py:203
4a Slack conversation reaches the-loop only when addresseda mention with a keyword composes the configured keywordR3…mentions_integration.py:241
5a Slack conversation reaches the-loop only when addresseda mentioned top-level message in the central channel is a kickoffR1…mentions_integration.py:259
6a Slack conversation reaches the-loop only when addresseda redelivered mention is processed onceR1…mentions_integration.py:294
7a Slack conversation reaches the-loop only when addresseda DM hears a plain messageR1…mentions_integration.py:314
8a Slack conversation reaches the-loop only when addressedan all room hears a plain messageR2…mentions_integration.py:338
9a Slack conversation reaches the-loop only when addressedpoll mode reads no mention-gated conversation and moves no cursorR1…mentions_integration.py:363
10a Slack conversation reaches the-loop only when addressedhelp answers ephemerally and records nothingR3…mentions_integration.py:397
11a Slack conversation reaches the-loop only when addressedrecord-context snapshots a thread onto the ticket and into the sessionR4…mentions_integration.py:434
12a Slack conversation reaches the-loop only when addressedrecord-context on a top-level message records its thread, never the mentionR4…mentions_integration.py:475
13a Slack conversation reaches the-loop only when addresseda second record-context records only what is newR4…mentions_integration.py:501
14a Slack conversation reaches the-loop only when addressedrecord-decision lands as a marked record and a decision frameR5…mentions_integration.py:573
15a Slack conversation reaches the-loop only when addresseda collaborator may add context but not a decisionR7…mentions_integration.py:627
16a Slack conversation reaches the-loop only when addresseda roster on one work item widens nothing on anotherR7…mentions_integration.py:693
17a message shortcut is exactly the typed mentionthe context shortcut is the typed mentionR6cli/tests/test_channels_shortcuts_integration.py:124
18a message shortcut is exactly the typed mentionthe decision shortcut opens the modal and the submission is the typed mentionR6…shortcuts_integration.py:163
19a message shortcut is exactly the typed mentiona shortcut acts once per triggerR6…shortcuts_integration.py:219
20a message shortcut is exactly the typed mentionthe listener routes app_mention, message_action and view_submissionR1, R6…shortcuts_integration.py:277
21a message shortcut is exactly the typed mentionSlack's own payload shapes drive the three handlersR1, R6…shortcuts_integration.py:342
22a session finds the records it has not foldedchannels records lists the enveloped records of a work itemR4.7, R5.6cli/tests/test_channels_records_integration.py:5

The CLI forms add-collaborator --slack and add-channel --listen are covered by test_collaborators_cli.py and test_workchannels_cli.py in the same run (R2.1, R7.1).

Fixtures ​

The three payload shapes the plan's environment names are checked in under cli/tests/fixtures/slack/ — app_mention.json, message_action.json, view_submission.json — with team, app, trigger and token values replaced by placeholders; scenarios 20 and 21 read them.

Released under the MIT License.