Skip to content

feat: HTML patrol reports, retention and the report server - #8

Merged
agus-darmawan merged 5 commits into
mainfrom
feat/reports
Nov 1, 2026
Merged

agus-darmawan merged 5 commits into
mainfrom
feat/reports

Conversation

@agus-darmawan

Copy link
Copy Markdown
Member

What and why

Substation operators need the result of a round as a report they can open, print and compare with the last round — not JSON files on the robot. New package hotdog_reports (report_node):

  • A page per patrol (<day>/patrol_<HHMMSS>.html), rendered when patrol/status reports the patrol ended: summary tiles (worst, points, findings per severity, duration, returned to the dock), the points, and per point every finding with value, reference, Δ and the last round of the same finding (site, point, target, check, region / discharge type) with its change — a clamp still normal but 6 °C hotter than yesterday is visible before it crosses a limit. Thermal + visible images, sound map + PRPD, linked from the point folders. Prints on A4 (one point per page), scrolls on a phone.
  • Day and front pages: patrols and points of a day (day.json figures), every day newest first.
  • Served read-only on http://<robot>:8088/ (GET/HEAD only, no cache, .. never leaves the folder; server.host: 127.0.0.1 for SSH-tunnel only).
  • Retention: days older than retention.days (365), then the oldest days while less than retention.min_free_gb (5 GB) is free; today never.
  • Missing pages are rendered at start; reports/rebuild re-renders everything.
  • Bringup starts it (reports, env REPORTS, default on).
  • fix(patrol): tf2_ros dependency for the pose of the way back (feat: patrol watchdog and the way back to the dock #7).
  • Docs: operations (open the reports in a browser, retention), commissioning (port 8088 in the network permit), README, CHANGELOG.

How it was tested

  • pre-commit run on every changed and new file
  • Unit + style (incl. Python 3.8 / Foxy checks): hotdog_reports 12, hotdog 31, hotdog_patrol 24 — patrols and points (old summaries without inspections too), last round, pages, HTML escaping of names and messages, builder (once, missing, everything, a broken summary), retention, the server (files only, .., 404, POST 501)
  • Rendered a two-round sample and checked it in headless Chrome (desktop and 390 px phone width)
  • CI Foxy build + test/ros (pages at start, a page when a patrol ends, the day refreshed by an inspection, rebuild) — needs DHARMA_TOKEN
  • On the robot: http://<robot>:8088/ after a patrol

Checklist

  • Conventional commit titles
  • Parameters documented (config/reports.yaml, README)
  • CHANGELOG entry
  • Safety-relevant: no (read-only server; retention deletes only <reports_dir>/<YYYYMMDD>/ folders, never today)

Generated by Claude Code

@agus-darmawan
agus-darmawan merged commit d5ce734 into main Nov 1, 2026
2 of 3 checks passed
agus-darmawan added a commit that referenced this pull request Nov 1, 2026
feat: HTML patrol reports, retention and the report server
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