Skip to content

feat: readiness check — continuous topic health monitor#25

Merged
shreyasgokhale merged 7 commits intotrunkfrom
feat/readiness-check
Apr 15, 2026
Merged

feat: readiness check — continuous topic health monitor#25
shreyasgokhale merged 7 commits intotrunkfrom
feat/readiness-check

Conversation

@shreyasgokhale
Copy link
Copy Markdown
Contributor

Summary

  • Adds continuous health monitoring that subscribes to expected ROS2 topics via rosbridge and verifies messages are actively being published (subscribe-and-wait-for-one-message, not just topic name existence)
  • Topics derived from RDF capabilities + task verb requirements via build_topic_checks(), not hardcoded
  • 10s polling health monitor thread in DefinedSession with status-change-only event emission
  • TUI status bar shows ✓ 8/8 topics OK or ⚠ 5/6 — /map MISSING
  • defined check CLI command for one-shot readiness probe (exit 0/1)
  • Pre-mission health warning (non-blocking) when required topics are down
  • session.latest_readiness property for E2E test assertions

Spec: knowledge_base/specs/readiness-check.md

Key files

  • transport/readiness.py — data model (TopicCheck, TopicResult, ReadinessReport) + topic builder
  • transport/rosbridge.py — parallel subscribe via Twisted reactor
  • mission/session.py — health monitor thread, pre-mission warning
  • tui/panels/status_bar.py — health reactive field
  • main.pydefined check CLI command

Test plan

  • 24 unit tests for data model + topic builder
  • 5 transport tests for check_readiness
  • 4 session tests for health monitor
  • 4 TUI tests for health status bar
  • CLI integration test for defined check
  • 388/388 total tests passing, zero regressions
  • E2E: start sim, defined check, verify all topics green
  • E2E: kill Nav2, verify status flips to degraded within 10s

🤖 Generated with Claude Code

shreyasgokhale and others added 7 commits April 15, 2026 17:35
TopicCheck, TopicResult, ReadinessReport dataclasses for
topic health verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CAPABILITY_TOPICS mapping and build_topic_checks() that derives
expected topics from RDF capabilities and task verb requirements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Parallel topic subscription via Twisted reactor. Each topic gets
a subscribe-and-wait-for-one-message probe. Total wall time bounded
by slowest topic timeout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
10s polling loop checks topic readiness via transport. Emits
health events on status change. Pre-mission warning when topics
are missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Status bar displays topic health with green/yellow indicators.
/status prints per-topic breakdown with latency. Health events
routed to activity log.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
One-shot topic health probe. Connects to rosbridge, checks all
expected topics, prints table, exits 0 (OK) or 1 (failures).
Supports --rdf and --task flags to derive expected topics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move _last_health_ready check inside lock for thread safety
- Add proper TYPE_CHECKING type hints to TransportBase.check_readiness()
- Remove unused world_path/bridge_config_path params from build_topic_checks()
- Remove dead _make_report helper from test_readiness.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@shreyasgokhale shreyasgokhale merged commit ba880b2 into trunk Apr 15, 2026
4 checks passed
@shreyasgokhale shreyasgokhale deleted the feat/readiness-check branch April 15, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant