Project revival, cleanup and robustness #1

Merged
alban merged 48 commits from dev/alban into master 2026-10-15 20:15:36 +00:00
Owner
No description provided.
It's caused an infinit loop. Now some point in (0, 0) with no light ar
added instead of added empty frame.
add some point at begin and endm beacause angles wasn't calculate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings angle_correction transformer, replicate empty-frame fix,
Point::dot helpers and debug-output cleanup. Conflicts resolved in
favour of dev/alban (etherdream/helios devices, framerate, intensity),
since lapin's side was mostly the older code reformatted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aligns with the release workflow already running on this Forgejo:
ubuntu-latest runner, checkout@v5, release from master via git-cliff,
publish in the same workflow since tags pushed with the workflow token
do not trigger other workflows. Release commit also bumps Cargo.toml
and Cargo.lock so the crate version matches the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unused imports and Etherdream ping() removed; Framerate kept with a
documented allow(dead_code) until main-loop pacing is decided. The
never_loop error in Etherdream draw() is left for a separate change
since fixing it may alter DAC pacing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Color * u8 divided instead of multiplying: intensity 0 (laser off)
panicked with divide by zero and values over 255 wrapped. With the
template config the transformer also ran before the cap in the frame
pipeline, so colours were distorted then capped.

Intensity is now only Color::capped(max) in the frame pipeline. The
intensity transformer is kept as a no-op that warns at load, so
configs copied from the old template still parse; it is removed from
copyme.settings.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous loop always broke on its first pass and read capacity
once, so a full buffer only caused a single 100ms sleep before
sending anyway. draw() now polls capacity every 10ms, pinging the DAC
to refresh its status, and gives up after 1s with a warning so a
stalled DAC cannot hang the main loop. Needs validation on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use matches! in config tests. Keep PlaybackState and EDH names, which
are written to or mirror Redis keys, with documented allows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts 4b0f904. ADR-0001..0003 and ROADMAP.md were authored by the agent
without the owner's content or approval. Task files no longer reference them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores ROADMAP.md removed by e2a2d54, keeping only the angle correction
entry. Trims the AGENTS.md workflow section to the owner's wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only call had been commented out since 2023.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draw() polled status() with no limit and wrote the frame when status()
failed. It now polls at most `status_poll_attempts` times (default 1024,
as in the Helios SDK example) and returns an error without writing.

Adds the HeliosDac port, mocked with mockall (dev-dependency, ADR-0001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Waiting for buffer room pinged the DAC every 10 ms. It now estimates
fullness from the last ACK and the point rate, and sleeps for the
missing points plus 500 µs, as libetherdream does. A full buffer that
is not playing waits 1 ms and sends.

draw() ignored its speed: the stream stayed at 20 000 pps. A new speed
now queues a point rate change applied from the first point of the
next chunk.

Adds the EtherdreamStream and Clock ports with hand-written fakes
(ADR-0001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When no broadcast from the configured IP arrived within 5 broadcasts,
startup panicked. It now returns EtherdreamNotFound naming the IP.
Removes the EtherdreamConnectError variant, which could not occur.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Startup now listens for broadcasts until the configured DAC appears,
logging each timeout. A send that fails with an IO error triggers a
reconnect; the configured point rate is sent again afterwards. A failed
reconnect is logged and retried on the next IO error.

A second Ctrl-C exits immediately (code 130), so a blocked wait can be
interrupted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Startup panicked on missing /clientkey, /EDH, /kpps or /intensity keys.
Missing keys are now created with LJ defaults (SET NX, never
overwriting) and invalid values return an error naming the key.

Redis and device errors in the main loop no longer exit the tracer:
the error is logged, the loop waits retry_delay_ms (default 1000) and
reconnects to Redis when the connection failed. Startup retries until
Redis answers or Ctrl-C.

Order 9 (power off) now stops the tracer explicitly; it previously
exited through an out-of-range error.

Adds the KeyValueStore port, mocked with mockall (ADR-0001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds tests for flip_horizontal, flip_vertical, grid,
helios_to_etherdream, replicate, rotate and translate. Flipping around
a non-zero axis returns c - v instead of 2c - v; those two tests are
ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Points were mapped to c - v instead of 2c - v, so any non-zero axis
shifted the frame instead of mirroring it. Axis 0 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orders that draw nothing and the Dummy device polled Redis without
pause. Both now wait `idle_delay_ms` (default 50, i.e. 20 iterations
per second). Helios and Etherdream draws stay paced by their buffers.

FakeClock moves to the clock module to be shared by device tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing needs it: non-draw orders are reset to 0 after one read, and a
busy loop on the Dummy device is acceptable. FakeClock stays in the
clock module.

This reverts commit 8a16a72.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Dockerfile: multi-stage build on Rust 1.77.2, slim Debian runtime.
- compose.yml: tracer + Valkey (valkey/valkey:8) with the named volume
  valkey-data, Valkey bound to 127.0.0.1. The tracer uses the host
  network (Etherdream discovery is a UDP broadcast) and stops on SIGINT.
- compose.helios.yml: USB bus + cgroup rule for Helios, no privileged.
- run.py (python3 stdlib only): docker, raw, test, down subcommands,
  --dac/--config flags or prompts, --dry-run. `test` runs a Dummy tracer
  against a throwaway Valkey and removes its volume on exit.

New external image: valkey/valkey:8 (approved by the user).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runner is Docker-in-Docker: job files are invisible to the daemon,
so the settings file now reaches the tracer as compose `configs.content`
(LJ_SETTINGS) instead of a bind mount. Same behaviour locally.

The e2e job follows the runner pattern (runs-on: docker, root, docker
CLI from apt, compose and buildx pinned and checksum-verified).
run.py exits with a clear message on Python older than 3.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci: 👷 run every job on the Docker-in-Docker runner pattern
All checks were successful
release / test (push) Successful in 4m28s
release / e2e (push) Successful in 4m36s
release / release (push) Has been skipped
release / publish (push) Has been skipped
release / test (pull_request) Successful in 5m56s
release / e2e (pull_request) Successful in 4m55s
release / release (pull_request) Has been skipped
release / publish (pull_request) Has been skipped
5540990812
test, release and publish move from ubuntu-latest + sudo to
`runs-on: docker` (root, no sudo), like e2e:
- system packages from apt, git installed before checkout where the
  history is needed (release, publish);
- actions/checkout@v4, the version known to work on this instance;
- coverage upload is continue-on-error, the instance may refuse
  artifacts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge branch 'master' into dev/alban
Some checks failed
release / e2e (push) Has been cancelled
release / release (push) Has been cancelled
release / publish (push) Has been cancelled
release / test (push) Has been cancelled
release / test (pull_request) Successful in 3m48s
release / e2e (pull_request) Successful in 3m12s
release / release (pull_request) Has been skipped
release / publish (pull_request) Has been skipped
254acc80da
Conflicts with a45abd6 resolved on the dev/alban side, which already
replaces or covers its changes (Framerate removed, init_world_state
rewritten, Etherdream wait without pings, grid literals). Carried over
from master:
- Etherdream: ignored broadcasts are logged at warn with the reason
  (ipv6, or expected vs received IP);
- SineWave: u16::MAX / i16::MIN / i16::MAX instead of std:: paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alban merged commit f3bc811beb into master 2026-10-15 20:15:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
protonphoton/lj_rust!1
No description provided.