openalice-relay
Architecture rating
Strong substrate adoption: manifest 100/100 valid, AGENTS.md present, drift 90, code_health 90, zero circular deps — uniform with org conventions; small uniform Rust codebase.
Valid manifest (100/100) with clear summary, AGENTS.md and 8 @feature annotations present, but README excerpt is empty and 7 definitions lack docstrings — manifest-strong, prose-light.
Outbound-only Telegram relay (1 runtime dep, no exposed HTTP surface) limits attack surface, but no visible secret-handling, token-scoping, or rate-limit evidence — bot token presumably via env, unverified; graded conservatively on absent signals.
Polling loop with max complexity 17, one god module and 3 deep-nesting sites; CI green but no observable signal for poll timeouts, retry/backoff, or graceful SIGTERM shutdown — core reliability concerns for a long-running poller unverified.
Stateless relay owns zero tables and ships no migrations — appropriate for the design, but there is no schema/constraint/RLS engineering to credit, so the axis is essentially N/A and scored as absent.
Declared RUST_LOG is unused (env drift) and health probe fails (no HTTPS endpoint in manifest) — no metrics, tracing, or working health probe; logging appears wired but under-used.
No tests/ directory and no test signal in inspector AST output for the relay loop or A2A parsing — critical poll/forward path appears entirely untested despite passing CI.
source · auto-grader-2026-06-16
Ecosystem manifest
.atlas-deps.ymlTelegram relay bot that polls the A2A Service and forwards agent messages to a Telegram chat.
- openalice-a2ahttpvia A2A_URLPoll tasks/list (JSON-RPC) to fetch new A2A messages and forward them to Telegram
- A2A_URL
- A2A_API_KEY
- A2A_RELAY_BOT_TOKEN
- A2A_RELAY_CHAT_ID
- A2A_RELAY_CHANNEL
- RUST_LOG
- docker_image: openalice-relay
Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.
- RUST_LOG
Roadmap · what's planned next
- relay.telegram.commandsP3planned1%Inbound Telegram → A2A: parse /reply, /mute, /channels and inject into A2A on behalf of the human operator.
- relay.a2a.websocketP3planned0%Replace 15s poll with A2A WebSocket subscription so relay latency drops to <1s.
- relay.telegram.threadingP4planned2%Forward each A2A channel as its own Telegram topic/thread instead of one flat chat.
- relay.observability.metricsP4planned3%Expose Prometheus counters (messages_forwarded, poll_errors, telegram_send_errors) on a /metrics endpoint.
Code composition
tokei · loc- Rust95.2%
- TOML4.8%
- Rust95.2%
- TOML4.8%
- Rust95.2%· 280
- TOML4.8%· 14
| Language | % code | code | comments | blanks | files |
|---|---|---|---|---|---|
| Rust | 95.2% | 280 | 16 | 32 | 1 |
| TOML | 4.8% | 14 | 0 | 1 | 1 |
| Markdown | 0.0% | 0 | 8 | 3 | 1 |
Telemetry ribbon · last 90 days
1 eventrelay/a2a
2 features- relay.a2a.mark_readsrc/main.rs:224POST /api/v1/messages/{id}/read against A2A — currently unused, relay stays an observer so Alice's monitor owns read-state.since 0.1.0
- relay.a2a.pollsrc/main.rs:106JSON-RPC tasks/list call against the A2A Service, flattening submitted+completed task history into A2AMessage records with from/to/channel metadata.route:A2A_URLsince 0.1.0
relay/bot
1 feature- relay.bot.initsrc/main.rs:54Construct a RelayBot with a tuned reqwest client (30s timeout, 10s connect) and a now-anchored last_seen so restarts don't replay history.since 0.1.0
relay/crate
1 feature- relay.cratesrc/main.rs:6Telegram relay bot binary — polls A2A Service and forwards agent messages to a Telegram chat for human visibility.bin:openalice-relaycrate:openalice-relaysince 0.1.0
relay/telegram
4 features- relay.a2a.telegramsrc/main.rs:260Poll A2A messages and forward each new one as an HTML-formatted Telegram message.since 0.1.0
- relay.telegram.auto_chat_idsrc/main.rs:355Bootstrap path — when A2A_RELAY_CHAT_ID is unset, long-poll Telegram getUpdates until the first inbound message reveals a chat id.since 0.1.0
- relay.telegram.formatsrc/main.rs:237Render an A2A message as HTML for Telegram — colour-coded emoji per sender, escaped from/to, timestamp, body.since 0.1.0
- relay.telegram.sendsrc/main.rs:76POST a message to Telegram Bot API sendMessage with HTML parse mode and disabled link previews; logs body on non-2xx without failing the loop.route:https://api.telegram.org/bot{token}/sendMessagesince 0.1.0