Commit Graph

23 Commits

Author SHA1 Message Date
eric b3063239f7 fix(e2e): deterministic in-range node scenario + log receiver decisions
The sim now observes TX from both nodes (current client fixed observation)
but nothing is ever delivered to the other node. Suspect: random placement
leaving nodes out of range, or the receiver decision. Provide a --from-file
scenario with nodes spaced 10 m apart (guaranteed adjacency) and print the
transmitter -> receivers decision per TX in the sim log.
2026-09-07 21:56:48 -07:00
eric 2198741132 ci(e2e): run simulator with current meshtastic client, not the stale 2.6.1 pin
Meshtasticator's requirements.txt pins meshtastic~=2.6.1, which predates the
meshtastic/meshtasticd image it drives; with the old client the simulator
never observed node TX packets (both e2e directions timed out). The official
meshtastic firmware_harness uses the current client against the same
simulator-mode meshtasticd, so install the sim deps with meshtastic floating
instead of the pinned requirements file.
2026-09-07 21:53:31 -07:00
eric cbef4635cb fix(e2e): instrument sim RF path; graceful shutdown; richer failure logs
Both e2e directions time out: nothing is delivered between nodes although
the adapter connects fine and bridging code is equivalent to meshtastic's own
firmware_harness. Before concluding, instrument the pinned meshtasticator:
- on_receive now prints every observed packet (topic keys) to sim.log,
- a [sim-text] listener prints any text packet any sim interface sees,
- cleanup sends 'exit' through the cmdloop (graceful, no EOF-spam flood that
  was drowning the log tail),
- workflow failure step prints 400 sim-log lines + the node logs dump.
2026-09-07 21:50:26 -07:00
eric 6125130e6a fix(e2e): peer sendText moved to Interface; add RF failure diagnostics
Run 10538 booted the full simulator and ran pytest — both failures were
test-side: the installed meshtastic client moved sendText from Node to the
Interface, and the outbound chunked message never arrived at the peer (cause
still unknown). Fix the sendText call and add in-run diagnostics so the next
failure is self-explaining:

- e2e: outbound-timeout failure now reports what arrived at the peer and the
  simulator log tail; sim now boots with -v (meshtastic debug logging).
- run_e2e.sh: on pytest failure in docker mode, dump per-node meshtasticd
  logs (meshtasticator-nodes.log) before cleanup removes the container.
2026-09-07 21:46:25 -07:00
eric eff352b2ea fix(e2e): headless Graph construction + keep simulator cmdloop alive
Run 10537 reached node boot but the simulator crashed again at Graph
construction: lib/gui.py move_figure() unconditionally touches the Tk window
manager (canvas.manager.window), which does not exist under Agg. Patch it to a
no-op guard alongside the TkAgg->Agg backend swap. Also feed the simulator's
interactive cmdloop from a FIFO held open until teardown — CI stdin is EOF, so
the sim would otherwise exit immediately after booting the nodes.
2026-09-07 21:41:50 -07:00
eric ba31d79368 fix(e2e): headless TkAgg crash + readiness false-positive on forwards
Run 10536 reached pytest but every connect was reset: the simulator died at
import with 'Tkinter is needed' — lib/gui.py calls matplotlib.use("TkAgg")
unconditionally (an explicit use() overrides MPLBACKEND=Agg), and the port
probe passed instantly because it was accepting the localhost forwarders, not
the nodes.

- run_e2e.sh: patch meshtasticator lib/gui.py TkAgg->Agg before boot;
  probe readiness on the upstream host (docker daemon) when forwards are
  active; docker pull meshtastic/meshtasticd up front so the pull is off the
  simulator's node-boot path.
- e2e tests: cancel leftover loop tasks (watchdog) at loop teardown.
2026-09-07 21:33:49 -07:00
eric 58b18d6260 fix(ci): make run_e2e.sh executable; invoke via bash in workflow
First dispatch (run 10535) failed instantly with Permission denied on the
orchestrator: the file lost its executable bit in the branch move. Set mode
100755 and call through bash so a future mode regression cannot break the job.
2026-09-07 21:30:01 -07:00
eric 4485ec3814 ci(e2e): on-demand Meshtasticator e2e job for the docker-enabled runner
Adds .gitea/workflows/meshtasticator-e2e.yaml (workflow_dispatch until
validated green, pull_request trigger commented out): builds the pinned
Hermes contract env like release.yaml, installs the plugin with deps,
checks out Meshtasticator at a pinned commit, installs the simulator's
own (conflicting-version) requirements in an isolated venv, then runs
scripts/meshtasticator_e2e/run_e2e.sh --mode docker.

Supporting changes:
- run_e2e.sh: SIM_VENV support; automatic localhost->daemon TCP forwards
  (scripts/meshtasticator_e2e/tcp_forward.py) when DOCKER_HOST is a tcp://
  daemon, because Meshtasticator hardcodes localhost for its node control
  connections; node-boot settle wait; fixed docker cleanup (container
  'Meshtastic', volume 'Meshtasticator').
- e2e tests: connect via a module-long event loop in a background thread
  (adapter requires a running loop for watchdog + inbound dispatch, so
  per-call asyncio.run was wrong) with retry while the node TCP API boots.
- README: sim-venv guidance, remote-daemon forwarding, CI section.

Docker access follows the deployment examples in
eric/actions-docker (docker is available to runner jobs).
2026-09-07 21:06:01 -07:00
eric a4abb5d15d feat(e2e): Meshtasticator radio-level validation harness for the adapter
Adds a skip-gated end-to-end suite (plugin/tests/e2e) that drives the
adapter against live Meshtasticator simulated nodes - real MeshtasticD
instances speaking the actual TCP/protobuf API - covering the layer no
contract test can reach: TCP handshake, inbound text over the simulated
mesh, and chunked outbound sends arriving at a peer node.

scripts/meshtasticator_e2e/run_e2e.sh boots N nodes (Docker or Linux
native MeshtasticD), discovers their TCP API ports, and runs the suite.
Radio-level reconnect and CI wiring are documented as open items pending
a Linux/Docker validation run.
2026-09-07 21:06:01 -07:00
eric d7aa18682b Merge pull request 'release v0.1.3: bump version, fix publish auth across http->https redirect' (#3) from v0.1.3-final into main
release / test-and-release (push) Successful in 12s
release / contract-test (push) Successful in 17s
v0.1.3
2026-09-08 04:01:44 +00:00
eric b8e9b65995 fix(ci): forward auth token across http->https redirect on release publish
curl drops the Authorization header when -L follows Gitea's 308 redirect from
http server_url to https, so the API replied 'token is required' and publish
failed with no release id. Add --location-trusted to every publish curl.
2026-09-07 21:01:34 -07:00
eric 29b048e066 chore(plugin): release v0.1.3 2026-09-07 21:01:21 -07:00
eric 932171c34d Merge pull request 'fix(ci): follow Gitea http->https redirect when publishing releases' (#1) from ci-publish-fix into main
release / contract-test (push) Successful in 45s
release / test-and-release (push) Failing after 12s
2026-09-08 03:56:33 +00:00
eric cdc67bc263 fix(ci): follow Gitea http->https redirect when publishing releases
server_url resolves to http and Gitea answers the create-release POST with a
308 redirect; curl without -L returned an empty body and the grep-based id
extraction failed under set -e/pipefail, failing v0.1.3 publish. Add -L,
reuse an existing release on retry, and parse with python3.
2026-09-07 20:56:20 -07:00
eric 310c0244df fix(plugin): bind adapter to real Hermes gateway API; add contract-test gate
release / contract-test (push) Successful in 54s
release / test-and-release (push) Successful in 11s
- Resolve the Hermes gateway API lazily via get_adapter_class() so the adapter
  always inherits the real gateway.platforms.base.BasePlatformAdapter instead
  of the ImportError fallback stub (root cause of the AttributeError:
  'set_message_handler' crash at gateway startup).
- Pass Platform('meshtastic') enum to super().__init__ and align
  connect(*, is_reconnect=False) -> bool with the gateway contract.
- Split pure formatting utils into formatting.py; remove the stub fallback.
- Add tests/contract (L0-L3): real-base binding, ABC instantiation, gateway
  run.py wiring replay, signature and event-shape conformance, run against
  hermes-agent pinned to the deployed image source (v2026.8.31).
- Add scripts/contract-test.sh and a contract-test CI job; release publish
  now requires contract tests to pass.
- Untrack stray __pycache__ artifacts.
2026-09-07 20:50:21 -07:00
eric 2d9106b864 fix(plugin): implement BasePlatformAdapter abstract methods and proper build_source event
release / test-and-release (push) Failing after 12s
v0.1.2
2026-09-07 19:45:37 -07:00
eric 7136f8c0fd fix: entry point should reference package module hermes_meshtastic not function
release / test-and-release (push) Successful in 13s
v0.1.1
2026-09-07 19:32:15 -07:00
eric 5e8ef0ee6e fix(ci): create python venv before installing test and build dependencies
release / test-and-release (push) Failing after 12s
v0.1.0
2026-09-07 19:25:23 -07:00
eric d7162ccfae feat: add hermes-meshtastic platform plugin and Gitea Actions release workflow
release / test-and-release (push) Successful in 1m5s
2026-09-07 19:24:10 -07:00
eric 0914bb8ab2 feat: add factory backup for second Heltec V4 node (!1ba1496c) 2026-09-07 18:39:46 -07:00
eric 1b4795ed83 chore: move meshtastic skill to local .agents/skills/ 2026-09-07 18:29:52 -07:00
eric a7e0d65a32 feat: add meshtastic skill definitions and references to repo 2026-09-07 18:28:31 -07:00
eric f6fe5a1987 feat: initial setup for Meshtastic Heltec V4 node, custom CA HTTPS firmware, backups, and tooling 2026-09-07 18:15:58 -07:00