Static routing checks for OpenClaw messages, cron jobs, and announce deliveries.
Project description
openclaw-route-check
openclaw-route-check is a small static-analysis CLI for checking where OpenClaw messages, cron jobs, and announce deliveries are expected to route before you rely on them in production.
It focuses only on delivery and routing correctness. It does not send test messages.
Install
pipx install openclaw-route-check
For local development:
uv sync
uv run openclaw-route-check --help
uv run pytest
Examples
openclaw-route-check --job 429c62e0-2b1f-4179-bac3-792f405d09ae
openclaw-route-check --session agent:main:telegram:group:-1003710118964
openclaw-route-check --all-crons --markdown
openclaw-route-check --announce fixtures/announce.json --json
openclaw-route-check --channel telegram --target -1003710118964 --thread 77
By default, --job and --all-crons read ./jobs.json. Use --jobs path/to/jobs.json to point at another file.
What Is Checked
The checker resolves and reports:
- resolved channel
- resolved target or chat
- resolved thread or topic when present
- session target behavior
- routing confidence score
- warnings or errors that are suitable for CI
It detects:
- missing announce target
- mismatched
sessionKeyand delivery target - likely thread/topic loss
- cron jobs relying on implicit routing where explicit routing would be safer
- ambiguous
channel: lastandtarget: lastusage
Supported Inputs
The analyzer intentionally accepts flexible JSON shapes because OpenClaw routing config can appear under different keys. It looks for route fields directly on an object and inside route-like containers such as delivery, announce, route, routing, target, and destination.
Recognized channel-like keys include:
channel, transport, provider, driver, via
Recognized target-like keys include:
target, chat, chat_id, chatId, room, room_id, to, recipient, target_id, targetId, channel_id, channelId
Recognized thread/topic keys include:
thread, thread_id, threadId, topic, topic_id, topicId, message_thread_id, messageThreadId, forum_topic_id, forumTopicId
Session keys are parsed heuristically. A key like this:
agent:main:telegram:group:-1003710118964:topic:77
resolves to:
- channel:
telegram - target/chat:
-1003710118964 - thread/topic:
77
Output Formats
Terminal output is optimized for local inspection:
openclaw-route-check --job implicit-nightly --jobs fixtures/jobs.json
JSON output is suitable for CI automation:
openclaw-route-check --all-crons --jobs fixtures/jobs.json --json
Markdown output works well in GitHub Actions step summaries:
openclaw-route-check --all-crons --jobs fixtures/jobs.json --markdown >> "$GITHUB_STEP_SUMMARY"
Use --strict to return a non-zero exit code on warnings as well as errors.
What Cannot Be Proven Statically
Static analysis cannot prove:
- whether an OpenClaw runtime session still exists
- whether
lastpoints at the conversation you expect - whether credentials, bot membership, or permissions allow delivery
- whether Telegram forum topics or similar thread ids are still valid
- whether runtime code mutates routing after config load
- whether an external provider silently remaps channels, chats, or topics
The tool is best used as a preflight check for config shape and obvious routing risks before a production deploy.
Development
uv sync
uv run pytest
uv run openclaw-route-check --all-crons --jobs fixtures/jobs.json
Releases
This repository includes a tag-driven GitHub Actions release workflow. Tags matching v*.*.* build and publish the Python package to PyPI, then update pfrederiksen/homebrew-tap.
Recommended release flow:
git tag v0.1.1
git push origin v0.1.1
PyPI publishing is configured for trusted publishing via GitHub Actions. Do not commit PyPI tokens. Configure the PyPI project to trust this repository and workflow environment.
The Homebrew tap update requires a GitHub secret named HOMEBREW_TAP_TOKEN with permission to push to pfrederiksen/homebrew-tap.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openclaw_route_check-0.1.1.tar.gz.
File metadata
- Download URL: openclaw_route_check-0.1.1.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c257609bd4088eef9a1562c3b0a52ae4189de2b8bbd886a5b769495f070e46b1
|
|
| MD5 |
ebc8d9c9e00a43f307fafb79eea80556
|
|
| BLAKE2b-256 |
be58e26a6ab7ce4fa66c1d08f533f645f810b027e5f7965d1f9f2f2f0a665f66
|
File details
Details for the file openclaw_route_check-0.1.1-py3-none-any.whl.
File metadata
- Download URL: openclaw_route_check-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac6c1905d3338470a0f905c3b2edcdf66ee681bc9316cf583f491a6baa66198
|
|
| MD5 |
bfbb1e7ea7418a251280965c755a6022
|
|
| BLAKE2b-256 |
cc3256734cab294d14ea365730350e4cdd0ca2a02a74e0319d49f61111393b1f
|