Tasks: read.mode: gateway
Six tasks, all in this repository. The config parse comes first, because every other code task reads what it produces. The docs task waits for the behaviour to settle.
Task list
- [x] 1. Parse
gateway, and derive interactivity from reachabilityREAD_MODESgainsgateway.SlackChannelConfiggainsgateway: bool, set fromcli_config.gateway_block.gatewaywith no usable block resolves tooff, with an error log that names both keys.- Add the
push_reachableproperty.interactive,command_buttonsandkickoff_pickeruse it in place ofread_mode == "socket". - Update the
poll_oncedocstring. Its code is unchanged. - Depends on: none
- Requirements: R1.1, R1.3, R1.5, R2.1–R2.4, R3.1, R3.3
- Test: T1 + T8,
tests/test_slack_gateway_read_mode.py(parse cases, gates, watcherNone,poll_oncenot skipped, press-time picker refusal, abuse AC1, AC2 and AC4) (red→green)
- [x] 2. Keep a socket from opening beside a gateway
run_socket_listenerrefuses before it reads any token, undermode: gatewayand whenever a block is present.- Add
lifecycle.socket_beside_gateway(config). startandstatusshow a missing-block detail on thedisabledlistener row._start_gateway_clientlogs the migrate warning once.- Depends on: 1
- Requirements: R1.2, R3.3, R4.1–R4.3, R6.2, R6.3
- Test: T1 + T8,
tests/test_slack_gateway_read_mode.py(enabled_services, listener refusals AC3, status rows, the warning) (red→green)
- [x] 3. Make
channels statustell the truthread: gateway — ….- Two
[!]lines: no block, and socket beside a block. commands,mentions,shortcutsand the kickoff line usepush_reachableand name the transport._button_lineshas no app-token step ingatewaymode.- Depends on: 1, 2
- Requirements: R3.2, R4.2, R6.1
- Test: T1,
tests/test_slack_gateway_read_mode.py(status output cases) (red→green)
- [x] 4. Migrate
gateway:+sockettogateway- Add
_migrate_gateway_read_mode, wired intomigrate_cli_config. needs_migrationflags the old form.assert_currentis untouched.- Depends on: 2 (shares
socket_beside_gateway) - Requirements: R4.4, R5.1–R5.3
- Test: T10,
tests/test_migrations.py -k gateway(red→green)
- Add
- [x] 5. Integration scenario through the gateway client's dispatch path
- With
mode: gateway, ablock_actionsapproval press is handled, and an approval notification renders the Approve / Request changes pair. - Gherkin docstrings with
Requirement:links. - Depends on: 1
- Requirements: R1.4, R2.2
- Test: T2,
tests/test_slack_gateway_read_mode_integration.py
- With
- [x] 6. Schema, template and docs
- The schema enum and descriptions (
read.mode, thegatewayblock, the grants that say "needs socket"). templates/cli-config.yamland the gateway template.- The slack-app-manifest comment.
docs/config/cli/channels-options.mdandgateway-options.md.- Capability docs
channels.mdandgateway.md, each with a history row. evidence/documentation.md.- Depends on: 1, 2, 3, 4
- Requirements: NFR documentation
- Test: T11,
uv run pre-commit run --all-files(schema validation, markdownlint, the whole suite)
- The schema enum and descriptions (
Dependency graph (DAG)
Checkpoints
- After each task: run that task's test file, then the neighbouring suites:
cd cli && uv run python -m pytest -q tests/test_channels*.py tests/test_gateway*.py tests/test_core_lifecycle.py tests/test_migrations.py. - After task 6:
uv run pre-commit run --all-files. Then the verification node executestesting-plan.md.