Description
Update 2026-11-26 (infra move): the Mattermost manifests are now in dan-petty/homelab.
- The internal-connection setting and the NetworkPolicy to the roadmap Service are a follow-up issue there.
- This issue keeps the code, the
k8s/devops/roadmap-service/manifests, the specs, the ADR lines and the documents here.
Follow-up: dan-petty/homelab#295.
Problem or Motivation
Child 15 of the ADR modernization (#5233). Code. It carries out a decision in force (0021:34; 0 uses in 7 days), so it needs no new decision.
The review of each record that this item changes:
- ADR 0009 (keep (amended by 0021; Status History)): The router, the authentication of each provider and the seam match the code. The consumer takes only issues events since feat(release): release-please makes every release from main #1952, and Mattermost (0 uses in 7 days) goes out in its own PR. The rule becomes 'consumer events are a subset of hook events'. The router stays, not Argo Events (0021:263-274).
- ADR 0021 (amend (Status History and two amending records)): The direction holds (owner, 2026-11-11), but only 2 of its 15 steps are built, and it grew from 3,585 to 7,472 words in 2 days. New rows go to their OpenSpec change and the step order to feat(roadmap): move Service work to Workflows and Valkey #4517. Caps become settings, cache keys fall back, and coordination keys fail closed.
Proposed Solution & Architectural Design
Remove webhooks.py:187, 255-261 and 460-463, service.py:780-789 and 1046-1078, commands/k8s/mattermost_bootstrap.py, cluster_secrets.py:407-408, env.py:164 and the k8s/README.md rows. An OpenSpec change removes the mattermost-roadmap-slash-command spec. A test proves that the Service starts while the old env is still set. Add a Status History line to 0009. A person deletes /roadmap in Mattermost. Take the item out of #4575.
Rules of the ADR process (docs/adr/README.md, #5225) that apply:
- Use one form for a Status History line, 30 words at most: 'YYYY-MM-DD: Amended by ADR NNNN, section S | Amended by the owner decision in #N, section S | Superseded by ADR NNNN | Fact out of date: (#N) | Living detail moved to (#PR).' The PR that makes a fact of a record wrong adds the line (AGENTS.md rule 8). An agent never edits the body of an accepted record.
Keep these constraints on purpose. The review found a reason for each one:
- ADR 0003/0017/0021, the sweep is the source of truth and 'webhooks as the only trigger' stays rejected: 25 of 100 deliveries got 403, and about 116 s are lost at each rollout.
- ADR 0003/0009, one public path with HMAC (401 before the body is parsed), the 413 cap and a rate limit: they stay when the IP list goes.
- ADR 0021, coordination keys fail closed (shared request window, holds, identity halt, locks): a local fallback would let N pods pass the owner's cap.
- ADR 0009, the router and not Argo Events: Argo Events adds at least 4 pods, and a lost delivery stays lost.
Target Subsystem
src/devops_cli/server/, src/devops_cli/commands/k8s/, src/devops_cli/k8s/cluster_secrets.py, src/devops_cli/config/env.py, k8s/README.md, openspec/specs/.
Existing Tool Considered
None. The change removes code.
Acceptance Criteria
- The Mattermost provider goes:
webhooks.py:187, 255-261, 460-463,service.py:780-789, 1046-1078,commands/k8s/mattermost_bootstrap.py,cluster_secrets.py:407-408,env.py:164and the rows ofk8s/README.md. - An OpenSpec change removes the
mattermost-roadmap-slash-commandspec. - A test proves that the Service starts while the old environment value is still set.
- ADR 0009 gets a Status History line. A comment takes the Mattermost step out of feat(service): make the webhook router stateless #4575.
- Person step after the merge: delete the
/roadmapslash command in Mattermost.
Dependencies
This item adds a Status History line to the ADR 0009 file of #5225.
Related
- Tracker: docs(adr): track the ADR modernization #5233. Review source:
docs/adr/at e413c40. - feat(service): make the webhook router stateless #4575 (stateless webhook router).
Source: #5233
Alternatives check of 2026-11-26: not-applicable.
Class: refactor, no model call.
Tool: none found.
Proposed design
Problem statement
The Service still carries a Mattermost webhook provider and a /roadmap slash command, and the dashboard, the specs and the documents still describe them. ADR 0021 in force holds the owner decision of 2026-11-11 that removes them, after 0 uses. One pull request removes the provider, the responder, the command token, the cluster secret row, the Deployment environment value, the roadmap-service-ingress Mattermost rule, the chat-command counter and its panel, the docs and the OpenSpec capability. It keeps the Mattermost alerts and deploys bootstrap, and it records the change in the Status History of ADR 0009 and ADR 0021. The live /roadmap deletion and the #4575 comment go to the follow-up #6587, after the merge.
Acceptance criteria
Requirement: Mattermost provider, /roadmap responder and chat counter removed
The Service SHALL declare no Mattermost webhook provider, no /roadmap responder and no devops_cli_service_chat_commands_total counter.
Scenario: Grep the server package and the counter name
- WHEN The check runs
! git grep -n -I -F -i mattermost src/devops_cli/server src/devops_cli/config/constants.pyand! git grep -n -I -F devops_cli_service_chat_commands_total src/ tests/. - THEN Both commands exit 0 and print nothing.
Requirement: Command token removed from the settings and the secret table
The CLI SHALL declare no mattermost.command_token credential and no cluster secret entry for DEVOPS_CLI_MATTERMOST_COMMAND_TOKEN.
Scenario: Grep the settings and the secret table
- WHEN The check runs
! git grep -n -I -F "mattermost.command_token" src/and! git grep -n -I -F DEVOPS_CLI_MATTERMOST_COMMAND_TOKEN src/. - THEN Both commands exit 0 and print nothing.
Requirement: Bootstrap command keeps the alerts and deploys hooks
devops k8s bootstrap-mattermost SHALL create the team, the channels and the alerts and deploys webhooks, and SHALL create no slash command.
Scenario: Grep the slash-command step and run the bootstrap tests
- WHEN The check runs
! git grep -n -I -F _ensure_slash_command src/anduv run devops ci test tests/commands/test_k8s_bootstrap_mattermost.py. - THEN Both commands exit 0, the grep prints nothing, and the tests record no
mmctl command createcall.
Requirement: Service starts with the old Mattermost environment value
The Service MUST start when DEVOPS_CLI_MATTERMOST_COMMAND_TOKEN is still set in the environment.
Scenario: Create the Service with the old value
- WHEN The check runs
uv run devops ci test tests/server/test_mattermost_removed.py; the test setsDEVOPS_CLI_MATTERMOST_COMMAND_TOKENto a webhook URL and callscreate_service_app. - THEN The test passes, the app declares no
/webhooks/mattermostroute and the settings hold nomattermost.command_token.
Requirement: Cluster manifests carry no command token and no Mattermost ingress rule
The roadmap-service Deployment MUST NOT set DEVOPS_CLI_MATTERMOST_COMMAND_TOKEN, and roadmap-service-ingress SHALL admit no connection from the Mattermost namespace.
Scenario: Validate the k8s tree and grep the token
- WHEN The check runs
! git grep -n -I -F DEVOPS_CLI_MATTERMOST_COMMAND_TOKEN k8s/anduv run devops ci --check --only k8s. - THEN Both commands exit 0, and the
k8srow reports no failure.
Requirement: Chat-command panel and counter requirement removed
The roadmap-service dashboard SHALL hold no panel for devops_cli_service_chat_commands_total, and the roadmap-service-counters delta SHALL drop the chat-command label set.
Scenario: Grep the dashboards and lint them
- WHEN The check runs
! git grep -n -I -F devops_cli_service_chat_commands_total k8s/anduv run devops grafana dashboards lint k8s/devops/dashboards. - THEN The grep prints nothing and the lint exits 0 with no error.
Requirement: The mattermost-roadmap-slash-command capability is removed
The change SHALL remove each requirement of mattermost-roadmap-slash-command, rename mattermost-bootstrap-webhooks-and-slash-command to mattermost-bootstrap-webhooks, and drop the slash command and its token from mattermost-bootstrap through its spec deltas.
Scenario: Archive the change and validate the specs
- WHEN The last commit runs
uv run devops openspec archive <change>anduv run devops ci --check --only openspec. - THEN The archive prints
Archivedand theopenspecrow exits 0.
Requirement: The documents describe no Mattermost slash command
The documentation SHALL describe no /roadmap Mattermost slash command and no mattermost.command_token.
Scenario: Regenerate and check the docs
- WHEN The check runs
uv run devops docs generate,uv run devops ci --check --only docsand! git grep -n -I -F -i /roadmap k8s/README.md docs/CLUSTER.md. - THEN All three commands exit 0, and the grep prints nothing.
Requirement: ADR 0009 and ADR 0021 record the change in their Status History
The pull request MUST add one Status History line to ADR 0009 and one to ADR 0021 that names #5257 as the step that deletes the Mattermost provider, and MUST NOT change either body.
Scenario: Check the ADR records
- WHEN The check runs
uv run devops ci test tests/invariants/test_adr_records.pyandgit grep -n -F '#5257' docs/adr/0009-*.md docs/adr/0021-*.md. - THEN The test passes, both records keep their
body-hash, and each record holds one Status History line that cites#5257.
Requirement: Webhook router and coordination keys stay
The change MUST keep the webhook router, the HMAC check before body parsing, the 413 cap, the rate limit and the coordination keys that fail closed.
Scenario: Run the server tests
- WHEN The check runs
uv run devops ci test tests/server/. - THEN The tests pass.
Existing Tool Considered
The alternatives check in the issue body records not-applicable on 2026-11-26 for class refactor, with Tool: none found. The Mattermost work stays on mmctl, the official, maintained Mattermost CLI that bootstrap-mattermost runs in the pod (openspec/changes/archive/2026-10-31-2945-bootstrap-mattermost/proposal.md:52). It lacks a declarative apply: each team, channel, webhook and command is a separate mmctl call over kubectl exec, so the command keeps its own Python steps and this change deletes only their command step. The change removes code and builds no replacement, so it has no build, keep or fix cost.
Key questions
- Which files and lines hold the Mattermost webhook provider and its
/roadmapcommand?: The provider and the responder are insrc/devops_cli/server/routes/webhooks.py, with the token check at 709-712 and the chat-command counter at 42 and 241. The token reachessrc/devops_cli/server/service.py:886-900and 1275-1314,src/devops_cli/config/env.py:201,src/devops_cli/k8s/cluster_secrets.py:726-727andsrc/devops_cli/commands/k8s/mattermost_bootstrap.py:278-335. The product manifests arek8s/devops/roadmap-service/deployment.yaml:132-137andk8s/devops/roadmap-service/networkpolicy.yaml:34-44. The counter issrc/devops_cli/config/constants.py:1905andsrc/devops_cli/server/counter_series.py:23,170, its panel isk8s/devops/dashboards/roadmap-service-telemetry.json:779, and its requirement isopenspec/specs/roadmap-service-counters/spec.md:24. The tests aretests/server/test_mattermost_slash_command.py,tests/commands/test_k8s_bootstrap_mattermost.py,tests/telemetry/test_service_counter_series.py:209andtests/telemetry/test_telemetry_instruments.py:34. [sources: src/devops_cli/server/routes/webhooks.py:709-712, src/devops_cli/server/routes/webhooks.py:42, src/devops_cli/server/service.py:886-900, src/devops_cli/config/env.py:201, src/devops_cli/k8s/cluster_secrets.py:726-727, src/devops_cli/commands/k8s/mattermost_bootstrap.py:278-335, k8s/devops/roadmap-service/deployment.yaml:132-137, k8s/devops/roadmap-service/networkpolicy.yaml:34-44, src/devops_cli/config/constants.py:1905, src/devops_cli/server/counter_series.py:170, k8s/devops/dashboards/roadmap-service-telemetry.json:779, openspec/specs/roadmap-service-counters/spec.md:24, tests/server/test_mattermost_slash_command.py, tests/commands/test_k8s_bootstrap_mattermost.py] - Which record in force authorizes the removal, and does it need a new owner decision?: ADR 0021 in force holds the owner decision of 2026-11-11: the stateless router step deletes the Mattermost provider and its
/roadmapcommand, after 0 uses in 7 days (ADR 0021:316). The reply of 2026-11-26 records 0 uses in 30 days, so the decision still holds and needs no new owner decision. ADR 0009 names the Mattermost slash command as the only chat sender (ADR 0009:21) and its Status History already notes that the provider goes away (ADR 0009:45), so it gets a dated line. [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:316, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md:21, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md:45] - Does the change remove the whole
mattermost_bootstrap.pyor only its/roadmapstep?: Remove only the/roadmapstep ofdevops k8s bootstrap-mattermost:_ensure_slash_command, itsmmctl commandcalls, themattermost.command_tokenkeyring store and the help text that names slash commands. Keep the team, channel and alerts/deploys webhook steps, because Alertmanager and Argo CD still post to Mattermost and themattermost-bootstraprequirements for them stay in force. (best practice) [sources: openspec/specs/mattermost-bootstrap/spec.md:30-38, docs/CLUSTER.md:138-143, src/devops_cli/commands/k8s/mattermost_bootstrap.py:278-335, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:316]- Chosen: Remove only the
/roadmapstep. ADR 0021 names the provider and the slash command only, and the alerts and deploys bootstrap stays in force for Alertmanager and Argo CD. - Rejected: Delete the whole
mattermost_bootstrap.py. It removes the only automation of the alerts and deploys hooks that Alertmanager and Argo CD still use, and breaks themattermost-bootstraprequirements that stay.
- Chosen: Remove only the
- How does the pull request record the change in ADR 0009 and ADR 0021?: Add one dated Status History line to each record and change no body text. ADR 0009's body names Mattermost's slash command as the only chat sender (0009:21) and ADR 0021's body names feat(service): make the webhook router stateless #4575 as the step that deletes the provider (0021:316); this pull request makes both wrong. Use
YYYY-MM-DD: Fact out of date: the Mattermost webhook provider and its /roadmap command are removed (#5257).in 0009 andYYYY-MM-DD: Fact out of date: #5257, not #4575, deletes the Mattermost provider and its /roadmap command (#5257).in 0021, each 30 words or fewer after the date. Thebody-hashof each record stays. (best practice) [sources: docs/adr/README.md:54, docs/adr/0009-one-webhook-router-delivers-each-event-to-the-consumers-subscribed-to-it.md:21, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:316, tests/invariants/test_adr_records.py]- Chosen: One Status History line on each of ADR 0009 and ADR 0021. The ADR process gives the fixed form, and the same pull request that makes a fact of each record wrong adds the line.
- Rejected: Only ADR 0009. It leaves ADR 0021 naming feat(service): make the webhook router stateless #4575 as the step that deletes the Mattermost provider, which this pull request makes wrong.
- Rejected: Edit the body of ADR 0009 or ADR 0021. An agent never edits the body of an accepted record, and the invariant test fails on a changed
body-hash. - Rejected: Write a new amending ADR. One provider is a detail, and the Status History line records it.
- How does the change remove the
mattermost-roadmap-slash-commandspec?: The change folder holds a delta that removes all requirements ofmattermost-roadmap-slash-command, including the requirement for the Mattermost internal connection and both network rules. It holds a RENAMED delta that takesmattermost-bootstrap-webhooks-and-slash-commandtomattermost-bootstrap-webhooks, MODIFIED deltas that drop the slash command and its token frommattermost-bootstrap, and a MODIFIED delta that drops the chat-command label set fromroadmap-service-counters. The last commit runsuv run devops openspec archive <change>. (best practice) [sources: CONTEXT.md, docs/SDLC.md, openspec/specs/mattermost-roadmap-slash-command/spec.md:56-60, openspec/specs/mattermost-bootstrap/spec.md:30-38, openspec/specs/roadmap-service-counters/spec.md:24]- Chosen: Spec deltas and archive. The archive is the only writer of
openspec/specs/, and readiness refuses a pull request that writes it. - Rejected: Delete the spec folder by hand. A hand edit of
openspec/specs/breaks the one writer of a spec and the readiness check.
- Chosen: Spec deltas and archive. The archive is the only writer of
- What of the slash-command path is outside this repository?:
k8s/holds onlyREADME.mdanddevops/, sok8s/mattermost/mattermost.yamlis no longer here:k8s/README.md:372points the Mattermost rollout and its operations tok8s/README.mdof dan-petty/homelab. The untrusted-internal-connection setting and the Mattermost-side egress rule go to the homelab follow-updan-petty/homelab#295. This item keeps the code,k8s/devops/roadmap-service/(the Deployment value and ingress rule 3 ofroadmap-service-ingress), the specs, the ADR lines and the documents. [sources: k8s/README.md:372, k8s/devops/roadmap-service/networkpolicy.yaml:34-44, k8s/devops/roadmap-service/deployment.yaml:132-137, openspec/specs/mattermost-roadmap-slash-command/spec.md:56-57] - Where do the live
/roadmapdeletion and the feat(service): make the webhook router stateless #4575 comment go?: Both go to the follow-up chore(mattermost): delete the /roadmap command and update #4575 after #5257 #6587, which is filed for these two steps and waits for this item: a person deletes the/roadmapcommand in the live Mattermost team, and a comment takes the Mattermost step out of feat(service): make the webhook router stateless #4575. This pull request delivers the code, manifests, specs, ADR lines and documents only. The live command and the tracker comment need the merge first, so neither blocks the code change, and the live value ofDEVOPS_CLI_MATTERMOST_COMMAND_TOKENstays in the keyring and Secret until a person removes it. (best practice) [sources: docs/CLUSTER.md:138-143, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:316, k8s/README.md:185, k8s/README.md:256]- Chosen: The follow-up chore(mattermost): delete the /roadmap command and update #4575 after #5257 #6587, after this item merges. The live team and the issue tracker are outside the repository, so no test or pull-request step proves them; chore(mattermost): delete the /roadmap command and update #4575 after #5257 #6587 is filed for exactly these two steps and waits for this item, which keeps this pull request on code, manifests, specs, ADR lines and documents.
- Rejected: Both in this pull request. A pull request cannot delete the live Mattermost command or comment on feat(service): make the webhook router stateless #4575 before its own merge, so neither step has a proof in the pull request.
- Rejected: Leave both with no owner. ADR 0021:316 names feat(service): make the webhook router stateless #4575 as the step that deletes Mattermost, so feat(service): make the webhook router stateless #4575 stays wrong, and the live
/roadmapcommand keeps failing once the route goes.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 12, 2026
Both concern the /roadmap Mattermost slash command; #1395 built it, this candidate removes it.devops-cli-service commentedon Nov 16, 2026
Alternatives check: not-applicable
Class: refactor. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Owner question: Can the pull request delete the
/roadmapslash command in Mattermost? (a person decides)Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
dan-petty commentedon Nov 26, 2026
Note from the premise check of dan-petty/homelab#295 (2026-11-26).
mattermost-roadmap-service) and chore(mattermost): delete the /roadmap command and update #4575 after #5257 #6587 wait for it. homelab#295 is returned as early, and its comment holds the evidence.openspec/specs/mattermost-roadmap-slash-command/spec.md:56-57is in force and requires the Mattermost setting and both network policy rules. The live team still has/roadmap, and Secretdevops/devops-clistill has a value forDEVOPS_CLI_MATTERMOST_COMMAND_TOKEN.roadmap-service-ingress,k8s/devops/roadmap-service/networkpolicy.yaml:34-44.k8s/mattermost/mattermost.yamlis no longer in this repository, so the pull request of this item cannot remove that setting.mattermostand 0/roadmapcommands. The decision of 2026-11-11 (ADR 0021:316) still holds.devops-cli-service commentedon Nov 27, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
chore(main): release 0.247.0 (#7752)
devops-cli-service commentedon Nov 29, 2026
Released in v0.247.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.247.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:17 UTC