Skip to content

Make every example run as documented and handle the errors they dropped - #71

Merged
hovsep merged 1 commit into
mainfrom
claude/project-thread-f0ednh
Oct 5, 2026
Merged

hovsep merged 1 commit into
mainfrom
claude/project-thread-f0ednh

Conversation

@hovsep

@hovsep hovsep commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Why

All 15 examples were run the way their READMEs describe.

Before:

  • life with FMESH_GRAPH=1 wrote the graphs and then started the simulation, so make graph hung.
  • nesting ran its inner mesh on context.Background(), so cancellation and the time limit never reached it.
  • graphviz printed Cycle #0 and wrote cycle-000.dot for the graph that says "Cycle: 1".
  • can_bus/advanced: each controller called SetPrefix on the logger the whole mesh shares, so MCU and laptop lines carried a controller's prefix.
  • Many PutSignals/PutPayloads errors were ignored.

After: each runs as documented, every one of those errors is returned or handled, and each controller has its own logger. Builders return errors instead of calling os.Exit.

Also: README fixes (filter, can_bus/basic, life TUI); make test and the life README use CI's 60 minute timeout; pipeline adds its components in one batch; .gitignore covers generated binaries and files.

Builds and vets against the released fmesh v1.17.0. The regenerated life graphs are a separate PR.

@hovsep hovsep self-assigned this Oct 5, 2026
Running each example the way its README says turned up:

- life: FMESH_GRAPH=1 wrote the graphs and then started the
  simulation, so `make graph` hung. It now returns after the graphs,
  and the habitat graph is no longer written twice.
- nesting: the inner mesh ran on context.Background(), so the outer
  run's cancellation and time limit never reached it. Its graph call
  could never fire and is gone.
- graphviz: printed cycle numbers and file names now start at 1, like
  the cycle numbers in the graphs.
- can_bus/advanced: every controller called SetPrefix on the logger
  the whole mesh shares, so MCU and laptop lines carried a
  controller's prefix. Each controller now has its own logger.

The examples ignored the errors of PutSignals, PutPayloads and similar
calls in many places; they are now returned from activation functions
or handled in main. Builders return errors instead of calling os.Exit.

Also: README fixes (filter, can_bus/basic, life TUI), make test and
the life README use CI's 60 minute timeout, pipeline adds its
components in one batch, and .gitignore covers the binaries and files
the examples generate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Y8J4ENomH5Zmc83H86Z8h
@hovsep
hovsep force-pushed the claude/project-thread-f0ednh branch from 2ce3ec8 to 9e8d910 Compare October 5, 2026 13:41
@hovsep
hovsep merged commit ea66a50 into main Oct 5, 2026
2 checks passed
@hovsep
hovsep deleted the claude/project-thread-f0ednh branch October 5, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants